2 ******************************************************************************
4 * @file connectiondiagram.h
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
8 * @addtogroup ConnectionDiagram
11 *****************************************************************************/
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 #ifndef CONNECTIONDIAGRAM_H
29 #define CONNECTIONDIAGRAM_H
33 #include <QSvgRenderer>
35 #include <QGraphicsSvgItem>
36 #include "vehicleconfigurationsource.h"
40 class ConnectionDiagram
;
43 class ConnectionDiagram
: public QDialog
{
47 explicit ConnectionDiagram(QWidget
*parent
, VehicleConfigurationSource
*configSource
);
52 static const char *FILE_NAME
;
53 static const int IMAGE_PADDING
;
54 Ui::ConnectionDiagram
*ui
;
55 VehicleConfigurationSource
*m_configSource
;
57 QSvgRenderer
*m_renderer
;
58 QGraphicsScene
*m_scene
;
60 void setupGraphicsScene();
61 void setupGraphicsSceneItems(QList
<QString
> elementsToShow
);
63 void resizeEvent(QResizeEvent
*event
);
64 void showEvent(QShowEvent
*event
);
68 void on_saveButton_clicked();
71 #endif // CONNECTIONDIAGRAM_H