summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Swift/QtUI/QtTabbable.cpp7
-rw-r--r--Swift/QtUI/QtTabbable.h4
2 files changed, 9 insertions, 2 deletions
diff --git a/Swift/QtUI/QtTabbable.cpp b/Swift/QtUI/QtTabbable.cpp
index ed0963b..df2cbfe 100644
--- a/Swift/QtUI/QtTabbable.cpp
+++ b/Swift/QtUI/QtTabbable.cpp
@@ -22,7 +22,7 @@ QtTabbable::QtTabbable() : QWidget() {
}
QtTabbable::~QtTabbable() {
- emit windowClosing();
+
}
bool QtTabbable::isWidgetSelected() {
@@ -65,4 +65,9 @@ bool QtTabbable::event(QEvent* event) {
return QWidget::event(event);
}
+void QtTabbable::closeEvent(QCloseEvent* event) {
+ emit windowClosing();
+ event->accept();
+}
+
}
diff --git a/Swift/QtUI/QtTabbable.h b/Swift/QtUI/QtTabbable.h
index 4073ab4..5837702 100644
--- a/Swift/QtUI/QtTabbable.h
+++ b/Swift/QtUI/QtTabbable.h
@@ -16,6 +16,7 @@ namespace Swift {
public:
enum AlertType {NoActivity, WaitingActivity, ImpendingActivity};
virtual ~QtTabbable();
+
bool isWidgetSelected();
virtual AlertType getWidgetAlertState() {return NoActivity;}
virtual int getCount() {return 0;}
@@ -24,7 +25,8 @@ namespace Swift {
protected:
QtTabbable();
- bool event(QEvent* event);
+ virtual bool event(QEvent* event);
+ virtual void closeEvent(QCloseEvent* event);
signals:
void titleUpdated();