itom  4.1.0
FontEditor.h
1 // *************************************************************************************************
2 //
3 // QPropertyEditor v 0.3
4 //
5 // --------------------------------------
6 // Copyright (C) 2007 Volker Wiendl
7 // Acknowledgements to Roman alias banal from qt-apps.org for the Enum enhancement
8 //
9 //
10 // The QPropertyEditor Library is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as published by the Free Software
12 // Foundation; either version 2 of the License, or (at your option) any later
13 // version.
14 //
15 // This program is distributed in the hope that it will be useful, but WITHOUT
16 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18 //
19 // You should have received a copy of the GNU Lesser General Public License along with
20 // this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21 // Place - Suite 330, Boston, MA 02111-1307, USA, or go to
22 // http://www.gnu.org/copyleft/lesser.txt.
23 //
24 // *************************************************************************************************
25 
26 #ifndef FONTEDITOR_H_
27 #define FONTEDITOR_H_
28 
29 #include <qwidget.h>
30 #include <qfont.h>
31 #include <qlineedit.h>
32 #include <qtoolbutton.h>
33 #include <qevent.h>
34 
35 class FontEditor : public QWidget
36 {
37  Q_OBJECT
38 public:
39  FontEditor(QWidget* parent = 0);
40  virtual ~FontEditor();
41 
42  QFont value() const;
43  void setValue(QFont font);
44 
45 private:
46  QFont m_font;
47  QLineEdit *m_textEdit;
48  QToolButton *m_toolBtn;
49 
50 protected:
51  //void focusOutEvent ( QFocusEvent * event );
52 
53 signals:
55  void fontChanged(QFont font);
56 
57 private slots:
58  void btnClicked();
59 
60 };
61 #endif
Definition: FontEditor.h:35
void fontChanged(QFont font)