From 29639f5b6da42fc976c883351ef508020f821b59 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 26 Nov 2016 18:58:14 +0100 Subject: New MainWindow. --- plugingui/testmain.cc | 46 +++++++++++----------------------------------- 1 file changed, 11 insertions(+), 35 deletions(-) (limited to 'plugingui/testmain.cc') 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 #endif #include - -#include #include -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; } -- cgit v1.2.3