Diffstat (limited to 'noncore/apps/opie-sheet/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-sheet/mainwindow.cpp | 56 |
1 files changed, 21 insertions, 35 deletions
diff --git a/noncore/apps/opie-sheet/mainwindow.cpp b/noncore/apps/opie-sheet/mainwindow.cpp index b9f8e57..43e5131 100644 --- a/noncore/apps/opie-sheet/mainwindow.cpp +++ b/noncore/apps/opie-sheet/mainwindow.cpp | |||
@@ -18,4 +18,6 @@ | |||
18 | #include <qpe/qcopenvelope_qws.h> | 18 | #include <qpe/qcopenvelope_qws.h> |
19 | #include <qpe/resource.h> | ||
19 | #include <qmessagebox.h> | 20 | #include <qmessagebox.h> |
20 | #include <qfile.h> | 21 | #include <qfile.h> |
22 | #include <qtranslator.h> | ||
21 | #include <qradiobutton.h> | 23 | #include <qradiobutton.h> |
@@ -27,8 +29,3 @@ | |||
27 | 29 | ||
28 | #include "file-new.xpm" | 30 | |
29 | #include "file-open.xpm" | ||
30 | #include "file-save.xpm" | ||
31 | #include "edit-cancel.xpm" | ||
32 | #include "edit-accept.xpm" | ||
33 | #include "help-general.xpm" | ||
34 | #include "func-plus.xpm" | 31 | #include "func-plus.xpm" |
@@ -267,21 +264,21 @@ void MainWindow::initActions() | |||
267 | { | 264 | { |
268 | fileNew=new QAction(tr("New File"), QPixmap(file_new_xpm), tr("&New"), 0, this); | 265 | fileNew=new QAction(tr("New File"), Resource::loadPixmap( "new" ), tr("&New"), 0, this); |
269 | connect(fileNew, SIGNAL(activated()), this, SLOT(slotFileNew())); | 266 | connect(fileNew, SIGNAL(activated()), this, SLOT(slotFileNew())); |
270 | fileOpen=new QAction(tr("Open File"), QPixmap(file_open_xpm), tr("&Open"), 0, this); | 267 | fileOpen=new QAction(tr("Open File"), Resource::loadPixmap( "fileopen" ), tr("&Open"), 0, this); |
271 | connect(fileOpen, SIGNAL(activated()), this, SLOT(slotFileOpen())); | 268 | connect(fileOpen, SIGNAL(activated()), this, SLOT(slotFileOpen())); |
272 | fileSave=new QAction(tr("Save File"), QPixmap(file_save_xpm), tr("&Save"), 0, this); | 269 | fileSave=new QAction(tr("Save File"),Resource::loadPixmap( "save" ), tr("&Save"), 0, this); |
273 | connect(fileSave, SIGNAL(activated()), this, SLOT(slotFileSave())); | 270 | connect(fileSave, SIGNAL(activated()), this, SLOT(slotFileSave())); |
274 | fileSaveAs=new QAction(tr("Save File As"), QPixmap(file_save_xpm), tr("Save &As"), 0, this); | 271 | fileSaveAs=new QAction(tr("Save File As"), Resource::loadPixmap( "save" ), tr("Save &As"), 0, this); |
275 | connect(fileSaveAs, SIGNAL(activated()), this, SLOT(slotFileSaveAs())); | 272 | connect(fileSaveAs, SIGNAL(activated()), this, SLOT(slotFileSaveAs())); |
276 | fileQuit=new QAction(tr("Quit"), tr("&Quit"), 0, this); | 273 | //fileQuit=new QAction(tr("Quit"), tr("&Quit"), 0, this); |
277 | connect(fileQuit, SIGNAL(activated()), this, SLOT(close())); | 274 | //connect(fileQuit, SIGNAL(activated()), this, SLOT(close())); |
278 | 275 | ||
279 | helpGeneral=new QAction(tr("General Help"), QPixmap(help_general_xpm), tr("&General"), 0, this); | 276 | // helpGeneral=new QAction(tr("General Help"), QPixmap(help_general_xpm), tr("&General"), 0, this); |
280 | connect(helpGeneral, SIGNAL(activated()), this, SLOT(slotHelpGeneral())); | 277 | //connect(helpGeneral, SIGNAL(activated()), this, SLOT(slotHelpGeneral())); |
281 | helpAbout=new QAction(tr("About Opie Sheet"), tr("&About"), 0, this); | 278 | //helpAbout=new QAction(tr("About Opie Sheet"), tr("&About"), 0, this); |
282 | connect(helpAbout, SIGNAL(activated()), this, SLOT(slotHelpAbout())); | 279 | //connect(helpAbout, SIGNAL(activated()), this, SLOT(slotHelpAbout())); |
283 | 280 | ||
284 | editAccept=new QAction(tr("Accept"), QPixmap(edit_accept_xpm), tr("&Accept"), 0, this); | 281 | editAccept=new QAction(tr("Accept"),Resource::loadPixmap( "enter" ) , tr("&Accept"), 0, this); |
285 | connect(editAccept, SIGNAL(activated()), this, SLOT(slotEditAccept())); | 282 | connect(editAccept, SIGNAL(activated()), this, SLOT(slotEditAccept())); |
286 | editCancel=new QAction(tr("Cancel"), QPixmap(edit_cancel_xpm), tr("&Cancel"), 0, this); | 283 | editCancel=new QAction(tr("Cancel"), Resource::loadPixmap( "close" ), tr("&Cancel"), 0, this); |
287 | connect(editCancel, SIGNAL(activated()), this, SLOT(slotEditCancel())); | 284 | connect(editCancel, SIGNAL(activated()), this, SLOT(slotEditCancel())); |
@@ -373,4 +370,4 @@ void MainWindow::initMenu() | |||
373 | fileSaveAs->addTo(menuFile); | 370 | fileSaveAs->addTo(menuFile); |
374 | menuFile->insertSeparator(); | 371 | // menuFile->insertSeparator(); |
375 | fileQuit->addTo(menuFile); | 372 | // fileQuit->addTo(menuFile); |
376 | menu->insertItem(tr("&File"), menuFile); | 373 | menu->insertItem(tr("&File"), menuFile); |
@@ -401,6 +398,6 @@ void MainWindow::initMenu() | |||
401 | 398 | ||
402 | menuHelp=new QPopupMenu; | 399 | // menuHelp=new QPopupMenu; |
403 | helpGeneral->addTo(menuHelp); | 400 | // helpGeneral->addTo(menuHelp); |
404 | helpAbout->addTo(menuHelp); | 401 | // helpAbout->addTo(menuHelp); |
405 | menu->insertItem(tr("&Help"), menuHelp); | 402 | // menu->insertItem(tr("&Help"), menuHelp); |
406 | 403 | ||
@@ -519,13 +516,2 @@ void MainWindow::initEditToolbar() | |||
519 | 516 | ||
520 | void MainWindow::slotHelpGeneral() | ||
521 | { | ||
522 | if (QFile::exists(helpFile)) | ||
523 | { | ||
524 | QCopEnvelope e("QPE/Application/helpbrowser", "showFile(QString)"); | ||
525 | e << helpFile; | ||
526 | } | ||
527 | else | ||
528 | QMessageBox::critical(this, tr("Error"), tr("Help file not found!")); | ||
529 | } | ||
530 | |||
531 | void MainWindow::slotHelpAbout() | 517 | void MainWindow::slotHelpAbout() |