MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / onAddClicked

Method onAddClicked

src/interface/dialog/PresetRuleDialog.cpp:67–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67void PresetRuleDialog::onAddClicked()
68{
69 if(!deviceModel->loadRemaining(ruleModel))
70 {
71 QMessageBox::information(this, tr("Cannot add new rule"),
72 tr("All connected audio devices have already a rule defined.\n"
73 "You can only create one rule per device."));
74 return;
75 }
76
77 if(PresetManager::instance().presetModel()->rowCount() <= 0)
78 {
79 QMessageBox::information(this, tr("Cannot add new rule"), tr("You have no presets saved.\n"
80 "Please create one first before adding a new rule."));
81 return;
82 }
83
84 presetModel->rescan();
85 addRuleFragment->slideIn();
86}
87
88void PresetRuleDialog::onAddConfirmed()
89{

Callers

nothing calls this directly

Calls 5

presetModelMethod · 0.80
rescanMethod · 0.80
loadRemainingMethod · 0.45
rowCountMethod · 0.45
slideInMethod · 0.45

Tested by

no test coverage detected