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
85379cfb
Commit
85379cfb
authored
1 year ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
mv method and var
parent
f0ef7636
No related branches found
No related tags found
1 merge request
!2261
merge local class TreeModel into parent class
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/View/Instrument/InstrumentsTreeModel.cpp
+5
-5
5 additions, 5 deletions
GUI/View/Instrument/InstrumentsTreeModel.cpp
GUI/View/Instrument/InstrumentsTreeModel.h
+5
-6
5 additions, 6 deletions
GUI/View/Instrument/InstrumentsTreeModel.h
with
10 additions
and
11 deletions
GUI/View/Instrument/InstrumentsTreeModel.cpp
+
5
−
5
View file @
85379cfb
...
...
@@ -36,6 +36,11 @@ InstrumentsTreeModel::InstrumentsTreeModel(QObject* parent, InstrumentModel* mod
{
}
void
InstrumentsTreeModel
::
setNewInstrument
(
InstrumentItem
*
addedInstrument
)
{
m_newInstrument
=
addedInstrument
;
}
void
InstrumentsTreeModel
::
enableEmptyHeadlines
(
bool
b
)
{
if
(
b
==
m_enableEmptyHeadlines
)
...
...
@@ -313,11 +318,6 @@ TreeModel::TreeModel(QObject* parent, InstrumentModel* model)
{
}
void
TreeModel
::
setNewInstrument
(
InstrumentItem
*
addedInstrument
)
{
m_newInstrument
=
addedInstrument
;
}
QVariant
TreeModel
::
data
(
const
QModelIndex
&
index
,
int
role
)
const
{
if
(
isHeadline
(
index
))
...
...
This diff is collapsed.
Click to expand it.
GUI/View/Instrument/InstrumentsTreeModel.h
+
5
−
6
View file @
85379cfb
...
...
@@ -37,6 +37,9 @@ public:
};
Q_DECLARE_FLAGS
(
VisibleInstrumentTypes
,
InstrumentType
)
//! Set the instrument which shall have a "NEW" sign in its icon
void
setNewInstrument
(
InstrumentItem
*
addedInstrument
);
void
enableEmptyHeadlines
(
bool
b
);
QModelIndex
index
(
int
row
,
int
column
,
...
...
@@ -66,6 +69,8 @@ private:
InstrumentModel
*
m_model
=
nullptr
;
bool
m_namesAreEditable
;
bool
m_enableEmptyHeadlines
;
protected
:
// TMP
InstrumentItem
*
m_newInstrument
=
nullptr
;
};
//! A model extension for InstrumentsTreeModel which
...
...
@@ -75,13 +80,7 @@ class TreeModel : public InstrumentsTreeModel {
public:
TreeModel
(
QObject
*
parent
,
InstrumentModel
*
model
);
//! Set the instrument which shall have a "NEW" sign in its icon
void
setNewInstrument
(
InstrumentItem
*
addedInstrument
);
QVariant
data
(
const
QModelIndex
&
index
,
int
role
)
const
override
;
private:
InstrumentItem
*
m_newInstrument
=
nullptr
;
};
#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTSTREEMODEL_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