Ejemplo n.º 1
0
void SysTrayIcon::slotJobDone( Choqok::JobResult result )
{
    kDebug();
    if ( result == Choqok::Success ) {
        setOverlayIconByName( "task-complete" );
    } else {
        setOverlayIconByName( "task-reject" );
    }
    QTimer::singleShot( 5000, this, SLOT( slotRestoreIcon() ) );
}
Ejemplo n.º 2
0
void KopeteSystemTray::slotReevaluateAccountStates()
{
	// If there is a pending message, we don't need to refresh the system tray now.
	// This function will even be called when the animation will stop.
	if ( mBlinkTimer->isActive() )
		return;

	Kopete::OnlineStatus highestStatus;
	foreach ( Kopete::Account *account, Kopete::AccountManager::self()->accounts())
	{
		if ( account->myself() && account->myself()->onlineStatus() > highestStatus )
		{
			highestStatus = account->myself()->onlineStatus();
		}
	}

	switch ( highestStatus.status() )
	{
		case Kopete::OnlineStatus::Unknown:
		case Kopete::OnlineStatus::Offline:
		case Kopete::OnlineStatus::Connecting:
		{
			setIconByName("kopete-offline");
			setOverlayIconByName("user-offline");
			break;
		}
		case Kopete::OnlineStatus::Invisible:
		{
			setIconByName(mKopeteIcon);
			setOverlayIconByName("user-invisible");
			break;
		}
		case Kopete::OnlineStatus::Away:
		{
			setIconByName(mKopeteIcon);
			setOverlayIconByName("user-away");
			break;
		}
		case Kopete::OnlineStatus::Busy:
		{
			setIconByName(mKopeteIcon);
			setOverlayIconByName("user-busy");
			break;
		}
		case Kopete::OnlineStatus::Online:
		{
			setIconByName(mKopeteIcon);
			setOverlayIconByName(QString());
			break;
		}
	}
}
Ejemplo n.º 3
0
Archivo: tray.cpp Proyecto: KDE/kget
// display a play icon when downloading and
// switch between Active or Passive state
void Tray::setDownloading( bool downloading )
{
    kDebug(5001) << "Tray::setDownloading";

    if (downloading)
    {
        if (status() == KStatusNotifierItem::Active)
            return;
        setStatus(KStatusNotifierItem::Active);
        setOverlayIconByName("media-playback-start");
    }
    else
    {
        if (status() == KStatusNotifierItem::Passive)
            return;
        setStatus(KStatusNotifierItem::Passive);
        setOverlayIconByName(QString());
    } 	
}
Ejemplo n.º 4
0
void SysTrayIcon::slotRestoreIcon()
{
    setOverlayIconByName(QString());
    updateUnreadCount( 0 );
}