author | harlekin <harlekin> | 2003-03-21 20:59:43 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-03-21 20:59:43 (UTC) |
commit | a1342464252328754954a59abf82d6dd030c88f0 (patch) (unidiff) | |
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 @@ | |||
25 | 25 | ||
26 | #include <opie/ofiledialog.h> | 26 | #include <opie/ofiledialog.h> |
27 | 27 | ||
28 | #include "tinykate.h" | 28 | #include "tinykate.h" |
29 | #include "pics/file-new.xpm" | ||
30 | #include "pics/file-open.xpm" | ||
31 | #include "pics/file-save.xpm" | ||
32 | #include "pics/edit-undo.xpm" | ||
33 | #include "pics/edit-redo.xpm" | ||
34 | 29 | ||
35 | #include <katedocument.h> | 30 | #include <katedocument.h> |
36 | #include <katehighlight.h> | 31 | #include <katehighlight.h> |
37 | #include <kateview.h> | 32 | #include <kateview.h> |
38 | #include <kglobal.h> | 33 | #include <kglobal.h> |
39 | 34 | ||
40 | TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : | 35 | TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : |
41 | QMainWindow( parent, name, f ) | 36 | QMainWindow( parent, name, f ) |
42 | { | 37 | { |
43 | nextUnnamed=0; | 38 | nextUnnamed=0; |
44 | currentView=0; | 39 | currentView=0; |
45 | viewCount=0; | 40 | viewCount=0; |
46 | setCaption(tr("TinyKATE")); | 41 | setCaption(tr("TinyKATE")); |
@@ -60,33 +55,33 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : | |||
60 | //FILE ACTIONS | 55 | //FILE ACTIONS |
61 | QPopupMenu *popup = new QPopupMenu( this ); | 56 | QPopupMenu *popup = new QPopupMenu( this ); |
62 | 57 | ||
63 | // Action for creating a new document | 58 | // Action for creating a new document |
64 | QAction *a = new QAction( tr( "New" ), QPixmap((const char**)file_new_xpm ), QString::null, 0, this, 0 ); | 59 | QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); |
65 | a->addTo( popup ); | 60 | a->addTo( popup ); |
66 | connect(a, SIGNAL(activated()), this, SLOT(slotNew())); | 61 | connect(a, SIGNAL(activated()), this, SLOT(slotNew())); |
67 | 62 | ||
68 | // Action for opening an exisiting document | 63 | // Action for opening an exisiting document |
69 | a = new QAction( tr( "Open" ), QPixmap((const char**)file_open_xpm), QString::null, 0, this, 0 ); | 64 | a = new QAction( tr( "Open" ),Resource::loadPixmap( "fileopen" ) , QString::null, 0, this, 0 ); |
70 | a->addTo(popup); | 65 | a->addTo(popup); |
71 | connect(a, SIGNAL(activated()), this, SLOT(slotOpen())); | 66 | connect(a, SIGNAL(activated()), this, SLOT(slotOpen())); |
72 | 67 | ||
73 | 68 | ||
74 | // Action for saving document | 69 | // Action for saving document |
75 | a = new QAction( tr( "Save" ), QPixmap((const char**)file_save_xpm), QString::null, 0, this, 0 ); | 70 | a = new QAction( tr( "Save" ), Resource::loadPixmap( "save" ) , QString::null, 0, this, 0 ); |
76 | a->addTo(popup); | 71 | a->addTo(popup); |
77 | connect(a, SIGNAL(activated()), this, SLOT(slotSave())); | 72 | connect(a, SIGNAL(activated()), this, SLOT(slotSave())); |
78 | 73 | ||
79 | // Action for saving document to a new name | 74 | // Action for saving document to a new name |
80 | a = new QAction( tr( "Save As" ), QPixmap((const char**)file_save_xpm), QString::null, 0, this, 0 ); | 75 | a = new QAction( tr( "Save As" ),Resource::loadPixmap( "save" ) , QString::null, 0, this, 0 ); |
81 | a->addTo(popup); | 76 | a->addTo(popup); |
82 | connect(a, SIGNAL(activated()), this, SLOT(slotSaveAs())); | 77 | connect(a, SIGNAL(activated()), this, SLOT(slotSaveAs())); |
83 | 78 | ||
84 | // Action for closing the currently active document | 79 | // Action for closing the currently active document |
85 | a = new QAction( tr( "Close" ), QPixmap(), QString::null, 0, this, 0 ); | 80 | a = new QAction( tr( "Close" ), Resource::loadPixmap( "quit_icon" ) , QString::null, 0, this, 0 ); |
86 | a->addTo(popup); | 81 | a->addTo(popup); |
87 | connect(a, SIGNAL(activated()), this, SLOT(slotClose())); | 82 | connect(a, SIGNAL(activated()), this, SLOT(slotClose())); |
88 | 83 | ||
89 | 84 | ||
90 | mb->insertItem(tr("File"),popup); | 85 | mb->insertItem(tr("File"),popup); |
91 | 86 | ||
92 | //EDIT ACTIONS | 87 | //EDIT ACTIONS |
@@ -108,18 +103,18 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : | |||
108 | editFindReplace = new QAction( tr( "Find/Replace" ), Resource::loadPixmap("find"), QString::null, 0, this, 0 ); | 103 | editFindReplace = new QAction( tr( "Find/Replace" ), Resource::loadPixmap("find"), QString::null, 0, this, 0 ); |
109 | editFindReplace->addTo( bar ); | 104 | editFindReplace->addTo( bar ); |
110 | 105 | ||
111 | // Action for undo | 106 | // Action for undo |
112 | editUndo = new QAction( tr( "Undo" ), QPixmap((const char**)edit_undo_xpm), QString::null, 0, this, 0 ); | 107 | editUndo = new QAction( tr( "Undo" ),Resource::loadPixmap( "undo" ) , QString::null, 0, this, 0 ); |
113 | editUndo->addTo( bar ); | 108 | editUndo->addTo( bar ); |
114 | 109 | ||
115 | // Action for redo | 110 | // Action for redo |
116 | editRedo = new QAction( tr( "Redo" ), QPixmap((const char**)edit_redo_xpm), QString::null, 0, this, 0 ); | 111 | editRedo = new QAction( tr( "Redo" ),Resource::loadPixmap( "redo" ) , QString::null, 0, this, 0 ); |
117 | editRedo->addTo( bar ); | 112 | editRedo->addTo( bar ); |
118 | 113 | ||
119 | //VIEW ACITONS | 114 | //VIEW ACITONS |
120 | popup = new QPopupMenu( this ); | 115 | popup = new QPopupMenu( this ); |
121 | 116 | ||
122 | viewIncFontSizes = new QAction( tr( "Font +" ), QString::null, 0, this, 0 ); | 117 | viewIncFontSizes = new QAction( tr( "Font +" ), QString::null, 0, this, 0 ); |
123 | viewIncFontSizes->addTo( popup ); | 118 | viewIncFontSizes->addTo( popup ); |
124 | 119 | ||
125 | viewDecFontSizes = new QAction( tr( "Font -" ), QString::null, 0, this, 0 ); | 120 | viewDecFontSizes = new QAction( tr( "Font -" ), QString::null, 0, this, 0 ); |
@@ -197,9 +192,9 @@ void TinyKate::slotCurrentChanged( QWidget * view) | |||
197 | disconnect(utilSettings,SIGNAL(activated()), currentView,SLOT(configDialog())); | 192 | disconnect(utilSettings,SIGNAL(activated()), currentView,SLOT(configDialog())); |
198 | } | 193 | } |
199 | 194 | ||
200 | currentView=(KTextEditor::View*)view; | 195 | currentView=(KTextEditor::View*)view; |
201 | 196 | ||
202 | connect(editCopy,SIGNAL(activated()),currentView,SLOT(copy())); | 197 | connect(editCopy,SIGNAL(activated()),currentView,SLOT(copy())); |
203 | connect(editCut,SIGNAL(activated()),currentView,SLOT(cut())); | 198 | connect(editCut,SIGNAL(activated()),currentView,SLOT(cut())); |
204 | connect(editPaste,SIGNAL(activated()),currentView,SLOT(paste())); | 199 | connect(editPaste,SIGNAL(activated()),currentView,SLOT(paste())); |
205 | connect(editUndo,SIGNAL(activated()),currentView,SLOT(undo())); | 200 | connect(editUndo,SIGNAL(activated()),currentView,SLOT(undo())); |