diff options
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtXMLConsoleWidget.cpp | 22 | ||||
-rw-r--r-- | Swift/QtUI/QtXMLConsoleWidget.h | 6 |
2 files changed, 28 insertions, 0 deletions
diff --git a/Swift/QtUI/QtXMLConsoleWidget.cpp b/Swift/QtUI/QtXMLConsoleWidget.cpp index d2ebb06..7553d06 100644 --- a/Swift/QtUI/QtXMLConsoleWidget.cpp +++ b/Swift/QtUI/QtXMLConsoleWidget.cpp @@ -1,7 +1,29 @@ #include "QtXMLConsoleWidget.h" +#include <QCloseEvent> + namespace Swift { QtXMLConsoleWidget::QtXMLConsoleWidget() { } + +void QtXMLConsoleWidget::showEvent(QShowEvent* event) { + emit windowOpening(); + QWidget::showEvent(event); +} + +void QtXMLConsoleWidget::show() { + QWidget::show(); + emit windowOpening(); +} + +void QtXMLConsoleWidget::activate() { + emit wantsToActivate(); +} + +void QtXMLConsoleWidget::closeEvent(QCloseEvent* event) { + emit windowClosing(); + event->accept(); +} + } diff --git a/Swift/QtUI/QtXMLConsoleWidget.h b/Swift/QtUI/QtXMLConsoleWidget.h index f545e18..50b53f2 100644 --- a/Swift/QtUI/QtXMLConsoleWidget.h +++ b/Swift/QtUI/QtXMLConsoleWidget.h @@ -8,5 +8,11 @@ namespace Swift { Q_OBJECT public: QtXMLConsoleWidget(); + void show(); + void activate(); + protected slots: + void closeEvent(QCloseEvent* event); + protected: + void showEvent(QShowEvent* event); }; } |