diff --git a/companion/src/datamodels/compounditemmodels.cpp b/companion/src/datamodels/compounditemmodels.cpp index ab0ba83ba..b243bf09a 100644 --- a/companion/src/datamodels/compounditemmodels.cpp +++ b/companion/src/datamodels/compounditemmodels.cpp @@ -717,6 +717,16 @@ AbstractItemModel * CompoundItemModelFactory::getItemModel(const int id) const return nullptr; } +AbstractItemModel * CompoundItemModelFactory::getItemModel(const QString name) const +{ + foreach (AbstractItemModel * itemModel, registeredItemModels) { + if (itemModel->getName() == name) + return itemModel; + } + + return nullptr; +} + bool CompoundItemModelFactory::isItemModelRegistered(const int id) const { foreach (AbstractItemModel * itemModel, registeredItemModels) { diff --git a/companion/src/datamodels/compounditemmodels.h b/companion/src/datamodels/compounditemmodels.h index 7acfcbdc9..d5a7c5f27 100644 --- a/companion/src/datamodels/compounditemmodels.h +++ b/companion/src/datamodels/compounditemmodels.h @@ -363,6 +363,7 @@ class CompoundItemModelFactory void unregisterItemModel(const int id); bool isItemModelRegistered(const int id) const; AbstractItemModel * getItemModel(const int id) const; + AbstractItemModel * getItemModel(const QString name) const; void update(const int event = AbstractItemModel::IMUE_SystemRefresh); void dumpAllItemModelContents() const; diff --git a/companion/src/firmwares/datahelpers.cpp b/companion/src/firmwares/datahelpers.cpp index 78ac15037..8ae759a1b 100644 --- a/companion/src/firmwares/datahelpers.cpp +++ b/companion/src/firmwares/datahelpers.cpp @@ -47,3 +47,24 @@ QString DataHelpers::getElementName(const QString & prefix, const unsigned int i return result; } + +QString DataHelpers::timeToString(const int value, const unsigned int mask) +{ + bool negative = value < 0 ? true : false; + int val = abs(value); + + QString result = QString("%1").arg(negative ? "-" : ((mask & TIMESTR_MASK_PADSIGN) ? " " : "")); + + if (mask & TIMESTR_MASK_HRSMINS) { + int hours = val / 3600; + if (hours > 0 || (mask & TIMESTR_MASK_ZEROHRS)) { + val -= hours * 3600; + result.append(QString("%1:").arg(hours, 2, 10, QLatin1Char('0'))); + } + } + + int minutes = val / 60; + int seconds = val % 60; + result.append(QString("%1:%2").arg(minutes, 2, 10, QLatin1Char('0')).arg(seconds, 2, 10, QLatin1Char('0'))); + return result; +} diff --git a/companion/src/firmwares/datahelpers.h b/companion/src/firmwares/datahelpers.h index ed46da717..ccd3b0f64 100644 --- a/companion/src/firmwares/datahelpers.h +++ b/companion/src/firmwares/datahelpers.h @@ -47,6 +47,11 @@ class FieldRange QString unit; }; + +constexpr unsigned int TIMESTR_MASK_HRSMINS { 1 << 1 }; +constexpr unsigned int TIMESTR_MASK_ZEROHRS { 1 << 2 }; +constexpr unsigned int TIMESTR_MASK_PADSIGN { 1 << 3 }; + namespace DataHelpers { enum BoolFormat { @@ -59,5 +64,6 @@ namespace DataHelpers QString boolToString(const bool value, const BoolFormat format); QString getElementName(const QString & prefix, const unsigned int index, const char * name = 0, const bool padding = false); + QString timeToString(const int value, const unsigned int mask); } diff --git a/companion/src/firmwares/timerdata.cpp b/companion/src/firmwares/timerdata.cpp index 484dfe019..c46351df8 100644 --- a/companion/src/firmwares/timerdata.cpp +++ b/companion/src/firmwares/timerdata.cpp @@ -20,6 +20,7 @@ #include "timerdata.h" #include "radiodataconversionstate.h" +#include "compounditemmodels.h" void TimerData::convert(RadioDataConversionState & cstate) { @@ -36,7 +37,7 @@ void TimerData::clear() bool TimerData::isEmpty() { - return (mode == RawSwitch(SWITCH_TYPE_TIMER_MODE, 0) && name[0] == '\0' && minuteBeep == 0 && countdownBeep == COUNTDOWN_SILENT && val == 0 && persistent == 0 /*&& pvalue == 0*/); + return (mode == RawSwitch(SWITCH_TYPE_TIMER_MODE, 0) && name[0] == '\0' && minuteBeep == 0 && countdownBeep == COUNTDOWNBEEP_SILENT && val == 0 && persistent == 0 /*&& pvalue == 0*/); } bool TimerData::isModeOff() @@ -59,9 +60,14 @@ QString TimerData::countdownStartToString() const return countdownStartToString(countdownStart); } -QString TimerData::persistentToString() const +QString TimerData::persistentToString(const bool verbose) const { - return persistentToString(persistent); + return persistentToString(persistent, verbose); +} + +QString TimerData::pvalueToString() const +{ + return pvalueToString(pvalue); } // static @@ -99,25 +105,31 @@ QString TimerData::countdownStartToString(const int value) } // static -QString TimerData::persistentToString(const int value) +QString TimerData::persistentToString(const int value, const bool verbose) { switch(value) { case PERSISTENT_NOT: - return tr("Not persistent"); + return verbose ? tr("Not persistent") : tr("NOT"); case PERSISTENT_FLIGHT: - return tr("Persistent (flight)"); + return verbose ? tr("Persistent (flight)") : tr("Flight"); case PERSISTENT_MANUALRESET: - return tr("Persistent (manual reset)"); + return verbose ? tr("Persistent (manual reset)") : tr("Manual reset"); default: return CPN_STR_UNKNOWN_ITEM; } } +// static +QString TimerData::pvalueToString(const int value) +{ + return DataHelpers::timeToString(value, TIMESTR_MASK_HRSMINS); +} + // static AbstractStaticItemModel * TimerData::countdownBeepItemModel() { AbstractStaticItemModel * mdl = new AbstractStaticItemModel(); - mdl->setName("timerdata.countdownBeep"); + mdl->setName(AIM_TIMER_COUNTDOWNBEEP); for (int i = 0; i < COUNTDOWNBEEP_COUNT; i++) { QString str = countdownBeepToString(i); @@ -131,7 +143,7 @@ AbstractStaticItemModel * TimerData::countdownBeepItemModel() AbstractStaticItemModel * TimerData::countdownStartItemModel() { AbstractStaticItemModel * mdl = new AbstractStaticItemModel(); - mdl->setName("timerdata.countdownStart"); + mdl->setName(AIM_TIMER_COUNTDOWNSTART); for (int i = COUNTDOWNSTART_LAST - 1; i >= COUNTDOWNSTART_FIRST; i--) { QString str = countdownStartToString(i); @@ -145,7 +157,7 @@ AbstractStaticItemModel * TimerData::countdownStartItemModel() AbstractStaticItemModel * TimerData::persistentItemModel() { AbstractStaticItemModel * mdl = new AbstractStaticItemModel(); - mdl->setName("timerdata.persistent"); + mdl->setName(AIM_TIMER_PERSISTENT); for (int i = 0; i < PERSISTENT_COUNT; i++) { QString str = persistentToString(i); diff --git a/companion/src/firmwares/timerdata.h b/companion/src/firmwares/timerdata.h index e2949cd6b..fcd1ab87d 100644 --- a/companion/src/firmwares/timerdata.h +++ b/companion/src/firmwares/timerdata.h @@ -26,8 +26,13 @@ #include class RadioDataConversionState; +class AbstractStaticItemModel; -#define TIMER_NAME_LEN 8 +constexpr char AIM_TIMER_COUNTDOWNBEEP[] {"timerdata.countdownBeep"}; +constexpr char AIM_TIMER_COUNTDOWNSTART[] {"timerdata.countdownStart"}; +constexpr char AIM_TIMER_PERSISTENT[] {"timerdata.persistent"}; + +constexpr int TIMER_NAME_LEN {8}; class TimerData { Q_DECLARE_TR_FUNCTIONS(TimerData) @@ -74,13 +79,15 @@ class TimerData { bool isEmpty(); bool isModeOff(); QString nameToString(int index) const; - QString countdownBeepToString(); - QString countdownStartToString(); - QString persistentToString(); + QString countdownBeepToString() const; + QString countdownStartToString() const; + QString persistentToString(const bool verbose = true) const; + QString pvalueToString() const; static QString countdownBeepToString(const int value); static QString countdownStartToString(const int value); - static QString persistentToString(const int value); + static QString persistentToString(const int value, const bool verbose = true); + static QString pvalueToString(const int value); static AbstractStaticItemModel * countdownBeepItemModel(); static AbstractStaticItemModel * countdownStartItemModel(); static AbstractStaticItemModel * persistentItemModel(); diff --git a/companion/src/modeledit/setup.cpp b/companion/src/modeledit/setup.cpp index b695b03ff..d3d199cc0 100644 --- a/companion/src/modeledit/setup.cpp +++ b/companion/src/modeledit/setup.cpp @@ -22,7 +22,6 @@ #include "ui_setup.h" #include "ui_setup_timer.h" #include "ui_setup_module.h" -#include "filtereditemmodels.h" #include "appdata.h" #include "modelprinter.h" #include "multiprotocols.h" @@ -31,54 +30,51 @@ #include +constexpr char FIM_TIMERSWITCH[] {"Timer Switch"}; +constexpr char FIM_THRSOURCE[] {"Throttle Source"}; + TimerPanel::TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, GeneralSettings & generalSettings, Firmware * firmware, - QWidget * prevFocus, FilteredItemModel * rawSwitchFilteredModel): + QWidget * prevFocus, FilteredItemModelFactory * panelFilteredModels, CompoundItemModelFactory * panelItemModels): ModelPanel(parent, model, generalSettings, firmware), timer(timer), ui(new Ui::Timer) { ui->setupUi(this); - connectItemModelEvents(rawSwitchFilteredModel); + connectItemModelEvents(panelFilteredModels->getItemModel(FIM_TIMERSWITCH)); lock = true; // Name int length = firmware->getCapability(TimersName); - if (length == 0) { + if (length == 0) ui->name->hide(); - } - else { - ui->name->setMaxLength(length); - } + else + ui->name->setField(timer.name, length, this); // Mode - ui->mode->setModel(rawSwitchFilteredModel); + ui->mode->setModel(panelFilteredModels->getItemModel(FIM_TIMERSWITCH)); ui->mode->setCurrentIndex(ui->mode->findData(timer.mode.toValue())); connect(ui->mode, SIGNAL(activated(int)), this, SLOT(onModeChanged(int))); + ui->countdownBeep->setModel(panelItemModels->getItemModel(AIM_TIMER_COUNTDOWNBEEP)); + ui->countdownBeep->setField(timer.countdownBeep, this); + + ui->value->setMaximumTime(firmware->getMaxTimerStart()); + + ui->minuteBeep->setField(timer.minuteBeep, this); + if (!firmware->getCapability(PermTimers)) { ui->persistent->hide(); ui->persistentValue->hide(); } + else { + ui->persistent->setModel(panelItemModels->getItemModel(AIM_TIMER_PERSISTENT)); + ui->persistent->setField(timer.persistent, this); + ui->persistentValue->setText(timer.pvalueToString()); + } - ui->countdownBeep->setField(timer.countdownBeep, this); - ui->countdownBeep->addItem(tr("Silent"), TimerData::COUNTDOWN_SILENT); - ui->countdownBeep->addItem(tr("Beeps"), TimerData::COUNTDOWN_BEEPS); - ui->countdownBeep->addItem(tr("Voice"), TimerData::COUNTDOWN_VOICE); - ui->countdownBeep->addItem(tr("Haptic"), TimerData::COUNTDOWN_HAPTIC); - - ui->value->setMaximumTime(firmware->getMaxTimerStart()); - - ui->persistent->setField(timer.persistent, this); - ui->persistent->addItem(tr("Not persistent"), 0); - ui->persistent->addItem(tr("Persistent (flight)"), 1); - ui->persistent->addItem(tr("Persistent (manual reset)"), 2); - + ui->countdownStart->setModel(panelItemModels->getItemModel(AIM_TIMER_COUNTDOWNSTART)); ui->countdownStart->setField(timer.countdownStart, this); - ui->countdownStart->addItem("5s", 1); - ui->countdownStart->addItem("10s", 0); - ui->countdownStart->addItem("20s", -1); - ui->countdownStart->addItem("30s", -2); disableMouseScrolling(); QWidget::setTabOrder(prevFocus, ui->name); @@ -102,32 +98,18 @@ void TimerPanel::update() { lock = true; - ui->name->setText(timer.name); + ui->name->updateValue(); + ui->mode->setCurrentIndex(ui->mode->findData(timer.mode.toValue())); int hour = timer.val / 3600; int min = (timer.val - (hour * 3600)) / 60; int sec = (timer.val - (hour * 3600)) % 60; - - ui->mode->setCurrentIndex(ui->mode->findData(timer.mode.toValue())); ui->value->setTime(QTime(hour, min, sec)); - if (firmware->getCapability(PermTimers)) { - int sign = 1; - int pvalue = timer.pvalue; - if (pvalue < 0) { - pvalue = -pvalue; - sign = -1; - } - int hours = pvalue / 3600; - pvalue -= hours * 3600; - int minutes = pvalue / 60; - int seconds = pvalue % 60; - ui->persistentValue->setText(QString(" %1(%2:%3:%4)").arg(sign < 0 ? "-" :" ").arg(hours, 2, 10, QLatin1Char('0')).arg(minutes, 2, 10, QLatin1Char('0')).arg(seconds, 2, 10, QLatin1Char('0'))); - } - ui->countdownBeep->updateValue(); - ui->minuteBeep->setChecked(timer.minuteBeep); - ui->persistent->updateValue(); + ui->minuteBeep->updateValue(); + if (firmware->getCapability(PermTimers)) + ui->persistent->updateValue(); ui->countdownStart->updateValue(); lock = false; } @@ -139,10 +121,17 @@ QWidget * TimerPanel::getLastFocus() void TimerPanel::on_countdownBeep_currentIndexChanged(int index) { - if(index == TimerData::COUNTDOWN_SILENT) - ui->countdownStart->hide(); - else - ui->countdownStart->show(); + if (!lock) { + const int start = ui->countdownStart->itemData(index).toInt(); + if (start != timer.countdownStart) { + timer.countdownStart = start; + emit modified(); + if(index == TimerData::COUNTDOWNBEEP_SILENT) + ui->countdownStart->setEnabled(false); + else + ui->countdownStart->setEnabled(true); + } + } } void TimerPanel::on_value_editingFinished() @@ -197,12 +186,27 @@ void TimerPanel::connectItemModelEvents(const FilteredItemModel * itemModel) void TimerPanel::onItemModelAboutToBeUpdated() { lock = true; + modelsUpdateCnt++; } void TimerPanel::onItemModelUpdateComplete() { - update(); - lock = false; + modelsUpdateCnt--; + if (modelsUpdateCnt < 1) { + update(); + lock = false; + } +} + +void TimerPanel::on_countdownStart_currentIndexChanged(int index) +{ + if (!lock) { + const int start = ui->countdownStart->itemData(index).toInt(); + if (start != timer.countdownStart) { + timer.countdownStart = start; + emit modified(); + } + } } /******************************************************************************/ @@ -1023,16 +1027,26 @@ SetupPanel::SetupPanel(QWidget * parent, ModelData & model, GeneralSettings & ge { ui->setupUi(this); - rawSwitchFilteredModel = new FilteredItemModel(sharedItemModels->getItemModel(AbstractItemModel::IMID_RawSwitch), RawSwitch::TimersContext); - connectItemModelEvents(rawSwitchFilteredModel); + lock = true; - thrSourceFilteredModel = new FilteredItemModel(sharedItemModels->getItemModel(AbstractItemModel::IMID_ThrSource)); - connectItemModelEvents(thrSourceFilteredModel); + panelFilteredModels = new FilteredItemModelFactory(); + + panelFilteredModels->registerItemModel(new FilteredItemModel(sharedItemModels->getItemModel(AbstractItemModel::IMID_RawSwitch), + RawSwitch::TimersContext), + FIM_TIMERSWITCH); + connectItemModelEvents(panelFilteredModels->getItemModel(FIM_TIMERSWITCH)); + + panelFilteredModels->registerItemModel(new FilteredItemModel(sharedItemModels->getItemModel(AbstractItemModel::IMID_ThrSource)), + FIM_THRSOURCE); + connectItemModelEvents(panelFilteredModels->getItemModel(FIM_THRSOURCE)); + + panelItemModels = new CompoundItemModelFactory(&generalSettings, &model); + panelItemModels->registerItemModel(TimerData::countdownBeepItemModel()); + panelItemModels->registerItemModel(TimerData::countdownStartItemModel()); + panelItemModels->registerItemModel(TimerData::persistentItemModel()); Board::Type board = firmware->getBoard(); - lock = true; - memset(modules, 0, sizeof(modules)); QRegExp rx(CHAR_FOR_NAMES_REGEX); @@ -1112,7 +1126,7 @@ SetupPanel::SetupPanel(QWidget * parent, ModelData & model, GeneralSettings & ge for (int i = 0; i < CPN_MAX_TIMERS; i++) { if (i < timersCount) { - timers[i] = new TimerPanel(this, model, model.timers[i], generalSettings, firmware, prevFocus, rawSwitchFilteredModel); + timers[i] = new TimerPanel(this, model, model.timers[i], generalSettings, firmware, prevFocus, panelFilteredModels, panelItemModels); ui->gridLayout->addWidget(timers[i], 1+i, 1); connect(timers[i], &TimerPanel::modified, this, &SetupPanel::modified); connect(timers[i], &TimerPanel::nameChanged, this, &SetupPanel::onTimerNameChanged); @@ -1279,8 +1293,8 @@ SetupPanel::SetupPanel(QWidget * parent, ModelData & model, GeneralSettings & ge SetupPanel::~SetupPanel() { delete ui; - delete rawSwitchFilteredModel; - delete thrSourceFilteredModel; + delete panelFilteredModels; + delete panelItemModels; } void SetupPanel::on_extendedLimits_toggled(bool checked) diff --git a/companion/src/modeledit/setup.h b/companion/src/modeledit/setup.h index 7409d7b25..24b1625f7 100644 --- a/companion/src/modeledit/setup.h +++ b/companion/src/modeledit/setup.h @@ -18,17 +18,15 @@ * GNU General Public License for more details. */ -#ifndef _SETUP_H_ -#define _SETUP_H_ +#pragma once #include "modeledit.h" #include "eeprominterface.h" +#include "compounditemmodels.h" +#include "filtereditemmodels.h" constexpr char MIMETYPE_TIMER[] = "application/x-companion-timer"; -class CompoundItemModelFactory; -class FilteredItemModel; - namespace Ui { class Setup; class Timer; @@ -41,7 +39,7 @@ class TimerPanel : public ModelPanel public: TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, GeneralSettings & generalSettings, Firmware * firmware, - QWidget *prevFocus, FilteredItemModel * switchModel); + QWidget *prevFocus, FilteredItemModelFactory * panelFilteredModels, CompoundItemModelFactory * panelItemModels); virtual ~TimerPanel(); virtual void update(); @@ -55,6 +53,7 @@ class TimerPanel : public ModelPanel void on_name_editingFinished(); void onItemModelAboutToBeUpdated(); void onItemModelUpdateComplete(); + void on_countdownStart_currentIndexChanged(int index); signals: void nameChanged(); @@ -63,6 +62,7 @@ class TimerPanel : public ModelPanel TimerData & timer; Ui::Timer * ui; void connectItemModelEvents(const FilteredItemModel * itemModel); + int modelsUpdateCnt; }; class ModulePanel : public ModelPanel @@ -184,7 +184,7 @@ class SetupPanel : public ModelPanel QVector startupSwitchesCheckboxes; QVector potWarningCheckboxes; QVector centerBeepCheckboxes; - ModulePanel * modules[CPN_MAX_MODULES+1]; + ModulePanel * modules[CPN_MAX_MODULES + 1]; TimerPanel * timers[CPN_MAX_TIMERS]; void updateStartupSwitches(); void updatePotWarnings(); @@ -199,10 +199,8 @@ class SetupPanel : public ModelPanel bool moveTimerUpAllowed() const; void swapTimerData(int idx1, int idx2); CompoundItemModelFactory * sharedItemModels; - FilteredItemModel * rawSwitchFilteredModel; - FilteredItemModel * thrSourceFilteredModel; void updateItemModels(); void connectItemModelEvents(const FilteredItemModel * itemModel); + CompoundItemModelFactory * panelItemModels; + FilteredItemModelFactory * panelFilteredModels; }; - -#endif // _SETUP_H_ diff --git a/companion/src/modeledit/setup_timer.ui b/companion/src/modeledit/setup_timer.ui index 11f566b45..989e7074e 100644 --- a/companion/src/modeledit/setup_timer.ui +++ b/companion/src/modeledit/setup_timer.ui @@ -9,7 +9,7 @@ 0 0 - 675 + 874 33 @@ -33,7 +33,7 @@ 0 - + 80 @@ -68,11 +68,18 @@ + + + + Start + + + - + Minute Call @@ -109,6 +116,16 @@ QComboBox
autocombobox.h
+ + AutoLineEdit + QLineEdit +
autolineedit.h
+
+ + AutoCheckBox + QCheckBox +
autocheckbox.h
+
diff --git a/companion/src/modelprinter.cpp b/companion/src/modelprinter.cpp index 282f53550..7da624e1e 100644 --- a/companion/src/modelprinter.cpp +++ b/companion/src/modelprinter.cpp @@ -938,36 +938,6 @@ QString ModelPrinter::printFailsafeMode(unsigned int fsmode) } } -QString ModelPrinter::printTimerCountdownBeep(unsigned int countdownBeep) -{ - switch (countdownBeep) { - case TimerData::COUNTDOWN_SILENT: - return tr("Silent"); - case TimerData::COUNTDOWN_BEEPS: - return tr("Beeps"); - case TimerData::COUNTDOWN_VOICE: - return tr("Voice"); - case TimerData::COUNTDOWN_HAPTIC: - return tr("Haptic"); - default: - return CPN_STR_UNKNOWN_ITEM; - } -} - -QString ModelPrinter::printTimerPersistent(unsigned int persistent) -{ - switch (persistent) { - case 0: - return tr("OFF"); - case 1: - return tr("Flight"); - case 2: - return tr("Manual reset"); - default: - return CPN_STR_UNKNOWN_ITEM; - } -} - QString ModelPrinter::printSettingsTrim() { QStringList str; @@ -1042,16 +1012,6 @@ QString ModelPrinter::printTimerName(int idx) return result; } -QString ModelPrinter::printTimerTimeValue(unsigned int val) -{ - return printTimeValue(val, MASK_TIMEVALUE_HRSMINS | MASK_TIMEVALUE_ZEROHRS); -} - -QString ModelPrinter::printTimerMinuteBeep(bool mb) -{ - return printBoolean(mb, BOOLEAN_YESNO); -} - QString ModelPrinter::printTelemetryProtocol(unsigned int val) { switch (val) { diff --git a/companion/src/modelprinter.h b/companion/src/modelprinter.h index ea2eab2d8..97d697509 100644 --- a/companion/src/modelprinter.h +++ b/companion/src/modelprinter.h @@ -104,13 +104,9 @@ class ModelPrinter: public QObject QString printFailsafe(int idx); QString printFailsafeMode(unsigned int fsmode); QString printFailsafeValue(int val); - QString printTimerCountdownBeep(unsigned int countdownBeep); - QString printTimerPersistent(unsigned int persistent); QString printPPMFrameLength(int ppmFL); QString printTimerName(int idx); QString printTimeValue(const int value, const unsigned int mask); - QString printTimerMinuteBeep(bool mb); - QString printTimerTimeValue(unsigned int val); QString printTelemetryProtocol(unsigned int val); QString printLabelValue(const QString & lbl, const QString & val, const bool sep = false); QString printLabelValues(const QString & lbl, const QStringList & vals, const bool sep = false); diff --git a/companion/src/multimodelprinter.cpp b/companion/src/multimodelprinter.cpp index 17cb30be4..472354d84 100644 --- a/companion/src/multimodelprinter.cpp +++ b/companion/src/multimodelprinter.cpp @@ -341,11 +341,11 @@ QString MultiModelPrinter::printTimers() columns.appendCellStart(20, true); COMPARE(modelPrinter->printTimerName(i)); columns.appendCellEnd(true); - COMPARECELLWIDTH(modelPrinter->printTimerTimeValue(model->timers[i].val), 15); + COMPARECELLWIDTH(DataHelpers::timeToString(model->timers[i].val, TIMESTR_MASK_HRSMINS), 15); COMPARECELLWIDTH(model->timers[i].mode.toString(), 15); - COMPARECELLWIDTH(modelPrinter->printTimerCountdownBeep(model->timers[i].countdownBeep), 15); - COMPARECELLWIDTH(modelPrinter->printTimerMinuteBeep(model->timers[i].minuteBeep), 15); - COMPARECELLWIDTH(modelPrinter->printTimerPersistent(model->timers[i].persistent), 20); + COMPARECELLWIDTH(model->timers[i].countdownBeepToString(), 15); + COMPARECELLWIDTH(DataHelpers::boolToString(model->timers[i].minuteBeep, DataHelpers::BOOL_FMT_YESNO), 15); + COMPARECELLWIDTH(model->timers[i].persistentToString(false), 20); columns.appendRowEnd(); } columns.appendTableEnd();