Changeset View
Changeset View
Standalone View
Standalone View
sidebar/SidebarMode.h
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | 45 | { | |||
---|---|---|---|---|---|
47 | 47 | | |||
48 | Q_PROPERTY(QAbstractItemModel *categoryModel READ categoryModel CONSTANT) | 48 | Q_PROPERTY(QAbstractItemModel *categoryModel READ categoryModel CONSTANT) | ||
49 | Q_PROPERTY(QAbstractItemModel *subCategoryModel READ subCategoryModel CONSTANT) | 49 | Q_PROPERTY(QAbstractItemModel *subCategoryModel READ subCategoryModel CONSTANT) | ||
50 | Q_PROPERTY(QAbstractItemModel *mostUsedModel READ mostUsedModel CONSTANT) | 50 | Q_PROPERTY(QAbstractItemModel *mostUsedModel READ mostUsedModel CONSTANT) | ||
51 | Q_PROPERTY(int activeCategory READ activeCategory WRITE setActiveCategory NOTIFY activeCategoryChanged) | 51 | Q_PROPERTY(int activeCategory READ activeCategory WRITE setActiveCategory NOTIFY activeCategoryChanged) | ||
52 | Q_PROPERTY(int activeSubCategory READ activeSubCategory WRITE setActiveSubCategory NOTIFY activeSubCategoryChanged) | 52 | Q_PROPERTY(int activeSubCategory READ activeSubCategory WRITE setActiveSubCategory NOTIFY activeSubCategoryChanged) | ||
53 | Q_PROPERTY(int width READ width NOTIFY widthChanged) | 53 | Q_PROPERTY(int width READ width NOTIFY widthChanged) | ||
54 | Q_PROPERTY(bool actionMenuVisible READ actionMenuVisible NOTIFY actionMenuVisibleChanged) | 54 | Q_PROPERTY(bool actionMenuVisible READ actionMenuVisible NOTIFY actionMenuVisibleChanged) | ||
55 | Q_PROPERTY(bool introPageVisible READ introPageVisible WRITE setIntroPageVisible NOTIFY introPageVisibleChanged) | ||||
55 | 56 | | |||
56 | public: | 57 | public: | ||
57 | SidebarMode(QObject * parent, const QVariantList& ); | 58 | SidebarMode(QObject * parent, const QVariantList& ); | ||
58 | ~SidebarMode() override; | 59 | ~SidebarMode() override; | ||
59 | QWidget * mainWidget() override; | 60 | QWidget * mainWidget() override; | ||
60 | void initEvent() override; | 61 | void initEvent() override; | ||
61 | void giveFocus() override; | 62 | void giveFocus() override; | ||
62 | KAboutData * aboutData() override; | 63 | KAboutData * aboutData() override; | ||
63 | ModuleView * moduleView() const override; | 64 | ModuleView * moduleView() const override; | ||
64 | QAbstractItemModel *categoryModel() const; | 65 | QAbstractItemModel *categoryModel() const; | ||
65 | QAbstractItemModel *subCategoryModel() const; | 66 | QAbstractItemModel *subCategoryModel() const; | ||
66 | QAbstractItemModel *mostUsedModel() const; | 67 | QAbstractItemModel *mostUsedModel() const; | ||
67 | 68 | | |||
68 | int activeCategory() const; | 69 | int activeCategory() const; | ||
69 | void setActiveCategory(int cat); | 70 | void setActiveCategory(int cat); | ||
70 | 71 | | |||
71 | int activeSubCategory() const; | 72 | int activeSubCategory() const; | ||
72 | void setActiveSubCategory(int cat); | 73 | void setActiveSubCategory(int cat); | ||
73 | 74 | | |||
74 | int width() const; | 75 | int width() const; | ||
75 | 76 | | |||
76 | bool actionMenuVisible() const; | 77 | bool actionMenuVisible() const; | ||
77 | 78 | | |||
79 | bool introPageVisible() const; | ||||
80 | void setIntroPageVisible(const bool &introPageVisible); | ||||
81 | | ||||
78 | Q_INVOKABLE QAction *action(const QString &name) const; | 82 | Q_INVOKABLE QAction *action(const QString &name) const; | ||
79 | // QML doesn't understand QIcon, otherwise we could get it from the QAction itself | 83 | // QML doesn't understand QIcon, otherwise we could get it from the QAction itself | ||
80 | Q_INVOKABLE QString actionIconName(const QString &name) const; | 84 | Q_INVOKABLE QString actionIconName(const QString &name) const; | ||
81 | Q_INVOKABLE void requestToolTip(int index, const QRectF &rect); | 85 | Q_INVOKABLE void requestToolTip(int index, const QRectF &rect); | ||
82 | Q_INVOKABLE void requestSubCategoryToolTip(int index, const QRectF &rect); | 86 | Q_INVOKABLE void requestSubCategoryToolTip(int index, const QRectF &rect); | ||
83 | Q_INVOKABLE void requestMostUsedToolTip(int index, const QRectF &rect); | 87 | Q_INVOKABLE void requestMostUsedToolTip(int index, const QRectF &rect); | ||
84 | Q_INVOKABLE void hideToolTip(); | 88 | Q_INVOKABLE void hideToolTip(); | ||
85 | Q_INVOKABLE void hideSubCategoryToolTip(); | 89 | Q_INVOKABLE void hideSubCategoryToolTip(); | ||
Show All 10 Lines | 98 | private Q_SLOTS: | |||
96 | void moduleLoaded(); | 100 | void moduleLoaded(); | ||
97 | void initWidget(); | 101 | void initWidget(); | ||
98 | 102 | | |||
99 | Q_SIGNALS: | 103 | Q_SIGNALS: | ||
100 | void activeCategoryChanged(); | 104 | void activeCategoryChanged(); | ||
101 | void activeSubCategoryChanged(); | 105 | void activeSubCategoryChanged(); | ||
102 | void widthChanged(); | 106 | void widthChanged(); | ||
103 | void actionMenuVisibleChanged(); | 107 | void actionMenuVisibleChanged(); | ||
108 | void introPageVisibleChanged(); | ||||
104 | 109 | | |||
105 | private: | 110 | private: | ||
106 | class Private; | 111 | class Private; | ||
107 | Private *const d; | 112 | Private *const d; | ||
108 | }; | 113 | }; | ||
109 | 114 | | |||
110 | #endif | 115 | #endif |