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