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
9ab80260
Commit
9ab80260
authored
May 14, 2010
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed icon and audio paths, added "all" view which contains almost all widgets
parent
966cad30
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
150 additions
and
65 deletions
+150
-65
.gitignore
.gitignore
+2
-0
linux_create_debian_packet.sh
deploy/linux_create_debian_packet.sh
+13
-0
mac_create_dmg.sh
deploy/mac_create_dmg.sh
+13
-0
mac_audiotest.sh
mac_audiotest.sh
+2
-0
MainWindow.cc
src/ui/MainWindow.cc
+74
-31
MainWindow.h
src/ui/MainWindow.h
+36
-34
MainWindow.ui
src/ui/MainWindow.ui
+10
-0
No files found.
.gitignore
View file @
9ab80260
...
...
@@ -20,3 +20,5 @@ qgroundcontrol
qgroundcontrol.xcodeproj/**
doc/html
doc/doxy.log
deploy/mac
deploy/linux
deploy/linux_create_debian_packet.sh
0 → 100644
View file @
9ab80260
#!/bin/sh
# Clean build directories
rm
-rf
linux
mkdir
-p
linux
# Change to build directory and compile application
cd
..
make
-j4
# Copy and build the application bundle
cd
deploy
cp
-r
qgroundcontrol linux/.
cp
-r
../audio linux/.
# FIXME Create debian packet
echo
-e
'\n QGroundControl Debian packet is now ready for publishing\n'
deploy/mac_create_dmg.sh
0 → 100644
View file @
9ab80260
#!/bin/sh
# Clean build directories
rm
-rf
mac
mkdir
-p
mac
# Change to build directory and compile application
cd
..
make
-j4
# Copy and build the application bundle
cd
deploy
cp
-r
../bin/mac/qgroundcontrol.app mac/.
cp
-r
../audio mac/qgroundcontrol.app/Contents/MacOs/.
macdeployqt qgroundcontrol.app
--bundle
echo
-e
'\n QGroundControl .DMG file is now ready for publishing\n'
mac_audiotest.sh
0 → 100644
View file @
9ab80260
#!/bin/sh
cp
-r
audio bin/mac/qgroundcontrol.app/Contents/MacOs/.
src/ui/MainWindow.cc
View file @
9ab80260
...
...
@@ -216,18 +216,28 @@ void MainWindow::saveScreen()
}
}
/**
* Reload the style sheet from disk. The function tries to load "qgroundcontrol.css" from the application
* directory (which by default does not exist). If it fails, it will load the bundled default CSS
* from memory.
* To customize the application, just create a qgroundcontrol.css file in the application directory
*/
void
MainWindow
::
reloadStylesheet
()
{
// Load style sheet
//QFile styleSheet(MG::DIR::getSupportFilesDirectory() + "/images/style-mission.css");
QFile
styleSheet
(
":/images/style-mission.css"
);
if
(
styleSheet
.
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
))
{
QString
style
=
QString
(
styleSheet
.
readAll
());
style
.
replace
(
"ICONDIR"
,
MG
::
DIR
::
getIconDirectory
());
QFile
*
styleSheet
=
new
QFile
(
QCoreApplication
::
applicationDirPath
()
+
"/qgroundcontrol.css"
);
if
(
!
styleSheet
->
exists
())
{
styleSheet
=
new
QFile
(
":/images/style-mission.css"
);
}
if
(
styleSheet
->
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
))
{
QString
style
=
QString
(
styleSheet
->
readAll
());
style
.
replace
(
"ICONDIR"
,
QCoreApplication
::
applicationDirPath
()
+
"/images/"
);
qApp
->
setStyleSheet
(
style
);
}
else
{
qDebug
()
<<
"Style not set:"
<<
styleSheet
.
fileName
()
<<
"opened: "
<<
styleSheet
.
isOpen
();
qDebug
()
<<
"Style not set:"
<<
styleSheet
->
fileName
()
<<
"opened: "
<<
styleSheet
->
isOpen
();
}
delete
styleSheet
;
}
void
MainWindow
::
showStatusMessage
(
const
QString
&
status
,
int
timeout
)
...
...
@@ -235,14 +245,9 @@ void MainWindow::showStatusMessage(const QString& status, int timeout)
statusBar
->
showMessage
(
status
,
timeout
);
}
void
MainWindow
::
setLastAction
(
QString
status
)
{
showStatusMessage
(
status
,
5
);
}
void
MainWindow
::
setLinkStatus
(
QString
status
)
void
MainWindow
::
showStatusMessage
(
const
QString
&
status
)
{
s
howStatusMessage
(
status
,
1
5
);
s
tatusBar
->
showMessage
(
status
,
5
);
}
/**
...
...
@@ -270,6 +275,7 @@ void MainWindow::connectActions()
connect
(
ui
.
actionEngineerView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadEngineerView
()));
connect
(
ui
.
actionOperatorView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadOperatorView
()));
connect
(
ui
.
actionSettingsView
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadSettingsView
()));
connect
(
ui
.
actionShow_full_view
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
loadAllView
()));
connect
(
ui
.
actionStyleConfig
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
reloadStylesheet
()));
// Joystick configuration
...
...
@@ -501,28 +507,65 @@ void MainWindow::loadEngineerView()
void
MainWindow
::
loadAllView
()
{
clearView
();
GAudioOutput
::
instance
()
->
say
(
"Loaded complete view"
);
QDockWidget
*
containerPFD
=
new
QDockWidget
(
tr
(
"Primary Flight Display"
),
this
);
containerPFD
->
setWidget
(
headDown1
);
addDockWidget
(
Qt
::
RightDockWidgetArea
,
containerPFD
);
QDockWidget
*
containerPayload
=
new
QDockWidget
(
tr
(
"Payload Status"
),
this
);
containerPayload
->
setWidget
(
headDown2
);
addDockWidget
(
Qt
::
RightDockWidgetArea
,
containerPayload
);
headDown1
->
start
();
headDown2
->
start
();
// UAS CONTROL
QDockWidget
*
containerControl
=
new
QDockWidget
(
tr
(
"Control"
),
this
);
containerControl
->
setWidget
(
control
);
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
containerControl
);
// UAS LIST
QDockWidget
*
containerUASList
=
new
QDockWidget
(
tr
(
"Unmanned Systems"
),
this
);
containerUASList
->
setWidget
(
list
);
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
containerUASList
);
// UAS STATUS
QDockWidget
*
containerStatus
=
new
QDockWidget
(
tr
(
"Status Details"
),
this
);
containerStatus
->
setWidget
(
info
);
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
containerStatus
);
// WAYPOINT LIST
QDockWidget
*
containerWaypoints
=
new
QDockWidget
(
tr
(
"Waypoint List"
),
this
);
containerWaypoints
->
setWidget
(
waypoints
);
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
containerWaypoints
);
// DEBUG CONSOLE
QDockWidget
*
containerComm
=
new
QDockWidget
(
tr
(
"Communication Console"
),
this
);
containerComm
->
setWidget
(
debugConsole
);
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
containerComm
);
// OBJECT DETECTION
QDockWidget
*
containerObjRec
=
new
QDockWidget
(
tr
(
"Object Recognition"
),
this
);
containerObjRec
->
setWidget
(
detection
);
addDockWidget
(
Qt
::
RightDockWidgetArea
,
containerObjRec
);
// LINE CHART
linechart
->
setActive
(
true
);
centerStack
->
setCurrentWidget
(
linechart
);
// ONBOARD PARAMETERS
QDockWidget
*
containerParams
=
new
QDockWidget
(
tr
(
"Onboard Parameters"
),
this
);
containerParams
->
setWidget
(
parameters
);
addDockWidget
(
Qt
::
RightDockWidgetArea
,
containerParams
);
this
->
show
();
}
void
MainWindow
::
loadWidgets
()
{
loadOperatorView
();
//
loadEngineerView();
//
loadOperatorView();
loadEngineerView
();
//loadPilotView();
}
/*
void MainWindow::removeCommConfAct(QAction* action)
{
ui.menuNetwork->removeAction(action);
}*/
void
MainWindow
::
runTests
()
{
// TODO Remove after debugging: Add fake data
static
double
testvalue
=
0.0
f
;
testvalue
+=
0.01
f
;
linechart
->
appendData
(
126
,
"test data"
,
testvalue
,
MG
::
TIME
::
getGroundTimeNow
());
}
src/ui/MainWindow.h
View file @
9ab80260
...
...
@@ -76,32 +76,6 @@ public:
MainWindow
(
QWidget
*
parent
=
0
);
~
MainWindow
();
QSettings
settings
;
UASControlWidget
*
control
;
LinechartWidget
*
linechart
;
UASInfoWidget
*
info
;
CameraView
*
camera
;
UASListWidget
*
list
;
WaypointList
*
waypoints
;
ObjectDetectionView
*
detection
;
HUD
*
hud
;
PFD
*
pfd
;
GaugePanel
*
gaugePanel
;
// Popup widgets
JoystickWidget
*
joystickWidget
;
JoystickInput
*
joystick
;
/** User interface actions **/
QAction
*
connectUASAct
;
QAction
*
disconnectUASAct
;
QAction
*
startUASAct
;
QAction
*
returnUASAct
;
QAction
*
stopUASAct
;
QAction
*
killUASAct
;
QAction
*
simulateUASAct
;
public
slots
:
/**
* @brief Shows a status message on the bottom status bar
...
...
@@ -112,8 +86,15 @@ public slots:
* @param timeout how long the status should be displayed
*/
void
showStatusMessage
(
const
QString
&
status
,
int
timeout
);
void
setLastAction
(
QString
status
);
void
setLinkStatus
(
QString
status
);
/**
* @brief Shows a status message on the bottom status bar
*
* The status message will be overwritten if a new message is posted to this function.
* it will be automatically hidden after 5 seconds.
*
* @param status message text
*/
void
showStatusMessage
(
const
QString
&
status
);
void
addLink
();
void
addLink
(
LinkInterface
*
link
);
void
configure
();
...
...
@@ -133,10 +114,8 @@ public slots:
/** @brief Load view with all widgets */
void
loadAllView
();
/** @brief Reload the CSS style sheet */
void
reloadStylesheet
();
void
runTests
();
protected:
QStatusBar
*
statusBar
;
QStatusBar
*
createStatusBar
();
...
...
@@ -151,16 +130,39 @@ protected:
MAVLinkSimulationLink
*
simulationLink
;
LinkInterface
*
udpLink
;
QDockWidget
*
controlDock
;
QStackedWidget
*
centerStack
;
QSettings
settings
;
UASControlWidget
*
control
;
LinechartWidget
*
linechart
;
UASInfoWidget
*
info
;
CameraView
*
camera
;
UASListWidget
*
list
;
WaypointList
*
waypoints
;
ObjectDetectionView
*
detection
;
HUD
*
hud
;
DebugConsole
*
debugConsole
;
MapWidget
*
map
;
ParameterInterface
*
parameters
;
XMLCommProtocolWidget
*
protocol
;
HDDisplay
*
headDown1
;
HDDisplay
*
headDown2
;
GaugePanel
*
gaugePanel
;
// Popup widgets
JoystickWidget
*
joystickWidget
;
JoystickInput
*
joystick
;
/** User interface actions **/
QAction
*
connectUASAct
;
QAction
*
disconnectUASAct
;
QAction
*
startUASAct
;
QAction
*
returnUASAct
;
QAction
*
stopUASAct
;
QAction
*
killUASAct
;
QAction
*
simulateUASAct
;
QDockWidget
*
controlDock
;
QStackedWidget
*
centerStack
;
LogCompressor
*
comp
;
QString
screenFileName
;
...
...
src/ui/MainWindow.ui
View file @
9ab80260
...
...
@@ -74,6 +74,7 @@
<addaction
name=
"actionOperatorView"
/>
<addaction
name=
"actionSettingsView"
/>
<addaction
name=
"separator"
/>
<addaction
name=
"actionShow_full_view"
/>
<addaction
name=
"actionStyleConfig"
/>
</widget>
<addaction
name=
"menuMGround"
/>
...
...
@@ -243,6 +244,15 @@
<string>
Simulate one vehicle to test and evaluate this application
</string>
</property>
</action>
<action
name=
"actionShow_full_view"
>
<property
name=
"icon"
>
<iconset
resource=
"../../mavground.qrc"
>
<normaloff>
:/images/status/network-transmit-receive.svg
</normaloff>
:/images/status/network-transmit-receive.svg
</iconset>
</property>
<property
name=
"text"
>
<string>
Show full view
</string>
</property>
</action>
</widget>
<layoutdefault
spacing=
"6"
margin=
"11"
/>
<resources>
...
...
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