27 disconnect(
bind, SIGNAL(layoutChanged()),
this, SLOT(
newLayout()));
30 connect(newBind, SIGNAL(layoutChanged()),
this, SLOT(
newLayout()));
31 connect(newBind, SIGNAL(updated()),
this, SLOT(
updateBind()));
42 QHash<QString, QString> actions;
43 foreach(
const QString&
key, map.
keys())
85 if(selection.isEmpty())
87 selection = map.
keys();
88 uint count = selection.count();
91 if(count == map.
count())
92 text =
"<center>Reset all %1s to default?</center>";
94 text =
"<center>Reset this %1 to default?</center>";
96 text = tr(
"<center>Reset %1 %2s to default?</center>").arg(count);
97 if(QMessageBox(QMessageBox::NoIcon,
"Confirm action", text.arg(type), QMessageBox::Yes | QMessageBox::No,
this).exec() != QMessageBox::Yes)
106 int count = selection.
count();
108 QString text = tr(
"%1 %2").arg(count).arg(type) + (count == 1 ?
"" :
"s");
111 selection = map.
keys();
112 text = tr(
"all %1s").arg(type);
114 text =
"Copy binding for " + text +
" to:";
117 if(dialog.exec() != QDialog::Accepted)
120 QList<KbMode*> selectedModes = dialog.
selection();
121 foreach(
KbMode* mode, selectedModes){
123 foreach(
const QString&
key, selection){
KbMode * currentMode() const
const ModeList & modes() const
QString friendlyName(bool os=true) const
QString friendlyActionName(const QString &key)
void resetAction(const QString &key)
QString action(const QString &key)
void setAction(const QString &key, const QString &action)
QList< KbMode * > selection()