CMultiAttributeDelegateWidget.h
Go to the documentation of this file.
1 #ifndef icmpstr_CMultiAttributeDelegateWidget_included
2 #define icmpstr_CMultiAttributeDelegateWidget_included
3 
4 
5 // Qt includes
6 #include <QtGui/QIcon>
7 #if QT_VERSION >= 0x050000
8 #include <QtWidgets/QWidget>
9 #include <QtWidgets/QItemDelegate>
10 #else
11 #include <QtGui/QWidget>
12 #include <QtGui/QItemDelegate>
13 #endif
14 
15 // ACF-Solutions includes
17 
18 
19 namespace icmpstr
20 {
21 
22 
23 class CMultiAttributeDelegateWidget: public QWidget
24 {
25  Q_OBJECT
26 public:
27  typedef QWidget BaseClass;
28 
29 public:
31  QItemDelegate& itemDelegate,
32  const CElementSelectionInfoManagerBase& elementSelectionInfoManager,
33  QWidget* parentWidget,
34  const QByteArray& attributeId,
35  int attributeFlags);
36 
37  QString GetText() const;
38  void SetText(const QString& text);
39 
40 protected Q_SLOTS:
41  void OnShowDialog();
42 
43 private:
44  QItemDelegate& m_itemDelegate;
45  QLineEdit* m_textEditor;
46  QByteArray m_attributeId;
47  int m_attributeFlags;
48 
49  const CElementSelectionInfoManagerBase& m_elementSelectionInfoManager;
50 };
51 
52 
53 } // namespace icmpstr
54 
55 
56 #endif // !icmpstr_CMultiAttributeDelegateWidget_included
57 
void SetText(const QString &text)
CMultiAttributeDelegateWidget(QItemDelegate &itemDelegate, const CElementSelectionInfoManagerBase &elementSelectionInfoManager, QWidget *parentWidget, const QByteArray &attributeId, int attributeFlags)

© 2007-2011 Witold Gantzke and Kirill Lepskiy