예제 #1
0
KPassivePopup *KPassivePopup::message( int popupStyle, const QString &caption, const QString &text,
                       const QPixmap &icon, QSystemTrayIcon *parent, int timeout )
{
    KPassivePopup *pop = new KPassivePopup( );
    pop->setPopupStyle( popupStyle );
    pop->setAutoDelete( true );
    pop->setView( caption, text, icon );
    pop->d->hideDelay = timeout;
    QPoint pos = pop->calculateNearbyPoint(parent->geometry());
    pop->show(pos);
    pop->moveNear(parent->geometry());

    return pop;
}
예제 #2
0
KPassivePopup *KPassivePopup::message( int popupStyle, const QString &caption, const QString &text,
                                       const QPixmap &icon, WId parent, int timeout, const QPoint &p )
{
    KPassivePopup *pop = new KPassivePopup( parent );
    pop->setPopupStyle( popupStyle );
    pop->setAutoDelete( true );
    pop->setView( caption, text, icon );
    pop->d->hideDelay = timeout;
    if(p.isNull())
        pop->show();
    else
        pop->show(p);

    return pop;
}