> Hello,
>
> I would like to know how to add a menu button to the menu bar of
> rosegarden, but I have no idea where to start...
Start with data/rc/. From there, you probably want either
rosegardenmainwindow.rc or notation.rc. It'll be pretty obvious how it
goes, from all the other entries there. Invent some unique name for your
action; I'll call it "foo".
One thing you want to watch out for is state, which greys out some entries
when there's nothing sensible for them to do. You generally don't need to
mess with it, but if your entry greys out for no apparent reason, that's
probably it.
Once you've done that, you'll have a menu item that does nothing.
Then you need to add a slotFoo and connect it to command "foo", probably
in src/gui/application/RosegardenMainWindow.cpp or
src/gui/editors/notation/NotationView.cpp. Let's say it's
RosegardenMainWindow.
In RosegardenMainWindow.h, in class RosegardenMainWindow, after "public
slots:" add:
/* Description of what foo does */
void slotFoo();
In RosegardenMainWindow.cpp, add:
createAction("foo", SLOT(slotFoo()));
Please group it nicely with the other actions; should be fairly obvious
from the file.
Now you're created and connected a menu item. Debugging it, well, that's
another story.
Tom Breton (Tehom)
------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
endpoint security space. For insight on selecting the right partner to
tackle endpoint security challenges, access the full report.
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel