mirror of
https://github.com/YACReader/yacreader
synced 2025-07-27 01:15:07 -04:00
added shortcuts conflicts detection
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
#include <QPushButton>
|
||||
#include <QHeaderView>
|
||||
#include <QLabel>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "QsLog.h"
|
||||
|
||||
@ -59,6 +60,7 @@ EditShortcutsDialog::EditShortcutsDialog(QWidget *parent) :
|
||||
|
||||
connect(resetButton,SIGNAL(clicked()),this,SLOT(resetToDefaults()));
|
||||
connect(actionsGroupsListView->selectionModel(),SIGNAL(currentChanged(QModelIndex,QModelIndex)),this,SLOT(loadShortcuts(QModelIndex,QModelIndex))); //clicked(QModelIndex) doesn't work :S
|
||||
connect(actionsModel,SIGNAL(conflict(QString)),this,SLOT(processConflict(QString)));
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
setFixedSize(760,500);
|
||||
@ -86,3 +88,8 @@ void EditShortcutsDialog::loadShortcuts(const QModelIndex &mi,const QModelIndex
|
||||
{
|
||||
actionsModel->addActions(groupsModel->getActions(mi));
|
||||
}
|
||||
|
||||
void EditShortcutsDialog::processConflict(const QString &shortcutInConflict)
|
||||
{
|
||||
QMessageBox::warning(this,tr("Shortcut in use"), QString(tr("The shortcut \"%1\" is already assigned to other function")).arg(shortcutInConflict));
|
||||
}
|
||||
|
Reference in New Issue
Block a user