1 | /****************************************************************************
|
---|
2 | ** $Id: qfontdialog.h 2 2005-11-16 15:49:26Z dmik $
|
---|
3 | **
|
---|
4 | ** Definition of QFontDialog
|
---|
5 | **
|
---|
6 | ** Created : 970605
|
---|
7 | **
|
---|
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
|
---|
9 | **
|
---|
10 | ** This file is part of the dialogs module of the Qt GUI Toolkit.
|
---|
11 | **
|
---|
12 | ** This file may be distributed under the terms of the Q Public License
|
---|
13 | ** as defined by Trolltech AS of Norway and appearing in the file
|
---|
14 | ** LICENSE.QPL included in the packaging of this file.
|
---|
15 | **
|
---|
16 | ** This file may be distributed and/or modified under the terms of the
|
---|
17 | ** GNU General Public License version 2 as published by the Free Software
|
---|
18 | ** Foundation and appearing in the file LICENSE.GPL included in the
|
---|
19 | ** packaging of this file.
|
---|
20 | **
|
---|
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
|
---|
22 | ** licenses may use this file in accordance with the Qt Commercial License
|
---|
23 | ** Agreement provided with the Software.
|
---|
24 | **
|
---|
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
---|
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
---|
27 | **
|
---|
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
|
---|
29 | ** information about Qt Commercial License Agreements.
|
---|
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information.
|
---|
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information.
|
---|
32 | **
|
---|
33 | ** Contact info@trolltech.com if any conditions of this licensing are
|
---|
34 | ** not clear to you.
|
---|
35 | **
|
---|
36 | **********************************************************************/
|
---|
37 |
|
---|
38 | #ifndef QFONTDIALOG_H
|
---|
39 | #define QFONTDIALOG_H
|
---|
40 |
|
---|
41 | #include "qwindowdefs.h"
|
---|
42 |
|
---|
43 | #ifndef QT_NO_FONTDIALOG
|
---|
44 |
|
---|
45 | //
|
---|
46 | // W A R N I N G
|
---|
47 | // -------------
|
---|
48 | //
|
---|
49 | // This class is under development and has private constructors.
|
---|
50 | //
|
---|
51 | // You may use the public static getFont() functions which are guaranteed
|
---|
52 | // to be available in the future.
|
---|
53 | //
|
---|
54 |
|
---|
55 | #ifndef QT_H
|
---|
56 | #include "qdialog.h"
|
---|
57 | #include "qfont.h"
|
---|
58 | #endif // QT_H
|
---|
59 |
|
---|
60 | class QFontDialogPrivate;
|
---|
61 |
|
---|
62 | class Q_EXPORT QFontDialog: public QDialog
|
---|
63 | {
|
---|
64 | Q_OBJECT
|
---|
65 |
|
---|
66 | public:
|
---|
67 | static QFont getFont( bool *ok, const QFont &def,
|
---|
68 | QWidget* parent=0, const char* name=0);
|
---|
69 | static QFont getFont( bool *ok, QWidget* parent=0, const char* name=0);
|
---|
70 |
|
---|
71 | private:
|
---|
72 | static QFont getFont( bool *ok, const QFont *def,
|
---|
73 | QWidget* parent=0, const char* name=0);
|
---|
74 |
|
---|
75 | QFontDialog( QWidget* parent=0, const char* name=0, bool modal=FALSE,
|
---|
76 | WFlags f=0 );
|
---|
77 | ~QFontDialog();
|
---|
78 |
|
---|
79 | QFont font() const;
|
---|
80 | void setFont( const QFont &font );
|
---|
81 |
|
---|
82 | bool eventFilter( QObject *, QEvent * );
|
---|
83 |
|
---|
84 | void updateFamilies();
|
---|
85 | void updateStyles();
|
---|
86 | void updateSizes();
|
---|
87 |
|
---|
88 | private slots:
|
---|
89 | void sizeChanged( const QString &);
|
---|
90 | void familyHighlighted( int );
|
---|
91 | void scriptHighlighted( int );
|
---|
92 | void styleHighlighted( int );
|
---|
93 | void sizeHighlighted( const QString & );
|
---|
94 | void updateSample();
|
---|
95 |
|
---|
96 | private:
|
---|
97 | friend class QFontDialogPrivate;
|
---|
98 | QFontDialogPrivate * d;
|
---|
99 |
|
---|
100 | private: // Disabled copy constructor and operator=
|
---|
101 | #if defined(Q_DISABLE_COPY)
|
---|
102 | QFontDialog( const QFontDialog & );
|
---|
103 | QFontDialog& operator=( const QFontDialog & );
|
---|
104 | #endif
|
---|
105 | };
|
---|
106 |
|
---|
107 | #endif
|
---|
108 |
|
---|
109 | #endif // QFONTDIALOG_H
|
---|