Show count of new messages in the toolbar.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5394 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-08-08 10:48:29 +00:00
parent 121d49e5d1
commit 2921cbaf23
7 changed files with 85 additions and 17 deletions

View file

@ -1,9 +1,32 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2012 RetroShare Team
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
#ifndef USERNOTIFY_H
#define USERNOTIFY_H
#include <QObject>
#include <QSystemTrayIcon>
class QToolBar;
class QToolButton;
class QAction;
class UserNotify : public QObject
@ -13,7 +36,7 @@ class UserNotify : public QObject
public:
UserNotify(QObject *parent = 0);
void initialize(QAction *mainAction);
void initialize(QToolBar *mainToolBar, QAction *mainAction);
void createIcons(QMenu *notifyMenu);
virtual bool hasSetting(QString &/*name*/) { return false; }
@ -40,10 +63,12 @@ private:
virtual void iconClicked() {}
QAction *mMainIcon;
QToolButton *mMainToolButton;
QAction *mMainAction;
QSystemTrayIcon *mTrayIcon;
QAction *mNotifyIcon;
unsigned int newCount;
QString buttonText;
};
#endif // USERNOTIFY_H