Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
Kdenlive
Commits
5ce65477
Commit
5ce65477
authored
Mar 03, 2021
by
Julius Künzel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GIT_SILENT Fix doxygen descriptions
parent
5d445be8
Pipeline
#52965
passed with stage
in 10 minutes and 42 seconds
Changes
74
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
74 changed files
with
798 additions
and
782 deletions
+798
-782
src/abstractmodel/abstracttreemodel.hpp
src/abstractmodel/abstracttreemodel.hpp
+17
-17
src/abstractmodel/treeitem.hpp
src/abstractmodel/treeitem.hpp
+22
-22
src/assets/abstractassetsrepository.hpp
src/assets/abstractassetsrepository.hpp
+15
-15
src/assets/assetlist/model/assetfilter.hpp
src/assets/assetlist/model/assetfilter.hpp
+3
-3
src/assets/assetlist/model/assettreemodel.hpp
src/assets/assetlist/model/assettreemodel.hpp
+1
-1
src/assets/assetlist/view/assetlistwidget.hpp
src/assets/assetlist/view/assetlistwidget.hpp
+10
-10
src/assets/assetpanel.hpp
src/assets/assetpanel.hpp
+7
-7
src/assets/keyframes/model/corners/cornershelper.hpp
src/assets/keyframes/model/corners/cornershelper.hpp
+1
-1
src/assets/keyframes/model/keyframemodel.hpp
src/assets/keyframes/model/keyframemodel.hpp
+27
-26
src/assets/keyframes/model/keyframemodellist.hpp
src/assets/keyframes/model/keyframemodellist.hpp
+22
-22
src/assets/keyframes/model/keyframemonitorhelper.hpp
src/assets/keyframes/model/keyframemonitorhelper.hpp
+1
-1
src/assets/keyframes/model/rotoscoping/rotohelper.hpp
src/assets/keyframes/model/rotoscoping/rotohelper.hpp
+1
-1
src/assets/keyframes/view/keyframeview.hpp
src/assets/keyframes/view/keyframeview.hpp
+6
-6
src/assets/model/assetparametermodel.hpp
src/assets/model/assetparametermodel.hpp
+25
-21
src/assets/view/assetparameterview.hpp
src/assets/view/assetparameterview.hpp
+1
-2
src/assets/view/widgets/abstractparamwidget.hpp
src/assets/view/widgets/abstractparamwidget.hpp
+1
-2
src/assets/view/widgets/curves/curveparamwidget.ipp
src/assets/view/widgets/curves/curveparamwidget.ipp
+2
-2
src/assets/view/widgets/geometryeditwidget.hpp
src/assets/view/widgets/geometryeditwidget.hpp
+1
-1
src/assets/view/widgets/keyframewidget.hpp
src/assets/view/widgets/keyframewidget.hpp
+1
-1
src/assets/view/widgets/positioneditwidget.hpp
src/assets/view/widgets/positioneditwidget.hpp
+1
-1
src/bin/abstractprojectitem.h
src/bin/abstractprojectitem.h
+5
-5
src/bin/binplaylist.hpp
src/bin/binplaylist.hpp
+7
-7
src/bin/clipcreator.hpp
src/bin/clipcreator.hpp
+7
-7
src/bin/model/markerlistmodel.hpp
src/bin/model/markerlistmodel.hpp
+29
-28
src/bin/model/subtitlemodel.hpp
src/bin/model/subtitlemodel.hpp
+2
-2
src/bin/projectclip.h
src/bin/projectclip.h
+6
-6
src/bin/projectitemmodel.h
src/bin/projectitemmodel.h
+18
-18
src/core.h
src/core.h
+1
-1
src/effects/effectlist/model/effectfilter.hpp
src/effects/effectlist/model/effectfilter.hpp
+2
-2
src/effects/effectlist/model/effecttreemodel.hpp
src/effects/effectlist/model/effecttreemodel.hpp
+1
-1
src/effects/effectlist/view/effectlistwidget.hpp
src/effects/effectlist/view/effectlistwidget.hpp
+2
-2
src/effects/effectsrepository.hpp
src/effects/effectsrepository.hpp
+14
-12
src/effects/effectstack/model/abstracteffectitem.hpp
src/effects/effectstack/model/abstracteffectitem.hpp
+10
-10
src/effects/effectstack/model/effectgroupmodel.hpp
src/effects/effectstack/model/effectgroupmodel.hpp
+5
-5
src/effects/effectstack/model/effectitemmodel.hpp
src/effects/effectstack/model/effectitemmodel.hpp
+6
-6
src/effects/effectstack/model/effectstackmodel.hpp
src/effects/effectstack/model/effectstackmodel.hpp
+32
-32
src/jobs/abstractclipjob.h
src/jobs/abstractclipjob.h
+4
-4
src/jobs/audiothumbjob.hpp
src/jobs/audiothumbjob.hpp
+2
-2
src/jobs/cachejob.hpp
src/jobs/cachejob.hpp
+2
-2
src/jobs/createclipjob.hpp
src/jobs/createclipjob.hpp
+1
-1
src/jobs/loadjob.hpp
src/jobs/loadjob.hpp
+2
-2
src/jobs/thumbjob.hpp
src/jobs/thumbjob.hpp
+2
-2
src/macros.hpp
src/macros.hpp
+3
-3
src/mltconnection.h
src/mltconnection.h
+2
-2
src/mltcontroller/clipcontroller.h
src/mltcontroller/clipcontroller.h
+2
-2
src/onlineresources/providersrepository.hpp
src/onlineresources/providersrepository.hpp
+3
-2
src/profiles/profileinfo.hpp
src/profiles/profileinfo.hpp
+2
-2
src/profiles/profilemodel.hpp
src/profiles/profilemodel.hpp
+3
-3
src/profiles/profilerepository.hpp
src/profiles/profilerepository.hpp
+11
-9
src/profiles/tree/profilefilter.hpp
src/profiles/tree/profilefilter.hpp
+3
-3
src/profiles/tree/profiletreemodel.hpp
src/profiles/tree/profiletreemodel.hpp
+2
-2
src/project/dialogs/profilewidget.h
src/project/dialogs/profilewidget.h
+1
-1
src/timeline2/model/clipmodel.hpp
src/timeline2/model/clipmodel.hpp
+34
-32
src/timeline2/model/clipsnapmodel.hpp
src/timeline2/model/clipsnapmodel.hpp
+3
-3
src/timeline2/model/compositionmodel.hpp
src/timeline2/model/compositionmodel.hpp
+12
-12
src/timeline2/model/groupsmodel.hpp
src/timeline2/model/groupsmodel.hpp
+38
-35
src/timeline2/model/moveableItem.hpp
src/timeline2/model/moveableItem.hpp
+22
-20
src/timeline2/model/snapmodel.hpp
src/timeline2/model/snapmodel.hpp
+14
-13
src/timeline2/model/timelinefunctions.hpp
src/timeline2/model/timelinefunctions.hpp
+10
-10
src/timeline2/model/timelineitemmodel.hpp
src/timeline2/model/timelineitemmodel.hpp
+9
-9
src/timeline2/model/timelinemodel.hpp
src/timeline2/model/timelinemodel.hpp
+104
-104
src/timeline2/model/trackmodel.hpp
src/timeline2/model/trackmodel.hpp
+51
-51
src/timeline2/view/timelinecontroller.h
src/timeline2/view/timelinecontroller.h
+88
-88
src/timeline2/view/timelinetabs.hpp
src/timeline2/view/timelinetabs.hpp
+7
-7
src/timeline2/view/timelinewidget.h
src/timeline2/view/timelinewidget.h
+12
-12
src/transitions/transitionlist/model/transitionfilter.hpp
src/transitions/transitionlist/model/transitionfilter.hpp
+2
-2
src/transitions/transitionlist/model/transitiontreemodel.hpp
src/transitions/transitionlist/model/transitiontreemodel.hpp
+2
-2
src/transitions/transitionlist/view/transitionlistwidget.hpp
src/transitions/transitionlist/view/transitionlistwidget.hpp
+2
-2
src/transitions/transitionsrepository.hpp
src/transitions/transitionsrepository.hpp
+11
-11
src/transitions/view/transitionparameterview.hpp
src/transitions/view/transitionparameterview.hpp
+2
-3
src/undohelper.hpp
src/undohelper.hpp
+3
-3
src/utils/thumbnailcache.hpp
src/utils/thumbnailcache.hpp
+6
-6
src/widgets/positionwidget.h
src/widgets/positionwidget.h
+1
-1
src/xml/xml.hpp
src/xml/xml.hpp
+8
-8
No files found.
src/abstractmodel/abstracttreemodel.hpp
View file @
5ce65477
...
...
@@ -27,7 +27,7 @@
#include <memory>
#include <unordered_map>
/* @brief This class represents a generic tree hierarchy
/*
*
@brief This class represents a generic tree hierarchy
*/
class
TreeItem
;
class
AbstractTreeModel
:
public
QAbstractItemModel
,
public
std
::
enable_shared_from_this
<
AbstractTreeModel
>
...
...
@@ -35,7 +35,7 @@ class AbstractTreeModel : public QAbstractItemModel, public std::enable_shared_f
Q_OBJECT
public:
/* @brief Construct a TreeModel
/*
*
@brief Construct a TreeModel
@param parent is the parent object of the model
@return a ptr to the created object
*/
...
...
@@ -48,16 +48,16 @@ protected:
public:
~
AbstractTreeModel
()
override
;
/* @brief Given an item from the hierarchy, construct the corresponding ModelIndex */
/*
*
@brief Given an item from the hierarchy, construct the corresponding ModelIndex */
QModelIndex
getIndexFromItem
(
const
std
::
shared_ptr
<
TreeItem
>
&
item
)
const
;
/* @brief Given an item id, construct the corresponding ModelIndex */
/*
*
@brief Given an item id, construct the corresponding ModelIndex */
QModelIndex
getIndexFromId
(
int
id
)
const
;
/* @brief Return a ptr to an item given its id */
/*
*
@brief Return a ptr to an item given its id */
std
::
shared_ptr
<
TreeItem
>
getItemById
(
int
id
)
const
;
/* @brief Return a ptr to the root of the tree */
/*
*
@brief Return a ptr to the root of the tree */
std
::
shared_ptr
<
TreeItem
>
getRoot
()
const
;
QVariant
data
(
const
QModelIndex
&
index
,
int
role
)
const
override
;
...
...
@@ -69,50 +69,50 @@ public:
int
rowCount
(
const
QModelIndex
&
parent
=
QModelIndex
())
const
override
;
int
columnCount
(
const
QModelIndex
&
parent
=
QModelIndex
())
const
override
;
/* @brief Helper function to generate a lambda that adds an item to the tree */
/*
*
@brief Helper function to generate a lambda that adds an item to the tree */
Fun
addItem_lambda
(
const
std
::
shared_ptr
<
TreeItem
>
&
new_item
,
int
parentId
);
/* @brief Helper function to generate a lambda that removes an item from the tree */
/*
*
@brief Helper function to generate a lambda that removes an item from the tree */
Fun
removeItem_lambda
(
int
id
);
/* @brief Helper function to generate a lambda that changes the row of an item */
/*
*
@brief Helper function to generate a lambda that changes the row of an item */
Fun
moveItem_lambda
(
int
id
,
int
destRow
,
bool
force
=
false
);
friend
class
TreeItem
;
friend
class
AbstractProjectItem
;
protected:
/* @brief Register a new item. This is a call-back meant to be called from TreeItem */
/*
*
@brief Register a new item. This is a call-back meant to be called from TreeItem */
virtual
void
registerItem
(
const
std
::
shared_ptr
<
TreeItem
>
&
item
);
/* @brief Deregister an item. This is a call-back meant to be called from TreeItem */
/*
*
@brief Deregister an item. This is a call-back meant to be called from TreeItem */
virtual
void
deregisterItem
(
int
id
,
TreeItem
*
item
);
/* @brief Returns the next valid id to give to a new element */
/*
*
@brief Returns the next valid id to give to a new element */
static
int
getNextId
();
/* @brief Send the appropriate notification related to a row that we are appending
/*
*
@brief Send the appropriate notification related to a row that we are appending
@param item is the parent item to which row is appended
*/
void
notifyRowAboutToAppend
(
const
std
::
shared_ptr
<
TreeItem
>
&
item
);
/* @brief Send the appropriate notification related to a row that we have appended
/*
*
@brief Send the appropriate notification related to a row that we have appended
@param row is the new element
*/
void
notifyRowAppended
(
const
std
::
shared_ptr
<
TreeItem
>
&
row
);
/* @brief Send the appropriate notification related to a row that we are deleting
/*
*
@brief Send the appropriate notification related to a row that we are deleting
@param item is the parent of the row being deleted
@param row is the index of the row being deleted
*/
void
notifyRowAboutToDelete
(
std
::
shared_ptr
<
TreeItem
>
item
,
int
row
);
/* @brief Send the appropriate notification related to a row that we have appended
/*
*
@brief Send the appropriate notification related to a row that we have appended
@param row is the old element
*/
void
notifyRowDeleted
();
/* @brief This is a convenience function that helps check if the tree is in a valid state */
/*
*
@brief This is a convenience function that helps check if the tree is in a valid state */
virtual
bool
checkConsistency
();
protected:
...
...
src/abstractmodel/treeitem.hpp
View file @
5ce65477
...
...
@@ -28,7 +28,7 @@
#include <memory>
#include <unordered_map>
/* @brief This class is a generic class to represent items of a tree-like model
/*
*
@brief This class is a generic class to represent items of a tree-like model
It works in tandem with AbstractTreeModel or one of its derived classes.
There is a registration mechanism that takes place: each TreeItem holds a unique Id
that can allow to retrieve it directly from the model.
...
...
@@ -46,7 +46,7 @@ class AbstractTreeModel;
class
TreeItem
:
public
enable_shared_from_this_virtual
<
TreeItem
>
{
public:
/* @brief Construct a TreeItem
/*
*
@brief Construct a TreeItem
@param data List of data elements (columns) of the created item
@param model Pointer to the model to which this elem belongs to
@param parentItem address of the parent if the child is not orphan
...
...
@@ -65,66 +65,66 @@ protected:
public:
virtual
~
TreeItem
();
/* @brief Creates a child of the current item
/*
*
@brief Creates a child of the current item
@param data: List of data elements (columns) to init the child with.
*/
std
::
shared_ptr
<
TreeItem
>
appendChild
(
const
QList
<
QVariant
>
&
data
);
/* @brief Appends an already created child
/*
*
@brief Appends an already created child
Useful for example if the child should be a subclass of TreeItem
@return true on success. Otherwise, nothing is modified.
*/
bool
appendChild
(
const
std
::
shared_ptr
<
TreeItem
>
&
child
);
void
moveChild
(
int
ix
,
const
std
::
shared_ptr
<
TreeItem
>
&
child
);
/* @brief Remove given child from children list. The parent of the child is updated
/*
*
@brief Remove given child from children list. The parent of the child is updated
accordingly
*/
void
removeChild
(
const
std
::
shared_ptr
<
TreeItem
>
&
child
);
/* @brief Change the parent of the current item. Structures are modified accordingly
/*
*
@brief Change the parent of the current item. Structures are modified accordingly
*/
virtual
bool
changeParent
(
std
::
shared_ptr
<
TreeItem
>
newParent
);
/* @brief Retrieves a child of the current item
/*
*
@brief Retrieves a child of the current item
@param row is the index of the child to retrieve
*/
std
::
shared_ptr
<
TreeItem
>
child
(
int
row
)
const
;
/* @brief Returns a vector containing a pointer to all the leaves in the subtree rooted in this element */
/*
*
@brief Returns a vector containing a pointer to all the leaves in the subtree rooted in this element */
std
::
vector
<
std
::
shared_ptr
<
TreeItem
>>
getLeaves
();
/* @brief Return the number of children */
/*
*
@brief Return the number of children */
int
childCount
()
const
;
/* @brief Return the number of data fields (columns) */
/*
*
@brief Return the number of data fields (columns) */
int
columnCount
()
const
;
/* @brief Return the content of a column
/*
*
@brief Return the content of a column
@param column Index of the column to look-up
*/
QVariant
dataColumn
(
int
column
)
const
;
void
setData
(
int
column
,
const
QVariant
&
dataColumn
);
/* @brief Return the index of current item amongst father's children
/*
*
@brief Return the index of current item amongst father's children
Returns -1 on error (eg: no parent set)
*/
int
row
()
const
;
/* @brief Return a ptr to the parent item
/*
*
@brief Return a ptr to the parent item
*/
std
::
weak_ptr
<
TreeItem
>
parentItem
()
const
;
/* @brief Return the depth of the current item*/
/*
*
@brief Return the depth of the current item*/
int
depth
()
const
;
/* @brief Return the id of the current item*/
/*
*
@brief Return the id of the current item*/
int
getId
()
const
;
/* @brief Return true if the current item has been registered */
/*
*
@brief Return true if the current item has been registered */
bool
isInModel
()
const
;
/* @brief This is similar to the std::accumulate function, except that it
/*
*
@brief This is similar to the std::accumulate function, except that it
operates on the whole subtree
@param init is the initial value of the operation
@param is the binary op to apply (signature should be (T, shared_ptr<TreeItem>)->T)
...
...
@@ -132,24 +132,24 @@ public:
template
<
class
T
,
class
BinaryOperation
>
T
accumulate
(
T
init
,
BinaryOperation
op
);
template
<
class
T
,
class
BinaryOperation
>
T
accumulate_const
(
T
init
,
BinaryOperation
op
)
const
;
/* @brief Return true if the current item has the item with given id as an ancestor */
/*
*
@brief Return true if the current item has the item with given id as an ancestor */
bool
hasAncestor
(
int
id
);
/* @brief Return true if the item thinks it is a root.
/*
*
@brief Return true if the item thinks it is a root.
Note that it should be consistent with what the model thinks, but it may have been
messed up at some point if someone wrongly constructed the object with isRoot = true */
bool
isRoot
()
const
;
protected:
/* @brief Finish construction of object given its pointer
/*
*
@brief Finish construction of object given its pointer
This is a separated function so that it can be called from derived classes */
static
void
baseFinishConstruct
(
const
std
::
shared_ptr
<
TreeItem
>
&
self
);
/* @brief Helper functions to handle registration / deregistration to the model */
/*
*
@brief Helper functions to handle registration / deregistration to the model */
static
void
registerSelf
(
const
std
::
shared_ptr
<
TreeItem
>
&
self
);
void
deregisterSelf
();
/* @brief Reflect update of the parent ptr (for example set the correct depth)
/*
*
@brief Reflect update of the parent ptr (for example set the correct depth)
This is meant to be overridden in derived classes
@param ptr is the pointer to the new parent
*/
...
...
src/assets/abstractassetsrepository.hpp
View file @
5ce65477
...
...
@@ -39,27 +39,27 @@ public:
AbstractAssetsRepository
();
virtual
~
AbstractAssetsRepository
()
=
default
;
/* @brief Returns true if a given asset exists
/*
*
@brief Returns true if a given asset exists
*/
bool
exists
(
const
QString
&
assetId
)
const
;
/* @brief Returns a vector of pair (asset id, asset name)
/*
*
@brief Returns a vector of pair (asset id, asset name)
*/
QVector
<
QPair
<
QString
,
QString
>>
getNames
()
const
;
/* @brief Return type of asset */
/*
*
@brief Return type of asset */
AssetType
getType
(
const
QString
&
assetId
)
const
;
/* @brief Return type of asset */
/*
*
@brief Return type of asset */
bool
isUnique
(
const
QString
&
assetId
)
const
;
/* @brief Return name of asset */
/*
*
@brief Return name of asset */
Q_INVOKABLE
QString
getName
(
const
QString
&
assetId
)
const
;
/* @brief Return description of asset */
/*
*
@brief Return description of asset */
QString
getDescription
(
const
QString
&
assetId
)
const
;
/* @brief Returns a DomElement representing the asset's properties */
/*
*
@brief Returns a DomElement representing the asset's properties */
QDomElement
getXml
(
const
QString
&
assetId
)
const
;
protected:
...
...
@@ -79,36 +79,36 @@ protected:
void
init
();
virtual
Mlt
::
Properties
*
retrieveListFromMlt
()
const
=
0
;
/* @brief Parse some info from a mlt structure
/*
*
@brief Parse some info from a mlt structure
@param res Datastructure to fill
@return true on success
*/
bool
parseInfoFromMlt
(
const
QString
&
assetId
,
Info
&
res
);
/* @brief Returns the metadata associated with the given asset*/
/*
*
@brief Returns the metadata associated with the given asset*/
virtual
Mlt
::
Properties
*
getMetadata
(
const
QString
&
assetId
)
const
=
0
;
/* @brief Parse one asset from its XML content
/*
*
@brief Parse one asset from its XML content
@param res data structure to fill
@return true of success
*/
bool
parseInfoFromXml
(
const
QDomElement
&
currentAsset
,
Info
&
res
)
const
;
/* @brief Figure what is the type of the asset based on its metadata and store it in res*/
/*
*
@brief Figure what is the type of the asset based on its metadata and store it in res*/
virtual
void
parseType
(
QScopedPointer
<
Mlt
::
Properties
>
&
metadata
,
Info
&
res
)
=
0
;
/* @brief Retrieves additional info about asset from a custom XML file
/*
*
@brief Retrieves additional info about asset from a custom XML file
The resulting assets are stored in customAssets
*/
virtual
void
parseCustomAssetFile
(
const
QString
&
file_name
,
std
::
unordered_map
<
QString
,
Info
>
&
customAssets
)
const
=
0
;
/* @brief Returns the path to custom XML description of the assets*/
/*
*
@brief Returns the path to custom XML description of the assets*/
virtual
QStringList
assetDirs
()
const
=
0
;
/* @brief Returns the path to the assets' blacklist*/
/*
*
@brief Returns the path to the assets' blacklist*/
virtual
QString
assetBlackListPath
()
const
=
0
;
/* @brief Returns the path to the assets' preferred list*/
/*
*
@brief Returns the path to the assets' preferred list*/
virtual
QString
assetPreferredListPath
()
const
=
0
;
std
::
unordered_map
<
QString
,
Info
>
m_assets
;
...
...
src/assets/assetlist/model/assetfilter.hpp
View file @
5ce65477
...
...
@@ -25,7 +25,7 @@
#include <QSortFilterProxyModel>
#include <memory>
/* @brief This class is used as a proxy model to filter an asset list based on given criterion (name, ...)
/*
*
@brief This class is used as a proxy model to filter an asset list based on given criterion (name, ...)
*/
class
TreeItem
;
class
AssetFilter
:
public
QSortFilterProxyModel
...
...
@@ -35,7 +35,7 @@ class AssetFilter : public QSortFilterProxyModel
public:
AssetFilter
(
QObject
*
parent
=
nullptr
);
/* @brief Manage the name filter
/*
*
@brief Manage the name filter
@param enabled whether to enable this filter
@param pattern to match against effects' names
*/
...
...
@@ -61,7 +61,7 @@ protected:
bool
filterAcceptsRow
(
int
sourceRow
,
const
QModelIndex
&
sourceParent
)
const
override
;
bool
lessThan
(
const
QModelIndex
&
left
,
const
QModelIndex
&
right
)
const
override
;
bool
filterName
(
const
std
::
shared_ptr
<
TreeItem
>
&
item
)
const
;
/* @brief Apply all filter and returns true if the object should be kept after filtering */
/*
*
@brief Apply all filter and returns true if the object should be kept after filtering */
virtual
bool
applyAll
(
std
::
shared_ptr
<
TreeItem
>
item
)
const
;
bool
m_name_enabled
{
false
};
...
...
src/assets/assetlist/model/assettreemodel.hpp
View file @
5ce65477
...
...
@@ -24,7 +24,7 @@
#include "abstractmodel/abstracttreemodel.hpp"
/* @brief This class represents an effect hierarchy to be displayed as a tree
/*
*
@brief This class represents an effect hierarchy to be displayed as a tree
*/
class
TreeItem
;
class
QMenu
;
...
...
src/assets/assetlist/view/assetlistwidget.hpp
View file @
5ce65477
...
...
@@ -26,7 +26,7 @@
#include <QQuickWidget>
#include <memory>
/* @brief This class is a generic widget that display the list of available assets
/*
*
@brief This class is a generic widget that display the list of available assets
*/
class
AssetIconProvider
;
...
...
@@ -36,33 +36,33 @@ class AssetTreeModel;
class
AssetListWidget
:
public
QQuickWidget
{
Q_OBJECT
/* @brief Should the descriptive info box be displayed
/*
*
@brief Should the descriptive info box be displayed
*/
public:
AssetListWidget
(
QWidget
*
parent
=
Q_NULLPTR
);
~
AssetListWidget
()
override
;
/* @brief Returns the name of the asset given its model index */
/*
*
@brief Returns the name of the asset given its model index */
QString
getName
(
const
QModelIndex
&
index
)
const
;
/* @brief Returns true if this effect belongs to favorites */
/*
*
@brief Returns true if this effect belongs to favorites */
bool
isFavorite
(
const
QModelIndex
&
index
)
const
;
/* @brief Sets whether this effect belongs to favorites */
/*
*
@brief Sets whether this effect belongs to favorites */
void
setFavorite
(
const
QModelIndex
&
index
,
bool
favorite
=
true
,
bool
isEffect
=
true
);
/* @brief Delete a custom effect */
/*
*
@brief Delete a custom effect */
void
deleteCustomEffect
(
const
QModelIndex
&
index
);
virtual
void
reloadCustomEffectIx
(
const
QModelIndex
&
index
)
=
0
;
virtual
void
editCustomAsset
(
const
QModelIndex
&
index
)
=
0
;
/* @brief Returns the description of the asset given its model index */
/*
*
@brief Returns the description of the asset given its model index */
QString
getDescription
(
bool
isEffect
,
const
QModelIndex
&
index
)
const
;
/* @brief Sets the pattern against which the assets' names are filtered */
/*
*
@brief Sets the pattern against which the assets' names are filtered */
void
setFilterName
(
const
QString
&
pattern
);
/*@brief Return mime type used for drag and drop. It can be kdenlive/effect,
/*
*
@brief Return mime type used for drag and drop. It can be kdenlive/effect,
kdenlive/composition or kdenlive/transition*/
virtual
QString
getMimeType
(
const
QString
&
assetId
)
const
=
0
;
...
...
@@ -70,7 +70,7 @@ public:
void
activate
(
const
QModelIndex
&
ix
);
/* @brief Rebuild the view by resetting the source. Is there a better way? */
/*
*
@brief Rebuild the view by resetting the source. Is there a better way? */
void
reset
();
protected:
...
...
src/assets/assetpanel.hpp
View file @
5ce65477
...
...
@@ -54,22 +54,22 @@ class AssetPanel : public QWidget
public:
AssetPanel
(
QWidget
*
parent
);
/* @brief Shows the parameters of the given transition model */
/*
*
@brief Shows the parameters of the given transition model */
void
showTransition
(
int
tid
,
const
std
::
shared_ptr
<
AssetParameterModel
>
&
transition_model
);
/* @brief Shows the parameters of the given mix model */
/*
*
@brief Shows the parameters of the given mix model */
void
showMix
(
int
cid
,
const
std
::
shared_ptr
<
AssetParameterModel
>
&
transitionModel
);
/* @brief Shows the parameters of the given effect stack model */
/*
*
@brief Shows the parameters of the given effect stack model */
void
showEffectStack
(
const
QString
&
itemName
,
const
std
::
shared_ptr
<
EffectStackModel
>
&
effectsModel
,
QSize
frameSize
,
bool
showKeyframes
);
/* @brief Clear the panel so that it doesn't display anything */
/*
*
@brief Clear the panel so that it doesn't display anything */
void
clear
();
/* @brief This method should be called when the style changes */
/*
*
@brief This method should be called when the style changes */
void
updatePalette
();
/* @brief Returns the object type / id of effectstack owner */
/*
*
@brief Returns the object type / id of effectstack owner */
ObjectId
effectStackOwner
();
/* @brief Add an effect to the current stack owner */
/*
*
@brief Add an effect to the current stack owner */
bool
addEffect
(
const
QString
&
effectId
);
public
slots
:
...
...
src/assets/keyframes/model/corners/cornershelper.hpp
View file @
5ce65477
...
...
@@ -38,7 +38,7 @@ class CornersHelper : public KeyframeMonitorHelper
Q_OBJECT
public:
/* @brief Construct a keyframe list bound to the given effect
/*
*
@brief Construct a keyframe list bound to the given effect
@param init_value is the value taken by the param at time 0.
@param model is the asset this parameter belong to
@param index is the index of this parameter in its model
...
...
src/assets/keyframes/model/keyframemodel.hpp
View file @
5ce65477
...
...
@@ -37,7 +37,7 @@ class AssetParameterModel;
class
DocUndoStack
;
class
EffectItemModel
;
/* @brief This class is the model for a list of keyframes.
/*
*
@brief This class is the model for a list of keyframes.
A keyframe is defined by a time, a type and a value
We store them in a sorted fashion using a std::map
*/
...
...
@@ -51,7 +51,7 @@ class KeyframeModel : public QAbstractListModel
Q_OBJECT
public:
/* @brief Construct a keyframe list bound to the given effect
/*
*
@brief Construct a keyframe list bound to the given effect
@param init_value is the value taken by the param at time 0.
@param model is the asset this parameter belong to
@param index is the index of this parameter in its model
...
...
@@ -67,35 +67,35 @@ public:
protected:
/** @brief These methods should ONLY be called by keyframemodellist to ensure synchronisation
* with keyframes from other parameters */
/* @brief Adds a keyframe at the given position. If there is already one then we update it.
/*
*
@brief Adds a keyframe at the given position. If there is already one then we update it.
@param pos defines the position of the keyframe, relative to the clip
@param type is the type of the keyframe.
*/
bool
addKeyframe
(
GenTime
pos
,
KeyframeType
type
,
QVariant
value
);
bool
addKeyframe
(
int
frame
,
double
normalizedValue
);
/* @brief Same function but accumulates undo/redo
/*
*
@brief Same function but accumulates undo/redo
@param notify: if true, send a signal to model
*/
bool
addKeyframe
(
GenTime
pos
,
KeyframeType
type
,
QVariant
value
,
bool
notify
,
Fun
&
undo
,
Fun
&
redo
);
/* @brief Removes the keyframe at the given position. */
/*
*
@brief Removes the keyframe at the given position. */
bool
removeKeyframe
(
int
frame
);
bool
moveKeyframe
(
int
oldPos
,
int
pos
,
QVariant
newVal
);
/* @brief Duplicate a keyframe at the given position. */
/*
*
@brief Duplicate a keyframe at the given position. */
bool
duplicateKeyframe
(
GenTime
srcPos
,
GenTime
dstPos
,
Fun
&
undo
,
Fun
&
redo
);
bool
removeKeyframe
(
GenTime
pos
);
/* @brief Delete all the keyframes of the model */
/*
*
@brief Delete all the keyframes of the model */
bool
removeAllKeyframes
();
bool
removeAllKeyframes
(
Fun
&
undo
,
Fun
&
redo
);
bool
removeNextKeyframes
(
GenTime
pos
,
Fun
&
undo
,
Fun
&
redo
);
QList
<
GenTime
>
getKeyframePos
()
const
;
protected:
/* @brief Same function but accumulates undo/redo */
/*
*
@brief Same function but accumulates undo/redo */
bool
removeKeyframe
(
GenTime
pos
,
Fun
&
undo
,
Fun
&
redo
,
bool
notify
=
true
);
public:
/* @brief moves a keyframe
/*
*
@brief moves a keyframe
@param oldPos is the old position of the keyframe
@param pos defines the new position of the keyframe, relative to the clip
@param logUndo if true, then an undo object is created
...
...
@@ -105,7 +105,7 @@ public:
bool
moveKeyframe
(
GenTime
oldPos
,
GenTime
pos
,
QVariant
newVal
,
bool
logUndo
);
bool
moveKeyframe
(
GenTime
oldPos
,
GenTime
pos
,
QVariant
newVal
,
Fun
&
undo
,
Fun
&
redo
);
/* @brief updates the value of a keyframe
/*
*
@brief updates the value of a keyframe
@param old is the position of the keyframe
@param value is the new value of the param
*/
...
...
@@ -113,53 +113,53 @@ public:
bool
updateKeyframe
(
GenTime
pos
,
QVariant
value
);
bool
updateKeyframeType
(
GenTime
pos
,
int
type
,
Fun
&
undo
,
Fun
&
redo
);
bool
updateKeyframe
(
GenTime
pos
,
const
QVariant
&
value
,
Fun
&
undo
,
Fun
&
redo
,
bool
update
=
true
);
/* @brief updates the value of a keyframe, without any management of undo/redo
/*
*
@brief updates the value of a keyframe, without any management of undo/redo
@param pos is the position of the keyframe
@param value is the new value of the param
*/
bool
directUpdateKeyframe
(
GenTime
pos
,
QVariant
value
);
/* @brief Returns a keyframe data at given pos
/*
*
@brief Returns a keyframe data at given pos
ok is a return parameter, set to true if everything went good
*/
Keyframe
getKeyframe
(
const
GenTime
&
pos
,
bool
*
ok
)
const
;
/* @brief Returns true if we only have 1 keyframe
/*
*
@brief Returns true if we only have 1 keyframe
*/
bool
singleKeyframe
()
const
;
/* @brief Returns the keyframe located after given position.
/*
*
@brief Returns the keyframe located after given position.
If there is a keyframe at given position it is ignored.
@param ok is a return parameter to tell if a keyframe was found.
*/
Keyframe
getNextKeyframe
(
const
GenTime
&
pos
,
bool
*
ok
)
const
;
/* @brief Returns the keyframe located before given position.
/*
*
@brief Returns the keyframe located before given position.
If there is a keyframe at given position it is ignored.
@param ok is a return parameter to tell if a keyframe was found.
*/
Keyframe
getPrevKeyframe
(
const
GenTime
&
pos
,
bool
*
ok
)
const
;
/* @brief Returns the closest keyframe from given position.
/*
*
@brief Returns the closest keyframe from given position.
@param ok is a return parameter to tell if a keyframe was found.
*/
Keyframe
getClosestKeyframe
(
const
GenTime
&
pos
,
bool
*
ok
)
const
;
/* @brief Returns true if a keyframe exists at given pos
/*
*
@brief Returns true if a keyframe exists at given pos
Notice that add/remove queries are done in real time (gentime), but this request is made in frame
*/
Q_INVOKABLE
bool
hasKeyframe
(
int
frame
)
const
;
Q_INVOKABLE
bool
hasKeyframe
(
const
GenTime
&
pos
)
const
;
/* @brief Read the value from the model and update itself accordingly */
/*
*
@brief Read the value from the model and update itself accordingly */
void
refresh
();
/* @brief Reset all values to their default */
/*
*
@brief Reset all values to their default */
void
reset
();
/* @brief Return the interpolated value at given pos */
/*
*
@brief Return the interpolated value at given pos */
QVariant
getInterpolatedValue
(
int
pos
)
const
;
QVariant
getInterpolatedValue
(
const
GenTime
&
pos
)
const
;
QVariant
updateInterpolated
(
const
QVariant
&
interpValue
,
double
val
);
/* @brief Return the real value from a normalized one */
/*
*
@brief Return the real value from a normalized one */
QVariant
getNormalizedValue
(
double
newVal
)
const
;
// Mandatory overloads
...
...
@@ -180,10 +180,10 @@ protected:
/** @brief Helper function that generate a lambda to remove given keyframe */
Fun
deleteKeyframe_lambda
(
GenTime
pos
,
bool
notify
);
/* @brief Connects the signals of this object */
/*
*
@brief Connects the signals of this object */
void
setup
();
/* @brief Commit the modification to the model */
/*
*
@brief Commit the modification to the model */
void
sendModification
();