KProperty
KPropertyEditorView.cpp
122 const KPropertyEditorDataModel *editorModel = qobject_cast<const KPropertyEditorDataModel*>(index.model());
137 QVariant modifiedVariant( editorModel->data(index, KPropertyEditorDataModel::PropertyModifiedRole) );
155 const bool isGroupHeader(editorModel->data(index, KPropertyEditorDataModel::PropertyGroupRole).toBool());
160 if (index.column() == 1 && KPropertyWidgetsPluginManager::self()->paint(t, painter, alteredOption, index)) {
185 // (alteredOption.state & QStyle::State_Selected) ? QPalette::HighlightedText : QPalette::Text ), false);
206 //kprDebug()<<"rect:" << r << "viewport:" << painter->viewport() << "window:"<<painter->window();
232 QWidget *w = KPropertyWidgetsPluginManager::self()->createEditor(t, parent, alteredOption, index);
235 w = KPropertyWidgetsPluginManager::self()->createEditor(KProperty::String, parent, alteredOption, index);
238 if (-1 != w->metaObject()->indexOfSignal(QMetaObject::normalizedSignature("commitData(QWidget*)").constData())
288 const bool isGroupHeader(model->data(parent, KPropertyEditorDataModel::PropertyGroupRole).toBool());
353void KPropertyEditorView::changeSet(KPropertySet *set, const QByteArray& propertyToSelect, SetOptions options)
533void KPropertyEditorView::currentChanged( const QModelIndex & current, const QModelIndex & previous )
556void KPropertyEditorView::drawBranches( QPainter * painter, const QRect & rect, const QModelIndex & index ) const
561void KPropertyEditorView::drawRow(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
567 const bool isGroupHeader(d->model->data(index, KPropertyEditorDataModel::PropertyGroupRole).toBool());
588 QVariant modifiedVariant( d->model->data(index, KPropertyEditorDataModel::PropertyModifiedRole) );
void setValueSyncEnabled(bool set)
Definition KPropertyEditorView.cpp:486
void setGridLineColor(const QColor &color)
Sets color of grid lines. Use invalid color QColor() to hide grid lines.
Definition KPropertyEditorView.cpp:670
void propertySetChanged(KPropertySet *set)
KPropertyEditorView(QWidget *parent=nullptr)
Definition KPropertyEditorView.cpp:320
bool groupItemsExpanded() const
Definition KPropertyEditorView.cpp:511
bool childPropertyItemsExpanded() const
Definition KPropertyEditorView.cpp:501
QSize sizeHint() const override
Reimplemented to suggest widget size that is based on number of property items.
Definition KPropertyEditorView.cpp:655
void slotPropertyChanged(KPropertySet &set, KProperty &property)
Definition KPropertyEditorView.cpp:697
void setToolTipsVisible(bool set)
If set is true tooltips are visible for property editor items.
Definition KPropertyEditorView.cpp:747
void slotSetWillBeDeleted()
Definition KPropertyEditorView.cpp:471
void slotPropertyReset(KPropertySet &set, KProperty &property)
Definition KPropertyEditorView.cpp:735
void setChildPropertyItemsExpanded(bool set)
Definition KPropertyEditorView.cpp:496
bool toolTipsVisible() const
Returns true if the property editor widget has enabled visibility of tooltips.
Definition KPropertyEditorView.cpp:742
void slotSetWillBeCleared()
Definition KPropertyEditorView.cpp:466
void setGroupItemsExpanded(bool set)
Definition KPropertyEditorView.cpp:506
bool isValueSyncEnabled() const
Definition KPropertyEditorView.cpp:491
@ PreservePreviousSelection
If used, previously selected editor item will be kept selected.
@ AlphabeticalOrder
Alphabetical order of properties. The default is order of insertion.
KPropertySet * propertySet() const
Definition KPropertyEditorView.cpp:660
void changeSet(KPropertySet *set, SetOptions options=SetOption::None)
Definition KPropertyEditorView.cpp:348
void setGroupsVisible(bool set)
Definition KPropertyEditorView.cpp:521
void slotReadOnlyFlagChanged()
Definition KPropertyEditorView.cpp:476
QColor gridLineColor() const
Definition KPropertyEditorView.cpp:665
@ Alphabetical
alphabetical order (case-insensitively by captions)
void readOnlyFlagChanged()
@ Auto
Synchronize automatically as soon as the editor widget for this property signals (using commitData) t...
@ Editor
Allow to synchronize by the property editor using its valueSync setting (default)
qreal pixelSize(qreal scale)
void commitData(QWidget *editor)
CurrentChanged
ScrollPerPixel
SelectRows
SingleSelection
void setAlternatingRowColors(bool enable)
virtual void commitData(QWidget *editor)
QModelIndex currentIndex() const const
virtual bool edit(const QModelIndex &index, EditTrigger trigger, QEvent *event)
void setEditTriggers(EditTriggers triggers)
virtual bool event(QEvent *event) override
void setHorizontalScrollMode(ScrollMode mode)
iconSize
void setSelectionBehavior(QAbstractItemView::SelectionBehavior behavior)
void setSelectionMode(QAbstractItemView::SelectionMode mode)
QItemSelectionModel * selectionModel() const const
void setCurrentIndex(const QModelIndex &index)
void setItemDelegate(QAbstractItemDelegate *delegate)
QWidget * viewport() const const
const char * constData() const const
bool isEmpty() const const
ToolTip
AllEvents
void setSectionsMovable(bool movable)
const QPoint & globalPos() const const
const QPoint & pos() const const
int x() const const
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const const override
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const const override
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const const override
virtual void select(const QItemSelection &selection, QItemSelectionModel::SelectionFlags command)
void deselect()
void end(bool mark)
int indexOfSignal(const char *signal) const const
QByteArray normalizedSignature(const char *method)
int column() const const
QVariant data(int role) const const
void * internalPointer() const const
bool isValid() const const
const QAbstractItemModel * model() const const
QModelIndex parent() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
virtual const QMetaObject * metaObject() const const
QObject * parent() const const
QVariant property(const char *name) const const
T qobject_cast(QObject *object)
void setObjectName(QAnyStringView name)
QString tr(const char *sourceText, const char *disambiguation, int n)
void drawLine(const QLine &line)
void drawText(const QPoint &position, const QString &text)
void fillRect(const QRect &rectangle, QGradient::Preset preset)
void setFont(const QFont &font)
void setPen(Qt::PenStyle style)
Highlight
T * data() const const
PM_TreeViewIndentation
State_Selected
AlignLeft
UniqueConnection
DisplayRole
void hideText()
void showText(const QPoint &pos, const QString &text, QWidget *w, const QRect &rect, int msecDisplayTime)
void setAllColumnsShowFocus(bool enable)
void setAnimated(bool enable)
int columnWidth(int column) const const
virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous) override
virtual void drawBranches(QPainter *painter, const QRect &rect, const QModelIndex &index) const const
virtual void drawRow(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const const
QHeaderView * header() const const
virtual QModelIndex indexAt(const QPoint &point) const const override
virtual void mousePressEvent(QMouseEvent *event) override
virtual void scrollTo(const QModelIndex &index, ScrollHint hint) override
virtual void setModel(QAbstractItemModel *model) override
virtual bool viewportEvent(QEvent *event) override
virtual QSize viewportSizeHint() const const override
virtual QRect visualRect(const QModelIndex &index) const const override
QString toString() const const
font
QFontInfo fontInfo() const const
rect
QStyle * style() const const
void update()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:09 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:09 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.