-rw-r--r-- | libopie2/opiepim/ui/opimmainwindow.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/libopie2/opiepim/ui/opimmainwindow.cpp b/libopie2/opiepim/ui/opimmainwindow.cpp index a6d574b..efb45ca 100644 --- a/libopie2/opiepim/ui/opimmainwindow.cpp +++ b/libopie2/opiepim/ui/opimmainwindow.cpp | |||
@@ -17,40 +17,40 @@ | |||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "opimmainwindow.h" | 30 | #include "opimmainwindow.h" |
31 | 31 | ||
32 | /* OPIE */ | 32 | /* OPIE */ |
33 | #include <opie2/opimresolver.h> | ||
34 | #include <opie2/odebug.h> | 33 | #include <opie2/odebug.h> |
34 | #include <opie2/opimresolver.h> | ||
35 | #include <opie2/oresource.h> | ||
35 | 36 | ||
36 | #include <qpe/categoryselect.h> | 37 | #include <qpe/categoryselect.h> |
37 | #include <qpe/ir.h> | 38 | #include <qpe/ir.h> |
38 | #include <qpe/qcopenvelope_qws.h> | 39 | #include <qpe/qcopenvelope_qws.h> |
39 | #include <qpe/qpeapplication.h> | 40 | #include <qpe/qpeapplication.h> |
40 | #include <qpe/resource.h> | ||
41 | #include <qpe/sound.h> | 41 | #include <qpe/sound.h> |
42 | 42 | ||
43 | /* QT */ | 43 | /* QT */ |
44 | #include <qaction.h> | 44 | #include <qaction.h> |
45 | #include <qapplication.h> | 45 | #include <qapplication.h> |
46 | #include <qcombobox.h> | 46 | #include <qcombobox.h> |
47 | #include <qcopchannel_qws.h> | 47 | #include <qcopchannel_qws.h> |
48 | #include <qdatetime.h> | 48 | #include <qdatetime.h> |
49 | #include <qmenubar.h> | 49 | #include <qmenubar.h> |
50 | #include <qobjectlist.h> | 50 | #include <qobjectlist.h> |
51 | #include <qpopupmenu.h> | 51 | #include <qpopupmenu.h> |
52 | #include <qtoolbar.h> | 52 | #include <qtoolbar.h> |
53 | #include <qwhatsthis.h> | 53 | #include <qwhatsthis.h> |
54 | 54 | ||
55 | namespace Opie { | 55 | namespace Opie { |
56 | OPimMainWindow::OPimMainWindow( const QString &serviceName, const QString &catName, | 56 | OPimMainWindow::OPimMainWindow( const QString &serviceName, const QString &catName, |
@@ -314,70 +314,76 @@ void OPimMainWindow::initBars( const QString &itemName ) { | |||
314 | // Create application menu bar | 314 | // Create application menu bar |
315 | QToolBar *toolbar = new QToolBar( this ); | 315 | QToolBar *toolbar = new QToolBar( this ); |
316 | 316 | ||
317 | // Create sub-menus | 317 | // Create sub-menus |
318 | m_itemMenu = new QPopupMenu( this ); | 318 | m_itemMenu = new QPopupMenu( this ); |
319 | m_itemMenu->setCheckable( true ); | 319 | m_itemMenu->setCheckable( true ); |
320 | menubar->insertItem( itemName, m_itemMenu ); | 320 | menubar->insertItem( itemName, m_itemMenu ); |
321 | m_viewMenu = new QPopupMenu( this ); | 321 | m_viewMenu = new QPopupMenu( this ); |
322 | m_viewMenu->setCheckable( true ); | 322 | m_viewMenu->setCheckable( true ); |
323 | menubar->insertItem( tr( "View" ), m_viewMenu ); | 323 | menubar->insertItem( tr( "View" ), m_viewMenu ); |
324 | 324 | ||
325 | m_viewMenuAppGroup = 0l; | 325 | m_viewMenuAppGroup = 0l; |
326 | 326 | ||
327 | // Item menu | 327 | // Item menu |
328 | m_itemMenuGroup1 = new QActionGroup( this, QString::null, false ); | 328 | m_itemMenuGroup1 = new QActionGroup( this, QString::null, false ); |
329 | 329 | ||
330 | m_itemNewAction = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), | 330 | m_itemNewAction = new QAction( tr( "New" ), |
331 | QString::null, 0, m_itemMenuGroup1, 0 ); | 331 | Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ), |
332 | QString::null, 0, m_itemMenuGroup1, 0 ); | ||
332 | connect( m_itemNewAction, SIGNAL(activated()), this, SLOT(slotItemNew()) ); | 333 | connect( m_itemNewAction, SIGNAL(activated()), this, SLOT(slotItemNew()) ); |
333 | m_itemNewAction->setWhatsThis( tr( "Click here to create a new item." ) ); | 334 | m_itemNewAction->setWhatsThis( tr( "Click here to create a new item." ) ); |
334 | m_itemNewAction->addTo( toolbar ); | 335 | m_itemNewAction->addTo( toolbar ); |
335 | 336 | ||
336 | m_itemEditAction = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), | 337 | m_itemEditAction = new QAction( tr( "Edit" ), |
338 | Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ), | ||
337 | QString::null, 0, m_itemMenuGroup1, 0 ); | 339 | QString::null, 0, m_itemMenuGroup1, 0 ); |
338 | connect( m_itemEditAction, SIGNAL(activated()), this, SLOT(slotItemEdit()) ); | 340 | connect( m_itemEditAction, SIGNAL(activated()), this, SLOT(slotItemEdit()) ); |
339 | m_itemEditAction->setWhatsThis( tr( "Click here to edit the selected item." ) ); | 341 | m_itemEditAction->setWhatsThis( tr( "Click here to edit the selected item." ) ); |
340 | m_itemEditAction->addTo( toolbar ); | 342 | m_itemEditAction->addTo( toolbar ); |
341 | 343 | ||
342 | m_itemDuplicateAction = new QAction( tr( "Duplicate" ), Resource::loadPixmap( "copy" ), | 344 | m_itemDuplicateAction = new QAction( tr( "Duplicate" ), |
345 | Opie::Core::OResource::loadPixmap( "copy", Opie::Core::OResource::SmallIcon ), | ||
343 | QString::null, 0, m_itemMenuGroup1, 0 ); | 346 | QString::null, 0, m_itemMenuGroup1, 0 ); |
344 | connect( m_itemDuplicateAction, SIGNAL(activated()), this, SLOT(slotItemDuplicate()) ); | 347 | connect( m_itemDuplicateAction, SIGNAL(activated()), this, SLOT(slotItemDuplicate()) ); |
345 | m_itemDuplicateAction->setWhatsThis( tr( "Click here to duplicate the selected item." ) ); | 348 | m_itemDuplicateAction->setWhatsThis( tr( "Click here to duplicate the selected item." ) ); |
346 | 349 | ||
347 | if ( Ir::supported() ) { | 350 | if ( Ir::supported() ) { |
348 | m_itemBeamAction = new QAction( tr( "Beam" ), Resource::loadPixmap( "beam" ), | 351 | m_itemBeamAction = new QAction( tr( "Beam" ), |
352 | Opie::Core::OResource::loadPixmap( "beam", Opie::Core::OResource::SmallIcon ), | ||
349 | QString::null, 0, m_itemMenuGroup1, 0 ); | 353 | QString::null, 0, m_itemMenuGroup1, 0 ); |
350 | connect( m_itemBeamAction, SIGNAL(activated()), this, SLOT(slotItemBeam()) ); | 354 | connect( m_itemBeamAction, SIGNAL(activated()), this, SLOT(slotItemBeam()) ); |
351 | m_itemBeamAction->setWhatsThis( tr( "Click here to transmit the selected item." ) ); | 355 | m_itemBeamAction->setWhatsThis( tr( "Click here to transmit the selected item." ) ); |
352 | m_itemBeamAction->addTo( toolbar ); | 356 | m_itemBeamAction->addTo( toolbar ); |
353 | } | 357 | } |
354 | 358 | ||
355 | m_itemDeleteAction = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), | 359 | m_itemDeleteAction = new QAction( tr( "Delete" ), |
360 | Opie::Core::OResource::loadPixmap( "trash", Opie::Core::OResource::SmallIcon ), | ||
356 | QString::null, 0, m_itemMenuGroup1, 0 ); | 361 | QString::null, 0, m_itemMenuGroup1, 0 ); |
357 | connect( m_itemDeleteAction, SIGNAL(activated()), this, SLOT(slotItemDelete()) ); | 362 | connect( m_itemDeleteAction, SIGNAL(activated()), this, SLOT(slotItemDelete()) ); |
358 | m_itemDeleteAction->setWhatsThis( tr( "Click here to delete the selected item." ) ); | 363 | m_itemDeleteAction->setWhatsThis( tr( "Click here to delete the selected item." ) ); |
359 | m_itemDeleteAction->addTo( toolbar ); | 364 | m_itemDeleteAction->addTo( toolbar ); |
360 | 365 | ||
361 | m_itemMenuGroup1->addTo( m_itemMenu ); | 366 | m_itemMenuGroup1->addTo( m_itemMenu ); |
362 | 367 | ||
363 | m_itemMenu->insertSeparator(); | 368 | m_itemMenu->insertSeparator(); |
364 | 369 | ||
365 | m_itemMenuGroup2 = new QActionGroup( this, QString::null, false ); | 370 | m_itemMenuGroup2 = new QActionGroup( this, QString::null, false ); |
366 | 371 | ||
367 | m_configureAction = new QAction( tr( "Configure" ), Resource::loadPixmap( "SettingsIcon" ), | 372 | m_configureAction = new QAction( tr( "Configure" ), |
373 | Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon ), | ||
368 | QString::null, 0, m_itemMenuGroup2, 0 ); | 374 | QString::null, 0, m_itemMenuGroup2, 0 ); |
369 | connect( m_configureAction, SIGNAL(activated()), this, SLOT(slotConfigure()) ); | 375 | connect( m_configureAction, SIGNAL(activated()), this, SLOT(slotConfigure()) ); |
370 | m_configureAction->setWhatsThis( tr( "Click here to set your preferences for this application." ) ); | 376 | m_configureAction->setWhatsThis( tr( "Click here to set your preferences for this application." ) ); |
371 | 377 | ||
372 | m_itemMenuGroup2->addTo( m_itemMenu ); | 378 | m_itemMenuGroup2->addTo( m_itemMenu ); |
373 | 379 | ||
374 | // View menu | 380 | // View menu |
375 | // m_viewMenuGroup = new QActionGroup( this, QString::null, false ); | 381 | // m_viewMenuGroup = new QActionGroup( this, QString::null, false ); |
376 | 382 | ||
377 | // QAction *a = new QAction( tr( "Filter" ), QString::null, 0, m_viewMenuGroup, 0 ); | 383 | // QAction *a = new QAction( tr( "Filter" ), QString::null, 0, m_viewMenuGroup, 0 ); |
378 | // connect( a, SIGNAL(activated()), this, SLOT(slotViewFilter()) ); | 384 | // connect( a, SIGNAL(activated()), this, SLOT(slotViewFilter()) ); |
379 | // a->setWhatsThis( tr( "Click here to filter the items displayed." ) ); | 385 | // a->setWhatsThis( tr( "Click here to filter the items displayed." ) ); |
380 | // | 386 | // |
381 | // a = new QAction( tr( "Filter Settings" ), QString::null, 0, m_viewMenuGroup, 0 ); | 387 | // a = new QAction( tr( "Filter Settings" ), QString::null, 0, m_viewMenuGroup, 0 ); |
382 | // connect( a, SIGNAL(activated()), this, SLOT(slotViewFilterSettings()) ); | 388 | // connect( a, SIGNAL(activated()), this, SLOT(slotViewFilterSettings()) ); |
383 | // a->setWhatsThis( tr( "Click here to modify the current filter settings." ) ); | 389 | // a->setWhatsThis( tr( "Click here to modify the current filter settings." ) ); |