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
cac31024
Commit
cac31024
authored
Nov 18, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove old reconnect on boot option
parent
b9cb57ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
45 deletions
+1
-45
MainWindow.cc
src/ui/MainWindow.cc
+1
-32
MainWindow.h
src/ui/MainWindow.h
+0
-13
No files found.
src/ui/MainWindow.cc
View file @
cac31024
...
...
@@ -129,8 +129,7 @@ void MainWindow::deleteInstance(void)
/// by MainWindow::_create method. Hence no other code should have access to
/// constructor.
MainWindow
::
MainWindow
()
:
_autoReconnect
(
false
)
,
_lowPowerMode
(
false
)
:
_lowPowerMode
(
false
)
,
_showStatusBar
(
false
)
,
_mainQmlWidgetHolder
(
NULL
)
{
...
...
@@ -208,12 +207,6 @@ MainWindow::MainWindow()
connect
(
this
,
SIGNAL
(
x11EventOccured
(
XEvent
*
)),
mouse
,
SLOT
(
handleX11Event
(
XEvent
*
)));
#endif //QGC_MOUSE_ENABLED_LINUX
// Connect link
if
(
_autoReconnect
)
{
restoreLastUsedConnection
();
}
// Set low power mode
enableLowPowerMode
(
_lowPowerMode
);
emit
initStatusChanged
(
tr
(
"Restoring last view state"
),
Qt
::
AlignLeft
|
Qt
::
AlignBottom
,
QColor
(
62
,
93
,
141
));
...
...
@@ -496,7 +489,6 @@ void MainWindow::loadSettings()
// Why the screaming?
QSettings
settings
;
settings
.
beginGroup
(
MAIN_SETTINGS_GROUP
);
_autoReconnect
=
settings
.
value
(
"AUTO_RECONNECT"
,
_autoReconnect
).
toBool
();
_lowPowerMode
=
settings
.
value
(
"LOW_POWER_MODE"
,
_lowPowerMode
).
toBool
();
_showStatusBar
=
settings
.
value
(
"SHOW_STATUSBAR"
,
_showStatusBar
).
toBool
();
settings
.
endGroup
();
...
...
@@ -506,7 +498,6 @@ void MainWindow::storeSettings()
{
QSettings
settings
;
settings
.
beginGroup
(
MAIN_SETTINGS_GROUP
);
settings
.
setValue
(
"AUTO_RECONNECT"
,
_autoReconnect
);
settings
.
setValue
(
"LOW_POWER_MODE"
,
_lowPowerMode
);
settings
.
setValue
(
"SHOW_STATUSBAR"
,
_showStatusBar
);
settings
.
endGroup
();
...
...
@@ -543,11 +534,6 @@ void MainWindow::configureWindowName()
setWindowTitle
(
windowname
);
}
void
MainWindow
::
enableAutoReconnect
(
bool
enabled
)
{
_autoReconnect
=
enabled
;
}
/**
* @brief Create all actions associated to the main window
*
...
...
@@ -634,23 +620,6 @@ void MainWindow::saveLastUsedConnection(const QString connection)
settings
.
setValue
(
key
,
connection
);
}
/// @brief Restore (and connects) the last used connection (if any)
void
MainWindow
::
restoreLastUsedConnection
()
{
// TODO This should check and see of the port/whatever is present
// first. That is, if the last connection was to a PX4 on some serial
// port, it should check and see if the port is present before making
// the connection.
QSettings
settings
;
QString
key
(
MAIN_SETTINGS_GROUP
);
key
+=
"/LAST_CONNECTION"
;
if
(
settings
.
contains
(
key
))
{
QString
connection
=
settings
.
value
(
key
).
toString
();
// Create a link for it
qgcApp
()
->
toolbox
()
->
linkManager
()
->
createConnectedLink
(
connection
);
}
}
#ifdef QGC_MOUSE_ENABLED_LINUX
bool
MainWindow
::
x11Event
(
XEvent
*
event
)
{
...
...
src/ui/MainWindow.h
View file @
cac31024
...
...
@@ -80,12 +80,6 @@ public:
~
MainWindow
();
/** @brief Get auto link reconnect setting */
bool
autoReconnectEnabled
()
const
{
return
_autoReconnect
;
}
/** @brief Get low power mode setting */
bool
lowPowerModeEnabled
()
const
{
...
...
@@ -95,18 +89,12 @@ public:
/// @brief Saves the last used connection
void
saveLastUsedConnection
(
const
QString
connection
);
/// @brief Restore (and connects) the last used connection (if any)
void
restoreLastUsedConnection
();
public
slots
:
/** @brief Show the application settings */
void
showSettings
();
void
manageLinks
();
/** @brief Automatically reconnect last link */
void
enableAutoReconnect
(
bool
enabled
);
/** @brief Save power by reducing update rates */
void
enableLowPowerMode
(
bool
enabled
)
{
_lowPowerMode
=
enabled
;
}
...
...
@@ -251,7 +239,6 @@ private:
void
_storeVisibleWidgetsSettings
(
void
);
#endif
bool
_autoReconnect
;
bool
_lowPowerMode
;
///< If enabled, QGC reduces the update rates of all widgets
bool
_showStatusBar
;
QVBoxLayout
*
_centralLayout
;
...
...
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