-rw-r--r-- | noncore/apps/opie-write/mainwindow.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/apps/opie-write/mainwindow.cpp b/noncore/apps/opie-write/mainwindow.cpp index bcafd16..4a49abf 100644 --- a/noncore/apps/opie-write/mainwindow.cpp +++ b/noncore/apps/opie-write/mainwindow.cpp | |||
@@ -163,39 +163,39 @@ void MainWindow::setupActions() | |||
163 | // ### perhaps these shortcut keys should have some | 163 | // ### perhaps these shortcut keys should have some |
164 | // IPaq keys defined??? | 164 | // IPaq keys defined??? |
165 | QAction *a; | 165 | QAction *a; |
166 | 166 | ||
167 | a = new QAction( tr( "New" ), Resource::loadPixmap("new"), QString::null, 0, this, 0 ); | 167 | a = new QAction( tr( "New" ), Resource::loadPixmap("new"), QString::null, 0, this, 0 ); |
168 | connect( a, SIGNAL(activated()), this, SLOT(fileNew()) ); | 168 | connect( a, SIGNAL(activated()), this, SLOT(fileNew()) ); |
169 | a->addTo( file ); | 169 | a->addTo( file ); |
170 | 170 | ||
171 | a = new QAction( tr( "Open" ), Resource::loadPixmap( "fileopen" ), QString::null, 0, this, 0 ); | 171 | a = new QAction( tr( "Open" ), Resource::loadPixmap( "fileopen" ), QString::null, 0, this, 0 ); |
172 | connect( a, SIGNAL(activated()), this, SLOT(fileOpen()) ); | 172 | connect( a, SIGNAL(activated()), this, SLOT(fileOpen()) ); |
173 | a->addTo( file ); | 173 | a->addTo( file ); |
174 | 174 | ||
175 | a = new QAction( tr( "Undo" ), Resource::loadIconSet("opie-write/undo"), | 175 | a = new QAction( tr( "Undo" ), Resource::loadIconSet("undo"), |
176 | QString::null, 0, this, "editUndo" ); | 176 | QString::null, 0, this, "editUndo" ); |
177 | connect( a, SIGNAL( activated() ), this, SLOT( editUndo() ) ); | 177 | connect( a, SIGNAL( activated() ), this, SLOT( editUndo() ) ); |
178 | connect( editor, SIGNAL(undoAvailable(bool)), a, SLOT(setEnabled(bool)) ); | 178 | connect( editor, SIGNAL(undoAvailable(bool)), a, SLOT(setEnabled(bool)) ); |
179 | a->addTo( tbEdit ); | 179 | a->addTo( tbEdit ); |
180 | a->addTo( edit ); | 180 | a->addTo( edit ); |
181 | a = new QAction( tr( "Redo" ), Resource::loadIconSet("opie-write/redo"), | 181 | a = new QAction( tr( "Redo" ), Resource::loadIconSet("redo"), |
182 | QString::null, 0, this, "editRedo" ); | 182 | QString::null, 0, this, "editRedo" ); |
183 | connect( a, SIGNAL( activated() ), this, SLOT( editRedo() ) ); | 183 | connect( a, SIGNAL( activated() ), this, SLOT( editRedo() ) ); |
184 | connect( editor, SIGNAL(redoAvailable(bool)), a, SLOT(setEnabled(bool)) ); | 184 | connect( editor, SIGNAL(redoAvailable(bool)), a, SLOT(setEnabled(bool)) ); |
185 | a->addTo( tbEdit ); | 185 | a->addTo( tbEdit ); |
186 | a->addTo( edit ); | 186 | a->addTo( edit ); |
187 | 187 | ||
188 | edit->insertSeparator(); | 188 | edit->insertSeparator(); |
189 | 189 | ||
190 | a = new QAction( tr( "Copy" ), Resource::loadIconSet("copy"), | 190 | a = new QAction( tr( "Copy" ), Resource::loadIconSet("copy"), |
191 | QString::null, 0, this, "editCopy" ); | 191 | QString::null, 0, this, "editCopy" ); |
192 | connect( a, SIGNAL( activated() ), this, SLOT( editCopy() ) ); | 192 | connect( a, SIGNAL( activated() ), this, SLOT( editCopy() ) ); |
193 | connect( editor, SIGNAL(copyAvailable(bool)), a, SLOT(setEnabled(bool)) ); | 193 | connect( editor, SIGNAL(copyAvailable(bool)), a, SLOT(setEnabled(bool)) ); |
194 | a->addTo( tbEdit ); | 194 | a->addTo( tbEdit ); |
195 | a->addTo( edit ); | 195 | a->addTo( edit ); |
196 | a = new QAction( tr( "Cut" ), Resource::loadIconSet("cut"), | 196 | a = new QAction( tr( "Cut" ), Resource::loadIconSet("cut"), |
197 | QString::null, 0, this, "editCut" ); | 197 | QString::null, 0, this, "editCut" ); |
198 | connect( a, SIGNAL( activated() ), this, SLOT( editCut() ) ); | 198 | connect( a, SIGNAL( activated() ), this, SLOT( editCut() ) ); |
199 | connect( editor, SIGNAL(copyAvailable(bool)), a, SLOT(setEnabled(bool)) ); | 199 | connect( editor, SIGNAL(copyAvailable(bool)), a, SLOT(setEnabled(bool)) ); |
200 | a->addTo( tbEdit ); | 200 | a->addTo( tbEdit ); |
201 | a->addTo( edit ); | 201 | a->addTo( edit ); |
@@ -256,25 +256,25 @@ void MainWindow::setupActions() | |||
256 | actionTextUnderline->setToggleAction( TRUE ); | 256 | actionTextUnderline->setToggleAction( TRUE ); |
257 | 257 | ||
258 | alignMenu = new ButtonMenu( tbStyle ); | 258 | alignMenu = new ButtonMenu( tbStyle ); |
259 | alignMenu->insertItem( Resource::loadPixmap("left"), tr("Left"), AlignLeft ); | 259 | alignMenu->insertItem( Resource::loadPixmap("left"), tr("Left"), AlignLeft ); |
260 | alignMenu->insertItem( Resource::loadPixmap("center"), tr("Center"), AlignCenter ); | 260 | alignMenu->insertItem( Resource::loadPixmap("center"), tr("Center"), AlignCenter ); |
261 | alignMenu->insertItem( Resource::loadPixmap("right"), tr("Right"), AlignRight ); | 261 | alignMenu->insertItem( Resource::loadPixmap("right"), tr("Right"), AlignRight ); |
262 | alignMenu->insertItem( Resource::loadPixmap("opie-write/justify"), tr("Full"), Qt3::AlignJustify ); | 262 | alignMenu->insertItem( Resource::loadPixmap("opie-write/justify"), tr("Full"), Qt3::AlignJustify ); |
263 | connect( alignMenu, SIGNAL(activated(int)), this, SLOT(textAlign(int)) ); | 263 | connect( alignMenu, SIGNAL(activated(int)), this, SLOT(textAlign(int)) ); |
264 | } | 264 | } |
265 | 265 | ||
266 | Qt3::QTextEdit *MainWindow::currentEditor() const | 266 | Qt3::QTextEdit *MainWindow::currentEditor() const |
267 | { | 267 | { |
268 | return editor; | 268 | return editor; |
269 | } | 269 | } |
270 | 270 | ||
271 | void MainWindow::doConnections( Qt3::QTextEdit *e ) | 271 | void MainWindow::doConnections( Qt3::QTextEdit *e ) |
272 | { | 272 | { |
273 | connect( e, SIGNAL( currentFontChanged( const QFont & ) ), | 273 | connect( e, SIGNAL( currentFontChanged( const QFont & ) ), |
274 | this, SLOT( fontChanged( const QFont & ) ) ); | 274 | this, SLOT( fontChanged( const QFont & ) ) ); |
275 | connect( e, SIGNAL( currentColorChanged( const QColor & ) ), | 275 | connect( e, SIGNAL( currentColorChanged( const QColor & ) ), |
276 | this, SLOT( colorChanged( const QColor & ) ) ); | 276 | this, SLOT( colorChanged( const QColor & ) ) ); |
277 | connect( e, SIGNAL( currentAlignmentChanged( int ) ), | 277 | connect( e, SIGNAL( currentAlignmentChanged( int ) ), |
278 | this, SLOT( alignmentChanged( int ) ) ); | 278 | this, SLOT( alignmentChanged( int ) ) ); |
279 | } | 279 | } |
280 | 280 | ||
@@ -498,25 +498,25 @@ void MainWindow::hideEditTools( void ) | |||
498 | // let's reset the buttons... | 498 | // let's reset the buttons... |
499 | actionTextBold->setOn( FALSE ); | 499 | actionTextBold->setOn( FALSE ); |
500 | actionTextItalic->setOn( FALSE ); | 500 | actionTextItalic->setOn( FALSE ); |
501 | actionTextUnderline->setOn( FALSE ); | 501 | actionTextUnderline->setOn( FALSE ); |
502 | //comboFont->setCurrentText( QApplication::font().family() ); | 502 | //comboFont->setCurrentText( QApplication::font().family() ); |
503 | comboSize->lineEdit()->setText( QString::number(QApplication::font().pointSize() ) ); | 503 | comboSize->lineEdit()->setText( QString::number(QApplication::font().pointSize() ) ); |
504 | tbMenu->hide(); | 504 | tbMenu->hide(); |
505 | tbEdit->hide(); | 505 | tbEdit->hide(); |
506 | tbFont->hide(); | 506 | tbFont->hide(); |
507 | tbStyle->hide(); | 507 | tbStyle->hide(); |
508 | } | 508 | } |
509 | 509 | ||
510 | 510 | ||
511 | void MainWindow::save() | 511 | void MainWindow::save() |
512 | { | 512 | { |
513 | if ( !doc ) | 513 | if ( !doc ) |
514 | return; | 514 | return; |
515 | if ( !editor->isModified() ) | 515 | if ( !editor->isModified() ) |
516 | return; | 516 | return; |
517 | 517 | ||
518 | QString rt = editor->text(); | 518 | QString rt = editor->text(); |
519 | 519 | ||
520 | // quick hack to get around formatting... | 520 | // quick hack to get around formatting... |
521 | editor->setTextFormat( Qt::PlainText ); | 521 | editor->setTextFormat( Qt::PlainText ); |
522 | QString pt = editor->text(); | 522 | QString pt = editor->text(); |