Version: 9.15.0
QtViewer_Object.h
Go to the documentation of this file.
1 // Copyright (C) 2013-2025 CEA, EDF, OPEN CASCADE
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, or (at your option) any later version.
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 
20 #ifndef QTVIEWER_OBJECT_H
21 #define QTVIEWER_OBJECT_H
22 
23 #include "QtViewer.h"
24 #include <QGraphicsItem>
25 
26 class SUIT_DataOwner;
27 /*
28  Class : QtViewer_Object
29  Description : Base class for all objects displayed at the scene
30 */
32 {
33 public:
34  QtViewer_Object( QGraphicsItem* theParent = nullptr );
35  ~QtViewer_Object();
36 
37  const QString& getName() const { return myName; }
38  virtual void setName( const QString& theName ) { myName = theName; }
39 
40  SUIT_DataOwner* owner() const { return myOwner; }
41  void setOwner( SUIT_DataOwner* owner ) { myOwner = owner; }
42 
43 protected:
45  QString myName;
46 };
47 
48 #endif
#define QTVIEWER_API
Definition: QtViewer.h:29
Definition: QtViewer_Object.h:32
QString myName
Definition: QtViewer_Object.h:45
void setOwner(SUIT_DataOwner *owner)
Definition: QtViewer_Object.h:41
SUIT_DataOwner * owner() const
Definition: QtViewer_Object.h:40
SUIT_DataOwner * myOwner
Definition: QtViewer_Object.h:44
const QString & getName() const
Definition: QtViewer_Object.h:37
virtual void setName(const QString &theName)
Definition: QtViewer_Object.h:38
Definition: SUIT_DataOwner.h:44