Diffstat (limited to 'libopie2/opiepim/ui/opimmainwindow.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/ui/opimmainwindow.h | 65 |
1 files changed, 60 insertions, 5 deletions
diff --git a/libopie2/opiepim/ui/opimmainwindow.h b/libopie2/opiepim/ui/opimmainwindow.h index abad630..4aed8b8 100644 --- a/libopie2/opiepim/ui/opimmainwindow.h +++ b/libopie2/opiepim/ui/opimmainwindow.h | |||
@@ -31,7 +31,14 @@ | |||
31 | 31 | ||
32 | #include <opie2/opimrecord.h> | ||
33 | |||
34 | #include <qpe/categories.h> | ||
35 | #include <qpe/config.h> | ||
36 | |||
32 | #include <qmainwindow.h> | 37 | #include <qmainwindow.h> |
33 | 38 | ||
34 | #include <opie2/opimrecord.h> | 39 | class QAction; |
40 | class QActionGroup; | ||
35 | class QCopChannel; | 41 | class QCopChannel; |
36 | class QDateTime; | 42 | class QDateTime; |
43 | class QPopupMenu; | ||
37 | 44 | ||
@@ -58,4 +65,8 @@ public: | |||
58 | 65 | ||
59 | OPimMainWindow( const QString& service, QWidget *parent = 0, const char* name = 0, | 66 | OPimMainWindow( const QString &serviceName, |
60 | WFlags f = WType_TopLevel); | 67 | const QString &appName = QString::null, |
68 | const QString &catName = QString::null, | ||
69 | const QString &itemName = QString::null, | ||
70 | const QString &configName = QString::null, | ||
71 | QWidget *parent = 0l, const char* name = 0l, WFlags f = WType_TopLevel ); | ||
61 | virtual ~OPimMainWindow(); | 72 | virtual ~OPimMainWindow(); |
@@ -92,2 +103,11 @@ protected slots: | |||
92 | 103 | ||
104 | /** UI-related slots */ | ||
105 | virtual void slotItemNew() = 0; | ||
106 | virtual void slotItemEdit() = 0; | ||
107 | virtual void slotItemDuplicate() = 0; | ||
108 | virtual void slotItemDelete() = 0; | ||
109 | virtual void slotItemBeam() = 0; | ||
110 | virtual void slotItemFind() = 0; | ||
111 | virtual void slotConfigure() = 0; | ||
112 | |||
93 | protected: | 113 | protected: |
@@ -97,3 +117,3 @@ protected: | |||
97 | */ | 117 | */ |
98 | void startAlarm(int count = 10); | 118 | void startAlarm( int count = 10 ); |
99 | void killAlarm(); | 119 | void killAlarm(); |
@@ -101,2 +121,11 @@ protected: | |||
101 | 121 | ||
122 | /** UI-related functions */ | ||
123 | QPopupMenu *itemContextMenu(); | ||
124 | |||
125 | void insertItemMenuItems( QActionGroup *items ); | ||
126 | void insertViewMenuItems( QActionGroup *items ); | ||
127 | |||
128 | void setViewCategory( const QString &category ); | ||
129 | void reloadCategories(); | ||
130 | |||
102 | private slots: | 131 | private slots: |
@@ -105,3 +134,5 @@ private slots: | |||
105 | 134 | ||
106 | 135 | /** UI-related slots */ | |
136 | void slotViewCategory( QAction *category ); | ||
137 | |||
107 | private: | 138 | private: |
@@ -118,2 +149,20 @@ private: | |||
118 | int m_timerId; | 149 | int m_timerId; |
150 | |||
151 | QString m_appName; // Name of application for title bar | ||
152 | QString m_catGroupName; // Name of category group | ||
153 | Config m_config; // Configuration settings file | ||
154 | |||
155 | // Menu bar data | ||
156 | QPopupMenu *m_itemContextMenu; // Pointer to context-sensitive menu | ||
157 | QPopupMenu *m_itemMenu; // Pointer to item menu | ||
158 | QPopupMenu *m_viewMenu; // Pointer to view menu | ||
159 | QActionGroup *m_itemMenuGroup1; // Action group containing default items in Item menu | ||
160 | QActionGroup *m_itemMenuGroup2; // Action group containing default items in Item menu | ||
161 | QActionGroup *m_viewMenuAppGroup; // Action group containing application items in View menu | ||
162 | QActionGroup *m_viewMenuGroup; // Action group containing default items in View menu | ||
163 | QActionGroup *m_viewMenuCategories; // Pointer to action group containing categories in View menu | ||
164 | QAction *m_itemEditAction; // Edit current item action | ||
165 | QAction *m_itemDuplicateAction; // Duplicate current item action | ||
166 | QAction *m_itemDeleteAction; // Delete current item action | ||
167 | |||
119 | /* I would love to do this as a template | 168 | /* I would love to do this as a template |
@@ -124,2 +173,8 @@ private: | |||
124 | int service(); | 173 | int service(); |
174 | |||
175 | /** UI-related functions */ | ||
176 | void initBars( const QString &itemName = tr( "Item" ) ); | ||
177 | |||
178 | signals: | ||
179 | void categorySelected( const QString &cat ); | ||
125 | }; | 180 | }; |