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
1fad473f
Commit
1fad473f
authored
1 year ago
by
Wuttke, Joachim
Committed by
Wuttke, Joachim
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
MasksQModel - move fcts
parent
af3dc8ad
No related branches found
No related tags found
1 merge request
!2441
MasksSet inherits SetWithModel
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/Model/Mask/MasksQModel.cpp
+0
-35
0 additions, 35 deletions
GUI/Model/Mask/MasksQModel.cpp
GUI/Model/Mask/MasksQModel.h
+0
-4
0 additions, 4 deletions
GUI/Model/Mask/MasksQModel.h
with
0 additions
and
39 deletions
GUI/Model/Mask/MasksQModel.cpp
+
0
−
35
View file @
1fad473f
...
@@ -84,38 +84,3 @@ QModelIndex MasksQModel::pushItem(MaskItem* t)
...
@@ -84,38 +84,3 @@ QModelIndex MasksQModel::pushItem(MaskItem* t)
return
createIndex
(
row
,
0
);
return
createIndex
(
row
,
0
);
}
}
//! Move mask to a given row
void
MasksQModel
::
moveMask
(
int
from_row
,
int
to_row
)
{
emit
QAbstractListModel
::
beginMoveRows
(
m_masks
->
rootIndex
,
from_row
,
from_row
,
m_masks
->
rootIndex
,
to_row
);
m_masks
->
swap
(
from_row
,
to_row
);
emit
QAbstractListModel
::
endMoveRows
();
}
void
MasksQModel
::
moveUp
()
{
/*
for (const QModelIndex& itemIndex : m_selection_model->selectedIndexes()) {
int row = itemIndex.row();
int new_row = row - 1;
if (new_row >= 0 && new_row < rowCount({}))
moveMask(row, new_row);
}
*/
}
void
MasksQModel
::
moveDown
()
{
/*
for (const QModelIndex& itemIndex : m_selection_model->selectedIndexes()) {
int row = itemIndex.row();
int new_row = row + 1;
if (new_row >= 0 && new_row < rowCount({}))
// Here we lower element from 'new_row' instead of rising element from 'row'
// The result should be the same, but rising doesn't work for an unknown reason
moveMask(new_row, row);
}
*/
}
This diff is collapsed.
Click to expand it.
GUI/Model/Mask/MasksQModel.h
+
0
−
4
View file @
1fad473f
...
@@ -38,10 +38,6 @@ public:
...
@@ -38,10 +38,6 @@ public:
void
deleteItem
();
void
deleteItem
();
QModelIndex
pushItem
(
MaskItem
*
);
QModelIndex
pushItem
(
MaskItem
*
);
void
moveMask
(
int
from_row
,
int
to_row
);
void
moveUp
();
void
moveDown
();
MasksSet
*
set
()
{
return
m_masks
;
}
MasksSet
*
set
()
{
return
m_masks
;
}
const
MasksSet
*
set
()
const
{
return
m_masks
;
}
const
MasksSet
*
set
()
const
{
return
m_masks
;
}
...
...
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