Commit 8562e530 authored by Stéphane Albert's avatar Stéphane Albert

ENH: Added MainWindow skeleton.

parent ec2d0fd3
......@@ -24,14 +24,14 @@
//
// Qt includes (sorted by alphabetic order)
#include <QApplication>
//
// OTB includes (sorted by alphabetic order)
//
// Monteverdi includes (sorted by alphabetic order)
#include "mvdApplication.h"
#include "mvdMainWindow.h"
//
// Main functions definitions.
......@@ -43,7 +43,10 @@
int
main( int argc, char* argv[] )
{
QApplication application( argc, argv );
mvd::Application application( argc, argv );
mvd::MainWindow main_window;
main_window.show();
return application.exec();
}
......
/*=========================================================================
Program: qTutor
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c)
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "mvdApplication.h"
//
// System includes (sorted by alphabetic order)
#include <iostream>
//
// Qt includes (sorted by alphabetic order)
#include <QApplication>
//
// OTB includes (sorted by alphabetic order)
//
// Monteverdi includes (sorted by alphabetic order)
//
// Class pre-declaration.
//
// Class implementation.
namespace mvd
{
Application
::Application( int& argc, char** argv ) :
QApplication( argc, argv )
{
QObject::connect(
this, SIGNAL( aboutToQuit() ),
this, SLOT( OnAboutToQuit() )
);
}
Application
::~Application()
{
}
//
// SLOTS
//
void
Application
::OnAboutToQuit()
{
qDebug( ">DEBUG< mvd::Application::OnAboutToQuit()" );
qWarning( ">WARNING< mvd::Application::OnAboutToQuit()" );
std::cout << ">info< mvd::Application::OnAboutToQuit()" << std::endl;
}
} // end namespace 'mvd'
/*=========================================================================
Program: qTutor
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c)
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __Application_h
#define __Application_h
//
// System includes (sorted by alphabetic order)
//
// Qt includes (sorted by alphabetic order)
#include <QApplication>
//
// OTB includes (sorted by alphabetic order)
//
// Monteverdi includes (sorted by alphabetic order)
//
// Class pre-declaration.
//
// Class declaration.
namespace mvd
{
/** \class Application
*
*/
class Application
: public QApplication
{
Q_OBJECT;
//
//
public:
/** Constructor */
Application( int& argc, char** argv );
/** Destructor */
virtual ~Application();
//
//
protected:
//
// SLOTS
private slots:
/**
*
*/
void OnAboutToQuit();
//
//
private:
};
} // end namespace 'mvd'
#endif // __Application_h
/*=========================================================================
Program: qTutor
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c)
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "mvdMainWindow.h"
#include "ui_mvdMainWindow.h"
//
// System includes (sorted by alphabetic order)
//
// Qt includes (sorted by alphabetic order)
//
// OTB includes (sorted by alphabetic order)
//
// Monteverdi includes (sorted by alphabetic order)
//#include "DockWidget.h"
namespace mvd
{
MainWindow
::MainWindow( QWidget* parent, Qt::WindowFlags flags ) :
QMainWindow( parent, flags ),
ui( new Ui::MainWindow() )
{
ui->setupUi( this );
/*
QDockWidget* dock_widget = new DockWidget( tr( "Dock Widget" ), this );
dock_widget->setAllowedAreas(
Qt::LeftDockWidgetArea |
Qt::RightDockWidgetArea
);
// dockWidget->setWidget( dockWidgetContents );
addDockWidget( Qt::LeftDockWidgetArea, dock_widget );
*/
QObject::connect(
ui->action_Quit, SIGNAL( activated() ),
qApp, SLOT( quit() )
);
}
MainWindow
::~MainWindow()
{
}
//
// SLOTS
//
void
MainWindow
::on_action_Quit_activated()
{
//qApp->quit();
}
} // end namespace 'mvd'
/*=========================================================================
Program: qTutor
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c)
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __MainWindow_h
#define __MainWindow_h
//
// System includes (sorted by alphabetic order)
//
// Qt includes (sorted by alphabetic order)
#include <QMainWindow>
//
// OTB includes (sorted by alphabetic order)
//
// Monteverdi includes (sorted by alphabetic order)
//
// Class pre-declaration.
namespace Ui
{
class MainWindow;
};
namespace mvd
{
/** \class MainWindow
*
*/
class MainWindow
: public QMainWindow
{
Q_OBJECT;
//
//
public:
/** Constructor */
MainWindow( QWidget* Parent =0, Qt::WindowFlags flags =0 );
/** Destructor */
virtual ~MainWindow();
//
//
protected:
//
// SLOTS
private slots:
void on_action_Quit_activated();
//
//
private:
Ui::MainWindow* ui;
};
} // end namespace 'mvd'
#endif // __MainWindow_h
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget"/>
<widget class="QMenuBar" name="m_MenuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menu_File">
<property name="title">
<string>&amp;File</string>
</property>
<addaction name="separator"/>
<addaction name="action_Quit"/>
</widget>
<addaction name="menu_File"/>
</widget>
<widget class="QStatusBar" name="m_StatusBar"/>
<widget class="QToolBar" name="mToolBar">
<property name="windowTitle">
<string>toolBar</string>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
</widget>
<action name="action_Quit">
<property name="text">
<string>&amp;Quit</string>
</property>
<property name="shortcut">
<string>Ctrl+Q</string>
</property>
</action>
</widget>
<resources/>
<connections/>
</ui>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment