summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/ui/opimmainwindow.cpp28
-rw-r--r--libopie2/opiepim/ui/opimmainwindow.h3
2 files changed, 12 insertions, 19 deletions
diff --git a/libopie2/opiepim/ui/opimmainwindow.cpp b/libopie2/opiepim/ui/opimmainwindow.cpp
index f22a302..a6d574b 100644
--- a/libopie2/opiepim/ui/opimmainwindow.cpp
+++ b/libopie2/opiepim/ui/opimmainwindow.cpp
@@ -226,34 +226,34 @@ void OPimMainWindow::insertItemMenuItems( QActionGroup *items ) {
if ( items ) {
// Rebuild Item menu
m_itemMenu->clear();
m_itemMenuGroup1->addTo( m_itemMenu );
m_itemMenu->insertSeparator();
items->addTo( m_itemMenu );
m_itemMenu->insertSeparator();
m_itemMenuGroup2->addTo( m_itemMenu );
}
}
void OPimMainWindow::insertViewMenuItems( QActionGroup *items ) {
// Insert menu items into View menu
if ( items ) {
// Rebuild Item menu
m_viewMenu->clear();
- m_viewMenuGroup->addTo( m_viewMenu );
- m_viewMenu->insertSeparator();
+// m_viewMenuGroup->addTo( m_viewMenu );
+// m_viewMenu->insertSeparator();
m_viewMenuAppGroup = items;
m_viewMenuAppGroup->addTo( m_viewMenu );
}
}
void OPimMainWindow::setViewCategory( const QString &category ) {
// Find category in list
for ( int i = 0; i < m_catSelect->count(); i++ ) {
if ( m_catSelect->text( i ) == category ) {
m_catSelect->setCurrentItem( i );
emit categorySelected( category );
return;
}
}
}
@@ -351,51 +351,45 @@ void OPimMainWindow::initBars( const QString &itemName ) {
m_itemBeamAction->setWhatsThis( tr( "Click here to transmit the selected item." ) );
m_itemBeamAction->addTo( toolbar );
}
m_itemDeleteAction = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ),
QString::null, 0, m_itemMenuGroup1, 0 );
connect( m_itemDeleteAction, SIGNAL(activated()), this, SLOT(slotItemDelete()) );
m_itemDeleteAction->setWhatsThis( tr( "Click here to delete the selected item." ) );
m_itemDeleteAction->addTo( toolbar );
m_itemMenuGroup1->addTo( m_itemMenu );
m_itemMenu->insertSeparator();
m_itemMenuGroup2 = new QActionGroup( this, QString::null, false );
-// a = new QAction( tr( "Find" ), Resource::loadPixmap( "find" ),
-// QString::null, 0, m_itemMenuGroup2, 0 );
-// connect( a, SIGNAL(activated()), this, SLOT(slotItemFind()) );
-// a->setWhatsThis( tr( "Click here to search for an item." ) );
-// a->addTo( toolbar );
-
m_configureAction = new QAction( tr( "Configure" ), Resource::loadPixmap( "SettingsIcon" ),
QString::null, 0, m_itemMenuGroup2, 0 );
connect( m_configureAction, SIGNAL(activated()), this, SLOT(slotConfigure()) );
m_configureAction->setWhatsThis( tr( "Click here to set your preferences for this application." ) );
m_itemMenuGroup2->addTo( m_itemMenu );
// View menu
- m_viewMenuGroup = new QActionGroup( this, QString::null, false );
-
- QAction *a = new QAction( tr( "Filter" ), QString::null, 0, m_viewMenuGroup, 0 );
- connect( a, SIGNAL(activated()), this, SLOT(slotViewFilter()) );
- a->setWhatsThis( tr( "Click here to filter the items displayed." ) );
-
- a = new QAction( tr( "Filter Settings" ), QString::null, 0, m_viewMenuGroup, 0 );
- connect( a, SIGNAL(activated()), this, SLOT(slotViewFilterSettings()) );
- a->setWhatsThis( tr( "Click here to modify the current filter settings." ) );
+// m_viewMenuGroup = new QActionGroup( this, QString::null, false );
+
+// QAction *a = new QAction( tr( "Filter" ), QString::null, 0, m_viewMenuGroup, 0 );
+// connect( a, SIGNAL(activated()), this, SLOT(slotViewFilter()) );
+// a->setWhatsThis( tr( "Click here to filter the items displayed." ) );
+//
+// a = new QAction( tr( "Filter Settings" ), QString::null, 0, m_viewMenuGroup, 0 );
+// connect( a, SIGNAL(activated()), this, SLOT(slotViewFilterSettings()) );
+// a->setWhatsThis( tr( "Click here to modify the current filter settings." ) );
// Create view toolbar
toolbar = new QToolBar( this );
m_catSelect = new QComboBox( toolbar );
connect( m_catSelect, SIGNAL(activated(const QString&)), this, SIGNAL(categorySelected(const QString&)) );
QWhatsThis::add( m_catSelect, tr( "Click here to filter items by category." ) );
// Do initial load of categories
reloadCategories();
}
} // namespace Opie
diff --git a/libopie2/opiepim/ui/opimmainwindow.h b/libopie2/opiepim/ui/opimmainwindow.h
index fa7a730..0d3f7b7 100644
--- a/libopie2/opiepim/ui/opimmainwindow.h
+++ b/libopie2/opiepim/ui/opimmainwindow.h
@@ -94,33 +94,32 @@ protected slots:
/** edit the record */
virtual void edit( int uid ) = 0;
/** make a copy of it! */
virtual void add( const OPimRecord& ) = 0;
virtual void doAlarm( const QDateTime&, int uid );
QCopChannel* channel();
/** UI-related slots */
virtual void slotItemNew() = 0;
virtual void slotItemEdit() = 0;
virtual void slotItemDuplicate() = 0;
virtual void slotItemDelete() = 0;
virtual void slotItemBeam() = 0;
- //virtual void slotItemFind() = 0;
virtual void slotConfigure() = 0;
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 );
@@ -150,33 +149,33 @@ private:
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
QPopupMenu *m_viewMenu; // Pointer to view menu
QActionGroup *m_itemMenuGroup1; // Action group containing default items in Item menu
QActionGroup *m_itemMenuGroup2; // Action group containing default items in Item menu
QActionGroup *m_viewMenuAppGroup; // Action group containing application items in View menu
- QActionGroup *m_viewMenuGroup; // Action group containing default items in View menu
+// QActionGroup *m_viewMenuGroup; // Action group containing default items in View menu
QAction *m_itemNewAction; // Add new item action
QAction *m_itemEditAction; // Edit current item action
QAction *m_itemDuplicateAction; // Duplicate current item action
QAction *m_itemDeleteAction; // Delete current item action
QAction *m_itemBeamAction; // Beam current item action
QAction *m_configureAction; // Configure application dialog action
QComboBox *m_catSelect; // Category selection combo box
/* I would love to do this as a template
* but can't think of a right way
* because I need signal and slots -zecke
*/
virtual OPimRecord* record( int rtti, const QByteArray& ) ;
int service();