summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/tinykate.cpp
authorharlekin <harlekin>2003-03-21 20:59:43 (UTC)
committer harlekin <harlekin>2003-03-21 20:59:43 (UTC)
commita1342464252328754954a59abf82d6dd030c88f0 (patch) (side-by-side diff)
treee49e5c3e9cd9fd4816df78b788f7a9999d4b4581 /noncore/apps/tinykate/tinykate.cpp
parent1e1a09e08d441db9ee899845a0200a5f70ac38a1 (diff)
downloadopie-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.cpp27
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
@@ -26,11 +26,6 @@
#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>
@@ -39,7 +34,7 @@
TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) :
QMainWindow( parent, name, f )
-{
+{
nextUnnamed=0;
currentView=0;
viewCount=0;
@@ -61,31 +56,31 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) :
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);
@@ -109,16 +104,16 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) :
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 );
@@ -198,7 +193,7 @@ void TinyKate::slotCurrentChanged( QWidget * view)
}
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()));