35 lines
712 B
C++
35 lines
712 B
C++
#ifndef QVIEWPORTPANE_H
|
|
#define QVIEWPORTPANE_H
|
|
|
|
#include <QWidget>
|
|
|
|
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; }
|
|
|
|
private slots:
|
|
void onCloseRequested();
|
|
void showContextMenu(const QPoint& pos);
|
|
|
|
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;
|
|
};
|
|
|
|
#endif // QVIEWPORTPANE_H
|