1.1 --- a/texteditor.cpp Tue Jan 24 15:09:48 2006 +0000
1.2 +++ b/texteditor.cpp Tue Apr 11 14:36:20 2006 +0000
1.3 @@ -31,32 +31,14 @@
1.4 #include "noteobj.h"
1.5 #include "version.h"
1.6
1.7 -#include "icons/fileopen.xpm"
1.8 -#include "icons/filesave.xpm"
1.9 -#include "icons/fileprint.xpm"
1.10 -#include "icons/editundo.xpm"
1.11 -#include "icons/editredo.xpm"
1.12 -#include "icons/editcopy.xpm"
1.13 -#include "icons/editcut.xpm"
1.14 -#include "icons/editpaste.xpm"
1.15 -#include "icons/edittrash.xpm"
1.16 -#include "icons/formatfixedfont.xpm"
1.17 -#include "icons/formattextbold.xpm"
1.18 -#include "icons/formattextitalic.xpm"
1.19 -#include "icons/formattextunder.xpm"
1.20 -#include "icons/formattextleft.xpm"
1.21 -#include "icons/formattextcenter.xpm"
1.22 -#include "icons/formattextright.xpm"
1.23 -#include "icons/formattextjustify.xpm"
1.24 -#include "icons/formattextsub.xpm"
1.25 -#include "icons/formattextsuper.xpm"
1.26 -
1.27 extern QCanvas* actCanvas;
1.28 extern int statusbarTime;
1.29 extern QSettings settings;
1.30
1.31 extern QAction *actionViewToggleNoteEditor;
1.32
1.33 +extern QString iconPath;
1.34 +
1.35 using namespace std;
1.36
1.37
1.38 @@ -245,7 +227,7 @@
1.39 menuBar()->insertItem( tr( "&File" ), menu );
1.40
1.41 QAction *a;
1.42 - a = new QAction( tr( "Import" ), QPixmap( fileopen_xpm), tr( "&Import..." ), CTRL + Key_O, this, "fileImport" );
1.43 + a = new QAction( tr( "Import" ), QPixmap( iconPath+"fileopen.png"), tr( "&Import..." ), CTRL + Key_O, this, "fileImport" );
1.44 connect( a, SIGNAL( activated() ), this, SLOT( textLoad() ) );
1.45 a->setEnabled(false);
1.46 a->addTo( tb );
1.47 @@ -253,7 +235,7 @@
1.48 actionFileLoad=a;
1.49
1.50 menu->insertSeparator();
1.51 - a = new QAction( tr( "Export Note (HTML)" ), QPixmap( filesave_xpm ), tr( "&Export..." ), CTRL + Key_S, this, "fileSave" );
1.52 + a = new QAction( tr( "Export Note (HTML)" ), QPixmap(iconPath+"filesave.png" ), tr( "&Export..." ), CTRL + Key_S, this, "fileSave" );
1.53 connect( a, SIGNAL( activated() ), this, SLOT( textSave() ) );
1.54 a->addTo( tb );
1.55 a->addTo( menu );
1.56 @@ -270,7 +252,7 @@
1.57 actionFileSaveAs=a;
1.58
1.59 menu->insertSeparator();
1.60 - a = new QAction( tr( "Print Note" ), QPixmap( fileprint_xpm ), tr( "&Print..." ), CTRL + Key_P, this, "filePrint" );
1.61 + a = new QAction( tr( "Print Note" ), QPixmap(iconPath+"fileprint.png" ), tr( "&Print..." ), CTRL + Key_P, this, "filePrint" );
1.62 connect( a, SIGNAL( activated() ), this, SLOT( textPrint() ) );
1.63 a->addTo( tb );
1.64 a->addTo( menu );
1.65 @@ -285,13 +267,13 @@
1.66 menuBar()->insertItem( tr( "&Edit" ), menu );
1.67
1.68 QAction *a;
1.69 - a = new QAction( tr( "Undo" ), QPixmap(editundo_xpm), tr( "&Undo" ), CTRL + Key_Z, this, "undoEvent" );
1.70 + a = new QAction( tr( "Undo" ), QPixmap(iconPath+"undo.png"), tr( "&Undo" ), CTRL + Key_Z, this, "undoEvent" );
1.71 connect( a, SIGNAL( activated() ), e, SLOT( undo() ) );
1.72 a->addTo( menu );
1.73 a->addTo( tb);
1.74 actionEditUndo=a;
1.75
1.76 - a = new QAction( tr( "Redo" ), QPixmap( editredo_xpm ), tr( "&Redo" ), CTRL + Key_Y, this, "editRedo" );
1.77 + a = new QAction( tr( "Redo" ), QPixmap(iconPath+"redo.png" ), tr( "&Redo" ), CTRL + Key_Y, this, "editRedo" );
1.78 connect( a, SIGNAL( activated() ), e, SLOT( redo() ) );
1.79 a->addTo( tb );
1.80 a->addTo( menu );
1.81 @@ -303,25 +285,25 @@
1.82 a->addTo( menu );
1.83
1.84 menu->insertSeparator();
1.85 - a = new QAction( tr( "Copy" ), QPixmap( editcopy_xpm ), tr( "&Copy" ), CTRL + Key_C, this, "editCopy" );
1.86 + a = new QAction( tr( "Copy" ), QPixmap(iconPath+"editcopy.png" ), tr( "&Copy" ), CTRL + Key_C, this, "editCopy" );
1.87 connect( a, SIGNAL( activated() ), e, SLOT( copy() ) );
1.88 a->addTo( tb );
1.89 a->addTo( menu );
1.90 actionEditCopy=a;
1.91
1.92 - a = new QAction( tr( "Cut" ), QPixmap( editcut_xpm ), tr( "Cu&t" ), CTRL + Key_X, this, "editCut" );
1.93 + a = new QAction( tr( "Cut" ), QPixmap(iconPath+"editcut.png" ), tr( "Cu&t" ), CTRL + Key_X, this, "editCut" );
1.94 connect( a, SIGNAL( activated() ), e, SLOT( cut() ) );
1.95 a->addTo( tb );
1.96 a->addTo( menu );
1.97 actionEditCut=a;
1.98
1.99 - a = new QAction( tr( "Paste" ), QPixmap( editpaste_xpm ), tr( "&Paste" ), CTRL + Key_V, this, "editPaste" );
1.100 + a = new QAction( tr( "Paste" ), QPixmap(iconPath+"editpaste.png" ), tr( "&Paste" ), CTRL + Key_V, this, "editPaste" );
1.101 connect( a, SIGNAL( activated() ), e, SLOT( paste() ) );
1.102 a->addTo( tb );
1.103 a->addTo( menu );
1.104 actionEditPaste=a;
1.105
1.106 - a = new QAction( tr( "Delete all" ), QPixmap( edittrash_xpm ), tr( "&Delete All" ), 0, this, "editDeleteAll" );
1.107 + a = new QAction( tr( "Delete all" ), QPixmap( iconPath+"edittrash.png"), tr( "&Delete All" ), 0, this, "editDeleteAll" );
1.108 connect( a, SIGNAL( activated() ), e, SLOT( clear() ) );
1.109 a->addTo( tb );
1.110 a->addTo( menu );
1.111 @@ -347,7 +329,7 @@
1.112
1.113 QAction *a;
1.114
1.115 - a = new QAction( tr( "Toggle font hint for the whole text" ), QPixmap(formatfixedfont_xpm), tr( "&Font hint" ), ALT + Key_I, this, "fontHint" );
1.116 + a = new QAction( tr( "Toggle font hint for the whole text" ), QPixmap(iconPath+"formatfixedfont.png"), tr( "&Font hint" ), ALT + Key_I, this, "fontHint" );
1.117 a->setToggleAction (true);
1.118 a->setOn (settings.readBoolEntry ("/vym/noteeditor/fonts/useFixedByDefault",false) );
1.119 connect( a, SIGNAL( activated() ), this, SLOT( toggleFonthint() ) );
1.120 @@ -382,17 +364,17 @@
1.121 actionTextColor->addTo( tb );
1.122 actionTextColor->addTo( menu );
1.123
1.124 - actionTextBold = new QAction( QPixmap (formattextbold_xpm), tr( "&Bold" ), CTRL + Key_B, this, "textBold" );
1.125 + actionTextBold = new QAction( QPixmap (iconPath+"text_bold.png"), tr( "&Bold" ), CTRL + Key_B, this, "textBold" );
1.126 connect( actionTextBold, SIGNAL( activated() ), this, SLOT( textBold() ) );
1.127 actionTextBold->addTo( tb );
1.128 actionTextBold->addTo( menu );
1.129 actionTextBold->setToggleAction( true );
1.130 - actionTextItalic = new QAction( QPixmap(formattextitalic_xpm ), tr( "&Italic" ), CTRL + Key_I, this, "textItalic" );
1.131 + actionTextItalic = new QAction( QPixmap(iconPath+"text_italic.png"), tr( "&Italic" ), CTRL + Key_I, this, "textItalic" );
1.132 connect( actionTextItalic, SIGNAL( activated() ), this, SLOT( textItalic() ) );
1.133 actionTextItalic->addTo( tb );
1.134 actionTextItalic->addTo( menu );
1.135 actionTextItalic->setToggleAction( true );
1.136 - actionTextUnderline = new QAction( QPixmap (formattextunder_xpm ), tr( "&Underline" ), CTRL + Key_U, this, "textUnderline" );
1.137 + actionTextUnderline = new QAction( QPixmap (iconPath+"text_italic.png"), tr( "&Underline" ), CTRL + Key_U, this, "textUnderline" );
1.138 connect( actionTextUnderline, SIGNAL( activated() ), this, SLOT( textUnderline() ) );
1.139 actionTextUnderline->addTo( tb );
1.140 actionTextUnderline->addTo( menu );
1.141 @@ -402,13 +384,13 @@
1.142 QActionGroup *grp = new QActionGroup( this );
1.143 connect( grp, SIGNAL( selected( QAction* ) ), this, SLOT( textAlign( QAction* ) ) );
1.144
1.145 - actionAlignLeft = new QAction( QPixmap (formattextleft_xpm ), tr( "&Left" ), CTRL + Key_L, grp, "textLeft" );
1.146 + actionAlignLeft = new QAction( QPixmap (iconPath+"text_left.png"), tr( "&Left" ), CTRL + Key_L, grp, "textLeft" );
1.147 actionAlignLeft->setToggleAction( true );
1.148 - actionAlignCenter = new QAction( QPixmap (formattextcenter_xpm ), tr( "C&enter" ), CTRL + Key_E, grp, "textCenter" );
1.149 + actionAlignCenter = new QAction( QPixmap (iconPath+"text_center.png"), tr( "C&enter" ), CTRL + Key_E, grp, "textCenter" );
1.150 actionAlignCenter->setToggleAction( true );
1.151 - actionAlignRight = new QAction( QPixmap (formattextright_xpm ), tr( "&Right" ), CTRL + Key_R, grp, "textRight" );
1.152 + actionAlignRight = new QAction( QPixmap (iconPath+"text_right.png" ), tr( "&Right" ), CTRL + Key_R, grp, "textRight" );
1.153 actionAlignRight->setToggleAction( true );
1.154 - actionAlignJustify = new QAction( QPixmap ( formattextjustify_xpm ), tr( "&Justify" ), CTRL + Key_J, grp, "textjustify" );
1.155 + actionAlignJustify = new QAction( QPixmap ( iconPath+"text_block.png"), tr( "&Justify" ), CTRL + Key_J, grp, "textjustify" );
1.156 actionAlignJustify->setToggleAction( true );
1.157
1.158 grp->addTo( tb );
1.159 @@ -416,12 +398,12 @@
1.160
1.161 QActionGroup *grp2 = new QActionGroup( this );
1.162 grp2->setExclusive(false);
1.163 - actionAlignSubScript = new QAction( QPixmap (formattextsub_xpm ), tr( "Subs&cript" ), CTRL + SHIFT + Key_B, grp2, "textSubscript" );
1.164 + actionAlignSubScript = new QAction( QPixmap (iconPath+"text_sub.png"), tr( "Subs&cript" ), CTRL + SHIFT + Key_B, grp2, "textSubscript" );
1.165
1.166 actionAlignSubScript->setToggleAction( true );
1.167 connect(actionAlignSubScript, SIGNAL(activated()), this, SLOT(textVAlign()));
1.168
1.169 - actionAlignSuperScript = new QAction( QPixmap (formattextsuper_xpm ), tr( "Su&perscript" ), CTRL + SHIFT + Key_P, grp2, "textSuperscript" );
1.170 + actionAlignSuperScript = new QAction( QPixmap (iconPath+"text_super.png"), tr( "Su&perscript" ), CTRL + SHIFT + Key_P, grp2, "textSuperscript" );
1.171
1.172 actionAlignSuperScript->setToggleAction( true );
1.173 connect(actionAlignSuperScript, SIGNAL(activated()), this, SLOT(textVAlign()));