summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-11-26 22:44:00 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-11-26 22:44:00 (GMT)
commitc89ef0ffae597ac8c1063732e1d9a2d84703a80c (patch)
treefdacc93afd7e950b92dda6ad12fbc5e0d1dcb245 /Swift/QtUI
parent3ab65e86b1a8b81c6f38dbbed56749c6a77f9142 (diff)
downloadswift-contrib-c89ef0ffae597ac8c1063732e1d9a2d84703a80c.zip
swift-contrib-c89ef0ffae597ac8c1063732e1d9a2d84703a80c.tar.bz2
Allow the XmlConsole to be closed, and there to be only one.
Resolves: #261 Resolve: #262 # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: Swift/Controllers/UIInterfaces/XMLConsoleWidget.h # modified: Swift/Controllers/XMLConsoleController.cpp # modified: Swift/QtUI/QtXMLConsoleWidget.cpp # modified: Swift/QtUI/QtXMLConsoleWidget.h # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # src/
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtXMLConsoleWidget.cpp22
-rw-r--r--Swift/QtUI/QtXMLConsoleWidget.h6
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);
};
}