ICF 3.1.1.10
Technical documentation of ICF Libraries
CMultiAttributeEditor.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9// ICF includes
12#include <GeneratedFiles/icmpstr/ui_CMultiAttributeEditor.h>
13
14
15namespace icmpstr
16{
17
18
19class CMultiAttributeEditor: public QDialog
20{
21 Q_OBJECT
22public:
24 QWidget* parentPtr,
25 const CElementSelectionInfoManagerBase& elementSelectionInfoManager,
26 const QByteArray& attributeId,
27 int attributeFlags);
28
32 void SetEditorText(const QString& attributeValuesText);
33
37 QStringList GetAttributeValues() const;
38
39protected Q_SLOTS:
40 void OnItemAdd();
45 void OnItemChanged(QListWidgetItem* itemPtr);
46
47protected:
48 void CreateValuesTree(const QStringList& values);
49 void UpdateItemState(QListWidgetItem& item);
50
51private:
52 class ValueItemDelegate: public iwidgets::CItemDelegate
53 {
54 public:
55 typedef iwidgets::CItemDelegate BaseClass;
56
57 ValueItemDelegate(const CMultiAttributeEditor& parent);
58
59 // reimplemented (QItemDelegate)
60 virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
61 virtual void setEditorData(QWidget* editor, const QModelIndex& index ) const;
62 virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const;
63
64 private:
65 const CMultiAttributeEditor& m_parent;
66 };
67
68
69 const CElementSelectionInfoManagerBase& m_elementSelectionInfoManager;
70 QByteArray m_attributeId;
71 int m_attributeFlags;
72
73 Ui::CMultiAttributeEditor m_dialog;
74
75 ValueItemDelegate m_valueItemDelegate;
76};
77
78
79} // namespace icmpstr
80
81
Base class for all components depending of meta information in current selected registry context.
void UpdateItemState(QListWidgetItem &item)
CMultiAttributeEditor(QWidget *parentPtr, const CElementSelectionInfoManagerBase &elementSelectionInfoManager, const QByteArray &attributeId, int attributeFlags)
void OnItemChanged(QListWidgetItem *itemPtr)
void CreateValuesTree(const QStringList &values)
void SetEditorText(const QString &attributeValuesText)
Set the list of the attributes as a text object.
QStringList GetAttributeValues() const
Get attribute values.
Standard ICF item view delegator.
This package contains (Qt based) implementations of compositor components.

© Witold Gantzke and Kirill Lepskiy