Rewrite some parts of code in wiimotedev settings dialog (Fix remove action bug)
This commit is contained in:
parent
1a091c5c0a
commit
cfb66b3f33
@ -1333,6 +1333,9 @@ msgstr ""
|
||||
msgid "Progress"
|
||||
msgstr ""
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1333,6 +1333,9 @@ msgstr ""
|
||||
msgid "Progress"
|
||||
msgstr ""
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1354,6 +1354,9 @@ msgstr "Pista anterior"
|
||||
msgid "Progress"
|
||||
msgstr "Progrés"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Qualitat"
|
||||
|
||||
|
@ -1337,6 +1337,9 @@ msgstr "Předchozí skladba"
|
||||
msgid "Progress"
|
||||
msgstr "Průběh"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Kvalita"
|
||||
|
||||
|
@ -1338,6 +1338,9 @@ msgstr "Forrige spor"
|
||||
msgid "Progress"
|
||||
msgstr ""
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1354,6 +1354,9 @@ msgstr "Vorheriges Stück"
|
||||
msgid "Progress"
|
||||
msgstr "Fortschritt"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Qualität"
|
||||
|
||||
|
@ -1355,6 +1355,9 @@ msgstr "Προηγούμενο κομμάτι"
|
||||
msgid "Progress"
|
||||
msgstr "Πρόοδος"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Ποιότητα"
|
||||
|
||||
|
@ -1338,6 +1338,9 @@ msgstr "Previous track"
|
||||
msgid "Progress"
|
||||
msgstr "Progress"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1335,6 +1335,9 @@ msgstr "Previous track"
|
||||
msgid "Progress"
|
||||
msgstr ""
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1358,6 +1358,9 @@ msgstr "Pista anterior"
|
||||
msgid "Progress"
|
||||
msgstr "Progreso"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Calidad"
|
||||
|
||||
|
@ -1335,6 +1335,9 @@ msgstr "Edellinen kappale"
|
||||
msgid "Progress"
|
||||
msgstr ""
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Laatu"
|
||||
|
||||
|
@ -1347,6 +1347,9 @@ msgstr "Piste précédente"
|
||||
msgid "Progress"
|
||||
msgstr ""
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1335,6 +1335,9 @@ msgstr ""
|
||||
msgid "Progress"
|
||||
msgstr ""
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1350,6 +1350,9 @@ msgstr "Előző szám"
|
||||
msgid "Progress"
|
||||
msgstr "Folyamat"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Minőség"
|
||||
|
||||
|
@ -1362,6 +1362,9 @@ msgstr "Traccia precedente"
|
||||
msgid "Progress"
|
||||
msgstr "Avanzamento"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Qualità"
|
||||
|
||||
|
@ -1335,6 +1335,9 @@ msgstr ""
|
||||
msgid "Progress"
|
||||
msgstr ""
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1333,6 +1333,9 @@ msgstr ""
|
||||
msgid "Progress"
|
||||
msgstr ""
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1336,6 +1336,9 @@ msgstr "Forrige spor"
|
||||
msgid "Progress"
|
||||
msgstr ""
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Kvalitet"
|
||||
|
||||
|
@ -1352,6 +1352,9 @@ msgstr "Vorige track"
|
||||
msgid "Progress"
|
||||
msgstr "Voortgang"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Kwaliteit"
|
||||
|
||||
|
@ -1333,6 +1333,9 @@ msgstr "Pista precedenta"
|
||||
msgid "Progress"
|
||||
msgstr "Progression"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1344,6 +1344,9 @@ msgstr "Poprzedni utwór"
|
||||
msgid "Progress"
|
||||
msgstr "Postęp"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Jakość"
|
||||
|
||||
|
@ -1350,6 +1350,9 @@ msgstr "Faixa anterior"
|
||||
msgid "Progress"
|
||||
msgstr "Evolução"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Qualidade"
|
||||
|
||||
|
@ -1345,6 +1345,9 @@ msgstr "Faixa anterior"
|
||||
msgid "Progress"
|
||||
msgstr "Andamento"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Qualidade"
|
||||
|
||||
|
@ -1334,6 +1334,9 @@ msgstr "Piesa precedentă"
|
||||
msgid "Progress"
|
||||
msgstr ""
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1347,6 +1347,9 @@ msgstr "Предыдущая композиция"
|
||||
msgid "Progress"
|
||||
msgstr "Ход выполнения"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Качество"
|
||||
|
||||
|
@ -1348,6 +1348,9 @@ msgstr "Predchádzajúca skladba"
|
||||
msgid "Progress"
|
||||
msgstr "Priebeh"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Kvalita"
|
||||
|
||||
|
@ -1349,6 +1349,9 @@ msgstr "Prejšnja skladba"
|
||||
msgid "Progress"
|
||||
msgstr "Potek"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Kakovost"
|
||||
|
||||
|
@ -1338,6 +1338,9 @@ msgstr "Претходна нумера"
|
||||
msgid "Progress"
|
||||
msgstr "Напредак"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Квалитет"
|
||||
|
||||
|
@ -1342,6 +1342,9 @@ msgstr "Föregående spår"
|
||||
msgid "Progress"
|
||||
msgstr "Förlopp"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Kvalitet"
|
||||
|
||||
|
@ -1339,6 +1339,9 @@ msgstr "Önceki parça"
|
||||
msgid "Progress"
|
||||
msgstr "İlerleme"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Kalite"
|
||||
|
||||
|
@ -1323,6 +1323,9 @@ msgstr ""
|
||||
msgid "Progress"
|
||||
msgstr ""
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1348,6 +1348,9 @@ msgstr "Попередня доріжка"
|
||||
msgid "Progress"
|
||||
msgstr "Поступ"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr "Якість"
|
||||
|
||||
|
@ -1333,6 +1333,9 @@ msgstr "上一音轨"
|
||||
msgid "Progress"
|
||||
msgstr ""
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1338,6 +1338,9 @@ msgstr "上一首歌曲"
|
||||
msgid "Progress"
|
||||
msgstr "進展"
|
||||
|
||||
msgid "Push Wiiremote button"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quality"
|
||||
msgstr ""
|
||||
|
||||
|
@ -232,11 +232,8 @@ void SettingsDialog::accept() {
|
||||
#ifdef ENABLE_WIIMOTEDEV
|
||||
s.beginGroup(WiimotedevShortcuts::kActionsGroup);
|
||||
s.remove("");
|
||||
|
||||
foreach (const WiimotedevShortcutsConfig::Shortcut& shortcut, wiimotedev_config_->actions_) {
|
||||
foreach (const WiimotedevShortcutsConfig::Shortcut& shortcut, wiimotedev_config_->actions_)
|
||||
s.setValue(QString::number(shortcut.button), shortcut.action);
|
||||
}
|
||||
|
||||
s.endGroup();
|
||||
|
||||
s.beginGroup(WiimotedevShortcuts::kSettingsGroup);
|
||||
|
@ -62,6 +62,9 @@
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Push Wiiremote button</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
|
@ -106,11 +106,11 @@ WiimotedevShortcutsConfig::WiimotedevShortcutsConfig(QWidget* parent)
|
||||
|
||||
|
||||
settings_.beginGroup(WiimotedevShortcuts::kSettingsGroup);
|
||||
ui_->wiimotedev_enable->setChecked(settings_.value("enabled", true).toBool());
|
||||
ui_->wiimotedev_groupbox->setEnabled(settings_.value("enabled", true).toBool());
|
||||
ui_->wiimotedev_active->setChecked(settings_.value("use_active_action", false).toBool());
|
||||
ui_->wiimotedev_enable->setChecked(settings_.value("enabled", false).toBool());
|
||||
ui_->wiimotedev_groupbox->setEnabled(settings_.value("enabled", false).toBool());
|
||||
ui_->wiimotedev_active->setChecked(settings_.value("use_active_action", true).toBool());
|
||||
ui_->wiimotedev_focus->setChecked(settings_.value("only_when_focused", false).toBool());
|
||||
ui_->wiimotedev_notification->setChecked(settings_.value("use_notification", false).toBool());
|
||||
ui_->wiimotedev_notification->setChecked(settings_.value("use_notification", true).toBool());
|
||||
ui_->wiimotedev_device->setValue(settings_.value("device", 1).toUInt());
|
||||
settings_.endGroup();
|
||||
|
||||
@ -123,10 +123,20 @@ WiimotedevShortcutsConfig::WiimotedevShortcutsConfig(QWidget* parent)
|
||||
connect(ui_->wiimotedev_reload, SIGNAL(clicked()), this , SLOT(DefaultSettings()));
|
||||
}
|
||||
|
||||
|
||||
void WiimotedevShortcutsConfig::AddShortcut(quint64 button, quint32 action) {
|
||||
Shortcut s;
|
||||
s.object = new QTreeWidgetItem(ui_->list, QStringList() << GetReadableWiiremoteSequence(button) << text_actions_[action]);
|
||||
s.button = button;
|
||||
s.action = action;
|
||||
actions_ << s;
|
||||
}
|
||||
|
||||
void WiimotedevShortcutsConfig::LoadSettings(){
|
||||
settings_.beginGroup(WiimotedevShortcuts::kActionsGroup);
|
||||
settings_.sync();
|
||||
ui_->list->clear();
|
||||
actions_.clear();
|
||||
|
||||
quint64 fvalue, svalue;
|
||||
bool fvalid, svalid;
|
||||
@ -134,35 +144,30 @@ void WiimotedevShortcutsConfig::LoadSettings(){
|
||||
foreach (const QString& str, settings_.allKeys()) {
|
||||
fvalue = str.toULongLong(&fvalid, 10);
|
||||
svalue = settings_.value(str, 0).toULongLong(&svalid);
|
||||
if (fvalid && svalid) {
|
||||
Shortcut s;
|
||||
s.object = new QTreeWidgetItem(ui_->list, QStringList() << GetReadableWiiremoteSequence(fvalue) << text_actions_[svalue]);
|
||||
s.button = fvalue;
|
||||
s.action = svalue;
|
||||
actions_ << s;
|
||||
}
|
||||
ui_->list->sortItems(1, Qt::AscendingOrder);
|
||||
if (fvalid && svalid)
|
||||
AddShortcut(fvalue, svalue);
|
||||
}
|
||||
|
||||
settings_.endGroup();
|
||||
|
||||
ui_->list->sortItems(1, Qt::AscendingOrder);
|
||||
}
|
||||
|
||||
|
||||
void WiimotedevShortcutsConfig::DefaultSettings()
|
||||
{
|
||||
settings_.beginGroup(WiimotedevShortcuts::kActionsGroup);
|
||||
settings_.sync();
|
||||
settings_.remove("");
|
||||
settings_.setValue(QString::number(WIIMOTE_BTN_LEFT), WiimotedevShortcuts::PlayerPreviousTrack);
|
||||
settings_.setValue(QString::number(WIIMOTE_BTN_RIGHT), WiimotedevShortcuts::PlayerNextTrack);
|
||||
settings_.setValue(QString::number(WIIMOTE_BTN_SHIFT_LEFT), WiimotedevShortcuts::PlayerPreviousTrack);
|
||||
settings_.setValue(QString::number(WIIMOTE_BTN_SHIFT_RIGHT), WiimotedevShortcuts::PlayerNextTrack);
|
||||
settings_.setValue(QString::number(WIIMOTE_BTN_PLUS), WiimotedevShortcuts::PlayerIncVolume);
|
||||
settings_.setValue(QString::number(WIIMOTE_BTN_MINUS), WiimotedevShortcuts::PlayerDecVolume);
|
||||
settings_.setValue(QString::number(WIIMOTE_BTN_1), WiimotedevShortcuts::PlayerTogglePause);
|
||||
settings_.setValue(QString::number(WIIMOTE_BTN_2), WiimotedevShortcuts::PlayerShowOSD);
|
||||
settings_.endGroup();
|
||||
ui_->list->clear();
|
||||
actions_.clear();
|
||||
|
||||
LoadSettings();
|
||||
AddShortcut(WIIMOTE_BTN_LEFT, WiimotedevShortcuts::PlayerPreviousTrack);
|
||||
AddShortcut(WIIMOTE_BTN_RIGHT, WiimotedevShortcuts::PlayerNextTrack);
|
||||
AddShortcut(WIIMOTE_BTN_SHIFT_LEFT, WiimotedevShortcuts::PlayerPreviousTrack);
|
||||
AddShortcut(WIIMOTE_BTN_SHIFT_RIGHT, WiimotedevShortcuts::PlayerNextTrack);
|
||||
AddShortcut(WIIMOTE_BTN_PLUS, WiimotedevShortcuts::PlayerIncVolume);
|
||||
AddShortcut(WIIMOTE_BTN_MINUS, WiimotedevShortcuts::PlayerDecVolume);
|
||||
AddShortcut(WIIMOTE_BTN_1, WiimotedevShortcuts::PlayerTogglePause);
|
||||
AddShortcut(WIIMOTE_BTN_2, WiimotedevShortcuts::PlayerShowOSD);
|
||||
|
||||
ui_->list->sortItems(1, Qt::AscendingOrder);
|
||||
}
|
||||
|
||||
void WiimotedevShortcutsConfig::WiimotedevEnabledChecked(bool checked) {
|
||||
@ -185,12 +190,12 @@ QString WiimotedevShortcutsConfig::GetReadableWiiremoteSequence(quint64 value) {
|
||||
|
||||
|
||||
QString output;
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
for (int i = 0; i < (list.count() - 1); ++i)
|
||||
output += list.at(i) + " + ";
|
||||
output += list.last();
|
||||
}
|
||||
} else
|
||||
output = tr("Push Wiiremote button");
|
||||
|
||||
return output;
|
||||
}
|
||||
|
@ -42,6 +42,9 @@ public:
|
||||
|
||||
QString GetReadableWiiremoteSequence(quint64 value);
|
||||
|
||||
private:
|
||||
void AddShortcut(quint64 button, quint32 action);
|
||||
|
||||
private:
|
||||
QSettings settings_;
|
||||
QString current_id_;
|
||||
|
@ -54,63 +54,46 @@ void WiimotedevShortcuts::SetWiimotedevInterfaceActived(bool actived) {
|
||||
}
|
||||
|
||||
void WiimotedevShortcuts::ReloadSettings() {
|
||||
settings_.beginGroup(WiimotedevShortcuts::kActionsGroup);
|
||||
settings_.sync();
|
||||
actions_.clear();
|
||||
|
||||
if (!settings_.allKeys().count()) {
|
||||
RestoreSettings();
|
||||
settings_.sync();
|
||||
settings_.beginGroup(WiimotedevShortcuts::kActionsGroup);
|
||||
|
||||
if (!settings_.allKeys().count()) {
|
||||
actions_[WIIMOTE_BTN_LEFT] = PlayerPreviousTrack;
|
||||
actions_[WIIMOTE_BTN_RIGHT] = PlayerNextTrack;
|
||||
actions_[WIIMOTE_BTN_RIGHT] = PlayerNextTrack;
|
||||
actions_[WIIMOTE_BTN_SHIFT_LEFT] = PlayerPreviousTrack;
|
||||
actions_[WIIMOTE_BTN_SHIFT_RIGHT] = PlayerNextTrack;
|
||||
actions_[WIIMOTE_BTN_PLUS] = PlayerIncVolume;
|
||||
actions_[WIIMOTE_BTN_MINUS] = PlayerDecVolume;
|
||||
actions_[WIIMOTE_BTN_1] = PlayerTogglePause;
|
||||
actions_[WIIMOTE_BTN_2] = PlayerShowOSD;
|
||||
} else {
|
||||
|
||||
quint64 fvalue, svalue;
|
||||
bool fvalid, svalid;
|
||||
|
||||
foreach (const QString& str, settings_.allKeys()) {
|
||||
fvalue = str.toULongLong(&fvalid, 10);
|
||||
svalue = settings_.value(str, 0).toULongLong(&svalid);
|
||||
if (fvalid && svalid) actions_[fvalue] = svalue;
|
||||
}
|
||||
}
|
||||
|
||||
quint64 fvalue, svalue;
|
||||
bool fvalid, svalid;
|
||||
|
||||
foreach (const QString& str, settings_.allKeys()) {
|
||||
fvalue = str.toULongLong(&fvalid, 10);
|
||||
svalue = settings_.value(str, 0).toULongLong(&svalid);
|
||||
if (fvalid && svalid) actions_[fvalue] = svalue;
|
||||
}
|
||||
|
||||
settings_.endGroup();
|
||||
|
||||
settings_.beginGroup(WiimotedevShortcuts::kSettingsGroup);
|
||||
wiimotedev_enable_ = settings_.value("enabled", wiimotedev_enable_).toBool();
|
||||
wiimotedev_device_ = settings_.value("device", wiimotedev_device_).toInt();
|
||||
wiimotedev_active_ = settings_.value("use_active_action", wiimotedev_active_).toBool();
|
||||
wiimotedev_focus_ = settings_.value("only_when_focused", wiimotedev_focus_).toBool();
|
||||
wiimotedev_notification_ = settings_.value("use_notification", wiimotedev_notification_).toBool();
|
||||
wiimotedev_enable_ = settings_.value("enabled", false).toBool();
|
||||
wiimotedev_device_ = settings_.value("device", 1).toInt();
|
||||
wiimotedev_active_ = settings_.value("use_active_action", true).toBool();
|
||||
wiimotedev_focus_ = settings_.value("only_when_focused", false).toBool();
|
||||
wiimotedev_notification_ = settings_.value("use_notification", true).toBool();
|
||||
|
||||
settings_.endGroup();
|
||||
|
||||
SetWiimotedevInterfaceActived(wiimotedev_enable_);
|
||||
}
|
||||
|
||||
void WiimotedevShortcuts::RestoreSettings()
|
||||
{
|
||||
QSettings settings;
|
||||
settings.beginGroup(WiimotedevShortcuts::kActionsGroup);
|
||||
settings.remove("");
|
||||
settings.setValue(QString::number(WIIMOTE_BTN_LEFT), PlayerPreviousTrack);
|
||||
settings.setValue(QString::number(WIIMOTE_BTN_RIGHT), PlayerNextTrack);
|
||||
settings.setValue(QString::number(WIIMOTE_BTN_SHIFT_LEFT), PlayerPreviousTrack);
|
||||
settings.setValue(QString::number(WIIMOTE_BTN_SHIFT_RIGHT), PlayerNextTrack);
|
||||
settings.setValue(QString::number(WIIMOTE_BTN_PLUS), PlayerIncVolume);
|
||||
settings.setValue(QString::number(WIIMOTE_BTN_MINUS), PlayerDecVolume);
|
||||
settings.setValue(QString::number(WIIMOTE_BTN_1), PlayerTogglePause);
|
||||
settings.setValue(QString::number(WIIMOTE_BTN_2), PlayerShowOSD);
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup(WiimotedevShortcuts::kSettingsGroup);
|
||||
settings.remove("");
|
||||
settings.setValue("enabled", false);
|
||||
settings.setValue("device", 1);
|
||||
settings.setValue("use_active_action", true);
|
||||
settings.setValue("only_when_focused", false);
|
||||
settings.setValue("use_notification", true);
|
||||
settings.endGroup();
|
||||
}
|
||||
|
||||
void WiimotedevShortcuts::DbusWiimoteGeneralButtons(uint id, qulonglong value) {
|
||||
if (id != wiimotedev_device_ || !wiimotedev_enable_ || !player_) return;
|
||||
|
||||
|
@ -54,7 +54,6 @@ public:
|
||||
public slots:
|
||||
void SetWiimotedevInterfaceActived(bool actived);
|
||||
void ReloadSettings();
|
||||
void RestoreSettings();
|
||||
|
||||
private slots:
|
||||
void DbusWiimoteGeneralButtons(uint id, qulonglong value);
|
||||
|
Loading…
x
Reference in New Issue
Block a user