summaryrefslogtreecommitdiff
authordrw <drw>2005-05-16 17:37:44 (UTC)
committer drw <drw>2005-05-16 17:37:44 (UTC)
commita0276f0957bd503491e8d435b7ad1a6479ce24eb (patch) (unidiff)
tree12be007f41dcbe7666b1a53578216cf12423596d
parente90364376c77a2f218b2fb291bb97eda7f18c3cb (diff)
downloadopie-a0276f0957bd503491e8d435b7ad1a6479ce24eb.zip
opie-a0276f0957bd503491e8d435b7ad1a6479ce24eb.tar.gz
opie-a0276f0957bd503491e8d435b7ad1a6479ce24eb.tar.bz2
Resource -> OResource
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-write/mainwindow.cpp49
1 files changed, 27 insertions, 22 deletions
diff --git a/noncore/apps/opie-write/mainwindow.cpp b/noncore/apps/opie-write/mainwindow.cpp
index aa03060..296a1b0 100644
--- a/noncore/apps/opie-write/mainwindow.cpp
+++ b/noncore/apps/opie-write/mainwindow.cpp
@@ -23,9 +23,9 @@
23 23
24/* OPIE */ 24/* OPIE */
25#include <opie2/odebug.h> 25#include <opie2/odebug.h>
26#include <opie2/oresource.h>
26#include <qpe/fileselector.h> 27#include <qpe/fileselector.h>
27#include <qpe/applnk.h> 28#include <qpe/applnk.h>
28#include <qpe/resource.h>
29#include <qpe/fontdatabase.h> 29#include <qpe/fontdatabase.h>
30using namespace Opie::Core; 30using namespace Opie::Core;
31 31
@@ -168,21 +168,23 @@ void MainWindow::setupActions()
168 // IPaq keys defined??? 168 // IPaq keys defined???
169 QAction *a; 169 QAction *a;
170 170
171 a = new QAction( tr( "New" ), Resource::loadPixmap("new"), QString::null, 0, this, 0 ); 171 a = new QAction( tr( "New" ), Opie::Core::OResource::loadPixmap("new", Opie::Core::OResource::SmallIcon),
172 QString::null, 0, this, 0 );
172 connect( a, SIGNAL(activated()), this, SLOT(fileNew()) ); 173 connect( a, SIGNAL(activated()), this, SLOT(fileNew()) );
173 a->addTo( file ); 174 a->addTo( file );
174 175
175 a = new QAction( tr( "Open" ), Resource::loadPixmap( "fileopen" ), QString::null, 0, this, 0 ); 176 a = new QAction( tr( "Open" ), Opie::Core::OResource::loadPixmap( "fileopen", Opie::Core::OResource::SmallIcon ),
177 QString::null, 0, this, 0 );
176 connect( a, SIGNAL(activated()), this, SLOT(fileOpen()) ); 178 connect( a, SIGNAL(activated()), this, SLOT(fileOpen()) );
177 a->addTo( file ); 179 a->addTo( file );
178 180
179 a = new QAction( tr( "Undo" ), Resource::loadIconSet("undo"), 181 a = new QAction( tr( "Undo" ), Opie::Core::OResource::loadPixmap("undo", Opie::Core::OResource::SmallIcon),
180 QString::null, 0, this, "editUndo" ); 182 QString::null, 0, this, "editUndo" );
181 connect( a, SIGNAL( activated() ), this, SLOT( editUndo() ) ); 183 connect( a, SIGNAL( activated() ), this, SLOT( editUndo() ) );
182 connect( editor, SIGNAL(undoAvailable(bool)), a, SLOT(setEnabled(bool)) ); 184 connect( editor, SIGNAL(undoAvailable(bool)), a, SLOT(setEnabled(bool)) );
183 a->addTo( tbEdit ); 185 a->addTo( tbEdit );
184 a->addTo( edit ); 186 a->addTo( edit );
185 a = new QAction( tr( "Redo" ), Resource::loadIconSet("redo"), 187 a = new QAction( tr( "Redo" ), Opie::Core::OResource::loadPixmap("redo", Opie::Core::OResource::SmallIcon),
186 QString::null, 0, this, "editRedo" ); 188 QString::null, 0, this, "editRedo" );
187 connect( a, SIGNAL( activated() ), this, SLOT( editRedo() ) ); 189 connect( a, SIGNAL( activated() ), this, SLOT( editRedo() ) );
188 connect( editor, SIGNAL(redoAvailable(bool)), a, SLOT(setEnabled(bool)) ); 190 connect( editor, SIGNAL(redoAvailable(bool)), a, SLOT(setEnabled(bool)) );
@@ -191,19 +193,19 @@ void MainWindow::setupActions()
191 193
192 edit->insertSeparator(); 194 edit->insertSeparator();
193 195
194 a = new QAction( tr( "Copy" ), Resource::loadIconSet("copy"), 196 a = new QAction( tr( "Copy" ), Opie::Core::OResource::loadPixmap("copy", Opie::Core::OResource::SmallIcon ),
195 QString::null, 0, this, "editCopy" ); 197 QString::null, 0, this, "editCopy" );
196 connect( a, SIGNAL( activated() ), this, SLOT( editCopy() ) ); 198 connect( a, SIGNAL( activated() ), this, SLOT( editCopy() ) );
197 connect( editor, SIGNAL(copyAvailable(bool)), a, SLOT(setEnabled(bool)) ); 199 connect( editor, SIGNAL(copyAvailable(bool)), a, SLOT(setEnabled(bool)) );
198 a->addTo( tbEdit ); 200 a->addTo( tbEdit );
199 a->addTo( edit ); 201 a->addTo( edit );
200 a = new QAction( tr( "Cut" ), Resource::loadIconSet("cut"), 202 a = new QAction( tr( "Cut" ), Opie::Core::OResource::loadPixmap("cut", Opie::Core::OResource::SmallIcon ),
201 QString::null, 0, this, "editCut" ); 203 QString::null, 0, this, "editCut" );
202 connect( a, SIGNAL( activated() ), this, SLOT( editCut() ) ); 204 connect( a, SIGNAL( activated() ), this, SLOT( editCut() ) );
203 connect( editor, SIGNAL(copyAvailable(bool)), a, SLOT(setEnabled(bool)) ); 205 connect( editor, SIGNAL(copyAvailable(bool)), a, SLOT(setEnabled(bool)) );
204 a->addTo( tbEdit ); 206 a->addTo( tbEdit );
205 a->addTo( edit ); 207 a->addTo( edit );
206 a = new QAction( tr( "Paste" ), Resource::loadPixmap("paste"), 208 a = new QAction( tr( "Paste" ), Opie::Core::OResource::loadPixmap("paste", Opie::Core::OResource::SmallIcon ),
207 QString::null, 0, this, "editPaste" ); 209 QString::null, 0, this, "editPaste" );
208 connect( a, SIGNAL( activated() ), this, SLOT( editPaste() ) ); 210 connect( a, SIGNAL( activated() ), this, SLOT( editPaste() ) );
209 a->addTo( tbEdit ); 211 a->addTo( tbEdit );
@@ -236,34 +238,37 @@ void MainWindow::setupActions()
236 tbStyle->setLabel( "Style Actions" ); 238 tbStyle->setLabel( "Style Actions" );
237 239
238 actionTextBold = new QAction( tr( "Bold" ), 240 actionTextBold = new QAction( tr( "Bold" ),
239 Resource::loadPixmap("bold"), 241 Opie::Core::OResource::loadPixmap("bold", Opie::Core::OResource::SmallIcon ),
240 QString::null, CTRL + Key_B, 242 QString::null, CTRL + Key_B,
241 this, "textBold" ); 243 this, "textBold" );
242 connect( actionTextBold, SIGNAL( activated() ), this, SLOT( textBold() ) ); 244 connect( actionTextBold, SIGNAL( activated() ), this, SLOT( textBold() ) );
243 actionTextBold->addTo( tbStyle ); 245 actionTextBold->addTo( tbStyle );
244 actionTextBold->setToggleAction( TRUE ); 246 actionTextBold->setToggleAction( TRUE );
245 actionTextItalic = new QAction( tr( "Italic" ), 247 actionTextItalic = new QAction( tr( "Italic" ),
246 Resource::loadPixmap("italic"), 248 Opie::Core::OResource::loadPixmap("italic", Opie::Core::OResource::SmallIcon ),
247 tr( "&Italic" ), CTRL + Key_I, 249 tr( "&Italic" ), CTRL + Key_I,
248 this, "textItalic" ); 250 this, "textItalic" );
249 connect( actionTextItalic, SIGNAL( activated() ), this, 251 connect( actionTextItalic, SIGNAL( activated() ), this,
250 SLOT( textItalic() ) ); 252 SLOT( textItalic() ) );
251 actionTextItalic->addTo( tbStyle ); 253 actionTextItalic->addTo( tbStyle );
252 actionTextItalic->setToggleAction( TRUE ); 254 actionTextItalic->setToggleAction( TRUE );
253 actionTextUnderline = new QAction( tr( "Underline" ), 255 actionTextUnderline = new QAction( tr( "Underline" ),
254 Resource::loadPixmap("underline"), 256 Opie::Core::OResource::loadPixmap("underline", Opie::Core::OResource::SmallIcon ),
255 tr( "&Underline" ), CTRL + Key_U, 257 tr( "&Underline" ), CTRL + Key_U,
256 this, "textUnderline" ); 258 this, "textUnderline" );
257 connect( actionTextUnderline, SIGNAL( activated() ), 259 connect( actionTextUnderline, SIGNAL( activated() ),
258 this, SLOT( textUnderline() ) ); 260 this, SLOT( textUnderline() ) );
259 actionTextUnderline->addTo( tbStyle ); 261 actionTextUnderline->addTo( tbStyle );
260 actionTextUnderline->setToggleAction( TRUE ); 262 actionTextUnderline->setToggleAction( TRUE );
261 263
262 alignMenu = new ButtonMenu( tbStyle ); 264 alignMenu = new ButtonMenu( tbStyle );
263 alignMenu->insertItem( Resource::loadPixmap("left"), tr("Left"), AlignLeft ); 265 alignMenu->insertItem( Opie::Core::OResource::loadPixmap("left", Opie::Core::OResource::SmallIcon), tr("Left"), AlignLeft );
264 alignMenu->insertItem( Resource::loadPixmap("center"), tr("Center"), AlignCenter ); 266 alignMenu->insertItem( Opie::Core::OResource::loadPixmap("center", Opie::Core::OResource::SmallIcon),
265 alignMenu->insertItem( Resource::loadPixmap("right"), tr("Right"), AlignRight ); 267 tr("Center"), AlignCenter );
266 alignMenu->insertItem( Resource::loadPixmap("opie-write/justify"), tr("Full"), Qt3::AlignJustify ); 268 alignMenu->insertItem( Opie::Core::OResource::loadPixmap("right", Opie::Core::OResource::SmallIcon),
269 tr("Right"), AlignRight );
270 alignMenu->insertItem( Opie::Core::OResource::loadPixmap("opie-write/justify", Opie::Core::OResource::SmallIcon),
271 tr("Full"), Qt3::AlignJustify );
267 connect( alignMenu, SIGNAL(activated(int)), this, SLOT(textAlign(int)) ); 272 connect( alignMenu, SIGNAL(activated(int)), this, SLOT(textAlign(int)) );
268} 273}
269 274