author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /microkde/kfontdialog.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-p1.zip kdepimpi-p1.tar.gz kdepimpi-p1.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | microkde/kfontdialog.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/microkde/kfontdialog.cpp b/microkde/kfontdialog.cpp index 174123c..f83c2a8 100644 --- a/microkde/kfontdialog.cpp +++ b/microkde/kfontdialog.cpp | |||
@@ -1,27 +1,29 @@ | |||
1 | #include "kfontdialog.h" | 1 | #include "kfontdialog.h" |
2 | #ifndef DESKTOP_VERSION | 2 | #ifndef DESKTOP_VERSION |
3 | #include "ofontselector.h" | 3 | #include "ofontselector.h" |
4 | #else | 4 | #else |
5 | #include <qfontdialog.h> | 5 | #include <qfontdialog.h> |
6 | #endif | 6 | #endif |
7 | #include <qdialog.h> | 7 | #include <qdialog.h> |
8 | #include <qlayout.h> | 8 | #include <qlayout.h> |
9 | #include <qpushbutton.h> | 9 | #include <qpushbutton.h> |
10 | //Added by qt3to4: | ||
11 | #include <Q3VBoxLayout> | ||
10 | QFont KFontDialog::getFont( const QFont & f, bool & ok ) | 12 | QFont KFontDialog::getFont( const QFont & f, bool & ok ) |
11 | { | 13 | { |
12 | #ifndef DESKTOP_VERSION | 14 | #ifndef DESKTOP_VERSION |
13 | QDialog d( 0, "fd", true );; | 15 | QDialog d( 0, "fd", true );; |
14 | OFontSelector s ( true, &d, "fontsel"); | 16 | OFontSelector s ( true, &d, "fontsel"); |
15 | QVBoxLayout l ( &d ); | 17 | Q3VBoxLayout l ( &d ); |
16 | l.addWidget( &s ); | 18 | l.addWidget( &s ); |
17 | s.setSelectedFont ( f ); | 19 | s.setSelectedFont ( f ); |
18 | QPushButton b ( "OK", &d ); | 20 | QPushButton b ( "OK", &d ); |
19 | l.addWidget( &b ); | 21 | l.addWidget( &b ); |
20 | qDebug("size %d ", f.bold()); | 22 | qDebug("size %d ", f.bold()); |
21 | QObject::connect( &b, SIGNAL( clicked () ), &d, SLOT ( accept () ) ); | 23 | QObject::connect( &b, SIGNAL( clicked () ), &d, SLOT ( accept () ) ); |
22 | d.show(); | 24 | d.show(); |
23 | ok = false; | 25 | ok = false; |
24 | if ( d.exec () ) { | 26 | if ( d.exec () ) { |
25 | ok = true; | 27 | ok = true; |
26 | return s.selectedFont ( ); | 28 | return s.selectedFont ( ); |
27 | } | 29 | } |