KDEUI
kfontdialog.h
Go to the documentation of this file.
00001 /* 00002 Requires the Qt widget libraries, available at no cost at 00003 http://www.troll.no 00004 00005 Copyright (C) 1997 Bernd Johannes Wuebben <wuebben@kde.org> 00006 Copyright (c) 1999 Preston Brown <pbrown@kde.org> 00007 Copyright (c) 1999 Mario Weilguni <mweilguni@kde.org> 00008 00009 This library is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU Library General Public 00011 License as published by the Free Software Foundation; either 00012 version 2 of the License, or (at your option) any later version. 00013 00014 This library is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 Library General Public License for more details. 00018 00019 You should have received a copy of the GNU Library General Public License 00020 along with this library; see the file COPYING.LIB. If not, write to 00021 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00022 Boston, MA 02110-1301, USA. 00023 */ 00024 #ifndef K_FONT_DIALOG_H 00025 #define K_FONT_DIALOG_H 00026 00027 #include <kdialog.h> 00028 #include <kfontchooser.h> 00029 00030 class QFont; 00031 class QStringList; 00032 00056 class KDEUI_EXPORT KFontDialog : public KDialog { 00057 Q_OBJECT 00058 00059 public: 00078 explicit KFontDialog( QWidget *parent = 0, 00079 const KFontChooser::DisplayFlags& flags = 00080 KFontChooser::NoDisplayFlags, 00081 const QStringList &fontlist = QStringList(), 00082 Qt::CheckState *sizeIsRelativeState = 0 ); 00083 00084 ~KFontDialog(); 00092 void setFont( const QFont &font, bool onlyFixed = false ); 00093 00097 QFont font() const; 00098 00105 void setSizeIsRelative( Qt::CheckState relative ); 00106 00111 Qt::CheckState sizeIsRelative() const; 00112 00133 static int getFont( QFont &theFont, 00134 const KFontChooser::DisplayFlags& flags = 00135 KFontChooser::NoDisplayFlags, 00136 QWidget *parent = 0L, 00137 Qt::CheckState *sizeIsRelativeState = 0L ); 00138 00171 static int getFontDiff( QFont &theFont, 00172 KFontChooser::FontDiffFlags& diffFlags, 00173 const KFontChooser::DisplayFlags& flags = 00174 KFontChooser::NoDisplayFlags, 00175 QWidget *parent = 0L, 00176 Qt::CheckState *sizeIsRelativeState = 0L ); 00177 00197 static int getFontAndText( QFont &theFont, QString &theString, 00198 const KFontChooser::DisplayFlags& flags = 00199 KFontChooser::NoDisplayFlags, 00200 QWidget *parent = 0L, 00201 Qt::CheckState *sizeIsRelativeState = 0L ); 00202 00203 Q_SIGNALS: 00209 void fontSelected( const QFont &font ); 00210 00211 private: 00212 class Private; 00213 Private * const d; 00214 00215 Q_DISABLE_COPY(KFontDialog) 00216 }; 00217 00218 #endif
KDE 4.7 API Reference