Commit e4939610 authored by Jason Wood's avatar Jason Wood

Implemented configurable keyboard shortcuts

Implemented configurable toolbars

svn path=/trunk/kdenlive/; revision=270
parent 0cdc568d
......@@ -37,6 +37,8 @@
#include <kstdaction.h>
#include <kcommand.h>
#include <kdebug.h>
#include <kkeydialog.h>
#include <kedittoolbar.h>
// application specific includes
#include "kdenlive.h"
......@@ -111,6 +113,8 @@ void KdenliveApp::initActions()
viewToolBar = KStdAction::showToolbar(this, SLOT(slotViewToolBar()), actionCollection());
viewStatusBar = KStdAction::showStatusbar(this, SLOT(slotViewStatusBar()), actionCollection());
optionsPreferences = KStdAction::preferences(this, SLOT(slotOptionsPreferences()), actionCollection());
keyBindings = KStdAction::keyBindings(this, SLOT(slotConfKeys()), actionCollection());
configureToolbars = KStdAction::configureToolbars(this, SLOT(slotConfToolbars()), actionCollection());
timelineMoveTool = new KRadioAction(i18n("Move/Resize Tool"), "moveresize.png", 0, this, SLOT(slotTimelineMoveTool()), actionCollection(),"timeline_move_tool");
timelineRazorTool = new KRadioAction(i18n("Razor Tool"), "razor.png", 0, this, SLOT(slotTimelineRazorTool()), actionCollection(),"timeline_razor_tool");
......@@ -989,3 +993,20 @@ void KdenliveApp::slotSetRenderFinished()
m_statusBarProgress->setPercentageVisible(false);
m_statusBarProgress->setProgress(m_statusBarProgress->totalSteps());
}
void KdenliveApp::slotConfKeys()
{
KKeyDialog::configureKeys(actionCollection(), xmlFile(), true, this);
}
void KdenliveApp::slotConfToolbars()
{
saveMainWindowSettings(KGlobal::config(), "General Options");
KEditToolbar *dlg = new KEditToolbar(actionCollection(), "kdenliveui.rc");
if (dlg->exec()) {
createGUI("kdenliveui.rc");
applyMainWindowSettings(KGlobal::config(), "General Options");
}
delete dlg;
}
......@@ -251,6 +251,12 @@ class KdenliveApp : public KDockMainWindow
void slotLookAtClip(DocClipBase *clip, const GenTime &time);
/** Display an error message in a suitable way to the user. */
void slotRenderError(const QString &name, const QString &message);
/** Configure keys */
void slotConfKeys();
/** Configure the toolbar */
void slotConfToolbars();
private:
/** the configuration object of the application */
......@@ -276,22 +282,24 @@ class KdenliveApp : public KDockMainWindow
// KAction* filePrint;
KAction* fileQuit;
KAction* editCut;
KAction* editCopy;
KAction* editPaste;
KAction* optionsPreferences;
KAction* projectAddClips;
KAction* projectDeleteClips;
KAction* projectClean;
KAction* projectClipProperties;
KAction* editCopy;
KAction* editPaste;
KAction* optionsPreferences;
KAction* projectAddClips;
KAction* projectDeleteClips;
KAction* projectClean;
KAction* projectClipProperties;
KAction* keyBindings;
KAction* configureToolbars;
KAction* actionSeekForwards;
KAction* actionSeekBackwards;
KAction* actionTogglePlay;
KAction* actionSeekForwards;
KAction* actionSeekBackwards;
KAction* actionTogglePlay;
KAction* actionNextFrame;
KAction* actionLastFrame;
KAction* actionSetInpoint;
KAction* actionSetOutpoint;
KAction* actionDeleteSelected;
KAction* actionDeleteSelected;
KAction* actionLoadLayout1;
KAction* actionLoadLayout2;
......@@ -322,10 +330,10 @@ class KdenliveApp : public KDockMainWindow
/** Application view setup */
ProjectList *m_projectList;
RenderDebugPanel *m_renderDebugPanel;
EffectListDialog *m_effectListDialog;
EffectParamDialog *m_effectParamDialog;
KRenderManager *m_renderManager;
RenderDebugPanel *m_renderDebugPanel;
EffectListDialog *m_effectListDialog;
EffectParamDialog *m_effectParamDialog;
KRenderManager *m_renderManager;
KMMMonitor *m_workspaceMonitor;
KMMMonitor *m_clipMonitor;
KMMRulerPanel *m_rulerPanel; // pointer, because it gets reparented to the timeline widget!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment