VPTissue Reference Manual
EditableItem.h
Go to the documentation of this file.
1 #ifndef SIMPT_EDITOR_EDITABLE_ITEM_H_INCLUDED
2 #define SIMPT_EDITOR_EDITABLE_ITEM_H_INCLUDED
3 /*
4  * Copyright 2011-2016 Universiteit Antwerpen
5  *
6  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
7  * the European Commission - subsequent versions of the EUPL (the "Licence");
8  * You may not use this work except in compliance with the Licence.
9  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the Licence is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the Licence for the specific language governing
15  * permissions and limitations under the Licence.
16  */
22 #include <QColor>
23 #include <QObject>
24 
25 namespace SimPT_Editor {
26 
30 class EditableItem : public QObject
31 {
32  Q_OBJECT
33 public:
38 
42  virtual ~EditableItem() {};
43 
49  virtual bool IsAtBoundary() const = 0;
50 
56  virtual void Highlight(bool highlighted) = 0;
57 
63  virtual void SetHighlightColor(const QColor& color) = 0;
64 
65 public slots:
69  virtual void Update() {};
70 };
71 
72 } // namespace
73 
74 #endif // end_of_include_guard
virtual ~EditableItem()
Destructor.
Definition: EditableItem.h:42
Interface for an editable graphical representation.
Definition: EditableItem.h:30
Namespace for SimPT tissue editor package.
Definition: Cell.h:32
EditableItem()
Constructor.
Definition: EditableItem.h:37
virtual void SetHighlightColor(const QColor &color)=0
Set the highlight color to a given color.
virtual bool IsAtBoundary() const =0
Checks whether the item is at the boundary.
virtual void Highlight(bool highlighted)=0
Highlights the item in the canvas.
see the online Qt documentation
virtual void Update()
Update this item.
Definition: EditableItem.h:69