2 #include <score/document/DocumentContext.hpp>
3 #include <score/plugins/panel/PanelDelegate.hpp>
4 #include <score/plugins/panel/PanelDelegateFactory.hpp>
5 #include <score/selection/SelectionDispatcher.hpp>
6 #include <score/selection/SelectionStack.hpp>
7 #include <score/widgets/MarginLess.hpp>
8 #include <score/widgets/SearchLineEdit.hpp>
9 #include <Scenario/Inspector/ObjectTree/SearchWidget.hpp>
11 #include <QAbstractItemModel>
12 #include <QContextMenuEvent>
15 #include <QVBoxLayout>
17 #include <nano_observer.hpp>
21 class QGraphicsSceneMouseEvent;
28 :
public QAbstractItemModel
29 ,
public Nano::Observer
34 void setSelected(QList<const IdentifiedObjectAbstract*> sel);
36 QModelIndex index(
int row,
int column,
const QModelIndex& parent)
const override;
37 QModelIndex parent(
const QModelIndex& child)
const override;
38 QVariant headerData(
int section, Qt::Orientation orientation,
int role)
const override;
40 int rowCount(
const QModelIndex& parent)
const override;
41 int columnCount(
const QModelIndex& parent)
const override;
43 QVariant data(
const QModelIndex& index,
int role)
const override;
44 Qt::ItemFlags flags(
const QModelIndex& index)
const override;
46 bool setData(
const QModelIndex& index,
const QVariant& value,
int role)
override;
48 QMimeData* mimeData(
const QModelIndexList& indexes)
const override;
50 const QMimeData* data, Qt::DropAction action,
int row,
int column,
51 const QModelIndex& parent)
const override;
53 const QMimeData* data, Qt::DropAction action,
int row,
int column,
54 const QModelIndex& parent)
override;
55 Qt::DropActions supportedDropActions()
const override;
56 Qt::DropActions supportedDragActions()
const override;
59 void changed() W_SIGNAL(changed);
62 void setupConnections();
63 void cleanConnections();
65 bool isAlive(QObject* obj)
const;
67 template <
typename... Args>
68 void recompute(Args&&...)
79 QList<const QObject*> m_root;
80 QMetaObject::Connection m_con;
84 std::vector<QMetaObject::Connection> m_itemCon;
93 bool updatingSelection{
false};
96 void selectionChanged(
97 const QItemSelection& selected,
const QItemSelection& deselected)
override;
99 void contextMenuEvent(QContextMenuEvent* ev)
override;
106 using QWidget::QWidget;
108 QSize sizeHint()
const override {
return m_sizePolicy; }
109 void setSizeHint(QSize s) { m_sizePolicy = s; }
120 bool hasRight()
const;
121 bool hasLeft()
const;
123 bool hasDown()
const;
143 QToolButton* m_prev{};
144 QToolButton* m_next{};
146 QToolButton* m_left{};
147 QToolButton* m_right{};
149 QToolButton* m_down{};
160 QWidget* widget()
override;
164 void setNewSelection(
const Selection& sel)
override;
167 QVBoxLayout* m_lay{};
175 SCORE_CONCRETE(
"aea973e2-84aa-4b8a-b0f0-b6ce39b6f15a")
177 std::unique_ptr<score::PanelDelegate>
180 return std::make_unique<ObjectPanelDelegate>(ctx);
Definition: ClipMode.hpp:10
Definition: ObjectItemModel.hpp:116
Definition: ObjectItemModel.hpp:30
Definition: ObjectItemModel.hpp:174
Definition: ObjectItemModel.hpp:155
Definition: Selection.hpp:12
Reimplement this interface to register new panels.
Definition: PanelDelegateFactory.hpp:10
The PanelDelegate class.
Definition: PanelDelegate.hpp:50
The SelectionDispatcher class.
Definition: SelectionDispatcher.hpp:15
The SelectionStack class.
Definition: SelectionStack.hpp:24
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Definition: DocumentContext.hpp:18
Specializes ApplicationContext with the QMainWindow.
Definition: GUIApplicationContext.hpp:15
The PanelStatus struct.
Definition: PanelDelegate.hpp:24