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
21ec4fa5
Commit
21ec4fa5
authored
1 year ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
SamplesQModel: rm flags, setData
parent
efc6d0bf
No related branches found
No related tags found
1 merge request
!2361
cleanup
Pipeline
#130120
passed
1 year ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/View/List/SamplesQModel.cpp
+0
-28
0 additions, 28 deletions
GUI/View/List/SamplesQModel.cpp
GUI/View/List/SamplesQModel.h
+0
-2
0 additions, 2 deletions
GUI/View/List/SamplesQModel.h
with
0 additions
and
30 deletions
GUI/View/List/SamplesQModel.cpp
+
0
−
28
View file @
21ec4fa5
...
...
@@ -44,34 +44,6 @@ QVariant SamplesQModel::data(const QModelIndex& index, int role) const
return
{};
}
Qt
::
ItemFlags
SamplesQModel
::
flags
(
const
QModelIndex
&
index
)
const
{
auto
f
=
QAbstractItemModel
::
flags
(
index
);
f
|=
Qt
::
ItemIsSelectable
|
Qt
::
ItemIsEnabled
|
Qt
::
ItemIsDragEnabled
;
return
f
;
}
bool
SamplesQModel
::
setData
(
const
QModelIndex
&
index
,
const
QVariant
&
value
,
int
role
)
{
if
(
!
index
.
isValid
())
return
false
;
if
(
role
==
Qt
::
EditRole
&&
index
.
column
()
==
0
)
{
itemForIndex
(
index
)
->
setSampleName
(
value
.
toString
());
emit
dataChanged
(
index
,
index
);
return
true
;
}
if
(
role
==
Qt
::
ToolTipRole
&&
index
.
column
()
==
0
)
{
itemForIndex
(
index
)
->
setDescription
(
value
.
toString
());
emit
dataChanged
(
index
,
index
);
return
true
;
}
return
false
;
}
SampleItem
*
SamplesQModel
::
itemForIndex
(
const
QModelIndex
&
index
)
const
{
if
(
!
index
.
isValid
())
...
...
This diff is collapsed.
Click to expand it.
GUI/View/List/SamplesQModel.h
+
0
−
2
View file @
21ec4fa5
...
...
@@ -26,8 +26,6 @@ class SamplesQModel : public QAbstractListModel {
public:
int
rowCount
(
const
QModelIndex
&
parent
=
QModelIndex
())
const
override
;
QVariant
data
(
const
QModelIndex
&
index
,
int
role
=
Qt
::
DisplayRole
)
const
override
;
Qt
::
ItemFlags
flags
(
const
QModelIndex
&
index
)
const
override
;
bool
setData
(
const
QModelIndex
&
index
,
const
QVariant
&
value
,
int
role
)
override
;
SampleItem
*
itemForIndex
(
const
QModelIndex
&
index
)
const
;
QModelIndex
indexForItem
(
SampleItem
*
item
)
const
;
...
...
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