diff -r fc7a93ff97c3 -r 2a33304714ba shortcuts.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/shortcuts.cpp Tue Nov 17 08:24:59 2009 +0000 @@ -0,0 +1,36 @@ +#include "shortcuts.h" + +#include +using namespace std; + +///////////////////////////////////////////////////////////////// +// Shortcut +///////////////////////////////////////////////////////////////// +Shortcut::Shortcut(QWidget *parent) :QShortcut (parent) +{ +} + +///////////////////////////////////////////////////////////////// +// Switchboard +///////////////////////////////////////////////////////////////// +Switchboard::Switchboard () +{ +} + +void Switchboard::addConnection (QAction *a, const QString &desc) +{ + QKeySequence ks=QKeySequence::fromString (desc); + actions.append (a); + if (!desc.isEmpty()) keys.append (new QKeySequence (ks)); + if (a) a->setShortcut (ks); +} + +void Switchboard::print () +{ + for (int i=0;ishortcut().toString().toStdString(); + cout << " Action: " <text().toStdString(); + cout <