BPS C++ API  2.24.4
bpslabelereditwidget.h
Go to the documentation of this file.
1 
4 #ifndef BPSLABELEREDITWIDGET_H
5 #define BPSLABELEREDITWIDGET_H
6 
7 #include "bpsgui_global.h"
8 #include <QWidget>
9 
14 {
15  Q_OBJECT
17 
18 public:
23 
28 
34  virtual void initialize();
35 
39  virtual void load(const QString& aType, const QString& aData) = 0;
40 
45  virtual void save();
46 
53  virtual QString type() const;
54 
59  virtual QString data() const = 0;
60 
64  bool isModified() const;
65 
71  virtual void loadGlobalData();
72 
77  virtual void saveGlobalData();
78 
82  virtual QString globalData() const;
83 
87  bool isGlobalModified() const;
88 
92  bool canAddItem() const;
93 
97  bool canDelItems() const;
98 
102  bool canCutItems() const;
103 
107  bool canCopyItems() const;
108 
112  bool canPasteItems() const;
113 
117  virtual void addItem();
118 
122  virtual void delItems();
123 
127  virtual void cutItems();
128 
132  virtual void copyItems();
133 
137  virtual void pasteItems();
138 
139 signals:
140 
145  void modified(bool aModified);
146 
151  void globalModified(bool aModified);
152 
157  void addItemEnabled(bool aEnabled);
158 
163  void delItemsEnabled(bool aEnabled);
164 
169  void cutItemsEnabled(bool aEnabled);
170 
175  void copyItemsEnabled(bool aEnabled);
176 
181  void pasteItemsEnabled(bool aEnabled);
182 
187  void itemContextMenuRequested(const QPoint& aPosition);
188 
189 protected:
190 
197  void setModified(bool aModified);
198 
205  void setGlobalModified(bool aModified);
206 
213  void enableAddItem(bool aEnable);
214 
221  void enableDelItems(bool aEnable);
222 
229  void enableCutItems(bool aEnable);
230 
237  void enableCopyItems(bool aEnable);
238 
245  void enablePasteItems(bool aEnable);
246 };
247 
248 #endif // BPSLABELEREDITWIDGET_H
#define BPS_PRIVATE(Class)
Declare pointer to private object in a public class.
Definition: bpsglobals.h:102
Public include file for BPS GUI library macros.
#define BPSGUI_EXPORT
Declare class an import from the shared library.
Definition: bpsgui_global.h:22
Abstract edit widget for labeler plug in.
Definition: bpslabelereditwidget.h:14
virtual void save()
Set the editor widget to saved state.
void enablePasteItems(bool aEnable)
Call this method from the re-implemented label editor to enable/disable pasting of items from the cli...
void addItemEnabled(bool aEnabled)
Signal emitted when the enable status for adding an item changes.
virtual QString globalData() const
void setGlobalModified(bool aModified)
Call this method from the re-implemented label editor to set the global data modification status.
void copyItemsEnabled(bool aEnabled)
Signal emitted to enable/disable the Copy Items action.
virtual void loadGlobalData()
Load global data from t_labelers.c_data (usually in XML format).
void enableDelItems(bool aEnable)
Call this method from the re-implemented label editor to enable/disable deleting of items.
void globalModified(bool aModified)
Signal emitted when global modification status changes.
void modified(bool aModified)
Signal emitted when item modification status changes.
bool canPasteItems() const
void enableAddItem(bool aEnable)
Call this method from the re-implemented label editor to enable/disable adding of an item.
virtual QString type() const
Get the current type.
bool canDelItems() const
virtual void delItems()
Re-implement this method in label editors that can delete items.
virtual void initialize()
Initialize the widget.
virtual void copyItems()
Re-implement this method in label editors that can copy items to the clipboard.
virtual ~BpsLabelerEditWidget()
Virtual default destructor.
bool canAddItem() const
virtual void cutItems()
Re-implement this method in label editors that can cut items to the clipboard.
bool isGlobalModified() const
bool canCutItems() const
void cutItemsEnabled(bool aEnabled)
Signal emitted to enable/disable the Cut Items action.
virtual QString data() const =0
Get the current data.
void setModified(bool aModified)
Call this method from the re-implemented label editor to set the item data modification status.
BpsLabelerEditWidget(QWidget *aParent=0)
The constructor.
void delItemsEnabled(bool aEnabled)
Signal emitted to enable/disable the Delete Items action.
bool isModified() const
virtual void saveGlobalData()
Save any global data to t_labelers.c_data (usually in XML format).
void enableCutItems(bool aEnable)
Call this method from the re-implemented label editor to enable/disable cutting of items to the clipb...
void itemContextMenuRequested(const QPoint &aPosition)
Signal emitted when the items context menu shall be shown.
void enableCopyItems(bool aEnable)
Call this method from the re-implemented label editor to enable/disable copying of items to the clipb...
virtual void load(const QString &aType, const QString &aData)=0
Load type and data to edit the item.
bool canCopyItems() const
void pasteItemsEnabled(bool aEnabled)
Signal emitted to enable/disable the Paste Items action.
virtual void addItem()
Re-implement this method in label editors that can add items.
virtual void pasteItems()
Re-implement this method in label editors the can paste items from the clipboard.