-
Notifications
You must be signed in to change notification settings - Fork 0
/
arnColorTableItem.h
45 lines (40 loc) · 2.01 KB
/
arnColorTableItem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/***************************************************************************
arnColorTableItem.h - description
-------------------
begin : mar giu 28 2005
copyright : (C) 2005 by Aurion s.r.l.
email : fabio.giovagnini@aurion-tech.com
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef ArnColorTableItemH
#define ArnColorTableItemH
#include <Q3Table>
class arnColorTableItem : public Q3TableItem
{
private:
protected:
QColor color_;
virtual void paint ( QPainter * p, const QColorGroup & cg, const QRect & cr, bool selected ) {
QColorGroup g(cg);
g.setColor( QColorGroup::Base, color_ );
Q3TableItem::paint(p,g,cr,selected);
}
public:
arnColorTableItem ( Q3Table * table, EditType et, const QColor & c = QColor("white") ) :
Q3TableItem (table, et, "") {color_ = c;}
arnColorTableItem ( Q3Table * table, EditType et, const QString & text, const QColor & c = QColor("white")) :
Q3TableItem (table, et, text) {color_ = c;}
arnColorTableItem ( Q3Table * table, EditType et, const QString & text, const QPixmap & p,const QColor & c = QColor("white")):
Q3TableItem (table, et, text, p) {color_ = c;}
virtual ~arnColorTableItem(void) {}
virtual inline void setColor(const QColor& c) {color_ = c;}
virtual inline QColor Color(void) {return color_;}
};
#endif