Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
cf2deea5
Commit
cf2deea5
authored
Dec 30, 2019
by
Jean-Baptiste Mardelle
Browse files
Add select all in bin
parent
cb9ec9d8
Pipeline
#12701
passed with stage
in 18 minutes and 52 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bin/bin.cpp
View file @
cf2deea5
...
...
@@ -1635,6 +1635,11 @@ QModelIndex Bin::getIndexForId(const QString &id, bool folderWanted) const
return
{};
}
void
Bin
::
selectAll
()
{
m_proxyModel
->
selectAll
();
}
void
Bin
::
selectClipById
(
const
QString
&
clipId
,
int
frame
,
const
QPoint
&
zone
)
{
if
(
m_monitor
->
activeClipId
()
==
clipId
)
{
...
...
src/bin/bin.h
View file @
cf2deea5
...
...
@@ -271,6 +271,7 @@ public:
// TODO refac: remove this and call directly the function in ProjectItemModel
void
cleanup
();
void
selectAll
();
private
slots
:
void
slotAddClip
();
...
...
src/bin/projectsortproxymodel.cpp
View file @
cf2deea5
...
...
@@ -180,7 +180,7 @@ void ProjectSortProxyModel::onCurrentRowChanged(const QItemSelection ¤t, c
return
;
}
for
(
int
ix
=
0
;
ix
<
indexes
.
count
();
ix
++
)
{
if
(
indexes
.
at
(
ix
).
column
()
==
0
)
{
if
(
indexes
.
at
(
ix
).
column
()
==
0
||
indexes
.
at
(
ix
).
column
()
==
7
)
{
emit
selectModel
(
indexes
.
at
(
ix
));
break
;
}
...
...
@@ -191,3 +191,13 @@ void ProjectSortProxyModel::slotDataChanged(const QModelIndex &ix1, const QModel
{
emit
dataChanged
(
ix1
,
ix2
,
roles
);
}
void
ProjectSortProxyModel
::
selectAll
()
{
QModelIndex
topLeft
=
index
(
0
,
0
,
QModelIndex
());
QModelIndex
bottomRight
=
index
(
rowCount
(
QModelIndex
())
-
1
,
columnCount
(
QModelIndex
())
-
1
,
QModelIndex
());
QItemSelection
selection
(
topLeft
,
bottomRight
);
m_selection
->
select
(
selection
,
QItemSelectionModel
::
Select
);
}
src/bin/projectsortproxymodel.h
View file @
cf2deea5
...
...
@@ -53,6 +53,8 @@ public slots:
void
slotClearSearchType
();
/** @brief Relay datachanged signal from view's model */
void
slotDataChanged
(
const
QModelIndex
&
ix1
,
const
QModelIndex
&
ix2
,
const
QVector
<
int
>
&
roles
);
/** @brief Select all items in model */
void
selectAll
();
private
slots
:
/** @brief Called when a row change is detected by selection model */
...
...
src/mainwindow.cpp
View file @
cf2deea5
...
...
@@ -2420,8 +2420,12 @@ void MainWindow::slotSelectTrack()
void
MainWindow
::
slotSelectAllTracks
()
{
getCurrentTimeline
()
->
controller
()
->
selectAll
();
if
((
QApplication
::
focusWidget
()
!=
nullptr
)
&&
(
QApplication
::
focusWidget
()
->
parentWidget
()
!=
nullptr
)
&&
QApplication
::
focusWidget
()
->
parentWidget
()
==
pCore
->
bin
())
{
pCore
->
bin
()
->
selectAll
();
}
else
{
getCurrentTimeline
()
->
controller
()
->
selectAll
();
}
}
void
MainWindow
::
slotUnselectAllTracks
()
...
...
Eugen Mohr
@emohr
mentioned in issue
#287
·
Dec 30, 2019
mentioned in issue
#287
mentioned in issue #287
Toggle commit list
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment