Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Redstart
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Institute of Technical Acoustics (ITA)
Redstart
Commits
5b42d232
Commit
5b42d232
authored
Nov 24, 2017
by
Dipl.-Ing. Jonas Stienen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing problems with struct viewer and making it fit to content
parent
78d3dde7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
+20
-8
src/RedstartSessionDetailsTreeView.h
src/RedstartSessionDetailsTreeView.h
+17
-5
src/RedstartUtils.h
src/RedstartUtils.h
+1
-1
ui/RedstartWindow.ui
ui/RedstartWindow.ui
+2
-2
No files found.
src/RedstartSessionDetailsTreeView.h
View file @
5b42d232
...
...
@@ -33,32 +33,44 @@ public:
{
m_pModel
=
new
RedstartSessionDetailModel
();
this
->
setModel
(
m_pModel
);
m_pModel
->
setHorizontalHeaderLabels
(
QStringList
()
<<
"Key"
<<
"Value"
<<
"Type"
);
SetDefaults
();
//setEditTriggers( QAbstractItemView::NoEditTriggers );
//setSelectionMode( QAbstractItemView::SingleSelection );
};
inline
void
SetDefaults
()
{
m_pModel
->
setHorizontalHeaderLabels
(
QStringList
()
<<
"Key"
<<
"Value"
<<
"Type"
);
resizeColumnToContents
(
1
);
};
void
SetStruct
(
const
CVAStruct
&
oStruct
)
{
m_pModel
->
clear
();
SetDefaults
();
BuildStandardItemFromVAStruct
(
oStruct
,
m_pModel
->
invisibleRootItem
()
);
expandAll
();
resizeColumnToContents
(
0
);
resizeColumnToContents
(
1
);
resizeColumnToContents
(
2
);
return
;
CVAStruct
oMyStruct
;
oMyStruct
[
"hi"
]
=
"wo!?!"
;
/
*
rootNode->appendRow( BuildStandardItemFromVAStruct( oMyStruct ) );
/
/
rootNode->appendRow( BuildStandardItemFromVAStruct( oMyStruct ) );
//return;
QList
<
QStandardItem
*>
qlDescriptors
;
qlDescriptors
<<
new
QStandardItem
(
"Name"
);
qlDescriptors
<<
new
QStandardItem
(
"Talkthrough"
);
qlDescriptors
<<
new
QStandardItem
(
"String"
);
rootNode
->appendRow( qlDescriptors );
m_pModel
->
invisibleRootItem
()
->
appendRow
(
qlDescriptors
);
QList
<
QStandardItem
*>
qlDescriptor2
;
qlDescriptor2
<<
new
QStandardItem
(
"weiteres"
);
rootNode
->appendRow( qlDescriptor2 );
m_pModel
->
invisibleRootItem
()
->
appendRow
(
qlDescriptor2
);
QList
<
QStandardItem
*>
qlDescriptor3
;
qlDescriptor3
<<
new
QStandardItem
(
"direction"
);
...
...
@@ -76,7 +88,7 @@ public:
qlDescriptor3
.
first
()
->
appendRow
(
qlDescriptor4
);
qlDescriptor3
.
first
()
->
appendRow
(
qlDescriptor5
);
*/
};
inline
~
RedstartSessionDetailsTreeView
()
{};
...
...
src/RedstartUtils.h
View file @
5b42d232
...
...
@@ -25,7 +25,6 @@
*/
inline
void
BuildStandardItemFromVAStruct
(
const
CVAStruct
&
oStruct
,
QStandardItem
*
pRootNode
)
{
CVAStruct
::
const_iterator
cit
=
oStruct
.
Begin
();
while
(
cit
!=
oStruct
.
End
()
)
{
...
...
@@ -71,6 +70,7 @@ inline void BuildStandardItemFromVAStruct( const CVAStruct& oStruct, QStandardIt
case
CVAStructValue
:
:
STRUCT
:
{
BuildStandardItemFromVAStruct
(
oValue
,
pItemList
.
first
()
);
break
;
}
}
...
...
ui/RedstartWindow.ui
View file @
5b42d232
...
...
@@ -72,10 +72,10 @@
<x>
0
</x>
<y>
0
</y>
<width>
1029
</width>
<height>
66
6
</height>
<height>
66
0
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_5"
stretch=
"
0
,0,0,0,1"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_5"
stretch=
"
1
,0,0,0,1"
>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_redstart_session"
stretch=
"1,2"
>
<item>
...
...
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