Added About dialog

git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@47 620bd6b2-0a58-f614-fd9a-1bd335dccda9
This commit is contained in:
matlabbe 2011-11-24 19:11:30 +00:00
parent 708cfa9cff
commit 1f71177807
7 changed files with 316 additions and 13 deletions

View File

@ -7,11 +7,13 @@ SET(headers_ui
../src/ObjWidget.h
../src/Camera.h
../src/ParametersToolBox.h
../src/AboutDialog.h
)
SET(uis
../src/ui/mainWindow.ui
../src/ui/addObjectDialog.ui
../src/ui/aboutDialog.ui
)
#SET(qrc
@ -39,6 +41,7 @@ SET(SRC_FILES
../src/ParametersToolBox.cpp
../src/Settings.cpp
../src/ObjWidget.cpp
../src/AboutDialog.cpp
${moc_srcs}
${moc_uis}
#${srcs_qrc}

35
src/AboutDialog.cpp Normal file
View File

@ -0,0 +1,35 @@
/*
* Copyright (C) 2010-2011, Mathieu Labbe and IntRoLab - Universite de Sherbrooke
*
* This file is part of RTAB-Map.
*
* RTAB-Map is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* RTAB-Map is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RTAB-Map. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AboutDialog.h"
#include "ui_aboutDialog.h"
AboutDialog::AboutDialog(QWidget * parent) :
QDialog(parent)
{
_ui = new Ui_aboutDialog();
_ui->setupUi(this);
_ui->label_version->setText(PROJECT_VERSION);
}
AboutDialog::~AboutDialog()
{
delete _ui;
}

42
src/AboutDialog.h Normal file
View File

@ -0,0 +1,42 @@
/*
* Copyright (C) 2010-2011, Mathieu Labbe and IntRoLab - Universite de Sherbrooke
*
* This file is part of RTAB-Map.
*
* RTAB-Map is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* RTAB-Map is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RTAB-Map. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ABOUTDIALOG_H_
#define ABOUTDIALOG_H_
#include <QtGui/QDialog>
#include <QtCore/QUrl>
class Ui_aboutDialog;
class AboutDialog : public QDialog
{
Q_OBJECT
public:
AboutDialog(QWidget * parent = 0);
virtual ~AboutDialog();
private:
Ui_aboutDialog * _ui;
};
#endif /* ABOUTDIALOG_H_ */

View File

@ -8,6 +8,7 @@
#include "Camera.h"
#include "Settings.h"
#include "ParametersToolBox.h"
#include "AboutDialog.h"
#include <iostream>
#include <stdio.h>
@ -31,6 +32,7 @@ MainWindow::MainWindow(Camera * camera, QWidget * parent) :
{
ui_ = new Ui_mainWindow();
ui_->setupUi(this);
aboutDialog_ = new AboutDialog(this);
if(!camera_)
{
@ -69,6 +71,7 @@ MainWindow::MainWindow(Camera * camera, QWidget * parent) :
connect(ui_->actionExit, SIGNAL(triggered()), this, SLOT(close()));
connect(ui_->actionSave_objects, SIGNAL(triggered()), this, SLOT(saveObjects()));
connect(ui_->actionLoad_objects, SIGNAL(triggered()), this, SLOT(loadObjects()));
connect(ui_->actionAbout, SIGNAL(triggered()), aboutDialog_ , SLOT(exec()));
startProcessing();
}

View File

@ -17,6 +17,7 @@ class ObjWidget;
class Camera;
class ParametersToolBox;
class QLabel;
class AboutDialog;
class MainWindow : public QMainWindow
{
@ -55,6 +56,7 @@ private:
private:
Ui_mainWindow * ui_;
Camera * camera_;
AboutDialog * aboutDialog_;
QList<ObjWidget*> objects_;
cv::Mat dataTree_;
QList<int> dataRange_;

209
src/ui/aboutDialog.ui Normal file
View File

@ -0,0 +1,209 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>aboutDialog</class>
<widget class="QDialog" name="aboutDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>404</width>
<height>257</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>About Find-Object</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:14pt; font-weight:600;&quot;&gt;Find-Object&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0">
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Author :</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Link :</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Version :</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_HomePage_2">
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://www.code.google.com/p/find-object&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Home page&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Mathieu Labbé, matlabbe@gmail.com</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="label_version">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap>:/images/IntRoLabSmall.png</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>Copyright (C) 2011 IntRoLab - Université de Sherbrooke</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../GuiLib.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>aboutDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>aboutDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -6,12 +6,12 @@
<rect>
<x>0</x>
<y>0</y>
<width>864</width>
<width>871</width>
<height>533</height>
</rect>
</property>
<property name="windowTitle">
<string>Find object</string>
<string>Find-Object</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="2">
@ -130,8 +130,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>864</width>
<height>25</height>
<width>871</width>
<height>22</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
@ -156,15 +156,22 @@
<string>View</string>
</property>
</widget>
<widget class="QMenu" name="menu">
<property name="title">
<string>?</string>
</property>
<addaction name="actionAbout"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuEdit"/>
<addaction name="menuView"/>
<addaction name="menu"/>
</widget>
<widget class="QDockWidget" name="dockWidget_parameters">
<property name="minimumSize">
<size>
<width>300</width>
<height>180</height>
<height>194</height>
</size>
</property>
<property name="floating">
@ -188,8 +195,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>282</width>
<height>401</height>
<width>276</width>
<height>393</height>
</rect>
</property>
<attribute name="label">
@ -204,9 +211,6 @@
<property name="verticalSpacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item row="0" column="2">
<widget class="QLabel" name="label_3">
<property name="text">
@ -345,7 +349,7 @@
<property name="minimumSize">
<size>
<width>300</width>
<height>121</height>
<height>128</height>
</size>
</property>
<property name="windowTitle">
@ -372,8 +376,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>280</width>
<height>463</height>
<width>274</width>
<height>459</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_objects">
@ -430,6 +434,11 @@
<string>Load objects...</string>
</property>
</action>
<action name="actionAbout">
<property name="text">
<string>About...</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>