Salome HOME
NRI : Add message (GUI lib not found).
[modules/kernel.git] / src / SALOMEGUI / QAD_ObjectBrowserItem.h
1 //  File      : QAD_ObjectBrowserItem.h
2 //  Created   : Thu Jun 14 17:06:54 2001
3 //  Author    : Nicolas REJNERI
4 //  Project   : SALOME
5 //  Module    : SALOMEGUI
6 //  Copyright : Open CASCADE
7 //  $Header$
8
9 #ifndef QAD_OBJECTBROWSERITEM_H
10 #define QAD_OBJECTBROWSERITEM_H
11
12 #include <qobject.h>
13 #include <qlistview.h>
14
15 class QPainter;
16 class QColorGroup;
17
18 class QAD_ObjectBrowserItem : public QListViewItem
19 {
20   friend class QListView;
21
22 public:
23   QAD_ObjectBrowserItem( QListView* theParent );
24   QAD_ObjectBrowserItem( QListView* theParent, QAD_ObjectBrowserItem* after );
25   QAD_ObjectBrowserItem( QAD_ObjectBrowserItem* theParent );
26   QAD_ObjectBrowserItem( QAD_ObjectBrowserItem* theParent, QAD_ObjectBrowserItem* after );
27   virtual ~QAD_ObjectBrowserItem();
28   
29   void    setType( int type );
30   void    setTextColor( const QColor& color );
31   void    setTextHighlightColor( const QColor& color );
32
33   QString getName() const;
34   void    setName( const QString& name );
35   QString getValue() const;
36   void    setValue( const QString& value );
37   QString getEntry() const;
38   void    setEntry( const QString& entry );
39   QString getIOR() const;
40   void    setIOR( const QString& IOR );
41   QString getReference() const;
42   void    setReference( const QString& ref );
43   
44   bool    isCurrent() const;
45   void    setCurrent( bool on );
46
47   int     compare( QListViewItem* i, int col, bool ascending ) const;
48
49 protected:
50   enum { BlackItem = 0, BlueItem, RedItem };
51   int      myType;
52   QColor   myTextColor;
53   QColor   myTextHighlightColor;
54   bool     myCurrent;
55
56   void    paintCell( QPainter*, const QColorGroup &, int, int, int );
57   QString text( int column ) const;
58 };
59
60 #endif
61
62
63
64
65
66