#include <ICollectionViewDelegate.h>
Inherits ibase::ICommandsProvider.
|
| virtual bool | InitializeDelegate (imtbase::IObjectCollection *collectionPtr, iqtgui::IGuiObject *parentGuiPtr, const iprm::IParamsSet *filterParamsPtr)=0 |
| |
| virtual const iqtgui::IVisualStatus & | GetDocumentTypeStatus () const =0 |
| |
| virtual QByteArray | GetSupportedTypeId () const =0 |
| |
| virtual QAbstractItemDelegate * | GetColumnItemDelegate (const QByteArray &columnId) const =0 |
| |
| virtual void | OnColumnItemDelegateEditFinished (const QByteArray &objectId, const QByteArray &columnId, const QVariant &newValue) const =0 |
| |
| virtual bool | IsEditorEnabled (const QByteArray &columnId) const =0 |
| |
| virtual void | UpdateItemSelection (const imtbase::ICollectionInfo::Ids &selectedItems, const QByteArray &selectedTypeId)=0 |
| |
| virtual QByteArray | CreateNewObject (const QByteArray &typeId, const QString &objectName, const QString &description, const istd::IChangeable *defaultDataPtr=nullptr) const =0 |
| |
| virtual QByteArray | ImportObject (const QByteArray &typeId, const QString &sourcePath=QString()) const =0 |
| |
| virtual bool | ExportObject (const QByteArray &objectId, const QString &targetPath=QString()) const =0 |
| |
| virtual void | RemoveObjects (const imtbase::ICollectionInfo::Ids &objectIds) const =0 |
| |
| virtual bool | UpdateObject (const QByteArray &objectId, const istd::IChangeable &contents) const =0 |
| |
| virtual QString | RenameObject (const QByteArray &objectId, const QString &newName) const =0 |
| |
| virtual const imtbase::ICollectionInfo & | GetSummaryInformationTypes () const =0 |
| |
| virtual HeaderInfo | GetSummaryInformationHeaderInfo (const QByteArray &informationId) const =0 |
| |
| virtual bool | OpenDocumentEditor (const QByteArray &objectId, const QByteArray &viewTypeId=QByteArray()) const =0 |
| |
| virtual iqtgui::IGuiObject * | GetInformationView () const =0 |
| |
| virtual bool | IsCommandSupported (int commandId) const =0 |
| |
| virtual void | SetupContextMenu (QMenu &menu) const =0 |
| |
Interface used for realization the business logic of a collection view and commands related to the items in the collection.
Definition at line 31 of file ICollectionViewDelegate.h.
◆ ObjectMetaInfo
◆ ViewState
| Enumerator |
|---|
| VS_NONE | No flags.
|
| VS_ENABLED | Collection item is enabled and can be processed.
|
| VS_EDITOR_AVAILABLE | An editor for the object is available.
|
Definition at line 34 of file ICollectionViewDelegate.h.
◆ CreateNewObject()
| virtual QByteArray imtgui::ICollectionViewDelegate::CreateNewObject |
( |
const QByteArray & |
typeId, |
|
|
const QString & |
objectName, |
|
|
const QString & |
description, |
|
|
const istd::IChangeable * |
defaultDataPtr = nullptr |
|
) |
| const |
|
pure virtual |
Create a new object in the collection.
◆ ExportObject()
| virtual bool imtgui::ICollectionViewDelegate::ExportObject |
( |
const QByteArray & |
objectId, |
|
|
const QString & |
targetPath = QString() |
|
) |
| const |
|
pure virtual |
Export an existing object from the collection to an external target.
◆ GetColumnItemDelegate()
| virtual QAbstractItemDelegate * imtgui::ICollectionViewDelegate::GetColumnItemDelegate |
( |
const QByteArray & |
columnId | ) |
const |
|
pure virtual |
Get item delegate for the given column.
◆ GetDocumentTypeStatus()
| virtual const iqtgui::IVisualStatus & imtgui::ICollectionViewDelegate::GetDocumentTypeStatus |
( |
| ) |
const |
|
pure virtual |
Get access to the visual status of the document type supported by this delegate.
◆ GetInformationView()
| virtual iqtgui::IGuiObject * imtgui::ICollectionViewDelegate::GetInformationView |
( |
| ) |
const |
|
pure virtual |
Get access to the information view. Information widget will show the information about currently selected item(s).
- See also
- UpdateItemSelection
◆ GetSummaryInformationHeaderInfo()
| virtual HeaderInfo imtgui::ICollectionViewDelegate::GetSummaryInformationHeaderInfo |
( |
const QByteArray & |
informationId | ) |
const |
|
pure virtual |
Get summary information header info of a given type for a given object.
◆ GetSummaryInformationTypes()
Get the list of the summary informations for the document type managed by this delegate. Those informations will be shown on the collection view.
◆ GetSupportedTypeId()
| virtual QByteArray imtgui::ICollectionViewDelegate::GetSupportedTypeId |
( |
| ) |
const |
|
pure virtual |
Get the type-IDs supported by the delegate implementation. The delegate can only work with objects of supported type.
◆ ImportObject()
| virtual QByteArray imtgui::ICollectionViewDelegate::ImportObject |
( |
const QByteArray & |
typeId, |
|
|
const QString & |
sourcePath = QString() |
|
) |
| const |
|
pure virtual |
Import an object from an external source into the collection.
◆ InitializeDelegate()
| virtual bool imtgui::ICollectionViewDelegate::InitializeDelegate |
( |
imtbase::IObjectCollection * |
collectionPtr, |
|
|
iqtgui::IGuiObject * |
parentGuiPtr, |
|
|
const iprm::IParamsSet * |
filterParamsPtr |
|
) |
| |
|
pure virtual |
Initialize the delegate for the collection instance.
◆ IsCommandSupported()
| virtual bool imtgui::ICollectionViewDelegate::IsCommandSupported |
( |
int |
commandId | ) |
const |
|
pure virtual |
By calling this method, the base class determines whether the command is supported by the child.
◆ IsEditorEnabled()
| virtual bool imtgui::ICollectionViewDelegate::IsEditorEnabled |
( |
const QByteArray & |
columnId | ) |
const |
|
pure virtual |
Check if the editing of a given column is enabled.
◆ OnColumnItemDelegateEditFinished()
| virtual void imtgui::ICollectionViewDelegate::OnColumnItemDelegateEditFinished |
( |
const QByteArray & |
objectId, |
|
|
const QByteArray & |
columnId, |
|
|
const QVariant & |
newValue |
|
) |
| const |
|
pure virtual |
Set value to object after finish editing.
◆ OpenDocumentEditor()
| virtual bool imtgui::ICollectionViewDelegate::OpenDocumentEditor |
( |
const QByteArray & |
objectId, |
|
|
const QByteArray & |
viewTypeId = QByteArray() |
|
) |
| const |
|
pure virtual |
Open a document editor for a given data object.
◆ RemoveObjects()
| virtual void imtgui::ICollectionViewDelegate::RemoveObjects |
( |
const imtbase::ICollectionInfo::Ids & |
objectIds | ) |
const |
|
pure virtual |
Remove objects with given IDs.
◆ RenameObject()
| virtual QString imtgui::ICollectionViewDelegate::RenameObject |
( |
const QByteArray & |
objectId, |
|
|
const QString & |
newName |
|
) |
| const |
|
pure virtual |
Rename an existing object.
- Returns
- New object name if the operation was successfull or an empty string otherwise.
◆ SetupContextMenu()
| virtual void imtgui::ICollectionViewDelegate::SetupContextMenu |
( |
QMenu & |
menu | ) |
const |
|
pure virtual |
◆ UpdateItemSelection()
| virtual void imtgui::ICollectionViewDelegate::UpdateItemSelection |
( |
const imtbase::ICollectionInfo::Ids & |
selectedItems, |
|
|
const QByteArray & |
selectedTypeId |
|
) |
| |
|
pure virtual |
Update the commands state according to the state of the collection and the current state of the collection view.
◆ UpdateObject()
| virtual bool imtgui::ICollectionViewDelegate::UpdateObject |
( |
const QByteArray & |
objectId, |
|
|
const istd::IChangeable & |
contents |
|
) |
| const |
|
pure virtual |
Update the contents of an existing object.