Skip to content
GitLab
Menu
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
dc1fe1eb
Commit
dc1fe1eb
authored
Oct 30, 2019
by
Jean-Baptiste Mardelle
Browse files
Remember searchbar visibility, related to
#350
parent
a0d528ca
Pipeline
#9716
passed with stage
in 13 minutes
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/assets/assetlist/view/assetlistwidget.cpp
View file @
dc1fe1eb
...
...
@@ -108,3 +108,17 @@ void AssetListWidget::activate(const QModelIndex &ix)
const
QString
assetId
=
m_model
->
data
(
m_proxyModel
->
mapToSource
(
ix
),
AssetTreeModel
::
IdRole
).
toString
();
emit
activateAsset
(
getMimeData
(
assetId
));
}
bool
AssetListWidget
::
showSearchBar
(
bool
isEffectList
)
const
{
return
isEffectList
?
KdenliveSettings
::
showEffectSearchBar
()
:
KdenliveSettings
::
showCompoSearchBar
();
}
void
AssetListWidget
::
setShowSearchBar
(
bool
isEffectList
,
bool
show
)
{
if
(
isEffectList
)
{
KdenliveSettings
::
setShowEffectSearchBar
(
show
);
}
else
{
KdenliveSettings
::
setShowCompoSearchBar
(
show
);
}
}
src/assets/assetlist/view/assetlistwidget.hpp
View file @
dc1fe1eb
...
...
@@ -68,6 +68,10 @@ public:
/* @brief Rebuild the view by resetting the source. Is there a better way? */
void
reset
();
/* @brief Show search bar on opening */
bool
showSearchBar
(
bool
isEffectList
)
const
;
void
setShowSearchBar
(
bool
isEffectList
,
bool
show
);
protected:
void
setup
();
...
...
src/assets/assetlist/view/qml/assetList.qml
View file @
dc1fe1eb
...
...
@@ -63,8 +63,10 @@ Rectangle {
id
:
searchList
iconName
:
"
edit-find
"
checkable
:
true
checked
:
assetlist
.
showSearchBar
(
isEffectList
)
tooltip
:
isEffectList
?
i18n
(
"
Find effect
"
)
:
i18n
(
"
Find composition
"
)
onCheckedChanged
:
{
assetlist
.
setShowSearchBar
(
isEffectList
,
searchList
.
checked
)
searchInput
.
visible
=
searchList
.
checked
searchInput
.
focus
=
searchList
.
checked
if
(
!
searchList
.
checked
)
{
...
...
@@ -169,7 +171,7 @@ Rectangle {
opacity
:
0
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
searchInput
.
text
=
''
;
searchInput
.
focus
=
true
;
searchList
.
checked
=
false
;
}
onClicked
:
{
searchInput
.
text
=
''
;
searchInput
.
focus
=
true
;
/*
searchList.checked = false;
*/
}
}
}
states
:
State
{
...
...
@@ -217,7 +219,7 @@ Rectangle {
Keys.onReturnPressed
:
{
if
(
sel
.
hasSelection
)
{
assetlist
.
activate
(
sel
.
currentIndex
)
searchList
.
checked
=
fals
e
treeView
.
focus
=
tru
e
}
}
}
...
...
src/effects/effectlist/view/effectlistwidget.hpp
View file @
dc1fe1eb
...
...
@@ -84,6 +84,8 @@ public:
Q_INVOKABLE
void
setFilterType
(
const
QString
&
type
)
{
q
->
setFilterType
(
type
);
}
Q_INVOKABLE
void
setFilterName
(
const
QString
&
pattern
)
{
q
->
setFilterName
(
pattern
);
}
Q_INVOKABLE
QString
getMimeType
(
const
QString
&
assetId
)
const
{
return
q
->
getMimeType
(
assetId
);
}
Q_INVOKABLE
bool
showSearchBar
(
bool
isEffectList
)
const
{
return
q
->
showSearchBar
(
isEffectList
);
}
Q_INVOKABLE
void
setShowSearchBar
(
bool
isEffectList
,
bool
show
)
{
q
->
setShowSearchBar
(
isEffectList
,
show
);
}
bool
showDescription
()
const
{
return
KdenliveSettings
::
showeffectinfo
();
}
void
setShowDescription
(
bool
show
)
...
...
src/kdenlivesettings.kcfg
View file @
dc1fe1eb
...
...
@@ -123,6 +123,17 @@
<label>
Default OpenGL backend.
</label>
<default>
0
</default>
</entry>
<entry
name=
"showEffectSearchBar"
type=
"Bool"
>
<label>
Show effect search bar by default.
</label>
<default>
true
</default>
</entry>
<entry
name=
"showCompoSearchBar"
type=
"Bool"
>
<label>
Show composition search bar by default.
</label>
<default>
true
</default>
</entry>
</group>
...
...
src/transitions/transitionlist/view/transitionlistwidget.hpp
View file @
dc1fe1eb
...
...
@@ -78,6 +78,8 @@ public:
Q_INVOKABLE
void
setFilterName
(
const
QString
&
pattern
)
{
q
->
setFilterName
(
pattern
);
}
Q_INVOKABLE
QString
getMimeType
(
const
QString
&
assetId
)
const
{
return
q
->
getMimeType
(
assetId
);
}
Q_INVOKABLE
bool
showSearchBar
(
bool
isEffectList
)
const
{
return
q
->
showSearchBar
(
isEffectList
);
}
Q_INVOKABLE
void
setShowSearchBar
(
bool
isEffectList
,
bool
show
)
{
q
->
setShowSearchBar
(
isEffectList
,
show
);
}
Q_INVOKABLE
void
downloadNewLumas
()
{
q
->
downloadNewLumas
();
}
bool
showDescription
()
const
{
return
KdenliveSettings
::
showeffectinfo
();
}
...
...
Eugen Mohr
@emohr
mentioned in issue
#350
·
Oct 30, 2019
mentioned in issue
#350
mentioned in issue #350
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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