]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/qfontexample.h
Joao latest bits
[lyx.git] / src / frontends / qt2 / qfontexample.h
1 // -*- C++ -*-
2 /**
3  * \file qfontexample.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #include <qwidget.h>
13 #include <qfont.h>
14
15 class QFontExample : public QWidget {
16
17 public:
18         QFontExample(QWidget * parent, const char * name)
19                 : QWidget(parent, name) {}
20
21         void set(QFont const & font, QString const & text);
22
23         virtual QSize sizeHint() const;
24
25 protected:
26         virtual void paintEvent(QPaintEvent * p);
27
28 private:
29         QFont font_;
30         QString text_;
31 };