6#include <icomp/CComponentBase.h>
7#include <ifile/IFileMetaInfoProvider.h>
8#include <iqtgui/IIconProvider.h>
9#include <iqtgui/IDialog.h>
12#include <imtgui/CObjectCollectionViewDelegate.h>
22class CStandardCollectionViewDelegateComp:
23 public CObjectCollectionViewDelegate,
24 public icomp::CComponentBase
28 typedef icomp::CComponentBase BaseClass;
29 typedef CObjectCollectionViewDelegate BaseClass2;
31 I_BEGIN_COMPONENT(CStandardCollectionViewDelegateComp);
32 I_REGISTER_INTERFACE(ibase::ICommandsProvider);
34 I_ASSIGN(m_objectTypeIdAttrPtr,
"ObjectTypeId",
"Type-ID supported by this delegate",
true,
"ObjectTypeId");
35 I_ASSIGN(m_statusIconsProviderCompPtr,
"StatusIcons",
"Icons for delegate visual status",
false,
"StatusIcons");
36 I_ASSIGN(m_editDialogCompPtr,
"EditDialog",
"Dialog used for editing the collection items",
false,
"EditDialog");
37 I_ASSIGN_TO(m_editDialogObserverCompPtr, m_editDialogCompPtr,
true);
38 I_ASSIGN(m_useCompressorAttrPtr,
"UseCompressor",
"If enable, use ZIP-compression for import/export of objects",
true,
true);
39 I_ASSIGN(m_isExportSupportedAttrPtr,
"ExportSupported",
"If enable, export command will be enabled",
true,
true);
40 I_ASSIGN(m_isImportSupportedAttrPtr,
"ImportSupported",
"If enable, import command will be enabled",
true,
true);
43 CStandardCollectionViewDelegateComp();
46 virtual QByteArray GetSupportedTypeId()
const override;
47 virtual bool InitializeDelegate(
imtbase::IObjectCollection* collectionPtr, iqtgui::IGuiObject* parentGuiPtr,
const iprm::IParamsSet* filterParamsPtr)
override;
48 virtual bool OpenDocumentEditor(
const QByteArray& objectId,
const QByteArray& viewTypeId = QByteArray())
const override;
49 virtual bool IsCommandSupported(
int commandId)
const override;
53 virtual void OnComponentCreated()
override;
56 virtual void SetupCommands()
override;
57 virtual bool IsBundlePersistenceSupported(ifile::IFileTypeInfo::QueryFlags flags)
const;
60 virtual void OnDesignSchemaChanged(
const QByteArray& themeId)
override;
63 virtual void OnLanguageChanged()
override;
66 virtual void OnEdit();
69 iqtgui::CHierarchicalCommand m_editContentsCommand;
72 void InitializeVisualStatus();
78 I_ATTR(
bool, m_useCompressorAttrPtr);
80 I_ATTR(QByteArray, m_objectTypeIdAttrPtr);
81 I_REF(iqtgui::IIconProvider, m_statusIconsProviderCompPtr);
83 I_REF(iqtgui::IDialog, m_editDialogCompPtr);
84 I_REF(imod::IObserver, m_editDialogObserverCompPtr);
86 I_ATTR(
bool, m_isExportSupportedAttrPtr);
87 I_ATTR(
bool, m_isImportSupportedAttrPtr);
90 idoc::MetaInfoPtr m_selectedMetaInfoPtr;