[PD] add shortcut to context menus
- people should be informed that there is a shortcut available (that was recently added) - make the shortcut also translatable since "Del" means nothing in e.g. German - minor code style fix in TaskDressUpParameters.h
This commit is contained in:
@@ -82,7 +82,11 @@ TaskBooleanParameters::TaskBooleanParameters(ViewProviderBoolean *BooleanView,QW
|
||||
|
||||
// Create context menu
|
||||
QAction* action = new QAction(tr("Remove"), this);
|
||||
action->setShortcut(QString::fromLatin1("Del"));
|
||||
action->setShortcut(tr("Del"));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
// display shortcut behind the context menu entry
|
||||
action->setShortcutVisibleInContextMenu(true);
|
||||
#endif
|
||||
ui->listWidgetBodies->addAction(action);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(onBodyDeleted()));
|
||||
ui->listWidgetBodies->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
|
||||
@@ -85,7 +85,11 @@ TaskChamferParameters::TaskChamferParameters(ViewProviderDressUp *DressUpView,QW
|
||||
|
||||
// Create context menu
|
||||
QAction* action = new QAction(tr("Remove"), this);
|
||||
action->setShortcut(QString::fromLatin1("Del"));
|
||||
action->setShortcut(tr("Del"));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
// display shortcut behind the context menu entry
|
||||
action->setShortcutVisibleInContextMenu(true);
|
||||
#endif
|
||||
ui->listWidgetReferences->addAction(action);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(onRefDeleted()));
|
||||
ui->listWidgetReferences->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
|
||||
@@ -99,7 +99,11 @@ TaskDraftParameters::TaskDraftParameters(ViewProviderDressUp *DressUpView,QWidge
|
||||
|
||||
// Create context menu
|
||||
QAction* action = new QAction(tr("Remove"), this);
|
||||
action->setShortcut(QString::fromLatin1("Del"));
|
||||
action->setShortcut(tr("Del"));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
// display shortcut behind the context menu entry
|
||||
action->setShortcutVisibleInContextMenu(true);
|
||||
#endif
|
||||
ui->listWidgetReferences->addAction(action);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(onRefDeleted()));
|
||||
ui->listWidgetReferences->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
protected Q_SLOTS:
|
||||
void onButtonRefAdd(const bool checked);
|
||||
void onButtonRefRemove(const bool checked);
|
||||
virtual void onRefDeleted(void)=0;
|
||||
virtual void onRefDeleted(void) = 0;
|
||||
|
||||
protected:
|
||||
void exitSelectionMode();
|
||||
|
||||
@@ -85,7 +85,11 @@ TaskFilletParameters::TaskFilletParameters(ViewProviderDressUp *DressUpView,QWid
|
||||
|
||||
// Create context menu
|
||||
QAction* action = new QAction(tr("Remove"), this);
|
||||
action->setShortcut(QString::fromLatin1("Del"));
|
||||
action->setShortcut(tr("Del"));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
// display shortcut behind the context menu entry
|
||||
action->setShortcutVisibleInContextMenu(true);
|
||||
#endif
|
||||
ui->listWidgetReferences->addAction(action);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(onRefDeleted()));
|
||||
ui->listWidgetReferences->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
|
||||
@@ -113,7 +113,11 @@ void TaskLinearPatternParameters::setupUI()
|
||||
|
||||
// Create context menu
|
||||
QAction* action = new QAction(tr("Remove"), this);
|
||||
action->setShortcut(QString::fromLatin1("Del"));
|
||||
action->setShortcut(tr("Del"));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
// display shortcut behind the context menu entry
|
||||
action->setShortcutVisibleInContextMenu(true);
|
||||
#endif
|
||||
ui->listWidgetFeatures->addAction(action);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(onFeatureDeleted()));
|
||||
ui->listWidgetFeatures->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
|
||||
@@ -110,7 +110,11 @@ void TaskMirroredParameters::setupUI()
|
||||
|
||||
// Create context menu
|
||||
QAction* action = new QAction(tr("Remove"), this);
|
||||
action->setShortcut(QString::fromLatin1("Del"));
|
||||
action->setShortcut(tr("Del"));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
// display shortcut behind the context menu entry
|
||||
action->setShortcutVisibleInContextMenu(true);
|
||||
#endif
|
||||
ui->listWidgetFeatures->addAction(action);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(onFeatureDeleted()));
|
||||
ui->listWidgetFeatures->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
|
||||
@@ -75,7 +75,11 @@ TaskMultiTransformParameters::TaskMultiTransformParameters(ViewProviderTransform
|
||||
|
||||
// Create context menu
|
||||
QAction* action = new QAction(tr("Remove"), this);
|
||||
action->setShortcut(QString::fromLatin1("Del"));
|
||||
action->setShortcut(tr("Del"));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
// display shortcut behind the context menu entry
|
||||
action->setShortcutVisibleInContextMenu(true);
|
||||
#endif
|
||||
ui->listWidgetFeatures->addAction(action);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(onFeatureDeleted()));
|
||||
ui->listWidgetFeatures->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
|
||||
@@ -111,7 +111,11 @@ void TaskPolarPatternParameters::setupUI()
|
||||
|
||||
// Create context menu
|
||||
QAction* action = new QAction(tr("Remove"), this);
|
||||
action->setShortcut(QString::fromLatin1("Del"));
|
||||
action->setShortcut(tr("Del"));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
// display shortcut behind the context menu entry
|
||||
action->setShortcutVisibleInContextMenu(true);
|
||||
#endif
|
||||
ui->listWidgetFeatures->addAction(action);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(onFeatureDeleted()));
|
||||
ui->listWidgetFeatures->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
|
||||
@@ -97,7 +97,11 @@ void TaskScaledParameters::setupUI()
|
||||
|
||||
// Create context menu
|
||||
QAction* action = new QAction(tr("Remove"), this);
|
||||
action->setShortcut(QString::fromLatin1("Del"));
|
||||
action->setShortcut(tr("Del"));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
// display shortcut behind the context menu entry
|
||||
action->setShortcutVisibleInContextMenu(true);
|
||||
#endif
|
||||
ui->listWidgetFeatures->addAction(action);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(onFeatureDeleted()));
|
||||
ui->listWidgetFeatures->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
|
||||
@@ -101,7 +101,11 @@ TaskThicknessParameters::TaskThicknessParameters(ViewProviderDressUp *DressUpVie
|
||||
|
||||
// Create context menu
|
||||
QAction* action = new QAction(tr("Remove"), this);
|
||||
action->setShortcut(QString::fromLatin1("Del"));
|
||||
action->setShortcut(tr("Del"));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
// display shortcut behind the context menu entry
|
||||
action->setShortcutVisibleInContextMenu(true);
|
||||
#endif
|
||||
ui->listWidgetReferences->addAction(action);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(onRefDeleted()));
|
||||
ui->listWidgetReferences->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
|
||||
Reference in New Issue
Block a user