|
Computer Assited Medical Intervention Tool Kit
version 5.0
|
|
Go to the documentation of this file.
41 #ifndef QTTREEPROPERTYBROWSER_H
42 #define QTTREEPROPERTYBROWSER_H
46 #if QT_VERSION >= 0x040400
50 class QTreeWidgetItem;
62 Q_PROPERTY(
int indentation READ indentation WRITE setIndentation)
63 Q_PROPERTY(
bool rootIsDecorated READ rootIsDecorated WRITE setRootIsDecorated)
64 Q_PROPERTY(
bool alternatingRowColors READ alternatingRowColors WRITE setAlternatingRowColors)
65 Q_PROPERTY(
bool headerVisible READ isHeaderVisible WRITE setHeaderVisible)
66 Q_PROPERTY(
ResizeMode resizeMode READ resizeMode WRITE setResizeMode)
67 Q_PROPERTY(
int splitterPosition READ splitterPosition WRITE setSplitterPosition)
68 Q_PROPERTY(
bool propertiesWithoutValueMarked READ propertiesWithoutValueMarked WRITE setPropertiesWithoutValueMarked)
82 int indentation()
const;
83 void setIndentation(
int i);
85 bool rootIsDecorated()
const;
86 void setRootIsDecorated(
bool show);
88 bool alternatingRowColors()
const;
89 void setAlternatingRowColors(
bool enable);
91 bool isHeaderVisible()
const;
92 void setHeaderVisible(
bool visible);
94 ResizeMode resizeMode()
const;
95 void setResizeMode(ResizeMode mode);
97 int splitterPosition()
const;
98 void setSplitterPosition(
int position);
110 void setPropertiesWithoutValueMarked(
bool mark);
111 bool propertiesWithoutValueMarked()
const;
129 #if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)
138 Q_PRIVATE_SLOT(d_func(),
void slotCurrentTreeItemChanged(QTreeWidgetItem*, QTreeWidgetItem*))
142 #if QT_VERSION >= 0x040400
bool hasValue() const
Definition: qtpropertybrowser.cpp:259
QtBrowserItem * parent() const
Definition: qtpropertybrowser.cpp:1143
Definition: qttreepropertybrowser.cpp:124
ResizeMode resizeMode
the resize mode of setions in the header.
Definition: qttreepropertybrowser.h:66
void propertyChanged(QtBrowserItem *index)
Definition: qttreepropertybrowser.cpp:595
EditorToPropertyMap m_editorToProperty
Definition: qttreepropertybrowser.cpp:272
void expanded(QtBrowserItem *item)
void setEditorPrivate(QtTreePropertyBrowserPrivate *editorPrivate)
Definition: qttreepropertybrowser.cpp:231
QTreeWidgetItem * indexToItem(const QModelIndex &index) const
Definition: qttreepropertybrowser.cpp:133
The description of this class will come soon !
Definition: qttreepropertybrowser.h:60
void setEditorPrivate(QtTreePropertyBrowserPrivate *editorPrivate)
Definition: qttreepropertybrowser.cpp:129
Q_PRIVATE_SLOT(d_func(), void slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *)) Q_PRIVATE_SLOT(d_func()
QtBrowserItem * indexToBrowserItem(const QModelIndex &index) const
Definition: qttreepropertybrowser.cpp:512
QtProperty * indexToProperty(const QModelIndex &index) const
Definition: qttreepropertybrowser.cpp:503
QMap< QTreeWidgetItem *, QtBrowserItem * > m_itemToIndex
Definition: qttreepropertybrowser.cpp:107
void setResizeMode(ResizeMode mode)
Definition: qttreepropertybrowser.cpp:861
bool rootIsDecorated
whether to show controls for expanding and collapsing root items.
Definition: qttreepropertybrowser.h:63
void setAlternatingRowColors(bool enable)
Definition: qttreepropertybrowser.cpp:809
QTreeWidgetItem * editedItem() const
Definition: qttreepropertybrowser.cpp:254
void editItem(QtBrowserItem *item)
Definition: qttreepropertybrowser.cpp:1031
void setHeaderVisible(bool visible)
Definition: qttreepropertybrowser.cpp:822
QMap< QtProperty *, QWidget * > PropertyToEditorMap
Definition: qttreepropertybrowser.cpp:274
void slotCurrentTreeItemChanged(QTreeWidgetItem *newItem, QTreeWidgetItem *)
Definition: qttreepropertybrowser.cpp:682
Definition: qttreepropertybrowser.cpp:60
void setRootIsDecorated(bool show)
Definition: qttreepropertybrowser.cpp:789
bool m_headerVisible
Definition: qttreepropertybrowser.cpp:113
void setEditorData(QWidget *, const QModelIndex &) const override
Definition: qttreepropertybrowser.cpp:249
QtAbstractPropertyBrowser provides a base class for implementing property browsers.
Definition: qtpropertybrowser.h:301
#define QT_QTPROPERTYBROWSER_EXPORT
Definition: qtpropertybrowser.h:59
void enableItem(QTreeWidgetItem *item) const
Definition: qttreepropertybrowser.cpp:539
QtTreePropertyBrowser::ResizeMode m_resizeMode
Definition: qttreepropertybrowser.cpp:114
void mousePressEvent(QMouseEvent *event) override
mouse press handler overriden to manage different version of VTK
void setCurrentItem(QtBrowserItem *browserItem, bool block)
Definition: qttreepropertybrowser.cpp:490
QtTreePropertyBrowserPrivate * d_ptr
Definition: qttreepropertybrowser.h:127
void mousePressEvent(QMouseEvent *event) override
Definition: qttreepropertybrowser.cpp:205
void setPropertiesWithoutValueMarked(bool mark)
Definition: qttreepropertybrowser.cpp:987
QTreeWidgetItem * editedItem() const
Definition: qttreepropertybrowser.cpp:689
void setItemVisible(QtBrowserItem *item, bool visible)
Definition: qttreepropertybrowser.cpp:930
The QtBrowserItem class represents a property in a property browser instance.
Definition: qtpropertybrowser.h:286
int splitterPosition
the position of the splitter between the colunms.
Definition: qttreepropertybrowser.h:67
QtTreePropertyBrowser(QWidget *parent=nullptr)
Definition: qttreepropertybrowser.cpp:746
void void slotCurrentBrowserItemChanged(QtBrowserItem *)) Q_PRIVATE_SLOT(d_func()
bool propertiesWithoutValueMarked
whether to enable or disable marking properties without value.
Definition: qttreepropertybrowser.h:68
QtTreePropertyBrowserPrivate * m_editorPrivate
Definition: qttreepropertybrowser.cpp:143
The QtProperty class encapsulates an instance of a property.
Definition: qtpropertybrowser.h:113
void setExpanded(QtBrowserItem *item, bool expanded)
Definition: qttreepropertybrowser.cpp:888
void setBackgroundColor(QtBrowserItem *item, const QColor &color)
Definition: qttreepropertybrowser.cpp:943
@ Fixed
Definition: qttreepropertybrowser.h:74
~QtTreePropertyBrowser() override
Definition: qttreepropertybrowser.cpp:765
void setCurrentItem(QtBrowserItem *)
Definition: qtpropertybrowser.cpp:1963
QtPropertyEditorView * treeWidget() const
Definition: qttreepropertybrowser.cpp:87
void updateItem(QTreeWidgetItem *item)
Definition: qttreepropertybrowser.cpp:601
QColor calculatedBackgroundColor(QtBrowserItem *item) const
Definition: qttreepropertybrowser.cpp:974
bool lastColumn(int column) const
Definition: qttreepropertybrowser.cpp:521
QTreeWidgetItem * m_editedItem
Definition: qttreepropertybrowser.cpp:277
void keyPressEvent(QKeyEvent *event) override
Definition: qttreepropertybrowser.cpp:180
int indentation
indentation of the items in the tree view.
Definition: qttreepropertybrowser.h:62
void setModelData(QWidget *, QAbstractItemModel *, const QModelIndex &) const override
Definition: qttreepropertybrowser.cpp:246
QColor calculatedBackgroundColor(QtBrowserItem *item) const
Definition: qttreepropertybrowser.cpp:647
QtBrowserItem * currentItem() const
Definition: qttreepropertybrowser.cpp:483
void drawDisplay(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QString &text) const override
Definition: qttreepropertybrowser.cpp:401
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition: qttreepropertybrowser.cpp:341
void itemRemoved(QtBrowserItem *item) override
Definition: qttreepropertybrowser.cpp:1017
class QtPropertyEditorDelegate * m_delegate
Definition: qttreepropertybrowser.cpp:115
QtTreePropertyBrowser * q_ptr
Definition: qttreepropertybrowser.cpp:61
QWidget * createEditor(QtProperty *property, QWidget *parent) const
Definition: qttreepropertybrowser.cpp:71
QtPropertyEditorView(QWidget *parent=nullptr)
Definition: qttreepropertybrowser.cpp:146
QtProperty * property() const
Definition: qtpropertybrowser.cpp:1132
virtual void itemChanged(QtBrowserItem *item)=0
void drawRow(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition: qttreepropertybrowser.cpp:151
void setSplitterPosition(int position)
Definition: qttreepropertybrowser.cpp:878
bool isExpanded(QtBrowserItem *item) const
Definition: qttreepropertybrowser.cpp:901
bool isHeaderVisible() const
Definition: qttreepropertybrowser.cpp:818
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition: qttreepropertybrowser.cpp:347
QMap< QWidget *, QtProperty * > EditorToPropertyMap
Definition: qttreepropertybrowser.cpp:271
int indentation(const QModelIndex &index) const
Definition: qttreepropertybrowser.cpp:282
ResizeMode
Definition: qttreepropertybrowser.h:71
void slotEditorDestroyed(QObject *object)
Definition: qttreepropertybrowser.cpp:299
setBackgroundColor(0.0, 0.0, 0.0)
QMap< QtBrowserItem *, QTreeWidgetItem * > m_indexToItem
Definition: qttreepropertybrowser.cpp:106
void init(QWidget *parent)
Definition: qttreepropertybrowser.cpp:457
Definition: qttreepropertybrowser.cpp:224
virtual void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem)=0
bool m_browserChangedBlocked
Definition: qttreepropertybrowser.cpp:119
bool isItemVisible(QtBrowserItem *item) const
Definition: qttreepropertybrowser.cpp:916
void slotCurrentBrowserItemChanged(QtBrowserItem *item)
Definition: qttreepropertybrowser.cpp:676
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition: qttreepropertybrowser.cpp:410
void currentItemChanged(QtBrowserItem *)
void keyPressEvent(QKeyEvent *e) override
key events (do nothing but pass on e to the parent widget), please do not add any shortcut management...
@ Interactive
Definition: qttreepropertybrowser.h:72
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition: qttreepropertybrowser.cpp:319
QTreeWidgetItem * indexToItem(const QModelIndex &index) const
Definition: qttreepropertybrowser.cpp:517
QtPropertyEditorDelegate(QObject *parent=nullptr)
Definition: qttreepropertybrowser.cpp:227
bool markPropertiesWithoutValue() const
Definition: qttreepropertybrowser.cpp:90
virtual QWidget * createEditor(QtProperty *property, QWidget *parent)
Definition: qtpropertybrowser.cpp:1880
QtTreePropertyBrowserPrivate()
Definition: qttreepropertybrowser.cpp:426
void closeEditor(QtProperty *property)
Definition: qttreepropertybrowser.cpp:313
bool m_markPropertiesWithoutValue
Definition: qttreepropertybrowser.cpp:118
QtPropertyEditorView * m_treeWidget
Definition: qttreepropertybrowser.cpp:111
bool m_disablePainting
Definition: qttreepropertybrowser.cpp:279
bool eventFilter(QObject *object, QEvent *event) override
Definition: qttreepropertybrowser.cpp:415
QWidget * m_editedWidget
Definition: qttreepropertybrowser.cpp:278
void itemChanged(QtBrowserItem *item) override
Definition: qttreepropertybrowser.cpp:1024
void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem) override
Definition: qttreepropertybrowser.cpp:1010
void editItem(QtBrowserItem *browserItem)
Definition: qttreepropertybrowser.cpp:693
bool alternatingRowColors
whether to draw the background using alternating colors. By default this property is set to true.
Definition: qttreepropertybrowser.h:64
void slotExpanded(const QModelIndex &index)
Definition: qttreepropertybrowser.cpp:668
void drawDecoration(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QPixmap &pixmap) const override
Definition: qttreepropertybrowser.cpp:392
void propertyRemoved(QtBrowserItem *index)
Definition: qttreepropertybrowser.cpp:581
void slotCollapsed(const QModelIndex &index)
Definition: qttreepropertybrowser.cpp:660
void setIndentation(int i)
Definition: qttreepropertybrowser.cpp:777
@ Stretch
Definition: qttreepropertybrowser.h:73
QtTreePropertyBrowserPrivate * m_editorPrivate
Definition: qttreepropertybrowser.cpp:276
QColor backgroundColor(QtBrowserItem *item) const
Definition: qttreepropertybrowser.cpp:962
static QIcon drawIndicatorIcon(const QPalette &palette, QStyle *style)
Definition: qttreepropertybrowser.cpp:430
bool hasValue(QTreeWidgetItem *item) const
Definition: qttreepropertybrowser.cpp:553
void disableItem(QTreeWidgetItem *item) const
Definition: qttreepropertybrowser.cpp:525
void propertyInserted(QtBrowserItem *index, QtBrowserItem *afterIndex)
Definition: qttreepropertybrowser.cpp:561
QIcon m_expandIcon
Definition: qttreepropertybrowser.cpp:120
PropertyToEditorMap m_propertyToEditor
Definition: qttreepropertybrowser.cpp:275
QMap< QtBrowserItem *, QColor > m_indexToBackgroundColor
Definition: qttreepropertybrowser.cpp:109
virtual void itemRemoved(QtBrowserItem *item)=0
void collapsed(QtBrowserItem *item)