Changeset View
Changeset View
Standalone View
Standalone View
sidebar/SidebarMode.h
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
46 | { | 46 | { | ||
47 | Q_OBJECT | 47 | Q_OBJECT | ||
48 | Q_PROPERTY(QString title READ title NOTIFY titleChanged) | 48 | Q_PROPERTY(QString title READ title NOTIFY titleChanged) | ||
49 | 49 | | |||
50 | public: | 50 | public: | ||
51 | explicit SubcategoryModel(QAbstractItemModel *parentModel, QObject *parent = nullptr); | 51 | explicit SubcategoryModel(QAbstractItemModel *parentModel, QObject *parent = nullptr); | ||
52 | 52 | | |||
53 | QString title() const; | 53 | QString title() const; | ||
54 | QHash<int, QByteArray> roleNames() const override; | ||||
54 | 55 | | |||
55 | void setParentIndex(const QModelIndex &activeModule); | 56 | void setParentIndex(const QModelIndex &activeModule); | ||
56 | 57 | | |||
57 | Q_SIGNALS: | 58 | Q_SIGNALS: | ||
58 | void titleChanged(); | 59 | void titleChanged(); | ||
59 | 60 | | |||
60 | private: | 61 | private: | ||
61 | QAbstractItemModel *m_parentModel; | 62 | QAbstractItemModel *m_parentModel; | ||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | 81 | public: | |||
113 | Q_INVOKABLE void loadModule(const QModelIndex& activeModule); | 114 | Q_INVOKABLE void loadModule(const QModelIndex& activeModule); | ||
114 | 115 | | |||
115 | protected: | 116 | protected: | ||
116 | QList<QAbstractItemView*> views() const override; | 117 | QList<QAbstractItemView*> views() const override; | ||
117 | bool eventFilter(QObject* watched, QEvent* event) override; | 118 | bool eventFilter(QObject* watched, QEvent* event) override; | ||
118 | 119 | | |||
119 | private Q_SLOTS: | 120 | private Q_SLOTS: | ||
120 | void moduleLoaded(); | 121 | void moduleLoaded(); | ||
122 | void updateDefaults(); | ||||
121 | void initWidget(); | 123 | void initWidget(); | ||
122 | 124 | | |||
123 | Q_SIGNALS: | 125 | Q_SIGNALS: | ||
124 | void activeCategoryRowChanged(); | 126 | void activeCategoryRowChanged(); | ||
125 | void activeSubCategoryRowChanged(); | 127 | void activeSubCategoryRowChanged(); | ||
126 | void activeSearchRowChanged(); | 128 | void activeSearchRowChanged(); | ||
127 | void widthChanged(); | 129 | void widthChanged(); | ||
128 | void actionMenuVisibleChanged(); | 130 | void actionMenuVisibleChanged(); | ||
129 | void introPageVisibleChanged(); | 131 | void introPageVisibleChanged(); | ||
130 | 132 | | |||
131 | private: | 133 | private: | ||
132 | class Private; | 134 | class Private; | ||
133 | Private *const d; | 135 | Private *const d; | ||
134 | }; | 136 | }; | ||
135 | 137 | | |||
136 | #endif | 138 | #endif |