Salome HOME
copy tag mergefrom_BR_V0_1_CC_Salome_04oct07
[modules/yacs.git] / src / prs / YACSPrs_ServiceNode.h
1 // Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
2 // 
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either 
6 // version 2.1 of the License.
7 // 
8 // This library is distributed in the hope that it will be useful 
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public  
14 // License along with this library; if not, write to the Free Software 
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 #ifndef YACSPRS_SERVICENODE_H
20 #define YACSPRS_SERVICENODE_H
21
22 #include "YACSPrs_ElementaryNode.h"
23
24 class YACSPrs_ServiceNode : public YACSPrs_ElementaryNode {
25  public:
26   YACSPrs_ServiceNode( SUIT_ResourceMgr*, QCanvas*, YACS::ENGINE::Node* );
27   virtual ~YACSPrs_ServiceNode();
28
29   /* reimplement functions from QxGraph_ActiveItem */
30   virtual void showPopup(QWidget* theParent, QMouseEvent* theEvent, const QPoint& theMousePos = QPoint()) {}
31
32   virtual int rtti() const;
33
34   virtual int getInfoHeight() const;
35   virtual int getServiceHeight() const;
36   virtual int getComponentHeight() const;
37   virtual int getMachineHeight() const;
38   
39   virtual QRect getServiceRect() const;
40   virtual QRect getComponentRect() const;
41   virtual QRect getMachineRect() const;
42   virtual QRect getStatusRect() const;
43
44   virtual QRect getWholeRect() const;
45   virtual QRect getPercentRect() const;
46
47   virtual void updateInfo(); // update service, component, machine
48
49   virtual QString getToolTipText(const QPoint& theMousePos, QRect& theRect) const;
50   
51  protected:
52   virtual void drawTitleShape(QPainter& thePainter);
53
54  private:
55   int myServiceHeight;
56   int myComponentHeight;
57   int myMachineHeight;
58
59 };
60
61 #endif