27 #include <QItemDelegate>
28 #include <QTreeWidget>
33 #include "scribusapi.h"
43 virtual void paint(QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index)
const;
44 virtual QWidget *createEditor(QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index)
const;
45 virtual void setEditorData(QWidget *editor,
const QModelIndex &index)
const;
46 virtual void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index)
const;
47 virtual void destroyEditor(QWidget * editor,
const QModelIndex & index)
const;
48 virtual void updateEditorGeometry(QWidget *editor,
const QStyleOptionViewItem &option,
const QModelIndex &index)
const;
49 virtual QSize sizeHint(
const QStyleOptionViewItem &opt,
const QModelIndex &index)
const;
51 void valueHasChanged();
54 mutable QWidget *m_edit;
57 class SCRIBUS_API
PropTreeItem :
public QObject,
public QTreeWidgetItem
62 PropTreeItem(QTreeWidget* parent,
int typ, QString title);
82 double valueAsDouble();
84 QString valueAsString();
85 void setIntValue(
int value);
86 void setDoubleValue(
double value);
87 void setBoolValue(
bool value);
88 void setStringValue(QString value);
89 void setUnitValue(
int unit);
90 void setDecimalsValue(
int unit);
91 void setComboStrings(QStringList value);
92 void setMinMaxValues(
int min,
int max);
93 void setMinMaxValues(
double min,
double max);
106 void valueChanged(
int);
107 void valueChanged(
double);
108 void valueChanged(
bool);
109 void valueChanged(QString);
122 void mousePressEvent(QMouseEvent *event);
123 void drawRow(QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index)
const;
127 void handleMousePress(QTreeWidgetItem *item);
Definition: proptree.h:57
Definition: sccolor.h:155
Definition: proptree.h:37