File indexing completed on 2024-09-08 07:33:56
0001 /*************************************************************************** 0002 trayicon.h - description 0003 ------------------- 0004 begin : Tue Dec 11 2001 0005 copyright : (C) 2001-2002 by Tim Jansen 0006 email : tim@tjansen.de 0007 ***************************************************************************/ 0008 0009 /*************************************************************************** 0010 * * 0011 * This program is free software; you can redistribute it and/or modify * 0012 * it under the terms of the GNU General Public License as published by * 0013 * the Free Software Foundation; either version 2 of the License, or * 0014 * (at your option) any later version. * 0015 * * 0016 ***************************************************************************/ 0017 0018 #ifndef TRAYICON_H 0019 #define TRAYICON_H 0020 0021 #include <QHash> 0022 0023 #include <KStatusNotifierItem> 0024 0025 class RfbClient; 0026 class ClientActions; 0027 0028 /** 0029 * Implements the trayicon. 0030 * @author Tim Jansen 0031 */ 0032 0033 class TrayIcon : public KStatusNotifierItem 0034 { 0035 Q_OBJECT 0036 public: 0037 explicit TrayIcon(QWidget *mainWindow); 0038 0039 public Q_SLOTS: 0040 void onClientConnected(RfbClient *client); 0041 void onClientDisconnected(RfbClient *client); 0042 void showAbout(); 0043 0044 private: 0045 QAction *m_aboutAction; 0046 QHash<RfbClient*, ClientActions*> m_clientActions; 0047 }; 0048 0049 #endif