00001 /* 00002 ** This file is part of Vidalia, and is subject to the license terms in the 00003 ** LICENSE file, found in the top level directory of this distribution. If you 00004 ** did not receive the LICENSE file with this file, you may obtain it from the 00005 ** Vidalia source package distributed by the Vidalia Project at 00006 ** http://www.vidalia-project.net/. No part of Vidalia, including this file, 00007 ** may be copied, modified, propagated, or distributed except according to the 00008 ** terms described in the LICENSE file. 00009 */ 00010 00011 /* 00012 ** \file trayicon_qt.h 00013 ** \version $Id: trayicon_qt.h 2362 2008-02-29 04:30:11Z edmanm $ 00014 ** \brief Tray icon wrapper around Qt's QSystemTrayIcon implementation 00015 */ 00016 00017 #ifndef _TRAYICON_QT_H 00018 #define _TRAYICON_QT_H 00019 00020 #include <QSystemTrayIcon> 00021 00022 00023 class TrayIconImpl : public QSystemTrayIcon 00024 { 00025 Q_OBJECT 00026 00027 protected: 00028 /** Default constructor. */ 00029 TrayIconImpl(QObject *parent = 0); 00030 00031 /** Modify the tray icon's image to <b>iconFile</b>. */ 00032 void setIcon(const QString &iconFile); 00033 00034 private slots: 00035 /** Called when the user interacts with the tray icon and propagates 00036 * double-click events to the parent object. */ 00037 void onActivated(QSystemTrayIcon::ActivationReason reason); 00038 }; 00039 00040 #endif 00041