mirror of
https://github.com/fralx/LimeReport.git
synced 2025-11-25 00:18:06 +03:00
Define code style and format all source file using clang-format-14
except those placed in 3rdparty directories.
This commit is contained in:
@@ -30,39 +30,42 @@
|
||||
#ifndef LRPROPERTYDELEGATE_H
|
||||
#define LRPROPERTYDELEGATE_H
|
||||
|
||||
#include <QItemDelegate>
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QTreeView>
|
||||
#include <QObject>
|
||||
|
||||
#include "lrobjectitemmodel.h"
|
||||
|
||||
namespace LimeReport{
|
||||
#include <QItemDelegate>
|
||||
#include <QObject>
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QTreeView>
|
||||
|
||||
namespace LimeReport {
|
||||
|
||||
class ObjectInspectorTreeView;
|
||||
//class PropertyDelegate : public QItemDelegate
|
||||
class PropertyDelegate : public QStyledItemDelegate
|
||||
{
|
||||
// class PropertyDelegate : public QItemDelegate
|
||||
class PropertyDelegate: public QStyledItemDelegate {
|
||||
Q_OBJECT
|
||||
public:
|
||||
PropertyDelegate(QObject *parent=0);
|
||||
PropertyDelegate(QObject* parent = 0);
|
||||
void setObjectInspector(ObjectInspectorTreeView* objectInspector);
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
void setEditorData(QWidget *editor, const QModelIndex &index) const;
|
||||
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
|
||||
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
void paint(QPainter* painter, const QStyleOptionViewItem& option,
|
||||
const QModelIndex& index) const;
|
||||
QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
||||
QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option,
|
||||
const QModelIndex& index) const;
|
||||
void setEditorData(QWidget* editor, const QModelIndex& index) const;
|
||||
void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const;
|
||||
void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option,
|
||||
const QModelIndex& index) const;
|
||||
LimeReport::ObjectPropItem* editingItem();
|
||||
bool isEditing(){return m_isEditing;}
|
||||
bool isEditing() { return m_isEditing; }
|
||||
private slots:
|
||||
void commitAndCloseEditor();
|
||||
void slotEditorDeleted();
|
||||
void slotItemDeleted(QObject* item);
|
||||
|
||||
private:
|
||||
LimeReport::ObjectInspectorTreeView* m_objectInspector;
|
||||
mutable LimeReport::ObjectPropItem* m_editingItem;
|
||||
mutable bool m_isEditing;
|
||||
};
|
||||
}
|
||||
} // namespace LimeReport
|
||||
#endif // LRPROPERTYDELEGATE_H
|
||||
|
||||
Reference in New Issue
Block a user