summaryrefslogtreecommitdiff
path: root/plugingui/testmain.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-11-26 18:58:14 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2017-01-21 14:51:30 +0100
commit29639f5b6da42fc976c883351ef508020f821b59 (patch)
tree5e80827063a09d983158ff8e9ad507a2b7b6e6b5 /plugingui/testmain.cc
parent586fac8e8daa7665302b075f900d8d2df90716f9 (diff)
New MainWindow.
Diffstat (limited to 'plugingui/testmain.cc')
-rw-r--r--plugingui/testmain.cc46
1 files changed, 11 insertions, 35 deletions
diff --git a/plugingui/testmain.cc b/plugingui/testmain.cc
index 84d813d..c4ca18d 100644
--- a/plugingui/testmain.cc
+++ b/plugingui/testmain.cc
@@ -24,56 +24,32 @@
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#include "plugingui.h"
-
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
#include <hugin.hpp>
-
-#include <notifier.h>
#include <settings.h>
-class TestMain : public Listener {
-public:
- TestMain()
- {
- CONNECT(&gui, closeNotifier, this, &TestMain::stop);
- }
+#include "mainwindow.h"
- void stop()
- {
- DEBUG(stop, "Stopping...\n");
- running = false;
- }
+int main()
+{
+ INFO(example, "We are up and running");
- void run()
+ Settings settings;
+ GUI::MainWindow main_window(settings, nullptr);
+ main_window.show();
+
+ while(main_window.processEvents())
{
- while(running)
- {
#ifdef WIN32
- SleepEx(50, FALSE);
+ SleepEx(50, FALSE);
#else
- usleep(50000);
+ usleep(50000);
#endif
- gui.processEvents();
- }
}
- bool running = true;
-
- Settings settings;
- GUI::PluginGUI gui{settings};
-};
-
-int main()
-{
- INFO(example, "We are up and running");
-
- TestMain testMain;
- testMain.run();
-
return 0;
}