From cff0ec66444a430d7733ca245d2335475acd60bb Mon Sep 17 00:00:00 2001 From: ribes Date: Wed, 12 Oct 2011 07:26:40 +0000 Subject: [PATCH] Adding a shortcut for deleting jobs --- src/genericgui/BL_GenericGui.cxx | 2 +- src/wrappers/BL_MainWindows_Qt.cxx | 5 +++-- src/wrappers/BL_MainWindows_Qt.hxx | 5 +++-- src/wrappers/BL_MainWindows_SALOME.cxx | 7 ++++--- src/wrappers/BL_MainWindows_SALOME.hxx | 5 +++-- src/wrappers/BL_MainWindows_Wrap.hxx | 5 +++-- 6 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/genericgui/BL_GenericGui.cxx b/src/genericgui/BL_GenericGui.cxx index f626d38..e8c34ff 100644 --- a/src/genericgui/BL_GenericGui.cxx +++ b/src/genericgui/BL_GenericGui.cxx @@ -184,7 +184,7 @@ BL::GenericGui::createActions() _edit_clone_job_action = _wrapper->createAction("Edit/Clone a Job", QIcon(), "Edit/Clone a Job", "Edit/Clone a Job", 0, _dock_parent, false, this, SLOT(edit_clone_job())); _start_job_action = _wrapper->createAction("Start a Job", QIcon(), "Start a Job", "Start a Job", 0, _dock_parent, false, this, SLOT(start_job())); _restart_job_action = _wrapper->createAction("Restart a Job", QIcon(), "Restart a Job", "Restart a Job", 0, _dock_parent, false, this, SLOT(restart_job())); - _delete_job_action = _wrapper->createAction("Delete a Job", QIcon(), "Delete a Job", "Delete a Job", 0, _dock_parent, false, this, SLOT(delete_job())); + _delete_job_action = _wrapper->createAction("Delete a Job", QIcon(), "Delete a Job", "Delete a Job", Qt::Key_Delete, _dock_parent, false, this, SLOT(delete_job())); _refresh_job_action = _wrapper->createAction("Refresh Jobs", QIcon(), "Refresh Jobs", "Refresh Jobs", 0, _dock_parent, false, this, SLOT(refresh_job())); _get_results_job_action = _wrapper->createAction("Get Job Results", QIcon(), "Get Job Results", "Get Job Results", 0, _dock_parent, false, this, SLOT(refresh_job())); _stop_job_action = _wrapper->createAction("Stop a Job", QIcon(), "Stop a Job", "Stop a Job", 0, _dock_parent, false, this, SLOT(stop_job())); diff --git a/src/wrappers/BL_MainWindows_Qt.cxx b/src/wrappers/BL_MainWindows_Qt.cxx index cda3f49..e778956 100644 --- a/src/wrappers/BL_MainWindows_Qt.cxx +++ b/src/wrappers/BL_MainWindows_Qt.cxx @@ -49,11 +49,12 @@ BL::MainWindows_Qt::createAction(const QString& toolTip, const QIcon& icon, const QString& menu, const QString& status, - const int shortCut, + const int accel, QObject* parent, bool checkable, QObject* receiver, - const char* member) + const char* member, + const QString& shortCut) { QAction * action = new QAction(icon, menu, parent); action->setStatusTip(status); diff --git a/src/wrappers/BL_MainWindows_Qt.hxx b/src/wrappers/BL_MainWindows_Qt.hxx index 993c9a5..a84e0f0 100644 --- a/src/wrappers/BL_MainWindows_Qt.hxx +++ b/src/wrappers/BL_MainWindows_Qt.hxx @@ -39,11 +39,12 @@ namespace BL const QIcon& icon, const QString& menu, const QString& status, - const int shortCut, + const int accel, QObject* parent =0, bool checkable = false, QObject* receiver =0, - const char* member =0); + const char* member =0, + const QString& shortCut=QString()); virtual int createTopMenu(const QString & menu_name); virtual void addActionToMenu(QAction * action, int menu_id); diff --git a/src/wrappers/BL_MainWindows_SALOME.cxx b/src/wrappers/BL_MainWindows_SALOME.cxx index 3c6d970..5827751 100644 --- a/src/wrappers/BL_MainWindows_SALOME.cxx +++ b/src/wrappers/BL_MainWindows_SALOME.cxx @@ -121,13 +121,14 @@ BL::MainWindows_SALOME::createAction(const QString& toolTip, const QIcon& icon, const QString& menu, const QString& status, - const int shortCut, + const int accel, QObject* parent, bool checkable, QObject* receiver, - const char* member) + const char* member, + const QString & shortCut) { - return SalomeApp_Module::createAction(getActionId(), toolTip, icon, menu, status, shortCut, parent, checkable, receiver, member); + return SalomeApp_Module::createAction(getActionId(), toolTip, icon, menu, status, accel, parent, checkable, receiver, member, shortCut); } int diff --git a/src/wrappers/BL_MainWindows_SALOME.hxx b/src/wrappers/BL_MainWindows_SALOME.hxx index 96a96ee..32c6f14 100644 --- a/src/wrappers/BL_MainWindows_SALOME.hxx +++ b/src/wrappers/BL_MainWindows_SALOME.hxx @@ -54,11 +54,12 @@ namespace BL const QIcon& icon, const QString& menu, const QString& status, - const int shortCut, + const int accel, QObject* parent =0, bool checkable = false, QObject* receiver =0, - const char* member =0); + const char* member =0, + const QString& shortCut=QString()); virtual int createTopMenu(const QString & menu_name); virtual void addActionToMenu(QAction * action, int menu_id); diff --git a/src/wrappers/BL_MainWindows_Wrap.hxx b/src/wrappers/BL_MainWindows_Wrap.hxx index 454b675..de336b9 100644 --- a/src/wrappers/BL_MainWindows_Wrap.hxx +++ b/src/wrappers/BL_MainWindows_Wrap.hxx @@ -40,11 +40,12 @@ namespace BL const QIcon& icon, const QString& menu, const QString& status, - const int shortCut, + const int accel, QObject* parent =0, bool checkable = false, QObject* receiver =0, - const char* member =0) = 0; + const char* member =0, + const QString& shortCut=QString()) = 0; virtual int createTopMenu(const QString & menu_name) = 0; virtual void addActionToMenu(QAction * action, int menu_id) = 0; -- 2.39.2