20#ifndef KPROPERTYWIDGETS_FACTORY_H
21#define KPROPERTYWIDGETS_FACTORY_H
24#include "KPropertyFactory.h"
25#include "KPropertyUtils.h"
32#include <QStyleOptionViewItem>
50 bool bordersVisible()
const;
52 void setBordersVisible(
bool visible);
95class KPROPERTYWIDGETS_EXPORT KPropertyValuePainterInterface
98 KPropertyValuePainterInterface();
99 virtual ~KPropertyValuePainterInterface();
100 virtual void paint(
QPainter * painter,
115 Q_PROPERTY(
QVariant value READ value WRITE setValue USER
true)
125 void commitData(
QWidget * editor );
128 void setValue(
const QVariant& value);
140template<
class W
idget>
143 public KPropertyValuePainterInterface
155 KProperty *prop = KPropertyUtils::propertyForIndex(index);
156 return new Widget(parent, prop,
this);
162 KPropertyValuePainterInterface::paint(
this, painter, option, index);
169class KPROPERTYWIDGETS_EXPORT KPropertyWidgetsFactory :
public KPropertyFactory
172 KPropertyWidgetsFactory();
173 ~KPropertyWidgetsFactory()
override;
182 void addPainter(
int type, KPropertyValuePainterInterface *painter);
184 static void paintTopGridLine(
QWidget *widget);
185 static void setTopAndBottomBordersUsingStyleSheet(
QWidget *widget,
193 void addPainterInternal(
int type, KPropertyValuePainterInterface *painter,
bool own =
true);
195 Q_DISABLE_COPY(KPropertyWidgetsFactory)
An interface for editor widget creators.
Options for altering the editor widget creation process.
bool operator!=(const KPropertyEditorCreatorOptions &other) const
Creator returning editor.
Label widget that can be used for displaying text-based read-only items Used in KPropertyLabelCreator...
Provides a specialized conversion of value to string depending on type.
The base class representing a single property.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:05:13 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.