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
966d2cac
Commit
966d2cac
authored
Nov 27, 2020
by
Vivek Yadav
Browse files
Import Window as Widget Feature
parent
e0631623
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/bin/bin.cpp
View file @
966d2cac
...
...
@@ -824,6 +824,13 @@ bool LineEventEater::eventFilter(QObject *obj, QEvent *event)
return
QObject
::
eventFilter
(
obj
,
event
);
}
void
ClipWidget
::
init
(
QDockWidget
*
m_DockClipWidget
)
{
QString
clipFolder
=
KRecentDirs
::
dir
(
QStringLiteral
(
":KdenliveClipFolder"
));
KFileWidget
*
fileWidget
=
new
KFileWidget
(
QUrl
::
fromLocalFile
(
clipFolder
),
m_DockClipWidget
);
m_DockClipWidget
->
setWidget
(
fileWidget
);
}
Bin
::
Bin
(
std
::
shared_ptr
<
ProjectItemModel
>
model
,
QWidget
*
parent
)
:
QWidget
(
parent
)
,
isLoading
(
false
)
...
...
@@ -847,6 +854,7 @@ Bin::Bin(std::shared_ptr<ProjectItemModel> model, QWidget *parent)
,
m_gainedFocus
(
false
)
,
m_audioDuration
(
0
)
,
m_processedAudio
(
0
)
,
m_clipWidget
()
{
m_layout
=
new
QVBoxLayout
(
this
);
...
...
@@ -4348,3 +4356,7 @@ QList<int> Bin::getUsedClipIds()
}
return
timelineClipIds
;
}
ClipWidget
*
Bin
::
getWidget
(){
return
m_clipWidget
;
}
src/bin/bin.h
View file @
966d2cac
...
...
@@ -40,6 +40,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QUrl>
#include <QWidget>
#include <QActionGroup>
#include <QtWidgets>
#include "KFileWidget"
#include "KRecentDirs"
class
AbstractProjectItem
;
class
BinItemDelegate
;
...
...
@@ -163,6 +167,14 @@ signals:
* @brief The bin widget takes care of both item model and view upon project opening.
*/
class
ClipWidget
:
public
QWidget
{
public:
explicit
ClipWidget
(){}
~
ClipWidget
()
override
;
void
init
(
QDockWidget
*
m_DockClipWidget
);
};
class
Bin
:
public
QWidget
{
Q_OBJECT
...
...
@@ -296,6 +308,7 @@ public:
void
loadFolderState
(
QStringList
foldersToExpand
);
/** @brief gets a QList of all clips used in timeline */
QList
<
int
>
getUsedClipIds
();
ClipWidget
*
getWidget
();
// TODO refac: remove this and call directly the function in ProjectItemModel
void
cleanup
();
...
...
@@ -469,6 +482,7 @@ private:
QActionGroup
*
m_sortGroup
;
SmallJobLabel
*
m_infoLabel
;
TagWidget
*
m_tagsWidget
;
ClipWidget
*
m_clipWidget
;
QMenu
*
m_filterMenu
;
QActionGroup
m_filterGroup
;
QActionGroup
m_filterRateGroup
;
...
...
src/mainwindow.cpp
View file @
966d2cac
...
...
@@ -346,7 +346,8 @@ void MainWindow::init()
spectrumDock
->
close
();
m_projectBinDock
=
addDock
(
i18n
(
"Project Bin"
),
QStringLiteral
(
"project_bin"
),
pCore
->
bin
());
QDockWidget
*
m_ClipDockWidget
=
addDock
(
i18n
(
"Clips"
),
QStringLiteral
(
"bin_clip"
),
pCore
->
bin
()
->
getWidget
());
pCore
->
bin
()
->
getWidget
()
->
init
(
m_ClipDockWidget
);
m_assetPanel
=
new
AssetPanel
(
this
);
m_effectStackDock
=
addDock
(
i18n
(
"Effect/Composition Stack"
),
QStringLiteral
(
"effect_stack"
),
m_assetPanel
);
connect
(
m_assetPanel
,
&
AssetPanel
::
doSplitEffect
,
m_projectMonitor
,
&
Monitor
::
slotSwitchCompare
);
...
...
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