Fix UserNotify ToolTip

This commit is contained in:
Phenom 2021-02-18 18:38:58 +01:00
parent 33007f902f
commit e2e89dc971
17 changed files with 121 additions and 80 deletions

View file

@ -45,3 +45,14 @@ unsigned int NewsFeedUserNotify::getNewCount()
{
return mNewFeedCount;
}
QString NewsFeedUserNotify::getTrayMessage(bool plural)
{
return plural ? tr("You have %1 logged events") : tr("You have %1 logged event");
}
QString NewsFeedUserNotify::getNotifyMessage(bool plural)
{
return plural ? tr("%1 logged events") : tr("%1 logged event");
}

View file

@ -29,16 +29,18 @@ class NewsFeedUserNotify : public UserNotify
{
Q_OBJECT
virtual QString textInfo() const override { return tr("logged event(s)"); }
public:
NewsFeedUserNotify(NewsFeed *newsFeed, QObject *parent = 0);
explicit NewsFeedUserNotify(NewsFeed *newsFeed, QObject *parent = 0);
private slots:
void newsFeedChanged(int count);
private:
virtual QIcon getMainIcon(bool hasNew);
virtual unsigned int getNewCount();
virtual QIcon getMainIcon(bool hasNew) override;
virtual unsigned int getNewCount() override;
virtual QString getTrayMessage(bool plural) override;
virtual QString getNotifyMessage(bool plural) override;
private:
unsigned int mNewFeedCount;