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
f64f15df
Commit
f64f15df
authored
Apr 30, 2010
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Temporarily removed flite, fixed crash caused by tree view
parent
7b42cbd7
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
23 deletions
+39
-23
qgroundcontrol.pri
qgroundcontrol.pri
+4
-4
GAudioOutput.cc
src/GAudioOutput.cc
+1
-1
GAudioOutput.h
src/GAudioOutput.h
+2
-2
ParameterInterface.cc
src/ui/ParameterInterface.cc
+1
-1
ParamTreeItem.cc
src/ui/param/ParamTreeItem.cc
+21
-12
ParamTreeModel.cc
src/ui/param/ParamTreeModel.cc
+9
-3
ParamTreeModel.h
src/ui/param/ParamTreeModel.h
+1
-0
No files found.
qgroundcontrol.pri
View file @
f64f15df
...
...
@@ -116,10 +116,10 @@ linux-g++ {
LIBS += -lm \
#-lflite_cmu_us_rms \
#-lflite_cmu_us_slt \
-lflite_usenglish
\
-lflite_cmulex
\
-lflite_cmu_us_kal16
\
-lflite \
#-lflite_cmu_us_kal16
\
#-lflite_usenglish
\
#-lflite_cmulex
\
#
-lflite \
-lSDL \
-lSDLmain
}
...
...
src/GAudioOutput.cc
View file @
f64f15df
...
...
@@ -91,7 +91,7 @@ GAudioOutput::GAudioOutput(QObject* parent) : QObject(parent),
voiceIndex
(
0
),
emergency
(
false
)
{
#ifdef Q_OS_LINUX
#ifdef Q_OS_LINUX
2
flite_init
();
#endif
// Initialize audio output
...
...
src/GAudioOutput.h
View file @
f64f15df
...
...
@@ -39,7 +39,7 @@ This file is part of the PIXHAWK project
#include <Phonon>
#endif
#ifdef Q_OS_LINUX
#include <flite/flite.h>
//
#include <flite/flite.h>
#include <phonon>
#endif
#ifdef Q_OS_WIN
...
...
@@ -52,7 +52,7 @@ This file is part of the PIXHAWK project
#endif
*/
#ifdef Q_OS_LINUX
#ifdef Q_OS_LINUX
2
extern
"C"
{
cst_voice
*
REGISTER_VOX
(
const
char
*
voxdir
);
void
UNREGISTER_VOX
(
cst_voice
*
vox
);
...
...
src/ui/ParameterInterface.cc
View file @
f64f15df
...
...
@@ -17,7 +17,7 @@ ParameterInterface::ParameterInterface(QWidget *parent) :
tree
=
new
ParamTreeModel
();
treeView
=
new
QTreeView
(
this
);
//
treeView->setModel(tree);
treeView
->
setModel
(
tree
);
QStackedWidget
*
stack
=
m_ui
->
stackedWidget
;
stack
->
addWidget
(
treeView
);
...
...
src/ui/param/ParamTreeItem.cc
View file @
f64f15df
...
...
@@ -37,6 +37,8 @@ ParamTreeItem::ParamTreeItem(QString name, float value, ParamTreeItem* parent)
parentItem
=
parent
;
paramName
=
name
;
paramValue
=
value
;
// Initialize empty itemData
itemData
=
QList
<
QVariant
>
();
}
ParamTreeItem
::
ParamTreeItem
(
const
QList
<
QVariant
>
&
data
,
ParamTreeItem
*
parent
)
...
...
@@ -82,6 +84,8 @@ float ParamTreeItem::getParamValue()
QVariant
ParamTreeItem
::
data
(
int
column
)
const
{
if
(
itemData
.
empty
())
{
QVariant
ret
;
switch
(
column
)
{
...
...
@@ -95,7 +99,12 @@ QVariant ParamTreeItem::data(int column) const
ret
.
setValue
(
QString
(
""
));
break
;
}
//return itemData.value(column);
return
ret
;
}
else
{
return
itemData
.
value
(
column
,
QVariant
(
QString
(
""
)));
}
}
ParamTreeItem
*
ParamTreeItem
::
parent
()
...
...
src/ui/param/ParamTreeModel.cc
View file @
f64f15df
...
...
@@ -40,8 +40,9 @@ ParamTreeModel::ParamTreeModel(QObject *parent)
QList
<
QVariant
>
rootData
;
rootData
<<
tr
(
"Parameter"
)
<<
tr
(
"Value"
);
rootItem
=
new
ParamTreeItem
(
rootData
);
QString
data
=
"IMU
\n
ROLL_K_I
\t
1.255
\n
PITCH_K_P
\t
0.621
\n
PITCH_K_I
\t
2.5545
\n
"
;
setupModelData
(
data
.
split
(
QString
(
"
\n
"
)),
rootItem
);
//String data = "IMU\n ROLL_K_I\t1.255\n PITCH_K_P\t0.621\n PITCH_K_I\t2.5545\n";
//setupModelData(data.split(QString("\n")), rootItem);
}
ParamTreeModel
::
ParamTreeModel
(
const
QString
&
data
,
QObject
*
parent
)
...
...
@@ -80,12 +81,17 @@ QVariant ParamTreeModel::data(const QModelIndex &index, int role) const
return
item
->
data
(
index
.
column
());
}
bool
ParamTreeModel
::
setData
(
const
QModelIndex
&
index
,
const
QVariant
&
value
,
int
role
)
{
}
Qt
::
ItemFlags
ParamTreeModel
::
flags
(
const
QModelIndex
&
index
)
const
{
if
(
!
index
.
isValid
())
return
0
;
return
Qt
::
ItemIsEnabled
|
Qt
::
ItemIsSelectable
;
return
Qt
::
ItemIsEnabled
|
Qt
::
ItemIsSelectable
|
Qt
::
ItemIsEditable
;
}
QVariant
ParamTreeModel
::
headerData
(
int
section
,
Qt
::
Orientation
orientation
,
...
...
src/ui/param/ParamTreeModel.h
View file @
f64f15df
...
...
@@ -47,6 +47,7 @@ public:
~
ParamTreeModel
();
QVariant
data
(
const
QModelIndex
&
index
,
int
role
)
const
;
bool
setData
(
const
QModelIndex
&
index
,
const
QVariant
&
value
,
int
role
=
Qt
::
EditRole
);
Qt
::
ItemFlags
flags
(
const
QModelIndex
&
index
)
const
;
QVariant
headerData
(
int
section
,
Qt
::
Orientation
orientation
,
int
role
=
Qt
::
DisplayRole
)
const
;
...
...
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