Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Leander Singer
RobotAPI
Commits
334fa671
Commit
334fa671
authored
4 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Add splitter
parent
556811cf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/gui-plugins/ArMemMemoryViewer/ArMemMemoryViewerWidgetController.cpp
+37
-15
37 additions, 15 deletions
...s/ArMemMemoryViewer/ArMemMemoryViewerWidgetController.cpp
with
37 additions
and
15 deletions
source/RobotAPI/gui-plugins/ArMemMemoryViewer/ArMemMemoryViewerWidgetController.cpp
+
37
−
15
View file @
334fa671
...
...
@@ -28,6 +28,7 @@
#include
<QTimer>
#include
<ArmarXCore/observers/variant/Variant.h>
#include
<ArmarXCore/core/time/TimeUtil.h>
#include
<RobotAPI/libraries/armem/core/ice_conversions.h>
#include
<RobotAPI/libraries/armem_gui/QTreeWidgetAronDataVisitor.h>
...
...
@@ -50,6 +51,38 @@ namespace armarx
}
}
static
QSplitter
*
useSplitter
(
QLayout
*
layout
)
{
ARMARX_CHECK
(
layout
);
QSplitter
*
splitter
;
if
(
dynamic_cast
<
QHBoxLayout
*>
(
layout
))
{
splitter
=
new
QSplitter
(
Qt
::
Orientation
::
Horizontal
);
}
else
if
(
dynamic_cast
<
QVBoxLayout
*>
(
layout
))
{
splitter
=
new
QSplitter
(
Qt
::
Orientation
::
Vertical
);
}
else
{
splitter
=
new
QSplitter
();
}
while
(
layout
->
count
()
>
0
)
{
int
index
=
0
;
if
(
layout
->
itemAt
(
index
)
->
widget
())
{
QLayoutItem
*
item
=
layout
->
takeAt
(
index
);
splitter
->
addWidget
(
item
->
widget
());
}
}
layout
->
addWidget
(
splitter
);
return
splitter
;
}
QString
ArMemMemoryViewerWidgetController
::
GetWidgetName
()
{
...
...
@@ -62,20 +95,6 @@ namespace armarx
widget
.
setupUi
(
getWidget
());
// Setup widgets
{
QSplitter
*
splitter
=
new
QSplitter
();
while
(
widget
.
treesLayout
->
count
()
>
0
)
{
int
index
=
0
;
//widget.treesLayout->count() - 1;
if
(
widget
.
treesLayout
->
itemAt
(
index
)
->
widget
())
{
QLayoutItem
*
item
=
widget
.
treesLayout
->
takeAt
(
index
);
splitter
->
addWidget
(
item
->
widget
());
}
}
widget
.
treesLayout
->
addWidget
(
splitter
);
}
widget
.
statusLabel
->
clear
();
...
...
@@ -89,7 +108,6 @@ namespace armarx
replaceWidget
(
widget
.
_memoryTreeWidget
,
memoryTree
,
widget
.
memoryGroupBox
->
layout
());
ARMARX_CHECK_NULL
(
widget
.
_memoryTreeWidget
);
queryTabs
=
new
armem
::
gui
::
QueryWidget
();
widget
.
_queryTabWidget
=
nullptr
;
...
...
@@ -103,6 +121,10 @@ namespace armarx
ARMARX_CHECK_NULL
(
widget
.
_instanceTree
);
useSplitter
(
widget
.
treesLayout
);
useSplitter
(
widget
.
memoryGroupBox
->
layout
());
// Connect signals
connect
(
this
,
&
This
::
connected
,
this
,
&
This
::
updateMemory
);
connect
(
widget
.
updateButton
,
&
QPushButton
::
pressed
,
this
,
&
This
::
updateMemory
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment