Documents > BPS V2 C++ API
BpsLabelerEditWidget Class Reference

Abstract edit widget for labeler plug in. More...

#include <bpslabelereditwidget.h>

List of all members.

Signals

void addItemEnabled (bool aEnabled)
 Signal emitted when the enable status for adding an item changes.
void copyItemsEnabled (bool aEnabled)
 Signal emitted to enable/disable the Copy Items action.
void cutItemsEnabled (bool aEnabled)
 Signal emitted to enable/disable the Cut Items action.
void dataChanged (const QString &aData)
 Signal emitted whenever item data is changed.
void delItemsEnabled (bool aEnabled)
 Signal emitted to enable/disable the Delete Items action.
void globalDataModified (bool aModified)
 Signal emitted when global data turns modified or unmodified.
void itemContextMenuRequested (const QPoint &aPosition)
 Signal emitted when the items context menu shall be shown.
void pasteItemsEnabled (bool aEnabled)
 Signal emitted to enable/disable the Paste Items action.

Public Member Functions

virtual void addItem ()
 Re-implement this method in label editors that can add items.
 BpsLabelerEditWidget (QWidget *aParent=0)
 The constructor.
bool canAddItem () const
bool canCopyItems () const
bool canCutItems () const
bool canDelItems () const
bool canPasteItems () const
virtual void copyItems ()
 Re-implement this method in label editors that can copy items to the clipboard.
virtual void cutItems ()
 Re-implement this method in label editors that can cut items to the clipboard.
virtual QString data () const =0
virtual void delItems ()
 Re-implement this method in label editors that can delete items.
virtual QString globalData () const
virtual void initialize ()
 Initialize the widget.
bool isGlobalDataModified () const
virtual void loadGlobalData ()
 Load global data from t_labelers.c_data (usually in XML format).
virtual void pasteItems ()
 Re-implement this method in label editors the can paste items from the clipboard.
virtual void saveGlobalData ()
 Save any global data to t_labelers.c_data (usually in XML format).
virtual void setData (const QString &aData)=0
 Load data (from t_labels.c_data, usually an XML) to edit the item.
virtual ~BpsLabelerEditWidget ()
 Virtual default destructor.

Protected Member Functions

void enableAddItem (bool aEnable)
 Call this method from the re-implemented label editor to enable/disable adding of an item.
void enableCopyItems (bool aEnable)
 Call this method from the re-implemented label editor to enable/disable copying of items to the clipboard.
void enableCutItems (bool aEnable)
 Call this method from the re-implemented label editor to enable/disable cutting of items to the clipboard.
void enableDelItems (bool aEnable)
 Call this method from the re-implemented label editor to enable/disable deleting of items.
void enablePasteItems (bool aEnable)
 Call this method from the re-implemented label editor to enable/disable pasting of items from the clipboard.
void setGlobalDataModified (bool aModified)
 Call this method from the re-implemented label editor to set the global data modification status.

Detailed Description

Abstract edit widget for labeler plug in.


Member Function Documentation

void BpsLabelerEditWidget::addItemEnabled ( bool  aEnabled) [signal]

Signal emitted when the enable status for adding an item changes.

Parameters:
[in]aEnabledThe new enable status.
bool BpsLabelerEditWidget::canAddItem ( ) const
Returns:
True if the widget can add an item.
bool BpsLabelerEditWidget::canCopyItems ( ) const
Returns:
True if the widget has selected items that can be copied to the clipboard.
bool BpsLabelerEditWidget::canCutItems ( ) const
Returns:
True if the widget has selected items that can be cut into the clipboard.
bool BpsLabelerEditWidget::canDelItems ( ) const
Returns:
True if the widget has selected items that can be deleted.
bool BpsLabelerEditWidget::canPasteItems ( ) const
Returns:
True if the widget can paste from the clipboard.
void BpsLabelerEditWidget::copyItemsEnabled ( bool  aEnabled) [signal]

Signal emitted to enable/disable the Copy Items action.

Parameters:
[in]aEnabledTrue to enable, false to disable the action.
void BpsLabelerEditWidget::cutItemsEnabled ( bool  aEnabled) [signal]

Signal emitted to enable/disable the Cut Items action.

Parameters:
[in]aEnabledTrue to enable, false to disable the action.
virtual QString BpsLabelerEditWidget::data ( ) const [pure virtual]
Returns:
The current item data (encoded for t_labels.c_data, usually XML).
void BpsLabelerEditWidget::delItemsEnabled ( bool  aEnabled) [signal]

Signal emitted to enable/disable the Delete Items action.

Parameters:
[in]aEnabledTrue to enable, false to disable the action.
void BpsLabelerEditWidget::enableAddItem ( bool  aEnable) [protected]

Call this method from the re-implemented label editor to enable/disable adding of an item.

The signal addItemEnabled will be emitted when necessary. By default the status is disabled.

Parameters:
[in]aEnableThe new status to set.
void BpsLabelerEditWidget::enableCopyItems ( bool  aEnable) [protected]

Call this method from the re-implemented label editor to enable/disable copying of items to the clipboard.

The signal cutItemsEnabled will be emitted when necessary. By default the status is disabled.

Parameters:
[in]aEnableThe new status to set.
void BpsLabelerEditWidget::enableCutItems ( bool  aEnable) [protected]

Call this method from the re-implemented label editor to enable/disable cutting of items to the clipboard.

The signal cutItemsEnabled will be emitted when necessary. By default the status is disabled.

Parameters:
[in]aEnableThe new status to set.
void BpsLabelerEditWidget::enableDelItems ( bool  aEnable) [protected]

Call this method from the re-implemented label editor to enable/disable deleting of items.

The signal delItemsEnabled will be emitted when necessary. By default the status is disabled.

Parameters:
[in]aEnableThe new status to set.
void BpsLabelerEditWidget::enablePasteItems ( bool  aEnable) [protected]

Call this method from the re-implemented label editor to enable/disable pasting of items from the clipboard.

The signal pasteItemsEnabled will be emitted when necessary. By default the status is disabled.

Parameters:
[in]aEnableThe new status to set.
virtual QString BpsLabelerEditWidget::globalData ( ) const [virtual]
Returns:
The current global data (encoded for t_labelers.c_data, usually XML).
void BpsLabelerEditWidget::globalDataModified ( bool  aModified) [signal]

Signal emitted when global data turns modified or unmodified.

Parameters:
[in]aModifiedThe new modification status of the global data.
virtual void BpsLabelerEditWidget::initialize ( ) [virtual]

Initialize the widget.

Gets called after creating the widget, and after saving or undoing any changes in the application.

Exceptions:
Maythrow BpsException on errors.
bool BpsLabelerEditWidget::isGlobalDataModified ( ) const
Returns:
True if the global data is modified.
void BpsLabelerEditWidget::itemContextMenuRequested ( const QPoint &  aPosition) [signal]

Signal emitted when the items context menu shall be shown.

Parameters:
[in]aPositionThe global position of the cursor.
virtual void BpsLabelerEditWidget::loadGlobalData ( ) [virtual]

Load global data from t_labelers.c_data (usually in XML format).

Any pending modifications of currently loaded global data are discarded in advance.

Exceptions:
ThrowBpsException on errors.
void BpsLabelerEditWidget::pasteItemsEnabled ( bool  aEnabled) [signal]

Signal emitted to enable/disable the Paste Items action.

Parameters:
[in]aEnabledTrue to enable, false to disable the action.
virtual void BpsLabelerEditWidget::saveGlobalData ( ) [virtual]

Save any global data to t_labelers.c_data (usually in XML format).

Exceptions:
ThrowBpsException on errors.
void BpsLabelerEditWidget::setGlobalDataModified ( bool  aModified) [protected]

Call this method from the re-implemented label editor to set the global data modification status.

The signal globalDataModified will be emitted when necessary. By default the status is unmodified.

Parameters:
[in]aModifiedThe new modification state to set.

The documentation for this class was generated from the following file: