[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src commands/Gain.cpp commands/plugins...
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso/src commands/Gain.cpp commands/plugins... |
Date: |
Tue, 12 Feb 2008 11:01:08 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 08/02/12 11:01:08
Modified files:
src/commands : Gain.cpp
src/commands/plugins/TraversoCommands: TraversoCommands.cpp
TraversoCommands.h
src/core : CommandPlugin.h
Log message:
* Start adding documentation, the idea is to list the syntax and
arguments, and what they are supposed to do when creating a specific Command
object, and to which the Command object can be applied.
With this information, one can fill the keymap.xml file with proper
entries for Commands that are supplied by the TraversoCommands plugin
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/commands/Gain.cpp?cvsroot=traverso&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/traverso/src/commands/plugins/TraversoCommands/TraversoCommands.cpp?cvsroot=traverso&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/traverso/src/commands/plugins/TraversoCommands/TraversoCommands.h?cvsroot=traverso&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/CommandPlugin.h?cvsroot=traverso&r1=1.3&r2=1.4
Patches:
Index: commands/Gain.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/commands/Gain.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- commands/Gain.cpp 21 Jan 2008 16:22:11 -0000 1.24
+++ commands/Gain.cpp 12 Feb 2008 11:01:08 -0000 1.25
@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-$Id: Gain.cpp,v 1.24 2008/01/21 16:22:11 r_sijrier Exp $
+$Id: Gain.cpp,v 1.25 2008/02/12 11:01:08 r_sijrier Exp $
*/
#include "Gain.h"
@@ -34,6 +34,13 @@
// in case we run with memory leak detection enabled!
#include "Debugger.h"
+/**
+ * \class Gain
+ \brief Change (jog) the Gain of a Sheet, Track or AudioClip, or set to
a pre-defined value
+
+ \sa TraversoCommands
+ */
+
Gain::Gain(ContextItem* context, SheetView* sv, QVariantList args)
: Command(context, "")
Index: commands/plugins/TraversoCommands/TraversoCommands.cpp
===================================================================
RCS file:
/sources/traverso/traverso/src/commands/plugins/TraversoCommands/TraversoCommands.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- commands/plugins/TraversoCommands/TraversoCommands.cpp 22 Jan 2008
20:47:16 -0000 1.21
+++ commands/plugins/TraversoCommands/TraversoCommands.cpp 12 Feb 2008
11:01:08 -0000 1.22
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2007 Remon Sijrier
+Copyright (C) 2007-2008 Remon Sijrier
This file is part of Traverso
@@ -30,6 +30,69 @@
// in case we run with memory leak detection enabled!
#include "Debugger.h"
+/**
+ * \class TraversoCommands
+ \brief The Traverso CommandPlugin class which 'implements' many of the
default Commands
+
+ With this plugin, the InputEngine is able to dispatch key actions by
directly
+ asking this Plugin for the needed Command object.
+
+ Dispatching key events to a specific object to create a Command object
is accomplished by creating
+ entries in the keymap.xml file, which has the following syntax:
+
+ \code
+ <Object objectname="" mousehint="" modes="" sortorder="" pluginname=""
commandname="" arguments="" />
+ \endcode
+
+ \code
+ objectname: The class name of the object that we want to dispatch
the key action on
+ mousehint Used to set the mouse cursor. Use "LR" for horizontal
suggestion, "UD" for vertical suggestion, or "RLUD" for omnidirectional
suggestion.
+ modes: Modes for which this command can be used, like All,
Edit or Effects. Modes are to be defined in the keymap itself!
+ sortorder: The order of where the key action should show up in the
ContextMenu of 'objectname'
+ plugniname: The plugin to ask the Command for, the only one
available right now is TraversoCommands
+ commandname: The Command to be created, which by convention tries to
be the same name as the actuall class implementing the Command
+ arguements: One, or more values (seperated by semicolons), each
Command explains which (list of) values it can understand
+ \endcode
+
+
+ Available Command classes, their required Object (to operate on) and
arguments are:
+
+
+ \code
+ MoveClip: Move or Copy-move an AudioClip.
+
+ objectname: AudioClipView
+ arguments: Either one of the following: "move", "copy",
"move_to_end", "move_to_start"
+ commandname: Moveclip
+ \endcode
+
+
+ \code
+ Gain: Change (jog), or reset the Gain of audio processing items
+ objectname: SheetView, TrackView, AudioClipView
+ arguments: No argument: Move Mouse vertically. Argument
"horizontal": Move Mouse horizontally
+ commandname: Gain
+ \endcode
+
+ \code
+ ResetGain: Set Gain value to a pre-defined value (by means of the
supplied argument).
+
+ objectname: SheetView, TrackView, AudioClipView
+ arguments: a floating point value, eg: "0.5"
+ commandname: ResetGain
+ \endcode
+
+ \code
+ ?: ?
+
+ Objects(s):
+ arguments:
+ commandname:
+ \endcode
+
+ */
+
+
TraversoCommands::TraversoCommands()
{
m_dict.insert("Gain", GainCommand);
Index: commands/plugins/TraversoCommands/TraversoCommands.h
===================================================================
RCS file:
/sources/traverso/traverso/src/commands/plugins/TraversoCommands/TraversoCommands.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- commands/plugins/TraversoCommands/TraversoCommands.h 22 Jan 2008
20:47:16 -0000 1.9
+++ commands/plugins/TraversoCommands/TraversoCommands.h 12 Feb 2008
11:01:08 -0000 1.10
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2007 Remon Sijrier
+Copyright (C) 2007-2008 Remon Sijrier
This file is part of Traverso
Index: core/CommandPlugin.h
===================================================================
RCS file: /sources/traverso/traverso/src/core/CommandPlugin.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- core/CommandPlugin.h 16 Mar 2007 00:14:43 -0000 1.3
+++ core/CommandPlugin.h 12 Feb 2008 11:01:08 -0000 1.4
@@ -52,6 +52,14 @@
public:
virtual ~CommandPlugin() {}
+/**
+ * Create a Command object, based on the command string.
+
+ * @param obj The Context Item object for which the Command has to be
made
+ * @param command The name of the Command to be created
+ * @param arguments List of arguments which can be parsed by the to be
created Command object.
+ * @return On success a Command object, the caller takes authorship, or
0 on failure.
+ */
virtual Command* create(QObject* obj, const QString& command,
QVariantList arguments) = 0;
virtual QStringList commands() const {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Traverso-commit] traverso/src commands/Gain.cpp commands/plugins...,
Remon Sijrier <=