1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

OP-39 Added dialog for the connection diagram.

This commit is contained in:
Fredrik Arvidsson 2012-08-23 18:37:55 +02:00
parent b804bc4634
commit bc9181ba04
4 changed files with 179 additions and 3 deletions

View File

@ -0,0 +1,41 @@
/**
******************************************************************************
*
* @file connectiondiagram.cpp
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
* @addtogroup
* @{
* @addtogroup ConnectionDiagram
* @{
* @brief
*****************************************************************************/
/*
* This program 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.
*
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "connectiondiagram.h"
#include "ui_connectiondiagram.h"
ConnectionDiagram::ConnectionDiagram(QWidget *parent) :
QDialog(parent),
ui(new Ui::ConnectionDiagram)
{
ui->setupUi(this);
}
ConnectionDiagram::~ConnectionDiagram()
{
delete ui;
}

View File

@ -0,0 +1,49 @@
/**
******************************************************************************
*
* @file connectiondiagram.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
* @addtogroup
* @{
* @addtogroup ConnectionDiagram
* @{
* @brief
*****************************************************************************/
/*
* This program 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.
*
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef CONNECTIONDIAGRAM_H
#define CONNECTIONDIAGRAM_H
#include <QDialog>
namespace Ui {
class ConnectionDiagram;
}
class ConnectionDiagram : public QDialog
{
Q_OBJECT
public:
explicit ConnectionDiagram(QWidget *parent = 0);
~ConnectionDiagram();
private:
Ui::ConnectionDiagram *ui;
};
#endif // CONNECTIONDIAGRAM_H

View File

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ConnectionDiagram</class>
<widget class="QDialog" name="ConnectionDiagram">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>400</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<property name="sizeGripEnabled">
<bool>true</bool>
</property>
<property name="modal">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGraphicsView" name="connectionDiagram">
<property name="frameShape">
<enum>QFrame::WinPanel</enum>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close|QDialogButtonBox::Save</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>ConnectionDiagram</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>ConnectionDiagram</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

@ -27,7 +27,8 @@ HEADERS += setupwizardplugin.h \
pages/levellingpage.h \
levellingutil.h \
vehicleconfigurationsource.h \
vehicleconfigurationhelper.h
vehicleconfigurationhelper.h \
connectiondiagram.h
SOURCES += setupwizardplugin.cpp \
setupwizard.cpp \
@ -48,7 +49,8 @@ SOURCES += setupwizardplugin.cpp \
pages/levellingpage.cpp \
levellingutil.cpp \
vehicleconfigurationsource.cpp \
vehicleconfigurationhelper.cpp
vehicleconfigurationhelper.cpp \
connectiondiagram.cpp
OTHER_FILES += SetupWizard.pluginspec
@ -66,7 +68,8 @@ FORMS += \
pages/inputpage.ui \
pages/summarypage.ui \
pages/flashpage.ui \
pages/levellingpage.ui
pages/levellingpage.ui \
connectiondiagram.ui
RESOURCES += \
wizardResources.qrc