00001
00002 #include <Qt/qapplication.h>
00003
00004
00005 #include "MainProgram.h"
00006 #include "MainWindow.h"
00007 #include "QtCvWrapper.h"
00008
00010 MainProgram::MainProgram(int argc, char* argv[])
00011 {
00012
00013 QApplication app( argc, argv );
00014
00015 m_mainWindow = new MainWindow(0, Qt::Window);
00016
00017
00018 app.setActiveWindow(m_mainWindow);
00019
00020 m_mainWindow->resize(800,530);
00021
00022 m_mainWindow->show();
00023
00024 m_wrapper = new QtCvWrapper(this, m_mainWindow);
00025
00026
00027 QObject::connect(m_mainWindow, SIGNAL(signalSnakeButtonPressed()), m_wrapper, SLOT(slotSnakeButtonPressed()));
00028 QObject::connect(m_mainWindow, SIGNAL(signalDemoButtonPressed()), m_wrapper, SLOT(slotTest()));
00029 QObject::connect(m_mainWindow, SIGNAL(signalImageOpened()), m_wrapper, SLOT(slotImageOpened()));
00030 QObject::connect(m_mainWindow, SIGNAL(signalInitCurve()), m_wrapper, SLOT(slotInitCurve()));
00031
00032 QObject::connect(m_mainWindow, SIGNAL(signalIterationOn()), m_wrapper, SLOT(slotIterationOn()));
00033 QObject::connect(m_mainWindow, SIGNAL(signalIterationOff()), m_wrapper, SLOT(slotIterationOff()));
00034 QObject::connect(m_mainWindow, SIGNAL(signalIterationStep()), m_wrapper, SLOT(slotIterationStep()));
00035
00036
00037
00038
00039
00040
00041
00042
00043 app.exec();
00044 }
00045
00047 MainProgram::~MainProgram(void)
00048 {
00049 }
00050