Salome HOME
Color for background and title are taken from resource manager
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI_CanvasCellNodePrs.h
1 //  SUPERV SUPERVGUI : GUI for Supervisor component
2 //
3 //  Copyright (C) 2003  OPEN CASCADE
4 //
5 //  File   : SUPERVGUI_CanvasCellNodePrs.h
6 //  Author : 
7 //  Module : SUPERV
8
9 #ifndef SUPERVGUI_CanvasCellNodePrs_H
10 #define SUPERVGUI_CanvasCellNodePrs_H
11
12 using namespace std;
13 #include "SUPERVGUI_Def.h"
14 #include "SUPERVGUI_CanvasNodePrs.h"
15 #include "SUPERVGUI_CanvasControlNode.h"
16
17 class SUPERVGUI_CanvasCellNodePrs: public SUPERVGUI_CanvasNodePrs {
18
19   public:
20     SUPERVGUI_CanvasCellNodePrs( SUIT_ResourceMgr*, QCanvas* theCanvas, SUPERVGUI_CanvasCellNode* theNode);
21     virtual ~SUPERVGUI_CanvasCellNodePrs();
22
23     virtual void moveBy(double dx, double dy);
24  
25     virtual QRect getTitleRect() const;
26     virtual QRect getLabelRect() const;
27     virtual QRect getStatusRect() const;
28
29     int getTitleWidth() const;
30     int getLabelWidth() const;
31     int getStatusWidth() const;
32
33     virtual int width() const;
34     virtual int height() const;
35
36     virtual void setState(SUPERV::GraphState theState);
37
38   protected:
39     virtual void drawShape(QPainter& thePainter);
40
41     virtual void drawTitle(QPainter& thePainter);
42     virtual void drawLabel(QPainter& thePainter);
43     virtual void drawStatus(QPainter& thePainter);
44
45   private:
46     int myTitleWidth;
47     int myLabelWidth;
48     int myStatusWidth;
49     
50 };
51
52 #endif