SysTrayIcon::SysTrayIcon( Choqok::UI::MainWindow* parent ) : KStatusNotifierItem( parent ), _mainwin(parent), isOffline(false) { kDebug(); unread = 0; setAssociatedWidget(parent); setCategory(ApplicationStatus); setStandardActionsEnabled(false); setStatus(Active); setIconByName( currentIconName() ); }
BangarangNotifierItem::BangarangNotifierItem(QObject* parent) : KStatusNotifierItem(parent) { setTitle(i18n("Bangarang")); setIconByName("bangarang-notifier"); setStandardActionsEnabled(false); connect(this, SIGNAL(scrollRequested(int,Qt::Orientation)), this, SLOT(handleScrollRequested(int,Qt::Orientation))); connect(this, SIGNAL(secondaryActivateRequested(QPoint)), this, SLOT(handleMiddleClick())); }
KrcdNotifierItem::KrcdNotifierItem(){ setCategory(KStatusNotifierItem::Hardware); updateTray(); setContextMenu(&m_menu); // No need for close button... setStandardActionsEnabled(false); setAssociatedWidget(&m_menu); updateContextMenu(); QDBusConnection::sessionBus().connect(QLatin1String( "org.kde.kded" ), QLatin1String( "/modules/kremotecontroldaemon" ), QLatin1String( "org.kde.krcd" ), QLatin1String( "connectionChanged" ), this, SLOT(updateTray())); QDBusConnection::sessionBus().connect(QLatin1String( "org.kde.kded" ), QLatin1String( "/modules/kremotecontroldaemon" ), QLatin1String( "org.kde.krcd" ), QLatin1String( "remoteControlAdded" ), this, SLOT(updateTray())); QDBusConnection::sessionBus().connect(QLatin1String( "org.kde.kded" ), QLatin1String( "/modules/kremotecontroldaemon" ), QLatin1String( "org.kde.krcd" ), QLatin1String( "remoteControlAdded" ), this, SLOT(updateContextMenu())); QDBusConnection::sessionBus().connect(QLatin1String( "org.kde.kded" ), QLatin1String( "/modules/kremotecontroldaemon" ), QLatin1String( "org.kde.krcd" ), QLatin1String( "remoteControlRemoved" ), this, SLOT(updateTray())); QDBusConnection::sessionBus().connect(QLatin1String( "org.kde.kded" ), QLatin1String( "/modules/kremotecontroldaemon" ), QLatin1String( "org.kde.krcd" ), QLatin1String( "remoteControlRemoved" ), this, SLOT(updateContextMenu())); QDBusConnection::sessionBus().connect(QLatin1String( "org.kde.kded" ), QLatin1String( "/modules/kremotecontroldaemon" ), QLatin1String( "org.kde.krcd" ), QLatin1String( "buttonPressed" ), this, SLOT(flash())); QDBusConnection::sessionBus().connect(QLatin1String( "org.kde.kded" ), QLatin1String( "/modules/kremotecontroldaemon" ), QLatin1String( "org.kde.krcd" ), QLatin1String( "modeChanged" ), this, SLOT(updateContextMenu())); }