<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<gui name="kdenlive" version="39">
+<gui name="kdenlive" version="40">
<ToolBar name="extraToolBar" >
<text>Extra Toolbar</text>
<Action name="project_render" />
<Action name="mark_out" />
</Menu>
<Menu name="dockwindows" ><text>View</text>
+ <Action name="maximize_current" />
+ <Action name="show_timeline" />
</Menu>
<Menu name="settings" >
<Action name="manage_profiles" />
pasteEffects->setData("paste_effects");
connect(pasteEffects , SIGNAL(triggered()), this, SLOT(slotPasteEffects()));
+ QAction *showTimeline = new KAction(i18n("Show Timeline"), this);
+ collection->addAction("show_timeline", showTimeline);
+ showTimeline->setCheckable(true);
+ showTimeline->setChecked(true);
+ connect(showTimeline, SIGNAL(triggered(bool)), this, SLOT(slotShowTimeline(bool)));
+
+ /*QAction *maxCurrent = new KAction(i18n("Maximize Current Widget"), this);
+ collection->addAction("maximize_current", maxCurrent);
+ maxCurrent->setCheckable(true);
+ maxCurrent->setChecked(false);
+ connect(maxCurrent, SIGNAL(triggered(bool)), this, SLOT(slotMaximizeCurrent(bool)));*/
+
+
m_closeAction = KStandardAction::close(this, SLOT(closeCurrentDocument()), collection);
KStandardAction::quit(this, SLOT(queryQuit()), collection);
w->exec();
}
+void MainWindow::slotShowTimeline(bool show) {
+ if (show == false) {
+ m_timelineState = saveState();
+ centralWidget()->setHidden(true);
+ } else {
+ centralWidget()->setHidden(false);
+ restoreState(m_timelineState);
+ }
+}
+
+void MainWindow::slotMaximizeCurrent(bool show) {
+ //TODO: is there a way to maximize current widget?
+ //if (show == true)
+ {
+ m_timelineState = saveState();
+ QWidget *par = focusWidget()->parentWidget();
+ while (par->parentWidget() && par->parentWidget() != this) {
+ par = par->parentWidget();
+ }
+ kDebug() << "CURRENT WIDGET: " << par->objectName();
+ }
+ /*else {
+ //centralWidget()->setHidden(false);
+ //restoreState(m_timelineState);
+ }*/
+}
#include "mainwindow.moc"
QActionGroup *actionGroup);
void aboutPlugins();
QStringList m_pluginFileNames;
+ QByteArray m_timelineState;
public slots:
void openFile(const KUrl &url);
void slotSplitAudio();
void slotVideoOnly();
void slotAudioOnly();
+ void slotShowTimeline(bool show);
+ void slotMaximizeCurrent(bool show);
signals:
Q_SCRIPTABLE void abortRenderJob(const QString &url);