-rw-r--r-- | noncore/apps/opie-write/mainwindow.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/noncore/apps/opie-write/mainwindow.cpp b/noncore/apps/opie-write/mainwindow.cpp index ed95e83..bcafd16 100644 --- a/noncore/apps/opie-write/mainwindow.cpp +++ b/noncore/apps/opie-write/mainwindow.cpp @@ -20,12 +20,14 @@ **********************************************************************/ #include "mainwindow.h" #include <qpe/fileselector.h> #include <qpe/applnk.h> #include <qpe/resource.h> +#include <qpe/fontdatabase.h> + //#include "qspellchecker.h" #include "qtextedit.h" #include <qaction.h> #include <qtoolbar.h> #include <qtoolbutton.h> #include <qtabwidget.h> @@ -205,17 +207,19 @@ void MainWindow::setupActions() tbFont = new QToolBar( this ); tbFont->setLabel( "Font Actions" ); tbFont->setHorizontalStretchable(TRUE); comboFont = new QComboBox( FALSE, tbFont ); - QFontDatabase db; + FontDatabase db; + QStringList f= db.families(); comboFont->insertStringList( db.families() ); connect( comboFont, SIGNAL( activated( const QString & ) ), this, SLOT( textFamily( const QString & ) ) ); comboFont->setCurrentItem( comboFont->listBox()->index( comboFont->listBox()->findItem( QApplication::font().family() ) ) ); + comboFont->setMaximumWidth(90); comboSize = new QComboBox( TRUE, tbFont ); QValueList<int> sizes = db.standardSizes(); QValueList<int>::Iterator it = sizes.begin(); for ( ; it != sizes.end(); ++it ) comboSize->insertItem( QString::number( *it ) ); @@ -274,13 +278,13 @@ void MainWindow::doConnections( Qt3::QTextEdit *e ) this, SLOT( alignmentChanged( int ) ) ); } void MainWindow::updateFontSizeCombo( const QFont &f ) { comboSize->clear(); - QFontDatabase fdb; + FontDatabase fdb; QValueList<int> sizes = fdb.pointSizes( f.family() ); QValueList<int>::Iterator it = sizes.begin(); for ( ; it != sizes.end(); ++it ) comboSize->insertItem( QString::number( *it ) ); } |