diff options
Diffstat (limited to 'plugingui/testmain.cc')
-rw-r--r-- | plugingui/testmain.cc | 46 |
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; } |