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
4c8b3f0f
Commit
4c8b3f0f
authored
Apr 09, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Click through all setup buttons
parent
999a4a87
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
SetupViewTest.cc
src/VehicleSetup/SetupViewTest.cc
+27
-2
MainWindow.h
src/ui/MainWindow.h
+2
-0
No files found.
src/VehicleSetup/SetupViewTest.cc
View file @
4c8b3f0f
...
...
@@ -27,6 +27,9 @@
#include "SetupViewTest.h"
#include "MockLink.h"
#include "QGCMessageBox.h"
#include "SetupView.h"
#include "UASManager.h"
#include "AutoPilotPluginManager.h"
UT_REGISTER_TEST
(
SetupViewTest
)
...
...
@@ -72,9 +75,31 @@ void SetupViewTest::_clickThrough_test(void)
_mainToolBar
->
onSetupView
();
QTest
::
qWait
(
1000
);
// Click through all the setup buttons
// FIXME: NYI
MainWindow
*
mainWindow
=
MainWindow
::
instance
();
Q_ASSERT
(
mainWindow
);
QWidget
*
setupViewWidget
=
mainWindow
->
getCurrentViewWidget
();
Q_ASSERT
(
setupViewWidget
);
SetupView
*
setupView
=
qobject_cast
<
SetupView
*>
(
setupViewWidget
);
Q_ASSERT
(
setupView
);
// Click through fixed buttons
setupView
->
firmwareButtonClicked
();
QTest
::
qWait
(
1000
);
setupView
->
parametersButtonClicked
();
QTest
::
qWait
(
1000
);
setupView
->
summaryButtonClicked
();
QTest
::
qWait
(
1000
);
// Click through component buttons
UASInterface
*
uas
=
UASManager
::
instance
()
->
getActiveUAS
();
Q_ASSERT
(
uas
);
AutoPilotPlugin
*
autopilot
=
AutoPilotPluginManager
::
instance
()
->
getInstanceForAutoPilotPlugin
(
uas
);
Q_ASSERT
(
autopilot
);
const
QVariantList
&
components
=
autopilot
->
vehicleComponents
();
foreach
(
QVariant
varComponent
,
components
)
{
setupView
->
setupButtonClicked
(
varComponent
);
}
// On MainWindow close we should get a message box telling the user to disconnect first. Disconnect will then pop
// the log file save dialog.
...
...
src/ui/MainWindow.h
View file @
4c8b3f0f
...
...
@@ -124,6 +124,8 @@ public:
/// @brief Gets a pointer to the Main Tool Bar
MainToolBar
*
getMainToolBar
(
void
)
{
return
_mainToolBar
;
}
QWidget
*
getCurrentViewWidget
(
void
)
{
return
_currentViewWidget
;
}
public
slots
:
/** @brief Show the application settings */
...
...
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