]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/qcoloritem.h
rename LFUN enum values according to their command (as used in th minibuffer/bind...
[lyx.git] / src / frontends / qt4 / qcoloritem.h
1 // -*- C++ -*-
2 /**
3  * \file qcoloritem.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 #ifndef QT_QCOLORITEM_H
13 #define QT_QCOLORITEM_H
14
15 #include <Q3ListBox>
16 #include <QColor>
17
18 class QColorItem : public Q3ListBoxItem {
19
20 public:
21         QColorItem(QColor c, QString const & text);
22
23         QColor color() {
24                 return color_;
25         }
26
27         void color(QColor c) {
28                 color_ = c;
29         }
30
31         virtual int height(const Q3ListBox *) const {
32                 return height_;
33         }
34
35         virtual int width(const Q3ListBox *) const {
36                 return width_;
37         }
38
39 protected:
40         virtual void paint(QPainter * p);
41
42 private:
43         int ascent_;
44
45         int height_;
46
47         int width_;
48
49         QColor color_;
50
51         QString text_;
52 };
53
54 #endif