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
78f45dc8
Commit
78f45dc8
authored
May 19, 2013
by
Bryant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed line endings in MainWindow.cc
parent
5c33850d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
23 deletions
+24
-23
MainWindow.cc
src/ui/MainWindow.cc
+24
-23
No files found.
src/ui/MainWindow.cc
View file @
78f45dc8
...
...
@@ -845,7 +845,7 @@ void MainWindow::showTool(bool show)
}*/
void
MainWindow
::
addCentralWidget
(
QWidget
*
widget
,
const
QString
&
title
)
{
Q_UNUSED
(
title
);
Q_UNUSED
(
title
);
// Check if this widget already has been added
if
(
centerStack
->
indexOf
(
widget
)
==
-
1
)
{
...
...
@@ -1266,49 +1266,50 @@ void MainWindow::loadStyle(QGC_MAINWINDOW_STYLE style)
void
MainWindow
::
selectStylesheet
()
{
// Let user select style sheet
s
tyleFileName
=
QFileDialog
::
getOpenFileName
(
this
,
tr
(
"Specify stylesheet"
),
styleFileName
,
tr
(
"CSS Stylesheet (*.css);;"
));
QString
newS
tyleFileName
=
QFileDialog
::
getOpenFileName
(
this
,
tr
(
"Specify stylesheet"
),
styleFileName
,
tr
(
"CSS Stylesheet (*.css);;"
));
if
(
!
styleFileName
.
endsWith
(
".css"
))
// Load the new style sheet if a valid one was selected.
if
(
!
newStyleFileName
.
isNull
())
{
QMessageBox
msgBox
;
msgBox
.
setIcon
(
QMessageBox
::
Information
);
msgBox
.
setText
(
tr
(
"QGroundControl did lot load a new style"
));
msgBox
.
setInformativeText
(
tr
(
"No suitable .css file selected. Please select a valid .css file."
));
msgBox
.
setStandardButtons
(
QMessageBox
::
Ok
);
msgBox
.
setDefaultButton
(
QMessageBox
::
Ok
);
msgBox
.
exec
();
return
;
QFile
styleSheet
(
newStyleFileName
);
if
(
styleSheet
.
exists
())
{
styleFileName
=
newStyleFileName
;
reloadStylesheet
();
}
}
// Load style sheet
reloadStylesheet
();
}
void
MainWindow
::
reloadStylesheet
()
{
// Load style sheet
QFile
*
styleSheet
=
new
QFile
(
styleFileName
);
if
(
!
styleSheet
->
exists
())
QFile
styleSheet
(
styleFileName
);
// Default to the indoor stylesheet if an invalid stylesheet was chosen.
if
(
!
styleSheet
.
exists
())
{
styleSheet
=
new
QFil
e
(
":files/styles/style-indoor.css"
);
styleSheet
.
setFileNam
e
(
":files/styles/style-indoor.css"
);
}
if
(
styleSheet
->
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
))
// Load the new stylesheet.
// We also replace an 'ICONDIR' token here with the proper application path.
if
(
styleSheet
.
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
))
{
QString
style
=
QString
(
styleSheet
->
readAll
());
QString
style
=
QString
(
styleSheet
.
readAll
());
style
.
replace
(
"ICONDIR"
,
QCoreApplication
::
applicationDirPath
()
+
"files/styles/"
);
qApp
->
setStyleSheet
(
style
);
}
// Otherwise alert the user to the failure.
else
{
QMessageBox
msgBox
;
msgBox
.
setIcon
(
QMessageBox
::
Information
);
msgBox
.
setText
(
tr
(
"QGroundControl did
l
ot load a new style"
));
msgBox
.
setText
(
tr
(
"QGroundControl did
n
ot load a new style"
));
msgBox
.
setInformativeText
(
tr
(
"Stylesheet file %1 was not readable"
).
arg
(
styleFileName
));
msgBox
.
setStandardButtons
(
QMessageBox
::
Ok
);
msgBox
.
setDefaultButton
(
QMessageBox
::
Ok
);
msgBox
.
exec
();
}
delete
styleSheet
;
}
/**
...
...
@@ -1611,7 +1612,7 @@ void MainWindow::addLink(LinkInterface *link)
void
MainWindow
::
setActiveUAS
(
UASInterface
*
uas
)
{
Q_UNUSED
(
uas
);
Q_UNUSED
(
uas
);
// Enable and rename menu
// ui.menuUnmanned_System->setTitle(uas->getUASName());
// if (!ui.menuUnmanned_System->isEnabled()) ui.menuUnmanned_System->setEnabled(true);
...
...
@@ -1872,7 +1873,7 @@ void MainWindow::UASCreated(UASInterface* uas)
void
MainWindow
::
UASDeleted
(
UASInterface
*
uas
)
{
Q_UNUSED
(
uas
);
Q_UNUSED
(
uas
);
if
(
UASManager
::
instance
()
->
getUASList
().
count
()
==
0
)
{
// Last system deleted
...
...
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