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
ca2b102f
Commit
ca2b102f
authored
3 years ago
by
Matthias Puchner
Browse files
Options
Downloads
Patches
Plain Diff
use namespace instead of class (LayerEditorUtils)
parent
34b4f1ca
No related branches found
No related tags found
1 merge request
!413
introduce layer oriented sample editor
Pipeline
#47559
passed
3 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GUI/Views/SampleDesigner/LayerEditorUtils.h
+27
-28
27 additions, 28 deletions
GUI/Views/SampleDesigner/LayerEditorUtils.h
with
27 additions
and
28 deletions
GUI/Views/SampleDesigner/LayerEditorUtils.h
+
27
−
28
View file @
ca2b102f
...
...
@@ -38,42 +38,41 @@ class ItemWithParticles;
class
QPushButton
;
//! Utility functions to support layer oriented sample editor
class
LayerEditorUtils
{
public:
static
void
updateLabelUnit
(
QLabel
*
label
);
static
void
updateLabelUnit
(
QLabel
*
label
,
DoubleSpinBox
*
editor
);
namespace
LayerEditorUtils
{
static
void
addMultiPropertyToGrid
(
QGridLayout
*
m_gridLayout
,
int
firstCol
,
const
DoubleDescriptors
&
valueDescriptors
,
SampleEditorController
*
m_ec
,
bool
vertically
,
bool
addSpacer
);
void
updateLabelUnit
(
QLabel
*
label
);
void
updateLabelUnit
(
QLabel
*
label
,
DoubleSpinBox
*
editor
);
static
void
addMultiPropertyToGrid
(
QGridLayout
*
m_gridLayout
,
int
firstCol
,
const
DoubleDescriptors
&
valueDescriptors
,
SampleEditorController
*
m_ec
,
bool
addSpacer
);
void
addMultiPropertyToGrid
(
QGridLayout
*
m_gridLayout
,
int
firstCol
,
const
DoubleDescriptors
&
valueDescriptors
,
SampleEditorController
*
m_ec
,
bool
vertically
,
bool
addSpacer
);
static
void
addVectorToGrid
(
QGridLayout
*
m_gridLayout
,
int
firstCol
,
const
VectorDescriptor
&
v
,
SampleEditorController
*
m_ec
,
bool
vertically
,
bool
addSpacer
);
void
addMultiPropertyToGrid
(
QGridLayout
*
m_gridLayout
,
int
firstCol
,
const
DoubleDescriptors
&
valueDescriptors
,
SampleEditorController
*
m_ec
,
bool
addSpacer
);
static
QLabel
*
createBoldLabel
(
const
QString
&
text
);
void
addVectorToGrid
(
QGridLayout
*
m_gridLayout
,
int
firstCol
,
const
VectorDescriptor
&
v
,
SampleEditorController
*
m_ec
,
bool
vertically
,
bool
addSpacer
);
static
DoubleDescriptors
doubleDescriptorsOfItem
(
const
std
::
variant
<
LayerZeroRoughnessItem
*
,
LayerBasicRoughnessItem
*>&
item
);
QLabel
*
createBoldLabel
(
const
QString
&
text
);
static
DoubleDescriptors
doubleDescriptorsOfItem
(
FTDecayFunction1DItem
*
item
);
static
DoubleDescriptors
doubleDescriptorsOfItem
(
FormFactorItem
*
item
);
static
DoubleDescriptors
doubleDescriptorsOfItem
(
FTDistribution1DItem
*
item
);
static
DoubleDescriptors
doubleDescriptorsOfItem
(
RotationItem
*
item
);
DoubleDescriptors
doubleDescriptorsOfItem
(
const
std
::
variant
<
LayerZeroRoughnessItem
*
,
LayerBasicRoughnessItem
*>&
item
);
static
QWidget
*
createWidgetForItemWithParticles
(
QWidget
*
parentWidget
,
ItemWithParticles
*
itemWithParticles
,
SampleEditorController
*
ec
,
bool
allowRemove
=
true
);
DoubleDescriptors
doubleDescriptorsOfItem
(
FTDecayFunction1DItem
*
item
);
DoubleDescriptors
doubleDescriptorsOfItem
(
FormFactorItem
*
item
);
DoubleDescriptors
doubleDescriptorsOfItem
(
FTDistribution1DItem
*
item
);
DoubleDescriptors
doubleDescriptorsOfItem
(
RotationItem
*
item
);
static
QPushButton
*
createAddParticleButton
(
QWidget
*
parentWidget
,
std
::
function
<
void
(
const
QString
&
)
>
slot
);
QWidget
*
createWidgetForItemWithParticles
(
QWidget
*
parentWidget
,
ItemWithParticles
*
itemWithParticles
,
SampleEditorController
*
ec
,
bool
allowRemove
=
true
);
static
QList
<
QColor
>
predefinedLayerColors
();
};
QPushButton
*
createAddParticleButton
(
QWidget
*
parentWidget
,
std
::
function
<
void
(
const
QString
&
)
>
slot
);
QList
<
QColor
>
predefinedLayerColors
();
}
// namespace LayerEditorUtils
#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_LAYEREDITORUTILS_H
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