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
eaa641e3
Commit
eaa641e3
authored
4 months ago
by
Mikhail Svechnikov
Browse files
Options
Downloads
Patches
Plain Diff
rm extra {}
parent
97de58ea
No related branches found
Branches containing commit
No related tags found
1 merge request
!2741
GUI sample builder supports periodic stacks (#20)
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/View/Sample/LayerContainerForm.cpp
+40
-46
40 additions, 46 deletions
GUI/View/Sample/LayerContainerForm.cpp
auto/Examples/scatter2d/CorrelatedRoughness.py
+1
-1
1 addition, 1 deletion
auto/Examples/scatter2d/CorrelatedRoughness.py
with
41 additions
and
47 deletions
GUI/View/Sample/LayerContainerForm.cpp
+
40
−
46
View file @
eaa641e3
...
...
@@ -39,54 +39,48 @@ LayerContainerForm::LayerContainerForm(QWidget* parent, ItemWithLayers* item,
//... top right corner actions
// choose color
{
auto
*
chooseColorAction
=
new
QAction
(
this
);
chooseColorAction
->
setText
(
"Choose color"
);
chooseColorAction
->
setIcon
(
QIcon
(
":/images/palette.svg"
));
chooseColorAction
->
setIconText
(
"Choose color"
);
chooseColorAction
->
setToolTip
(
"Choose a color for this layer"
);
auto
*
menu
=
new
QMenu
(
this
);
chooseColorAction
->
setMenu
(
menu
);
addTitleAction
(
chooseColorAction
);
for
(
const
auto
&
col
:
GUI
::
Colors
::
layerDefaults
())
{
QPixmap
p
(
64
,
64
);
p
.
fill
(
col
);
auto
*
ca
=
menu
->
addAction
(
QIcon
(
p
),
""
);
connect
(
ca
,
&
QAction
::
triggered
,
[
this
,
col
]
{
m_item
->
setColor
(
col
);
updateColor
();
});
}
}
// move
{
m_move_button
=
new
WidgetMoverButton
(
this
,
this
,
0
);
m_move_button
->
setToolTip
(
"Move "
+
what
+
" up/down"
);
connect
(
m_move_button
,
&
WidgetMoverButton
::
finishedMoving
,
ec
,
&
SampleEditorController
::
onStoppedToMoveComponent
);
addTitleWidget
(
m_move_button
);
}
// show in real space
{
auto
*
showInRealspaceAction
=
ActionFactory
::
createShowInRealspaceAction
(
this
,
what
,
[
ec
,
item
]
{
ec
->
requestViewInRealspace
(
item
);
});
addTitleAction
(
showInRealspaceAction
);
}
// duplicate
{
auto
*
duplicate_action
=
ActionFactory
::
createDuplicateAction
(
this
,
what
,
[
ec
,
item
]
{
ec
->
duplicateItemWithLayers
(
item
);
});
addTitleAction
(
duplicate_action
);
}
// remove
{
auto
*
remove_action
=
ActionFactory
::
createRemoveAction
(
this
,
what
,
[
ec
,
item
]
{
ec
->
removeItemWithLayers
(
item
);
});
addTitleAction
(
remove_action
);
// choose color action
auto
*
chooseColorAction
=
new
QAction
(
this
);
chooseColorAction
->
setText
(
"Choose color"
);
chooseColorAction
->
setIcon
(
QIcon
(
":/images/palette.svg"
));
chooseColorAction
->
setIconText
(
"Choose color"
);
chooseColorAction
->
setToolTip
(
"Choose a color for this layer"
);
auto
*
menu
=
new
QMenu
(
this
);
chooseColorAction
->
setMenu
(
menu
);
addTitleAction
(
chooseColorAction
);
for
(
const
auto
&
color
:
GUI
::
Colors
::
layerDefaults
())
{
QPixmap
p
(
64
,
64
);
p
.
fill
(
color
);
auto
*
ca
=
menu
->
addAction
(
QIcon
(
p
),
""
);
connect
(
ca
,
&
QAction
::
triggered
,
[
this
,
color
]
{
m_item
->
setColor
(
color
);
updateColor
();
});
}
// move component action
m_move_button
=
new
WidgetMoverButton
(
this
,
this
,
0
);
m_move_button
->
setToolTip
(
"Move "
+
what
+
" up/down"
);
connect
(
m_move_button
,
&
WidgetMoverButton
::
finishedMoving
,
ec
,
&
SampleEditorController
::
onStoppedToMoveComponent
);
addTitleWidget
(
m_move_button
);
// show in real space action
auto
*
showInRealspaceAction
=
ActionFactory
::
createShowInRealspaceAction
(
this
,
what
,
[
ec
,
item
]
{
ec
->
requestViewInRealspace
(
item
);
});
addTitleAction
(
showInRealspaceAction
);
// duplicate action
auto
*
duplicate_action
=
ActionFactory
::
createDuplicateAction
(
this
,
what
,
[
ec
,
item
]
{
ec
->
duplicateItemWithLayers
(
item
);
});
addTitleAction
(
duplicate_action
);
// remove action
auto
*
remove_action
=
ActionFactory
::
createRemoveAction
(
this
,
what
,
[
ec
,
item
]
{
ec
->
removeItemWithLayers
(
item
);
});
addTitleAction
(
remove_action
);
updateColor
();
}
...
...
This diff is collapsed.
Click to expand it.
auto/Examples/scatter2d/CorrelatedRoughness.py
+
1
−
1
View file @
eaa641e3
...
...
@@ -25,7 +25,7 @@ def get_sample():
roughness
=
ba
.
LayerRoughness
(
autocorr
,
interlayer
,
crosscorrelation
)
# defining layers
l_ambience
=
ba
.
Layer
(
vacuum
,
1
)
l_ambience
=
ba
.
Layer
(
vacuum
)
l_part_a
=
ba
.
Layer
(
material_part_a
,
2.5
*
nm
,
roughness
)
l_part_b
=
ba
.
Layer
(
material_part_b
,
5
*
nm
,
roughness
)
l_substrate
=
ba
.
Layer
(
material_substrate
,
roughness
)
...
...
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