Commit e70cec6c authored by Stéphane Albert's avatar Stéphane Albert

ENH: Added about dialog.

parent 549c7fc2
......@@ -35,6 +35,7 @@
//
// Monteverdi includes (sorted by alphabetic order)
#include "mvdAboutDialog.h"
#include "mvdApplication.h"
#include "mvdGLImageWidget.h"
#include "mvdVectorImageModel.h"
......@@ -146,6 +147,16 @@ MainWindow
}
}
/*****************************************************************************/
void
MainWindow
::on_action_About_activated()
{
AboutDialog aboutDialog( this );
aboutDialog.exec();
}
/*****************************************************************************/
} // end namespace 'mvd'
......@@ -111,6 +111,7 @@ private:
// Private attributes.
private slots:
void on_action_Open_activated();
void on_action_About_activated();
};
} // end namespace 'mvd'
......
......@@ -34,7 +34,14 @@
<addaction name="separator"/>
<addaction name="action_Quit"/>
</widget>
<widget class="QMenu" name="menu_Help">
<property name="title">
<string>&amp;Help</string>
</property>
<addaction name="action_About"/>
</widget>
<addaction name="menu_File"/>
<addaction name="menu_Help"/>
</widget>
<widget class="QStatusBar" name="m_StatusBar"/>
<widget class="QToolBar" name="m_ToolBar">
......@@ -73,6 +80,17 @@
<string>Ctrl+O</string>
</property>
</action>
<action name="action_About">
<property name="text">
<string>&amp;About</string>
</property>
<property name="iconText">
<string>About...</string>
</property>
<property name="toolTip">
<string>About...</string>
</property>
</action>
</widget>
<resources/>
<connections/>
......
/*=========================================================================
Program: Monteverdi2
Language: C++
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See Copyright.txt for details.
Monteverdi2 is distributed under the CeCILL licence version 2. See
Licence_CeCILL_V2-en.txt or
http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt for more 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 "mvdAboutDialog.h"
#include "ui_mvdAboutDialog.h"
//
// Qt includes (sorted by alphabetic order)
//// Must be included before system/custom includes.
//
// System includes (sorted by alphabetic order)
//
// ITK includes (sorted by alphabetic order)
//
// OTB includes (sorted by alphabetic order)
//
// Monteverdi includes (sorted by alphabetic order)
namespace mvd
{
/*
TRANSLATOR mvd::AboutDialog
Necessary for lupdate to be aware of C++ namespaces.
Context comment for translator.
*/
/*******************************************************************************/
AboutDialog
::AboutDialog( QWidget* parent, Qt::WindowFlags flags ) :
QDialog( parent ),
m_UI( new mvd::Ui::AboutDialog() )
{
m_UI->setupUi( this );
m_UI->m_ProjectLabel->setText( PROJECT_NAME );
m_UI->m_VersionLabel->setText( Monteverdi2_VERSION_STRING );
}
/*******************************************************************************/
AboutDialog
::~AboutDialog()
{
}
/*******************************************************************************/
/* SLOTS */
/*******************************************************************************/
/*******************************************************************************/
} // end namespace 'mvd'
/*=========================================================================
Program: Monteverdi2
Language: C++
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See Copyright.txt for details.
Monteverdi2 is distributed under the CeCILL licence version 2. See
Licence_CeCILL_V2-en.txt or
http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt for more 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 __mvdAboutDialog_h
#define __mvdAboutDialog_h
//
// Configuration include.
//// Included at first position before any other ones.
#include "ConfigureMonteverdi2.h"
//
// Qt includes (sorted by alphabetic order)
//// Must be included before system/custom includes.
#include <QtGui>
//
// System includes (sorted by alphabetic order)
//
// ITK includes (sorted by alphabetic order)
//
// OTB includes (sorted by alphabetic order)
//
// Monteverdi includes (sorted by alphabetic order)
//
// External classes pre-declaration.
namespace
{
}
namespace mvd
{
//
// Internal classes pre-declaration.
namespace Ui
{
class AboutDialog;
}
/** \class AboutDialog
*
*/
class Monteverdi2_EXPORT AboutDialog :
public QDialog
{
Q_OBJECT;
//
// Public methods.
public:
/** Constructor */
AboutDialog( QWidget* parent =NULL, Qt::WindowFlags flags =0 );
/** Destructor */
virtual ~AboutDialog();
//
// SIGNALS.
signals:
//
// Protected methods.
protected:
//
// Protected attributes.
protected:
//
// Private methods.
private:
//
// Private attributes.
private:
/**
*/
Ui::AboutDialog* m_UI;
//
// SLOTS.
private slots:
};
} // end namespace 'mvd'
#endif // __mvdAboutDialog_h
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>mvd::AboutDialog</class>
<widget class="QDialog" name="mvd::AboutDialog">
<property name="windowModality">
<enum>Qt::ApplicationModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>413</width>
<height>423</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>About...</string>
</property>
<property name="locale">
<locale language="C" country="AnyCountry"/>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="m_ProjectLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Monteverdi2</string>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="m_VersionLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<italic>true</italic>
</font>
</property>
<property name="text">
<string>Version 0.1.0 (alpha-1)</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="m_CopyrightLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string>&lt;br /&gt;&lt;p&gt;Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.&lt;/p&gt;&lt;p&gt;See Copyright.txt for details.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Monteverdi2 is distributed under the CeCILL licence version 2. See&lt;/p&gt;&lt;p&gt;Licence_CeCILL_V2-en.txt or&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt&quot;&gt;http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt&lt;/a&gt; for more details.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;This software is distributed WITHOUT ANY WARRANTY; without even&lt;/p&gt;&lt;p&gt;the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR&lt;/p&gt;&lt;p&gt;PURPOSE. See the above copyright notices for more information&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="m_CloseButton">
<property name="text">
<string>&amp;Close</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<tabstops>
<tabstop>m_CloseButton</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>m_CloseButton</sender>
<signal>clicked()</signal>
<receiver>mvd::AboutDialog</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>359</x>
<y>398</y>
</hint>
<hint type="destinationlabel">
<x>206</x>
<y>211</y>
</hint>
</hints>
</connection>
</connections>
</ui>
......@@ -165,8 +165,6 @@ GLImageWidget
// setup the rendering context
if (aiModel)
{
// this->width() should be equal to width of ViewportImageRegion.
// this->height() should be equal to height of ViewportImageRegion.
ImageModelRenderer::RenderingContext context(aiModel, region, this->width(), this->height());
// use the model renderer to paint the requested region of the image
......
......@@ -16,7 +16,6 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "mvdMyClass.h"
//
......
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