home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / qt3_emx.zip / include / qfontdialog.h < prev    next >
C/C++ Source or Header  |  2001-10-11  |  4KB  |  137 lines

  1. /****************************************************************************
  2. ** $Id:  qt/qfontdialog.h   3.0.0   edited Sep 21 17:17 $
  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  QListBox;
  61. class  QComboBox;
  62. class QFontDialogPrivate;
  63.  
  64. class Q_EXPORT QFontDialog: public QDialog
  65. {
  66.     Q_OBJECT
  67.  
  68. public:
  69.     static QFont getFont( bool *ok, const QFont &def,
  70.               QWidget* parent=0, const char* name=0);
  71.     static QFont getFont( bool *ok, QWidget* parent=0, const char* name=0);
  72.  
  73. private:
  74.     QFontDialog( QWidget* parent=0, const char* name=0, bool modal=FALSE,
  75.          WFlags f=0 );
  76.     ~QFontDialog();
  77.  
  78.     QFont font() const;
  79.     void setFont( const QFont &font );
  80.  
  81. signals:
  82.     void fontSelected( const QFont &font );
  83.     void fontHighlighted( const QFont &font );
  84.  
  85. protected:
  86.     bool eventFilter( QObject *, QEvent * );
  87.  
  88.     QListBox * familyListBox() const;
  89.     virtual void updateFamilies();
  90.  
  91.     QListBox * styleListBox() const;
  92.     virtual void updateStyles();
  93.  
  94.     QListBox * sizeListBox() const;
  95.     virtual void updateSizes();
  96.  
  97.     QComboBox * scriptCombo() const;
  98.     virtual void updateScripts();
  99.  
  100. #if 0
  101.     QString family() const;
  102.     QString script() const;
  103.     QString style() const;
  104.     QString size() const;
  105. #endif
  106.  
  107. protected slots:
  108.     void sizeChanged( const QString &);
  109.  
  110. private slots:
  111.     void familyHighlighted( const QString &);
  112.     void familyHighlighted( int );
  113.     void scriptHighlighted( const QString &);
  114.     void scriptHighlighted( int );
  115.     void styleHighlighted( const QString &);
  116.     void sizeHighlighted( const QString &);
  117.     void updateSample();
  118.     void emitSelectedFont();
  119.  
  120. private:
  121.     static QFont getFont( bool *ok, const QFont *def,
  122.               QWidget* parent=0, const char* name=0);
  123.  
  124.     QFontDialogPrivate * d;
  125.     friend class QFontDialogPrivate;
  126.  
  127. private:    // Disabled copy constructor and operator=
  128. #if defined(Q_DISABLE_COPY)
  129.     QFontDialog( const QFontDialog & );
  130.     QFontDialog& operator=( const QFontDialog & );
  131. #endif
  132. };
  133.  
  134. #endif
  135.  
  136. #endif // QFONTDIALOG_H
  137.