summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-write/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-write/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-write/mainwindow.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/noncore/apps/opie-write/mainwindow.cpp b/noncore/apps/opie-write/mainwindow.cpp
index 6bb524f..90e1a70 100644
--- a/noncore/apps/opie-write/mainwindow.cpp
+++ b/noncore/apps/opie-write/mainwindow.cpp
@@ -120,14 +120,14 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags fl )
120 editorStack->addWidget( editor, 1 ); 120 editorStack->addWidget( editor, 1 );
121 121
122 setupActions(); 122 setupActions();
123 123
124 QObject::connect( fileSelector, SIGNAL(closeMe()), 124 QObject::connect( fileSelector, SIGNAL(closeMe()),
125 this, SLOT(showEditTools()) ); 125 this, SLOT(showEditTools()) );
126 QObject::connect( fileSelector, SIGNAL(fileSelected(const DocLnk &)), 126 QObject::connect( fileSelector, SIGNAL(fileSelected(const DocLnk&)),
127 this, SLOT(openFile(const DocLnk &)) ); 127 this, SLOT(openFile(const DocLnk&)) );
128 QObject::connect( fileSelector, SIGNAL(newSelected(const DocLnk&)), 128 QObject::connect( fileSelector, SIGNAL(newSelected(const DocLnk&)),
129 this, SLOT(newFile(const DocLnk&)) ); 129 this, SLOT(newFile(const DocLnk&)) );
130 130
131 if ( fileSelector->fileCount() < 1 ) 131 if ( fileSelector->fileCount() < 1 )
132 fileNew(); 132 fileNew();
133 else { 133 else {
@@ -210,24 +210,24 @@ void MainWindow::setupActions()
210 tbFont->setHorizontalStretchable(TRUE); 210 tbFont->setHorizontalStretchable(TRUE);
211 211
212 comboFont = new QComboBox( FALSE, tbFont ); 212 comboFont = new QComboBox( FALSE, tbFont );
213 FontDatabase db; 213 FontDatabase db;
214 QStringList f= db.families(); 214 QStringList f= db.families();
215 comboFont->insertStringList( db.families() ); 215 comboFont->insertStringList( db.families() );
216 connect( comboFont, SIGNAL( activated( const QString & ) ), 216 connect( comboFont, SIGNAL( activated(const QString&) ),
217 this, SLOT( textFamily( const QString & ) ) ); 217 this, SLOT( textFamily(const QString&) ) );
218 comboFont->setCurrentItem( comboFont->listBox()->index( comboFont->listBox()->findItem( QApplication::font().family() ) ) ); 218 comboFont->setCurrentItem( comboFont->listBox()->index( comboFont->listBox()->findItem( QApplication::font().family() ) ) );
219 comboFont->setMaximumWidth(90); 219 comboFont->setMaximumWidth(90);
220 220
221 comboSize = new QComboBox( TRUE, tbFont ); 221 comboSize = new QComboBox( TRUE, tbFont );
222 QValueList<int> sizes = db.standardSizes(); 222 QValueList<int> sizes = db.standardSizes();
223 QValueList<int>::Iterator it = sizes.begin(); 223 QValueList<int>::Iterator it = sizes.begin();
224 for ( ; it != sizes.end(); ++it ) 224 for ( ; it != sizes.end(); ++it )
225 comboSize->insertItem( QString::number( *it ) ); 225 comboSize->insertItem( QString::number( *it ) );
226 connect( comboSize, SIGNAL( activated( const QString & ) ), 226 connect( comboSize, SIGNAL( activated(const QString&) ),
227 this, SLOT( textSize( const QString & ) ) ); 227 this, SLOT( textSize(const QString&) ) );
228 comboSize->lineEdit()->setText( QString::number( QApplication::font().pointSize() ) ); 228 comboSize->lineEdit()->setText( QString::number( QApplication::font().pointSize() ) );
229 comboSize->setFixedWidth( 38 ); 229 comboSize->setFixedWidth( 38 );
230 230
231 tbStyle = new QToolBar( this ); 231 tbStyle = new QToolBar( this );
232 tbStyle->setLabel( "Style Actions" ); 232 tbStyle->setLabel( "Style Actions" );
233 233
@@ -267,18 +267,18 @@ Qt3::QTextEdit *MainWindow::currentEditor() const
267{ 267{
268 return editor; 268 return editor;
269} 269}
270 270
271void MainWindow::doConnections( Qt3::QTextEdit *e ) 271void 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
281void MainWindow::updateFontSizeCombo( const QFont &f ) 281void MainWindow::updateFontSizeCombo( const QFont &f )
282{ 282{
283 comboSize->clear(); 283 comboSize->clear();
284 FontDatabase fdb; 284 FontDatabase fdb;