summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/fontDialog.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/apps/textedit/fontDialog.cpp b/core/apps/textedit/fontDialog.cpp
index 681e8a6..5cdf538 100644
--- a/core/apps/textedit/fontDialog.cpp
+++ b/core/apps/textedit/fontDialog.cpp
@@ -25,97 +25,98 @@ copyright 2002 by L.J. Potter ljp@llornkcor.com
#include <qlabel.h>
#include <qlistbox.h>
#include <qmultilineedit.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
FontDialog::FontDialog( QWidget * parent, const char* name , bool modal, WFlags fl )
:QDialog /*QWidget*/( parent, name , modal, fl )
{
if ( !name )
setName( tr("FontDialog") );
setCaption( tr( "Font Dialog" ) );
FontTextLabel4 = new QLabel( this, "TextLabel4" );
FontTextLabel4->setGeometry( QRect( 145, 100, 30, 19 /*192, 0, 43, 19*/ ) );
FontTextLabel4->setText( tr( "Size" ) );
FamilyGroup = new QGroupBox( this, "FamilyGroup" );
FamilyGroup->setGeometry( QRect( 5, 5, 115, 135 /*0, 6, 185, 131 */) );
FamilyGroup->setTitle( tr( "Font" ) );
familyListBox = new QListBox( FamilyGroup, "familyListBox" );
familyListBox->setGeometry( QRect( 5, 20, 100, 105 /* 6, 18, 170, 105 */) );
GroupBox2 = new QGroupBox( this, "GroupBox2" );
GroupBox2->setGeometry( QRect( 120, 5, 100, 90/* 0, 138, 170, 90*/ ) );
GroupBox2->setTitle( tr( "Font Style" ) );
styleListBox = new QListBox( GroupBox2, "styleListBox" );
styleListBox->setGeometry( QRect( 5, 20, 90, 60 /*10, 20, 150, 61*/ ) );
sizeListBox = new QListBox( this, "sizeListBox" );
sizeListBox->setGeometry( QRect( 180, 100, 40, 60 /* 192, 24, 40, 108 */) );
MultiLineEdit1 = new QMultiLineEdit( this, "MultiLineEdit1" );
MultiLineEdit1->setGeometry( QRect( 5, 165, 215, 45 /* 6, 234, 222, 55*/ ) );
MultiLineEdit1->setText( tr( "The Quick Brown Fox Jumps Over The Lazy Dog" ) );
MultiLineEdit1->setWordWrap(QMultiLineEdit::WidgetWidth);
connect( familyListBox,SIGNAL( highlighted( const QString &)),SLOT( familyListBoxSlot(const QString &) ));
connect( styleListBox,SIGNAL( highlighted( const QString &)),SLOT( styleListBoxSlot(const QString &) ));
connect( sizeListBox,SIGNAL( highlighted( const QString &)),SLOT( sizeListBoxSlot(const QString &) ));
populateLists();
// MultiLineEdit1
// connect();
-
+// move(5,15);
+ showMaximized();
}
FontDialog::~FontDialog()
{
}
void FontDialog::familyListBoxSlot(const QString & text)
{
int styleInt=styleListBox->currentItem();
int sizeInt=sizeListBox->currentItem();
styleListBox->clear();
sizeListBox->clear();
family= text;
// qDebug(family);
QStringList styles = fdb.styles( family ); // string list of styles of our current font family
styleListBox->insertStringList( styles);
QString dstyle;// = "\t" + style + " (";
QValueList<int> smoothies = fdb.smoothSizes( family, styleListBox->text(0) );
for ( QValueList<int>::Iterator points = smoothies.begin(); points != smoothies.end(); ++points ) {
dstyle = QString::number( *points );
sizeListBox ->insertItem( dstyle.left( dstyle.length() - 1 ));
}
if(styleInt == -1 || styleInt > styleListBox->count() )
styleListBox->setCurrentItem(0);
else
styleListBox->setCurrentItem(styleInt);
if(sizeInt == -1 || sizeInt > sizeListBox->count())
sizeListBox->setCurrentItem(0);
else
sizeListBox->setCurrentItem(sizeInt);
changeText();
}
void FontDialog::styleListBoxSlot(const QString &text)
{
changeText();
}
void FontDialog::sizeListBoxSlot(const QString & text)
{
changeText();
}
void FontDialog::populateLists()
{