mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2025-10-01 19:51:31 +03:00
ObjectInspector has been wrapped by QWidget
This commit is contained in:
@@ -32,17 +32,20 @@
|
||||
|
||||
#include <QTreeView>
|
||||
#include <QMap>
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
#include "lrobjectitemmodel.h"
|
||||
#include "lrbasedesignobjectmodel.h"
|
||||
#include "lrpropertydelegate.h"
|
||||
|
||||
namespace LimeReport{
|
||||
|
||||
class ObjectInspectorWidget : public QTreeView
|
||||
class ObjectInspectorTreeView : public QTreeView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObjectInspectorWidget(QWidget * parent=0);
|
||||
~ObjectInspectorWidget();
|
||||
ObjectInspectorTreeView(QWidget * parent=0);
|
||||
~ObjectInspectorTreeView();
|
||||
QColor getColor(const int index) const;
|
||||
virtual void reset();
|
||||
virtual void commitActiveEditorData();
|
||||
@@ -59,6 +62,40 @@ private:
|
||||
PropertyDelegate *m_propertyDelegate;
|
||||
};
|
||||
|
||||
class PropertyFilterModel: public QSortFilterProxyModel{
|
||||
public:
|
||||
PropertyFilterModel(QObject* parent = 0): QSortFilterProxyModel(parent){}
|
||||
protected:
|
||||
bool filterAcceptsRow(int sourceRow,const QModelIndex &sourceParent) const;
|
||||
};
|
||||
|
||||
class ObjectInspectorWidget: public QWidget{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ObjectInspectorWidget(QWidget* parent = 0);
|
||||
void setModel(QAbstractItemModel* model);
|
||||
void setAlternatingRowColors(bool value);
|
||||
void setRootIsDecorated(bool value);
|
||||
void setColumnWidth(int column, int width);
|
||||
int columnWidth(int column);
|
||||
void expandToDepth(int depth);
|
||||
void commitActiveEditorData();
|
||||
void setValidator(ValidatorIntf *validator);
|
||||
bool subclassesAsLevel();
|
||||
void setSubclassesAsLevel(bool value);
|
||||
void setObject(QObject* object);
|
||||
const QObject* currentObject();
|
||||
void setMultiObjects(QList<QObject *>* list);
|
||||
void clearObjectsList();
|
||||
void updateProperty(const QString &propertyName);
|
||||
private slots:
|
||||
void slotFilterTextChanged(const QString& filter);
|
||||
private:
|
||||
ObjectInspectorTreeView* m_objectInspectorView;
|
||||
QSortFilterProxyModel* m_filterModel;
|
||||
BaseDesignPropertyModel* m_propertyModel;
|
||||
};
|
||||
|
||||
} //namespace LimeReport
|
||||
|
||||
#endif // LROBJECTINSPECTORWIDGET_H
|
||||
|
Reference in New Issue
Block a user