Documents > BPS V2 C++ API
bpslabelereditwidget.h
Go to the documentation of this file.
00001 
00004 #ifndef BPSLABELEREDITWIDGET_H
00005 #define BPSLABELEREDITWIDGET_H
00006 
00007 #include "bpsgui_global.h"
00008 #include <QWidget>
00009 
00013 class BPSGUI_EXPORT BpsLabelerEditWidget : public QWidget
00014 {
00015     Q_OBJECT
00016     BPS_PRIVATE(BpsLabelerEditWidget)
00017 
00018 public:
00022     BpsLabelerEditWidget(QWidget* aParent=0);
00023 
00027     virtual ~BpsLabelerEditWidget();
00028 
00034     virtual void initialize();
00035 
00041     virtual void loadGlobalData();
00042 
00047     virtual void saveGlobalData();
00048 
00052     virtual void setData(const QString& aData) = 0;
00053 
00057     virtual QString data() const = 0;
00058 
00062     virtual QString globalData() const;
00063 
00067     bool isGlobalDataModified() const;
00068 
00072     bool canAddItem() const;
00073 
00077     bool canDelItems() const;
00078 
00082     bool canCutItems() const;
00083 
00087     bool canCopyItems() const;
00088 
00092     bool canPasteItems() const;
00093 
00097     virtual void addItem();
00098 
00102     virtual void delItems();
00103 
00107     virtual void cutItems();
00108 
00112     virtual void copyItems();
00113 
00117     virtual void pasteItems();
00118 
00119 signals:
00120 
00125     void globalDataModified(bool aModified);
00126 
00130     void dataChanged(const QString& aData);
00131 
00136     void addItemEnabled(bool aEnabled);
00137 
00142     void delItemsEnabled(bool aEnabled);
00143 
00148     void cutItemsEnabled(bool aEnabled);
00149 
00154     void copyItemsEnabled(bool aEnabled);
00155 
00160     void pasteItemsEnabled(bool aEnabled);
00161 
00166     void itemContextMenuRequested(const QPoint& aPosition);
00167 
00168 protected:
00169 
00176     void setGlobalDataModified(bool aModified);
00177 
00184     void enableAddItem(bool aEnable);
00185 
00192     void enableDelItems(bool aEnable);
00193 
00200     void enableCutItems(bool aEnable);
00201 
00208     void enableCopyItems(bool aEnable);
00209 
00216     void enablePasteItems(bool aEnable);
00217 };
00218 
00219 #endif // BPSLABELEREDITWIDGET_H