From: Chris Cannam <cannam@al...> - 2008-10-06 16:13:34
I've put up a wiki page about actions.
I was seized by a feeling that the boilerplate code we should need (if
this scheme comes off) is simple enough that it can actually be
produced almost entirely by scripting -- so I am doing that (i.e. the
developer A task).
I'll leave the current "explicit construction and configuration" code
in place, in a big comment block, in case we run into unexpected
difficulties with the fancy scheme.
2008/10/6 Chris Cannam <cannam@...>:
> I've put up a wiki page about actions.
It might be possible (?) (as a further simplification) instead of calling
createAction( "file_save", SLOT(slotFileSave()) );
createAction( "file_save", "slotFileSave()" );
and in create Action:
QAction * RosegardenGUIApp::createAction(QString actionName, QString
QAction *action = new QAction(this);
connect( action, SIGNAL(triggered()), this, SLOT(connection) );
I saw Chris, you added the createAction() method per file/window.
What about a centralized approach (include file) ?
That would require us to select the parent at least once,
before calling following createAction of findAction functions.
setCurrentActionParent( this );
createAction( "save" );
From: Chris Cannam <cannam@al...> - 2008-10-13 10:53:19
On Sat, Oct 11, 2008 at 6:30 PM, Emanuel Rumpf <xbran23@...> wrote:
> I saw Chris, you added the createAction() method per file/window.
> What about a centralized approach (include file) ?
These methods will move somewhere else when I do the rest of the
"developer C" stuff. But I put them in the base classes directly for
now, because I want the subclasses to be able to call them without
qualification (i.e. the base classes will continue to have some
forwarding arrangement so that the subclass doesn't need to care where
the implementation is).
> connect( action, SIGNAL(triggered()), this, SLOT(connection) );
I'm pretty sure that would not work (it would use the literal text
"connection" as if it were the signature of the slot method). Also,
some of the connections are to signals rather than slots, and in any
case the saving would be minimal.