Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
95a8ab7c
Commit
95a8ab7c
authored
1 year ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
CollapsibleGroupBox + c'tor w/o title
parent
2a8ca1d9
No related branches found
No related tags found
1 merge request
!2387
unify code for list views
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GUI/View/Sample/LayerForm.cpp
+1
-1
1 addition, 1 deletion
GUI/View/Sample/LayerForm.cpp
GUI/View/Widget/GroupBoxes.cpp
+7
-2
7 additions, 2 deletions
GUI/View/Widget/GroupBoxes.cpp
GUI/View/Widget/GroupBoxes.h
+1
-0
1 addition, 0 deletions
GUI/View/Widget/GroupBoxes.h
with
9 additions
and
3 deletions
GUI/View/Sample/LayerForm.cpp
+
1
−
1
View file @
95a8ab7c
...
...
@@ -30,7 +30,7 @@
#include
<QPushButton>
LayerForm
::
LayerForm
(
QWidget
*
parent
,
LayerItem
*
layerItem
,
SampleEditorController
*
ec
)
:
CollapsibleGroupBox
(
layerItem
->
layerName
(),
parent
,
layerItem
->
expandLayer
)
:
CollapsibleGroupBox
(
parent
,
layerItem
->
expandLayer
)
,
m_layout
(
new
HeinzFormLayout
(
ec
))
,
m_layer
(
layerItem
)
,
m_ec
(
ec
)
...
...
This diff is collapsed.
Click to expand it.
GUI/View/Widget/GroupBoxes.cpp
+
7
−
2
View file @
95a8ab7c
...
...
@@ -43,7 +43,7 @@ StaticGroupBox::StaticGroupBox(const QString& title, QWidget* parent)
// class CollapsibleGroupBox
// ************************************************************************************************
CollapsibleGroupBox
::
CollapsibleGroupBox
(
const
QString
&
title
,
QWidget
*
parent
,
bool
&
expanded
)
CollapsibleGroupBox
::
CollapsibleGroupBox
(
QWidget
*
parent
,
bool
&
expanded
)
:
QssWidget
(
parent
)
,
m_title_widget
(
new
QWidget
)
,
m_title_layout
(
new
QHBoxLayout
(
m_title_widget
))
...
...
@@ -68,7 +68,6 @@ CollapsibleGroupBox::CollapsibleGroupBox(const QString& title, QWidget* parent,
m_toggle_button
->
setObjectName
(
"GroupBoxToggler"
);
m_toggle_button
->
setToolButtonStyle
(
Qt
::
ToolButtonTextBesideIcon
);
m_toggle_button
->
setCheckable
(
true
);
m_toggle_button
->
setText
(
title
);
m_toggle_button
->
setArrowType
(
Qt
::
ArrowType
::
DownArrow
);
m_toggle_button
->
setChecked
(
expanded
);
m_toggle_button
->
setSizePolicy
(
QSizePolicy
::
Minimum
,
QSizePolicy
::
MinimumExpanding
);
...
...
@@ -87,6 +86,12 @@ CollapsibleGroupBox::CollapsibleGroupBox(const QString& title, QWidget* parent,
});
}
CollapsibleGroupBox
::
CollapsibleGroupBox
(
const
QString
&
title
,
QWidget
*
parent
,
bool
&
expanded
)
:
CollapsibleGroupBox
(
parent
,
expanded
)
{
setTitle
(
title
);
}
void
CollapsibleGroupBox
::
setTitle
(
const
QString
&
title
)
{
m_toggle_button
->
setText
(
title
);
...
...
This diff is collapsed.
Click to expand it.
GUI/View/Widget/GroupBoxes.h
+
1
−
0
View file @
95a8ab7c
...
...
@@ -39,6 +39,7 @@ private:
class
CollapsibleGroupBox
:
public
QssWidget
{
Q_OBJECT
public:
CollapsibleGroupBox
(
QWidget
*
parent
,
bool
&
expanded
);
CollapsibleGroupBox
(
const
QString
&
title
,
QWidget
*
parent
,
bool
&
expanded
);
QWidget
*
body
()
{
return
m_body
;
}
void
setTitle
(
const
QString
&
title
);
...
...
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