summaryrefslogtreecommitdiffabout
path: root/microkde/kfontdialog.cpp
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /microkde/kfontdialog.cpp
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'microkde/kfontdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kfontdialog.cpp4
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,32 +1,34 @@
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>
10QFont KFontDialog::getFont( const QFont & f, bool & ok ) 12QFont 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 }
28 return f; 30 return f;
29#else 31#else
30 return QFontDialog::getFont ( &ok, f, 0, "fontdialog" ); 32 return QFontDialog::getFont ( &ok, f, 0, "fontdialog" );
31#endif 33#endif
32} 34}