15#ifndef OBJECTINSPECTORMODEL_H
16#define OBJECTINSPECTORMODEL_H
18#include <layoutinfo_p.h>
20#include <QtGui/qstandarditemmodel.h>
21#include <QtGui/qicon.h>
22#include <QtCore/qcompare.h>
23#include <QtCore/qstring.h>
24#include <QtCore/qlist.h>
25#include <QtCore/qmap.h>
26#include <QtCore/qpointer.h>
30class QDesignerFormWindowInterface;
62 inline QString
objectName()
const {
return m_objectName; }
80 return lhs.m_parent == rhs.m_parent && lhs.m_object == rhs.m_object;
87 QObject *m_parent =
nullptr;
88 QObject *m_object =
nullptr;
114 bool setData(
const QModelIndex &index,
const QVariant &value,
int role =
Qt::
EditRole)
override;
117 void rebuild(
const ObjectModel &newModel);
118 void updateItemContents(ObjectModel &oldModel,
const ObjectModel &newModel);
120 StandardItemList rowAt(QModelIndex index)
const;
123 QMultiMap<QObject *, QModelIndex> m_objectIndexMultiMap;
125 QPointer<QDesignerFormWindowInterface> m_formWindow;
ObjectData(QObject *parent, QObject *object, const ModelRecursionContext &ctx)
bool equals(const ObjectData &me) const
QString objectName() const
void setItemsDisplayData(const StandardItemList &row, const ObjectInspectorIcons &icons, unsigned mask) const
void setItems(const StandardItemList &row, const ObjectInspectorIcons &icons) const
unsigned compare(const ObjectData &me) const
friend bool comparesEqual(const ObjectData &lhs, const ObjectData &rhs) noexcept
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Returns the editor to be used for editing the data item with the given index.
ObjectInspectorModel(QObject *parent)
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Returns the data stored under the given role for the item referred to by the index.
const QModelIndexList indexesOf(QObject *o) const
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Sets the role data for the item at index to value.
UpdateResult update(QDesignerFormWindowInterface *fw)
QObject * objectAt(const QModelIndex &index) const
void mouseMoveEvent(QMouseEvent *event) override
void keyPressEvent(QKeyEvent *event) override
QObjectList indexesToObjects(const QModelIndexList &indexes) const
QWidget * managedWidgetAt(const QPoint &global_mouse_pos)
QModelIndexList indexesOf(QObject *o) const
void setFormWindow(QDesignerFormWindowInterface *fwi)
void slotPopupContextMenu(QWidget *parent, const QPoint &pos)
~ObjectInspectorPrivate()
void dropEvent(QDropEvent *event)
const QPointer< FormWindowBase > & formWindow() const
void getSelection(Selection &s) const
QLineEdit * filterLineEdit() const
void slotHeaderDoubleClicked(int column)
void handleDragEnterMoveEvent(const QWidget *objectInspectorWidget, QDragMoveEvent *event, bool isDragEnter)
void restoreDropHighlighting()
QDesignerFormEditorInterface * core() const
QObject * objectAt(const QModelIndex &index) const
void slotSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
bool selectObject(QObject *o)
QTreeView * treeView() const
Combined button and popup list for selecting options.
@ UnmanagedWidgetSelection
Auxiliary methods to store/retrieve settings.
static SelectionType selectionType(const QDesignerFormWindowInterface *fw, QObject *o)
static QPoint dropPointOffset(const qdesigner_internal::FormWindowBase *fw, const QWidget *dropTarget)
QIcon layoutIcons[LayoutInfo::UnknownLayout+1]