|
|
@ -29,9 +29,9 @@
|
|
|
|
#include "kaboutdata.h"
|
|
|
|
#include "kaboutdata.h"
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef Q_WS_X11
|
|
|
|
#ifdef Q_WS_X11
|
|
|
|
#include <kwin.h>
|
|
|
|
#include <kwin.h>
|
|
|
|
#include <kwinmodule.h>
|
|
|
|
#include <kwinmodule.h>
|
|
|
|
#include <qxembed.h>
|
|
|
|
#include <qxembed.h>
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#include <kiconloader.h>
|
|
|
|
#include <kiconloader.h>
|
|
|
@ -62,7 +62,7 @@ KSystemTray::KSystemTray( QWidget* parent, const char* name )
|
|
|
|
#ifdef Q_WS_X11
|
|
|
|
#ifdef Q_WS_X11
|
|
|
|
QXEmbed::initialize();
|
|
|
|
QXEmbed::initialize();
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
d = new KSystemTrayPrivate;
|
|
|
|
d = new KSystemTrayPrivate;
|
|
|
|
d->actionCollection = new KActionCollection(this);
|
|
|
|
d->actionCollection = new KActionCollection(this);
|
|
|
|
|
|
|
|
|
|
|
@ -95,6 +95,9 @@ KSystemTray::KSystemTray( QWidget* parent, const char* name )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
setCaption( KGlobal::instance()->aboutData()->programName());
|
|
|
|
setCaption( KGlobal::instance()->aboutData()->programName());
|
|
|
|
setAlignment( alignment() | Qt::AlignVCenter | Qt::AlignHCenter );
|
|
|
|
setAlignment( alignment() | Qt::AlignVCenter | Qt::AlignHCenter );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Handle the possibility that the requested system tray size is something other than 22x22 pixels, per the Free Desktop specifications
|
|
|
|
|
|
|
|
setScaledContents(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KSystemTray::~KSystemTray()
|
|
|
|
KSystemTray::~KSystemTray()
|
|
|
@ -306,7 +309,7 @@ KActionCollection* KSystemTray::actionCollection()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return d->actionCollection;
|
|
|
|
return d->actionCollection;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QPixmap KSystemTray::loadIcon( const QString &icon, KInstance *instance )
|
|
|
|
QPixmap KSystemTray::loadIcon( const QString &icon, KInstance *instance )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
KConfig *appCfg = kapp->config();
|
|
|
|
KConfig *appCfg = kapp->config();
|
|
|
@ -315,6 +318,11 @@ QPixmap KSystemTray::loadIcon( const QString &icon, KInstance *instance )
|
|
|
|
return instance->iconLoader()->loadIcon( icon, KIcon::Panel, iconWidth );
|
|
|
|
return instance->iconLoader()->loadIcon( icon, KIcon::Panel, iconWidth );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QPixmap KSystemTray::loadSizedIcon( const QString &icon, int iconWidth, KInstance *instance )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return instance->iconLoader()->loadIcon( icon, KIcon::Panel, iconWidth );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KSystemTray::setPixmap( const QPixmap& p )
|
|
|
|
void KSystemTray::setPixmap( const QPixmap& p )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QLabel::setPixmap( p );
|
|
|
|
QLabel::setPixmap( p );
|
|
|
|