#ifndef QVIEWPORTPANE_H #define QVIEWPORTPANE_H #include #include #include namespace uLib { class Object; namespace Qt { class PropertyEditor; } } class QVBoxLayout; class QLabel; class QViewportPane : public QWidget { Q_OBJECT public: explicit QViewportPane(QWidget* parent = nullptr); virtual ~QViewportPane(); void addVtkViewport(); void addRootCanvas(); QWidget* currentViewport() const { return m_viewport; } /** @brief Update the display properties for the given object. */ void setObject(uLib::Object* obj); private slots: void onCloseRequested(); void showContextMenu(const QPoint& pos); void toggleDisplayPanel(); private: void AttemptSplit(Qt::Orientation orientation); void setViewport(QWidget* viewport, const QString& title); QVBoxLayout* m_layout; QWidget* m_titleBar; QLabel* m_titleLabel; QWidget* m_viewport; // Display Properties Overlay QFrame* m_displayPanel; uLib::Qt::PropertyEditor* m_displayEditor; QPushButton* m_toggleBtn; }; #endif // QVIEWPORTPANE_H