17 #ifndef GEPETTO_GUI_SHORTCUT_FACTORY_HH_ 18 # define GEPETTO_GUI_SHORTCUT_FACTORY_HH_ 22 #include <QMouseEvent> 23 #include <QPushButton> 43 void addBinding(QString widgetName, QString actionName, QAction* action);
50 void writeShortcutsFile();
51 void readShortcutsFile();
53 typedef std::pair<QString, QAction*> Binding;
54 typedef std::list<Binding> BindingList;
55 typedef std::map<QString, BindingList> MapBindings;
57 class ShortcutButton :
public QPushButton {
59 ShortcutButton(QAction* action, QWidget* parent = 0);
63 virtual void mouseDoubleClickEvent(QMouseEvent* event);
64 virtual void keyPressEvent(QKeyEvent* event);
67 QList<int> modifiers_;
71 MapBindings widgetsBindings_;
72 std::map<QString, QKeySequence> saved_;
void open()
Open the widget that allows to change the different shortcut.
Definition: action-search-bar.hh:27
Definition: shortcut-factory.hh:30
void addBinding(QString widgetName, QString actionName, QAction *action)