~ubuntu-branches/ubuntu/jaunty/psi/jaunty

« back to all changes in this revision

Viewing changes to src/psitrayicon.h

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2008-04-14 18:57:30 UTC
  • mfrom: (2.1.9 hardy)
  • Revision ID: james.westby@ubuntu.com-20080414185730-528re3zp0m2hdlhi
Tags: 0.11-8
* added CONFIG -= link_prl to .pro files and removed dependencies
  which are made unnecessary by this change
* Fix segfault when closing last chat tab with qt4.4
  (This is from upstream svn, rev. 1101) (Closes: Bug#476122)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef PSITRAYICON_H
 
2
#define PSITRAYICON_H
 
3
 
 
4
#include <QObject>
 
5
#include <QRgb>
 
6
#include <QSystemTrayIcon>
 
7
 
 
8
class PsiIcon;
 
9
class TrayIcon; // old
 
10
class QMenu;
 
11
class QPoint;
 
12
class QPixmap;
 
13
 
 
14
class PsiTrayIcon : public QObject
 
15
{
 
16
        Q_OBJECT
 
17
public:
 
18
        PsiTrayIcon(const QString &tip, QMenu *popup, bool old = true, QObject *parent=0);
 
19
        ~PsiTrayIcon();
 
20
 
 
21
        void setContextMenu(QMenu*);
 
22
        void setToolTip(const QString &);
 
23
        void setIcon(const PsiIcon *, bool alert = false);
 
24
        void setAlert(const PsiIcon *);
 
25
        bool isAnimating() const;
 
26
 
 
27
        bool isWMDock();
 
28
 
 
29
signals:
 
30
        void clicked(const QPoint &, int);
 
31
        void doubleClicked(const QPoint &);
 
32
        void closed();
 
33
 
 
34
public slots:
 
35
        void show();
 
36
        void hide();
 
37
 
 
38
private slots:
 
39
        void animate();
 
40
        void trayicon_activated(QSystemTrayIcon::ActivationReason);
 
41
 
 
42
protected:
 
43
        QPixmap makeIcon();
 
44
        QRgb pixelBlend(QRgb p1, QRgb p2);
 
45
 
 
46
private:
 
47
        bool old_;
 
48
        PsiIcon* icon_;
 
49
        TrayIcon* old_trayicon_; // old
 
50
        QSystemTrayIcon* trayicon_;
 
51
};
 
52
 
 
53
 
 
54
#endif