author | drw <drw> | 2005-02-07 20:32:21 (UTC) |
---|---|---|
committer | drw <drw> | 2005-02-07 20:32:21 (UTC) |
commit | aeda5d05178f635c05ce4556e3a0b7f9be7d6401 (patch) (side-by-side diff) | |
tree | fd7dffb1ce16c02e80396294ac100cf0522c9bfe | |
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() { void OPimMainWindow::setItemNewEnabled( bool enable ) { m_itemNewAction->setEnabled( enable ); } void OPimMainWindow::setItemEditEnabled( bool enable ) { m_itemEditAction->setEnabled( enable ); } void OPimMainWindow::setItemDuplicateEnabled( bool enable ) { m_itemDuplicateAction->setEnabled( enable ); } void OPimMainWindow::setItemDeleteEnabled( bool enable ) { m_itemDeleteAction->setEnabled( enable ); } void OPimMainWindow::setItemBeamEnabled( bool enable ) { m_itemBeamAction->setEnabled( enable ); } void OPimMainWindow::setConfigureEnabled( bool enable ) { m_configureAction->setEnabled( enable ); } +void OPimMainWindow::setShowCategories( bool show ) { + show ? m_catSelect->show() + : m_catSelect->hide(); +} + void OPimMainWindow::initBars( const QString &itemName ) { QString itemStr = itemName.lower(); setToolBarsMovable( false ); // Create application menu bar QToolBar *mbHold = new QToolBar( this ); mbHold->setHorizontalStretchable( true ); QMenuBar *menubar = new QMenuBar( mbHold ); menubar->setMargin( 0 ); // Create application menu bar QToolBar *toolbar = new QToolBar( this ); // Create sub-menus m_itemMenu = new QPopupMenu( this ); m_itemMenu->setCheckable( true ); menubar->insertItem( itemName, m_itemMenu ); m_viewMenu = new QPopupMenu( this ); m_viewMenu->setCheckable( true ); menubar->insertItem( tr( "View" ), m_viewMenu ); m_viewMenuAppGroup = 0l; 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: protected: /** * start to play soundAlarm() * @param count How many times the alarm is played */ void startAlarm( int count = 10 ); void killAlarm(); void timerEvent( QTimerEvent* ); /** UI-related functions */ QPopupMenu *itemContextMenu(); void insertItemMenuItems( QActionGroup *items ); void insertViewMenuItems( QActionGroup *items ); void setViewCategory( const QString &category ); void reloadCategories(); void setItemNewEnabled( bool enable ); void setItemEditEnabled( bool enable ); void setItemDuplicateEnabled( bool enable ); void setItemDeleteEnabled( bool enable ); void setItemBeamEnabled( bool enable ); void setConfigureEnabled( bool enable ); + void setShowCategories( bool show ); private slots: void appMessage( const QCString&, const QByteArray& ); void setDocument( const QString& ); private: class Private; Private* d; int m_rtti; QCopChannel* m_channel; QString m_service; QCString m_str; OPimRecord* m_fallBack; int m_alarmCount; int m_playedCount; int m_timerId; QString m_catGroupName; // Name of category group Config m_config; // Configuration settings file // Menu bar data QPopupMenu *m_itemContextMenu; // Pointer to context-sensitive menu QPopupMenu *m_itemMenu; // Pointer to item menu |