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:
David Szabo 2018-03-02 09:11:18 +01:00 committed by Zach H
parent 281e52eaa9
commit 312caae062
24 changed files with 498 additions and 2 deletions

View file

@ -67,6 +67,8 @@ private:
QString deckPath, replaysPath, picsPath, customPicsPath, cardDatabasePath, customCardDatabasePath,
spoilerDatabasePath, tokenDatabasePath, themeName;
bool notifyAboutUpdates;
bool showTipsOnStartup;
unsigned int lastShownTip;
bool mbDownloadSpoilers;
int updateReleaseChannel;
int maxFontSize;
@ -199,6 +201,14 @@ public:
{
return notifyAboutUpdates;
}
bool getShowTipsOnStartup() const
{
return showTipsOnStartup;
}
unsigned int getLastShownTip() const
{
return lastShownTip;
}
ReleaseChannel *getUpdateReleaseChannel() const
{
return releaseChannels.at(updateReleaseChannel);
@ -433,6 +443,8 @@ public slots:
void setMainWindowGeometry(const QByteArray &_mainWindowGeometry);
void setTokenDialogGeometry(const QByteArray &_tokenDialog);
void setLang(const QString &_lang);
void setShowTipsOnStartup(bool _showTipsOnStartup);
void setLastShownTip(int _lastShowTip);
void setDeckPath(const QString &_deckPath);
void setReplaysPath(const QString &_replaysPath);
void setPicsPath(const QString &_picsPath);