2018-03-16 21:46:57 +00:00
|
|
|
#ifndef CUTTERWIDGET_H
|
|
|
|
#define CUTTERWIDGET_H
|
|
|
|
|
|
|
|
#include <QDockWidget>
|
|
|
|
|
|
|
|
class MainWindow;
|
|
|
|
|
|
|
|
class CutterDockWidget : public QDockWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit CutterDockWidget(MainWindow *main, QAction *action = nullptr);
|
2019-01-12 17:02:51 +00:00
|
|
|
~CutterDockWidget() override;
|
|
|
|
bool eventFilter(QObject *object, QEvent *event) override;
|
|
|
|
|
2018-03-16 21:46:57 +00:00
|
|
|
public slots:
|
|
|
|
void toggleDockWidget(bool show);
|
|
|
|
|
2019-01-12 18:01:43 +00:00
|
|
|
signals:
|
|
|
|
void becameVisibleToUser();
|
|
|
|
|
2018-03-16 21:46:57 +00:00
|
|
|
private:
|
|
|
|
QAction *action;
|
|
|
|
|
2019-01-12 18:01:43 +00:00
|
|
|
bool isVisibleToUserCurrent;
|
|
|
|
void updateIsVisibleToUser();
|
2019-01-12 17:02:51 +00:00
|
|
|
|
2018-03-16 21:46:57 +00:00
|
|
|
protected:
|
2018-03-21 20:32:32 +00:00
|
|
|
void closeEvent(QCloseEvent *event) override;
|
2019-01-12 18:01:43 +00:00
|
|
|
bool isVisibleToUser() { return isVisibleToUserCurrent; }
|
2018-03-16 21:46:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CUTTERWIDGET_H
|