23 #include "cfgautoupdates.h"
24 #include "ui_cfgautoupdates.h"
26 #include "configuration/doomseekerconfig.h"
27 #include "updater/updatechannel.h"
31 DClass<CFGAutoUpdates> :
public Ui::CFGAutoUpdates
43 CFGAutoUpdates::~CFGAutoUpdates()
47 void CFGAutoUpdates::initUpdateChannels()
52 d->cboUpdateChannel->addItem(channel.translatedName(),
57 void CFGAutoUpdates::onUpdateChannelChange(
int index)
60 QString
name = d->cboUpdateChannel->itemData(index).toString();
62 d->pteChannelDescription->setPlainText(channel.translatedDescription());
69 switch (gConfig.autoUpdates.updateMode)
72 d->rbDisabled->setChecked(
true);
76 d->rbNotifyButDontInstall->setChecked(
true);
79 d->rbInstallAutomatically->setChecked(
true);
82 QString channelName = gConfig.autoUpdates.updateChannelName;
83 int channelIdx = d->cboUpdateChannel->findData(channelName);
89 d->cboUpdateChannel->setCurrentIndex(channelIdx);
94 if (d->rbDisabled->isChecked())
98 else if (d->rbNotifyButDontInstall->isChecked())
102 else if (d->rbInstallAutomatically->isChecked())
108 assert(
false &&
"CFGAutoUpdates::saveSettings() - No radio button is checked.");
110 gConfig.autoUpdates.updateChannelName = d->cboUpdateChannel->itemData(
111 d->cboUpdateChannel->currentIndex()).toString();
void saveSettings()
Reimplement this to write settings to config from widgets.
static UpdateChannel fromName(const QString &name)
Creates object from its internal name.
static QList< UpdateChannel > allChannels()
List of all available channels.
QString name() const
Reimplement this to return a list-displayable name for this ConfigurationBaseBox. ...
Update is fully automatic.
void readSettings()
Reimplement this to read settings from config into widgets.
static UpdateChannel mkStable()
Creates "stable" channel object.
Base class for configuration pages.
User is only notified of the update and decides if it should be installed.