48 lines
1.0 KiB
C++
48 lines
1.0 KiB
C++
#ifndef CONTEXTPANEL_H
|
|
#define CONTEXTPANEL_H
|
|
|
|
#include <QWidget>
|
|
#include <QItemSelection>
|
|
#include "Core/Object.h"
|
|
|
|
class QVBoxLayout;
|
|
class QHBoxLayout;
|
|
class QLabel;
|
|
class QTreeView;
|
|
class QSplitter;
|
|
class ContextModel;
|
|
namespace uLib { class ObjectsContext; }
|
|
|
|
class ContextPanel : public QWidget {
|
|
Q_OBJECT
|
|
public:
|
|
ContextPanel(QWidget* parent = nullptr);
|
|
~ContextPanel();
|
|
|
|
void setContext(uLib::ObjectsContext* context);
|
|
void setPropertyContext(uLib::ObjectsContext* context);
|
|
void selectObject(uLib::Object* obj);
|
|
void clearSelection();
|
|
|
|
signals:
|
|
void objectSelected(uLib::Object* obj);
|
|
void propertyUpdated();
|
|
|
|
private slots:
|
|
void onSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
|
|
|
|
private:
|
|
QVBoxLayout* m_layout;
|
|
QWidget* m_titleBar;
|
|
QLabel* m_titleLabel;
|
|
|
|
QTreeView* m_treeView;
|
|
ContextModel* m_model;
|
|
QSplitter* m_splitter;
|
|
|
|
class PropertiesPanel* m_propertiesPanel;
|
|
uLib::ObjectsContext* m_context;
|
|
};
|
|
|
|
#endif // CONTEXTPANEL_H
|