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
f4a1b73a
Commit
f4a1b73a
authored
Jul 28, 2011
by
oberion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xbee window fixes
parent
e555424a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
4 deletions
+33
-4
CommConfigurationWindow.cc
src/ui/CommConfigurationWindow.cc
+25
-4
MainWindow.cc
src/ui/MainWindow.cc
+4
-0
MainWindow.h
src/ui/MainWindow.h
+4
-0
No files found.
src/ui/CommConfigurationWindow.cc
View file @
f4a1b73a
...
...
@@ -210,21 +210,32 @@ QAction* CommConfigurationWindow::getAction()
void
CommConfigurationWindow
::
setLinkType
(
int
linktype
)
{
#ifdef XBEELINK
// close old configuration window
this
->
window
()
->
close
();
if
(
link
->
isConnected
())
{
// close old configuration window
this
->
window
()
->
close
();
}
else
{
// delete old configuration window
this
->
remove
();
}
LinkInterface
*
tmpLink
(
NULL
);
switch
(
linktype
)
{
case
4
:
{
XbeeLink
*
xbee
=
new
XbeeLink
();
MainWindow
::
instance
()
->
addLink
(
xbee
);
tmpLink
=
xbee
;
MainWindow
::
instance
()
->
addLink
(
tmpLink
);
break
;
}
case
0
:
{
SerialLink
*
serial
=
new
SerialLink
();
MainWindow
::
instance
()
->
addLink
(
serial
);
tmpLink
=
serial
;
MainWindow
::
instance
()
->
addLink
(
tmpLink
);
break
;
}
default:
...
...
@@ -233,6 +244,16 @@ void CommConfigurationWindow::setLinkType(int linktype)
break
;
}
}
// trigger new window
QList
<
QAction
*>
actions
=
MainWindow
::
instance
()
->
listLinkMenuActions
();
foreach
(
QAction
*
act
,
actions
)
{
if
(
act
->
data
().
toInt
()
==
LinkManager
::
instance
()
->
getLinks
().
indexOf
(
tmpLink
))
{
act
->
trigger
();
break
;
}
}
#endif // XBEELINK
}
...
...
src/ui/MainWindow.cc
View file @
f4a1b73a
...
...
@@ -2002,3 +2002,7 @@ void MainWindow::loadDataView(QString fileName)
}
QList
<
QAction
*>
MainWindow
::
listLinkMenuActions
(
void
)
{
return
ui
.
menuNetwork
->
actions
();
}
\ No newline at end of file
src/ui/MainWindow.h
View file @
f4a1b73a
...
...
@@ -35,6 +35,7 @@ This file is part of the QGROUNDCONTROL project
#include <QStatusBar>
#include <QStackedWidget>
#include <QSettings>
#include <qlist.h>
#include "ui_MainWindow.h"
#include "LinkManager.h"
...
...
@@ -215,6 +216,9 @@ public slots:
/** @brief Updates a QDockWidget's location */
void
updateLocationSettings
(
Qt
::
DockWidgetArea
location
);
public:
QList
<
QAction
*>
listLinkMenuActions
(
void
);
protected:
MainWindow
(
QWidget
*
parent
=
0
);
...
...
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