-rw-r--r-- | core/pim/today/today.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 35758d5..34ec3cb 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp @@ -114,6 +114,8 @@ void Today::init() { m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); m_allApplets = cfg.readListEntry( "AllApplets", ',' ); + cfg.setGroup( "General" ); + m_iconSize = cfg.readNumEntry( "IconSize", 18 ); } @@ -135,7 +137,6 @@ void Today::loadPlugins() { QStringList list = dir.entryList(); QStringList::Iterator it; - QMap<QString, TodayPlugin> tempList; for ( it = list.begin(); it != list.end(); ++it ) { @@ -163,9 +164,11 @@ void Today::loadPlugins() { plugin.guiBox = new QWidget( this ); QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox ); QPixmap plugPix; - plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( 18, 18 ), 0 ); + plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( m_iconSize, m_iconSize ), 0 ); OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox ); plugIcon->setPixmap( plugPix ); + plugIcon->setName( plugin.guiPart->appName() ); + connect( plugIcon, SIGNAL( clicked() ), this, SLOT( startApplication() ) ); // a scrollview for each plugin QScrollView* sv = new QScrollView( plugin.guiBox ); QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() ); @@ -311,6 +314,11 @@ void Today::startAddressbook() { } +void Today::startApplication() { + QCopEnvelope e( "QPE/System", "execute(QString)" ); + e << QString( sender()->name() ); +} + /** * launch addressbook (personal card) */ |