author | harlekin <harlekin> | 2003-03-21 20:59:43 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-03-21 20:59:43 (UTC) |
commit | a1342464252328754954a59abf82d6dd030c88f0 (patch) (side-by-side diff) | |
tree | e49e5c3e9cd9fd4816df78b788f7a9999d4b4581 /noncore/apps/tinykate/tinykate.cpp | |
parent | 1e1a09e08d441db9ee899845a0200a5f70ac38a1 (diff) | |
download | opie-a1342464252328754954a59abf82d6dd030c88f0.zip opie-a1342464252328754954a59abf82d6dd030c88f0.tar.gz opie-a1342464252328754954a59abf82d6dd030c88f0.tar.bz2 |
adapted to new icons
Diffstat (limited to 'noncore/apps/tinykate/tinykate.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/tinykate/tinykate.cpp | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/noncore/apps/tinykate/tinykate.cpp b/noncore/apps/tinykate/tinykate.cpp index aecc1bd..a25f81f 100644 --- a/noncore/apps/tinykate/tinykate.cpp +++ b/noncore/apps/tinykate/tinykate.cpp @@ -25,22 +25,17 @@ #include <opie/ofiledialog.h> #include "tinykate.h" -#include "pics/file-new.xpm" -#include "pics/file-open.xpm" -#include "pics/file-save.xpm" -#include "pics/edit-undo.xpm" -#include "pics/edit-redo.xpm" #include <katedocument.h> #include <katehighlight.h> #include <kateview.h> #include <kglobal.h> TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : QMainWindow( parent, name, f ) -{ +{ nextUnnamed=0; currentView=0; viewCount=0; setCaption(tr("TinyKATE")); @@ -60,33 +55,33 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : //FILE ACTIONS QPopupMenu *popup = new QPopupMenu( this ); // Action for creating a new document - QAction *a = new QAction( tr( "New" ), QPixmap((const char**)file_new_xpm ), QString::null, 0, this, 0 ); + QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); a->addTo( popup ); connect(a, SIGNAL(activated()), this, SLOT(slotNew())); // Action for opening an exisiting document - a = new QAction( tr( "Open" ), QPixmap((const char**)file_open_xpm), QString::null, 0, this, 0 ); + a = new QAction( tr( "Open" ),Resource::loadPixmap( "fileopen" ) , QString::null, 0, this, 0 ); a->addTo(popup); connect(a, SIGNAL(activated()), this, SLOT(slotOpen())); // Action for saving document - a = new QAction( tr( "Save" ), QPixmap((const char**)file_save_xpm), QString::null, 0, this, 0 ); + a = new QAction( tr( "Save" ), Resource::loadPixmap( "save" ) , QString::null, 0, this, 0 ); a->addTo(popup); connect(a, SIGNAL(activated()), this, SLOT(slotSave())); // Action for saving document to a new name - a = new QAction( tr( "Save As" ), QPixmap((const char**)file_save_xpm), QString::null, 0, this, 0 ); + a = new QAction( tr( "Save As" ),Resource::loadPixmap( "save" ) , QString::null, 0, this, 0 ); a->addTo(popup); connect(a, SIGNAL(activated()), this, SLOT(slotSaveAs())); // Action for closing the currently active document - a = new QAction( tr( "Close" ), QPixmap(), QString::null, 0, this, 0 ); + a = new QAction( tr( "Close" ), Resource::loadPixmap( "quit_icon" ) , QString::null, 0, this, 0 ); a->addTo(popup); connect(a, SIGNAL(activated()), this, SLOT(slotClose())); - + mb->insertItem(tr("File"),popup); //EDIT ACTIONS @@ -108,18 +103,18 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : editFindReplace = new QAction( tr( "Find/Replace" ), Resource::loadPixmap("find"), QString::null, 0, this, 0 ); editFindReplace->addTo( bar ); // Action for undo - editUndo = new QAction( tr( "Undo" ), QPixmap((const char**)edit_undo_xpm), QString::null, 0, this, 0 ); + editUndo = new QAction( tr( "Undo" ),Resource::loadPixmap( "undo" ) , QString::null, 0, this, 0 ); editUndo->addTo( bar ); // Action for redo - editRedo = new QAction( tr( "Redo" ), QPixmap((const char**)edit_redo_xpm), QString::null, 0, this, 0 ); + editRedo = new QAction( tr( "Redo" ),Resource::loadPixmap( "redo" ) , QString::null, 0, this, 0 ); editRedo->addTo( bar ); //VIEW ACITONS popup = new QPopupMenu( this ); - + viewIncFontSizes = new QAction( tr( "Font +" ), QString::null, 0, this, 0 ); viewIncFontSizes->addTo( popup ); viewDecFontSizes = new QAction( tr( "Font -" ), QString::null, 0, this, 0 ); @@ -197,9 +192,9 @@ void TinyKate::slotCurrentChanged( QWidget * view) disconnect(utilSettings,SIGNAL(activated()), currentView,SLOT(configDialog())); } currentView=(KTextEditor::View*)view; - + connect(editCopy,SIGNAL(activated()),currentView,SLOT(copy())); connect(editCut,SIGNAL(activated()),currentView,SLOT(cut())); connect(editPaste,SIGNAL(activated()),currentView,SLOT(paste())); connect(editUndo,SIGNAL(activated()),currentView,SLOT(undo())); |