~mitya57/sni-qt/fix-pixmap-types

« back to all changes in this revision

Viewing changes to src/statusnotifieritem.cpp

  • Committer: Aurelien Gateau
  • Date: 2011-06-01 17:09:33 UTC
  • Revision ID: aurelien.gateau@canonical.com-20110601170933-h6d9jygwwj4qrwgh
Imported

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of the appmenu-qt project
 
2
   Copyright 2011 Canonical
 
3
   Author: Aurelien Gateau <aurelien.gateau@canonical.com>
 
4
 
 
5
   This library is free software; you can redistribute it and/or
 
6
   modify it under the terms of the GNU Library General Public
 
7
   License (LGPL) as published by the Free Software Foundation;
 
8
   either version 2 of the License, or (at your option) any later
 
9
   version.
 
10
 
 
11
   This library is distributed in the hope that it will be useful,
 
12
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
14
   Library General Public License for more details.
 
15
 
 
16
   You should have received a copy of the GNU Library General Public License
 
17
   along with this library; see the file COPYING.LIB.  If not, write to
 
18
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
19
   Boston, MA 02110-1301, USA.
 
20
*/
 
21
#include "statusnotifieritem.h"
 
22
 
 
23
// dbusmenu-qt
 
24
#include <dbusmenuexporter.h>
 
25
 
 
26
// Qt
 
27
#include <QDebug>
 
28
#include <QtPlugin>
 
29
 
 
30
StatusNotifierItem::StatusNotifierItem(QSystemTrayIcon* icon)
 
31
: QAbstractSystemTrayIconSys(icon)
 
32
{}
 
33
 
 
34
StatusNotifierItem::~StatusNotifierItem()
 
35
{}
 
36
 
 
37
QRect StatusNotifierItem::geometry() const
 
38
{
 
39
    return QRect();
 
40
}
 
41
 
 
42
void StatusNotifierItem::updateVisibility()
 
43
{
 
44
    qDebug() << __FUNCTION__;
 
45
}
 
46
 
 
47
void StatusNotifierItem::updateIcon()
 
48
{
 
49
    qDebug() << __FUNCTION__;
 
50
}
 
51
 
 
52
void StatusNotifierItem::updateToolTip()
 
53
{
 
54
    qDebug() << __FUNCTION__;
 
55
}
 
56
 
 
57
void StatusNotifierItem::showMessage(const QString &message, const QString &title,
 
58
    QSystemTrayIcon::MessageIcon icon, int msecs)
 
59
{
 
60
    qDebug() << __FUNCTION__ << message;
 
61
}
 
62
 
 
63
//////////////////////////////////////////////////////////////
 
64
QAbstractSystemTrayIconSys* StatusNotifierItemFactory::create(QSystemTrayIcon* sys)
 
65
{
 
66
    return new StatusNotifierItem(sys);
 
67
}
 
68
 
 
69
bool StatusNotifierItemFactory::isAvailable() const
 
70
{
 
71
    return true;
 
72
}
 
73
 
 
74
Q_EXPORT_PLUGIN2(statusnotifieritem, StatusNotifierItemFactory)
 
75
 
 
76
#include <statusnotifieritem.moc>