#include "kfontdialog.h" #ifndef DESKTOP_VERSION #include "ofontselector.h" #else #include #endif #include #include #include //Added by qt3to4: #include QFont KFontDialog::getFont( const QFont & f, bool & ok ) { #ifndef DESKTOP_VERSION QDialog d( 0, "fd", true );; OFontSelector s ( true, &d, "fontsel"); Q3VBoxLayout l ( &d ); l.addWidget( &s ); s.setSelectedFont ( f ); QPushButton b ( "OK", &d ); l.addWidget( &b ); qDebug("size %d ", f.bold()); QObject::connect( &b, SIGNAL( clicked () ), &d, SLOT ( accept () ) ); d.show(); ok = false; if ( d.exec () ) { ok = true; return s.selectedFont ( ); } return f; #else return QFontDialog::getFont ( &ok, f, 0, "fontdialog" ); #endif }