KProperty
22#ifndef KPROPERTY_PIXMAPEDIT_H
23#define KPROPERTY_PIXMAPEDIT_H
25#include "KPropertyWidgetsFactory.h"
33class KPROPERTYWIDGETS_EXPORT KPropertyPixmapEditor :
public QWidget
36 Q_PROPERTY(QVariant value READ value WRITE setValue USER
true)
39 explicit KPropertyPixmapEditor(KProperty *prop, QWidget *parent =
nullptr);
40 ~KPropertyPixmapEditor()
override;
42 QVariant value()
const;
45 void setValue(
const QVariant &value);
48 void commitData( QWidget * editor );
58 QString selectPixmapFileName();
61 virtual void selectPixmap();
64 Q_DISABLE_COPY(KPropertyPixmapEditor)
70 public KPropertyValuePainterInterface,
74 KPropertyPixmapDelegate();
76 QWidget *createEditor(
int type, QWidget *parent,
const QStyleOptionViewItem &option,
77 const QModelIndex &index)
const override;
79 void paint(QPainter *painter,
const QStyleOptionViewItem &option,
80 const QModelIndex &index)
const override;
82 QString valueToString(
const QVariant &value,
const QLocale &locale)
const override;
An interface for editor widget creators.
Provides a specialized conversion of value to string depending on type.
virtual bool eventFilter(QObject *watched, QEvent *event)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:57:41 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.