author | drw <drw> | 2005-02-07 20:32:21 (UTC) |
---|---|---|
committer | drw <drw> | 2005-02-07 20:32:21 (UTC) |
commit | aeda5d05178f635c05ce4556e3a0b7f9be7d6401 (patch) (unidiff) | |
tree | fd7dffb1ce16c02e80396294ac100cf0522c9bfe /libopie2/opiepim | |
parent | ed8328723ff32caee7db4064a0436703623a2de2 (diff) | |
download | opie-aeda5d05178f635c05ce4556e3a0b7f9be7d6401.zip opie-aeda5d05178f635c05ce4556e3a0b7f9be7d6401.tar.gz opie-aeda5d05178f635c05ce4556e3a0b7f9be7d6401.tar.bz2 |
Minor addition
-rw-r--r-- | libopie2/opiepim/ui/opimmainwindow.cpp | 5 | ||||
-rw-r--r-- | libopie2/opiepim/ui/opimmainwindow.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/libopie2/opiepim/ui/opimmainwindow.cpp b/libopie2/opiepim/ui/opimmainwindow.cpp index cf05329..bdf20a9 100644 --- a/libopie2/opiepim/ui/opimmainwindow.cpp +++ b/libopie2/opiepim/ui/opimmainwindow.cpp | |||
@@ -273,48 +273,53 @@ void OPimMainWindow::reloadCategories() { | |||
273 | void OPimMainWindow::setItemNewEnabled( bool enable ) { | 273 | void OPimMainWindow::setItemNewEnabled( bool enable ) { |
274 | m_itemNewAction->setEnabled( enable ); | 274 | m_itemNewAction->setEnabled( enable ); |
275 | } | 275 | } |
276 | 276 | ||
277 | void OPimMainWindow::setItemEditEnabled( bool enable ) { | 277 | void OPimMainWindow::setItemEditEnabled( bool enable ) { |
278 | m_itemEditAction->setEnabled( enable ); | 278 | m_itemEditAction->setEnabled( enable ); |
279 | } | 279 | } |
280 | 280 | ||
281 | void OPimMainWindow::setItemDuplicateEnabled( bool enable ) { | 281 | void OPimMainWindow::setItemDuplicateEnabled( bool enable ) { |
282 | m_itemDuplicateAction->setEnabled( enable ); | 282 | m_itemDuplicateAction->setEnabled( enable ); |
283 | } | 283 | } |
284 | 284 | ||
285 | void OPimMainWindow::setItemDeleteEnabled( bool enable ) { | 285 | void OPimMainWindow::setItemDeleteEnabled( bool enable ) { |
286 | m_itemDeleteAction->setEnabled( enable ); | 286 | m_itemDeleteAction->setEnabled( enable ); |
287 | } | 287 | } |
288 | 288 | ||
289 | void OPimMainWindow::setItemBeamEnabled( bool enable ) { | 289 | void OPimMainWindow::setItemBeamEnabled( bool enable ) { |
290 | m_itemBeamAction->setEnabled( enable ); | 290 | m_itemBeamAction->setEnabled( enable ); |
291 | } | 291 | } |
292 | 292 | ||
293 | void OPimMainWindow::setConfigureEnabled( bool enable ) { | 293 | void OPimMainWindow::setConfigureEnabled( bool enable ) { |
294 | m_configureAction->setEnabled( enable ); | 294 | m_configureAction->setEnabled( enable ); |
295 | } | 295 | } |
296 | 296 | ||
297 | void OPimMainWindow::setShowCategories( bool show ) { | ||
298 | show ? m_catSelect->show() | ||
299 | : m_catSelect->hide(); | ||
300 | } | ||
301 | |||
297 | void OPimMainWindow::initBars( const QString &itemName ) { | 302 | void OPimMainWindow::initBars( const QString &itemName ) { |
298 | QString itemStr = itemName.lower(); | 303 | QString itemStr = itemName.lower(); |
299 | 304 | ||
300 | setToolBarsMovable( false ); | 305 | setToolBarsMovable( false ); |
301 | 306 | ||
302 | // Create application menu bar | 307 | // Create application menu bar |
303 | QToolBar *mbHold = new QToolBar( this ); | 308 | QToolBar *mbHold = new QToolBar( this ); |
304 | mbHold->setHorizontalStretchable( true ); | 309 | mbHold->setHorizontalStretchable( true ); |
305 | QMenuBar *menubar = new QMenuBar( mbHold ); | 310 | QMenuBar *menubar = new QMenuBar( mbHold ); |
306 | menubar->setMargin( 0 ); | 311 | menubar->setMargin( 0 ); |
307 | 312 | ||
308 | // Create application menu bar | 313 | // Create application menu bar |
309 | QToolBar *toolbar = new QToolBar( this ); | 314 | QToolBar *toolbar = new QToolBar( this ); |
310 | 315 | ||
311 | // Create sub-menus | 316 | // Create sub-menus |
312 | m_itemMenu = new QPopupMenu( this ); | 317 | m_itemMenu = new QPopupMenu( this ); |
313 | m_itemMenu->setCheckable( true ); | 318 | m_itemMenu->setCheckable( true ); |
314 | menubar->insertItem( itemName, m_itemMenu ); | 319 | menubar->insertItem( itemName, m_itemMenu ); |
315 | m_viewMenu = new QPopupMenu( this ); | 320 | m_viewMenu = new QPopupMenu( this ); |
316 | m_viewMenu->setCheckable( true ); | 321 | m_viewMenu->setCheckable( true ); |
317 | menubar->insertItem( tr( "View" ), m_viewMenu ); | 322 | menubar->insertItem( tr( "View" ), m_viewMenu ); |
318 | 323 | ||
319 | m_viewMenuAppGroup = 0l; | 324 | m_viewMenuAppGroup = 0l; |
320 | 325 | ||
diff --git a/libopie2/opiepim/ui/opimmainwindow.h b/libopie2/opiepim/ui/opimmainwindow.h index 9aa0ded..fa7a730 100644 --- a/libopie2/opiepim/ui/opimmainwindow.h +++ b/libopie2/opiepim/ui/opimmainwindow.h | |||
@@ -113,48 +113,49 @@ protected slots: | |||
113 | protected: | 113 | protected: |
114 | /** | 114 | /** |
115 | * start to play soundAlarm() | 115 | * start to play soundAlarm() |
116 | * @param count How many times the alarm is played | 116 | * @param count How many times the alarm is played |
117 | */ | 117 | */ |
118 | void startAlarm( int count = 10 ); | 118 | void startAlarm( int count = 10 ); |
119 | void killAlarm(); | 119 | void killAlarm(); |
120 | void timerEvent( QTimerEvent* ); | 120 | void timerEvent( QTimerEvent* ); |
121 | 121 | ||
122 | /** UI-related functions */ | 122 | /** UI-related functions */ |
123 | QPopupMenu *itemContextMenu(); | 123 | QPopupMenu *itemContextMenu(); |
124 | 124 | ||
125 | void insertItemMenuItems( QActionGroup *items ); | 125 | void insertItemMenuItems( QActionGroup *items ); |
126 | void insertViewMenuItems( QActionGroup *items ); | 126 | void insertViewMenuItems( QActionGroup *items ); |
127 | 127 | ||
128 | void setViewCategory( const QString &category ); | 128 | void setViewCategory( const QString &category ); |
129 | void reloadCategories(); | 129 | void reloadCategories(); |
130 | 130 | ||
131 | void setItemNewEnabled( bool enable ); | 131 | void setItemNewEnabled( bool enable ); |
132 | void setItemEditEnabled( bool enable ); | 132 | void setItemEditEnabled( bool enable ); |
133 | void setItemDuplicateEnabled( bool enable ); | 133 | void setItemDuplicateEnabled( bool enable ); |
134 | void setItemDeleteEnabled( bool enable ); | 134 | void setItemDeleteEnabled( bool enable ); |
135 | void setItemBeamEnabled( bool enable ); | 135 | void setItemBeamEnabled( bool enable ); |
136 | void setConfigureEnabled( bool enable ); | 136 | void setConfigureEnabled( bool enable ); |
137 | void setShowCategories( bool show ); | ||
137 | 138 | ||
138 | private slots: | 139 | private slots: |
139 | void appMessage( const QCString&, const QByteArray& ); | 140 | void appMessage( const QCString&, const QByteArray& ); |
140 | void setDocument( const QString& ); | 141 | void setDocument( const QString& ); |
141 | 142 | ||
142 | private: | 143 | private: |
143 | class Private; | 144 | class Private; |
144 | Private* d; | 145 | Private* d; |
145 | 146 | ||
146 | int m_rtti; | 147 | int m_rtti; |
147 | QCopChannel* m_channel; | 148 | QCopChannel* m_channel; |
148 | QString m_service; | 149 | QString m_service; |
149 | QCString m_str; | 150 | QCString m_str; |
150 | OPimRecord* m_fallBack; | 151 | OPimRecord* m_fallBack; |
151 | int m_alarmCount; | 152 | int m_alarmCount; |
152 | int m_playedCount; | 153 | int m_playedCount; |
153 | int m_timerId; | 154 | int m_timerId; |
154 | 155 | ||
155 | QString m_catGroupName; // Name of category group | 156 | QString m_catGroupName; // Name of category group |
156 | Config m_config; // Configuration settings file | 157 | Config m_config; // Configuration settings file |
157 | 158 | ||
158 | // Menu bar data | 159 | // Menu bar data |
159 | QPopupMenu *m_itemContextMenu; // Pointer to context-sensitive menu | 160 | QPopupMenu *m_itemContextMenu; // Pointer to context-sensitive menu |
160 | QPopupMenu *m_itemMenu; // Pointer to item menu | 161 | QPopupMenu *m_itemMenu; // Pointer to item menu |