mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Tip of the Day (#3118)
* Basic tip of the day with sample widget added * "Show tips on startup" option added to settings * tip cycling implemented * Structure of the tipOfTheDay class and resource created * tip getter function modified * Resources added, feature works properly * clangified * accidental modification rolled back * zach cleanup * tips to spaces; cmake list combined * cleanup img * fix copy * remove TOTD as QObject so we can copy construct it * prevent mem leaks in dlg * changed order of 'next' and 'previous' buttons * Date and tip numbers added; content wraps around * useless sizepolicy removed * link support added & clangified * Initial tips & memory management updates
This commit is contained in:
parent
281e52eaa9
commit
312caae062
24 changed files with 498 additions and 2 deletions
|
|
@ -67,6 +67,8 @@ GeneralSettingsPage::GeneralSettingsPage()
|
|||
defaultUrlEdit = new QLineEdit(settingsCache->getPicUrl());
|
||||
fallbackUrlEdit = new QLineEdit(settingsCache->getPicUrlFallback());
|
||||
|
||||
showTipsOnStartup.setChecked(settingsCache->getShowTipsOnStartup());
|
||||
|
||||
connect(&clearDownloadedPicsButton, SIGNAL(clicked()), this, SLOT(clearDownloadedPicsButtonClicked()));
|
||||
connect(&languageBox, SIGNAL(currentIndexChanged(int)), this, SLOT(languageBoxChanged(int)));
|
||||
connect(&picDownloadCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setPicDownload(int)));
|
||||
|
|
@ -79,6 +81,7 @@ GeneralSettingsPage::GeneralSettingsPage()
|
|||
connect(fallbackUrlEdit, SIGNAL(textChanged(QString)), settingsCache, SLOT(setPicUrlFallback(QString)));
|
||||
connect(&defaultUrlRestoreButton, SIGNAL(clicked()), this, SLOT(defaultUrlRestoreButtonClicked()));
|
||||
connect(&fallbackUrlRestoreButton, SIGNAL(clicked()), this, SLOT(fallbackUrlRestoreButtonClicked()));
|
||||
connect(&showTipsOnStartup, SIGNAL(clicked(bool)), settingsCache, SLOT(setShowTipsOnStartup(bool)));
|
||||
|
||||
setEnabledStatus(settingsCache->getPicDownload());
|
||||
|
||||
|
|
@ -97,6 +100,7 @@ GeneralSettingsPage::GeneralSettingsPage()
|
|||
personalGrid->addWidget(&fallbackUrlLabel, 6, 0, 1, 1);
|
||||
personalGrid->addWidget(fallbackUrlEdit, 6, 1, 1, 1);
|
||||
personalGrid->addWidget(&fallbackUrlRestoreButton, 6, 2, 1, 1);
|
||||
personalGrid->addWidget(&showTipsOnStartup, 7, 0);
|
||||
personalGrid->addWidget(&urlLinkLabel, 7, 1, 1, 1);
|
||||
personalGrid->addWidget(&clearDownloadedPicsButton, 8, 0, 1, 3);
|
||||
|
||||
|
|
@ -310,6 +314,7 @@ void GeneralSettingsPage::retranslateUi()
|
|||
updateNotificationCheckBox.setText(tr("Notify if a feature supported by the server is missing in my client"));
|
||||
defaultUrlRestoreButton.setText(tr("Reset"));
|
||||
fallbackUrlRestoreButton.setText(tr("Reset"));
|
||||
showTipsOnStartup.setText(tr("Show tips on startup"));
|
||||
}
|
||||
|
||||
void GeneralSettingsPage::setEnabledStatus(bool status)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue