Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
7a9691fb
Commit
7a9691fb
authored
Dec 20, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete unused files
No longer needed with move to summary page qml
parent
32d0ca68
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
0 additions
and
401 deletions
+0
-401
SummaryPage.cc
src/VehicleSetup/SummaryPage.cc
+0
-92
SummaryPage.h
src/VehicleSetup/SummaryPage.h
+0
-53
SummaryPage.ui
src/VehicleSetup/SummaryPage.ui
+0
-26
VehicleComponentButton.h
src/VehicleSetup/VehicleComponentButton.h
+0
-54
VehicleComponentSummaryButton.qml
src/VehicleSetup/VehicleComponentSummaryButton.qml
+0
-9
VehicleSetupButton.h
src/VehicleSetup/VehicleSetupButton.h
+0
-42
VehicleSetupButtonList.qml
src/VehicleSetup/VehicleSetupButtonList.qml
+0
-79
VehicleSetupSummary.qml
src/VehicleSetup/VehicleSetupSummary.qml
+0
-46
No files found.
src/VehicleSetup/SummaryPage.cc
deleted
100644 → 0
View file @
32d0ca68
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL 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.
QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/// @file
/// @author Don Gagne <don@thegagnes.com>
#include "SummaryPage.h"
#include "ui_SummaryPage.h"
#include <QGroupBox>
#include <QTableWidget>
#include <QSpacerItem>
#include <QDebug>
SummaryPage
::
SummaryPage
(
QList
<
VehicleComponent
*>&
components
,
QWidget
*
parent
)
:
QWidget
(
parent
),
_components
(
components
),
_ui
(
new
Ui
::
SummaryPage
)
{
_ui
->
setupUi
(
this
);
// Loop over all components, creating summary widgets
int
row
=
0
;
int
col
=
0
;
foreach
(
VehicleComponent
*
component
,
_components
)
{
QList
<
QStringList
>
summaryItems
=
component
->
summaryItems
();
if
(
summaryItems
.
count
())
{
// Rows without columns, bad
Q_ASSERT
(
summaryItems
[
0
].
count
());
QGroupBox
*
box
=
new
QGroupBox
(
component
->
name
(),
this
);
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
box
);
QTableWidget
*
table
=
new
QTableWidget
(
summaryItems
.
count
(),
summaryItems
[
0
].
count
(),
box
);
table
->
setShowGrid
(
false
);
table
->
horizontalHeader
()
->
setVisible
(
false
);
table
->
verticalHeader
()
->
setVisible
(
false
);
QTableWidgetItem
*
item
;
for
(
int
tRow
=
0
;
tRow
<
summaryItems
.
count
();
tRow
++
)
{
for
(
int
tCol
=
0
;
tCol
<
summaryItems
[
tRow
].
count
();
tCol
++
)
{
item
=
new
QTableWidgetItem
(
summaryItems
[
tRow
][
tCol
]);
table
->
setItem
(
tRow
,
tCol
,
item
);
}
}
table
->
resizeColumnsToContents
();
layout
->
addWidget
(
table
);
_ui
->
gridLayout
->
addWidget
(
box
,
row
,
col
++
,
Qt
::
AlignLeft
|
Qt
::
AlignTop
);
}
if
(
col
==
2
)
{
row
++
;
col
=
0
;
}
}
// Add spacers to force the grid to collapse to it's smallest size
QSpacerItem
*
spacer
=
new
QSpacerItem
(
40
,
20
,
QSizePolicy
::
Expanding
,
QSizePolicy
::
Minimum
);
_ui
->
gridLayout
->
addItem
(
spacer
,
0
,
2
,
1
,
1
);
spacer
=
new
QSpacerItem
(
20
,
40
,
QSizePolicy
::
Minimum
,
QSizePolicy
::
Expanding
);
_ui
->
gridLayout
->
addItem
(
spacer
,
row
,
0
,
1
,
1
);
}
SummaryPage
::~
SummaryPage
()
{
delete
_ui
;
}
src/VehicleSetup/SummaryPage.h
deleted
100644 → 0
View file @
32d0ca68
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL 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.
QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
#ifndef SUMMARYPAGE_H
#define SUMMARYPAGE_H
#include <QWidget>
#include <QList>
#include "VehicleComponent.h"
/// @file
/// @brief This class is used to display the Summary Page portion of the Vehicle Setup UI.
/// @author Don Gagne <don@thegagnes.com>
namespace
Ui
{
class
SummaryPage
;
}
class
SummaryPage
:
public
QWidget
{
Q_OBJECT
public:
explicit
SummaryPage
(
QList
<
VehicleComponent
*>&
components
,
QWidget
*
parent
=
0
);
~
SummaryPage
();
private:
QList
<
VehicleComponent
*>
_components
;
///< VehicleComponents for active UAS
Ui
::
SummaryPage
*
_ui
;
};
#endif
src/VehicleSetup/SummaryPage.ui
deleted
100644 → 0
View file @
32d0ca68
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
SummaryPage
</class>
<widget
class=
"QWidget"
name=
"SummaryPage"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
1537
</width>
<height>
1100
</height>
</rect>
</property>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"MinimumExpanding"
vsizetype=
"MinimumExpanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
/>
</widget>
<resources/>
<connections/>
</ui>
src/VehicleSetup/VehicleComponentButton.h
deleted
100644 → 0
View file @
32d0ca68
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL 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.
QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
#ifndef VEHICLECOMPONENTBUTTON_H
#define VEHICLECOMPONENTBUTTON_H
#include "VehicleSetupButton.h"
#include "VehicleComponent.h"
/// @file
/// @brief This class is used for the push buttons in the Vehicle Setup display.
/// @author Don Gagne <don@thegagnes.com>
class
VehicleComponentButton
:
public
VehicleSetupButton
{
Q_OBJECT
public:
/// @param component VehicleComponent associated witht this button
VehicleComponentButton
(
VehicleComponent
*
component
,
QWidget
*
parent
=
NULL
)
:
VehicleSetupButton
(
parent
),
_component
(
component
)
{
Q_ASSERT
(
component
);
}
/// @brief Returns the component associated with the button
VehicleComponent
*
component
(
void
)
{
return
_component
;
}
private:
VehicleComponent
*
_component
;
};
#endif
src/VehicleSetup/VehicleComponentSummaryButton.qml
deleted
100644 → 0
View file @
32d0ca68
import
QtQuick
2.2
import
QtQuick
.
Controls
1.2
import
QGroundControlFactControls
1.0
SetupButton
{
width
:
300
height
:
200
title
:
vehicleComponent
.
name
}
src/VehicleSetup/VehicleSetupButton.h
deleted
100644 → 0
View file @
32d0ca68
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL 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.
QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
#ifndef VEHICLESETUPBUTTON_H
#define VEHICLESETUPBUTTON_H
#include <QPushButton>
/// @file
/// @brief This class is used for the push button in the Vehicle Setup display. We use a seperate class
/// so we can assign a seperate style for them.
/// @author Don Gagne <don@thegagnes.com>
class
VehicleSetupButton
:
public
QPushButton
{
Q_OBJECT
public:
VehicleSetupButton
(
QWidget
*
parent
=
NULL
)
:
QPushButton
(
parent
)
{
}
};
#endif
src/VehicleSetup/VehicleSetupButtonList.qml
deleted
100644 → 0
View file @
32d0ca68
// Currently unused but leaving here for future conversion to QML
import
QtQuick
2.0
import
QtQuick
.
Controls
1.2
Rectangle
{
SystemPalette
{
id
:
myPalette
;
colorGroup
:
SystemPalette
.
Active
}
color
:
myPalette
.
dark
anchors.fill
:
parent
id
:
buttonParent
signal
componentButtonClicked
(
variant
varComponent
)
Button
{
id
:
summaryButton
objectName
:
"
summaryButton
"
height
:
50
width
:
150
text
:
"
Summary
"
}
Button
{
id
:
firmwareButton
objectName
:
"
firmwareButton
"
height
:
50
width
:
150
anchors.top
:
summaryButton
.
bottom
text
:
"
Firmware
"
}
ListModel
{
id
:
vehicleComponentModelTest
ListElement
{
name
:
"
Radio
"
setupComplete
:
true
icon
:
"
/Users/Don/repos/qgroundcontrol/files/images/px4/menu/remote.png
"
}
ListElement
{
name
:
"
Gyroscope
"
setupCompleted
:
false
icon
:
"
qrc:/files/images/px4/menu/remote.png
"
}
ListElement
{
name
:
"
Magnetometer
"
icon
:
"
qrc:/files/images/px4/menu/remote.png
"
}
}
ListView
{
id
:
componentList
width
:
200
;
height
:
contentItem
.
childrenRect
.
height
snapMode
:
ListView
.
NoSnap
anchors.top
:
firmwareButton
.
bottom
model
:
vehicleComponentModel
delegate
:
Button
{
objectName
:
name
+
"
SetupButton
"
height
:
50
width
:
150
text
:
name
iconSource
:
icon
onClicked
:
{
console
.
log
(
"
Setup button clicked
"
)
buttonParent
.
componentButtonClicked
(
modelData
)
}
Rectangle
{
width
:
10
height
:
10
color
:
setupComplete
?
"
green
"
:
"
red
"
border.color
:
"
black
"
}
}
}
}
src/VehicleSetup/VehicleSetupSummary.qml
deleted
100644 → 0
View file @
32d0ca68
// Currently unused but leaving here for future conversion to QML
import
QtQuick
2.0
import
QtQuick
.
Controls
1.2
Item
{
width
:
parent
.
width
height
:
parent
.
height
ListModel
{
id
:
vehicleComponentModelTest
ListElement
{
name
:
"
Gyroscope
"
description
:
"
Long description
"
setupComplete
:
false
}
ListElement
{
name
:
"
Magnetometer
"
description
:
"
Long description
"
setupComplete
:
false
}
ListElement
{
name
:
"
Radio
"
description
:
"
Long description
"
setupComplete
:
true
}
}
ListView
{
id
:
componentList
anchors.fill
:
parent
model
:
vehicleComponentModel
section.property
:
"
setupComplete
"
section.criteria
:
ViewSection
.
FullString
section.delegate
:
Text
{
text
:
section
==
"
true
"
?
"
Setup complete
"
:
"
Requires setup
"
}
delegate
:
Item
{
width
:
180
;
height
:
40
Column
{
Text
{
text
:
"
Component:
"
+
model
.
name
}
Text
{
text
:
model
.
description
}
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment