-rw-r--r-- | core/pim/today/today.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 34ec3cb..dd98824 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -26,24 +26,25 @@ | |||
26 | #include <qpe/contact.h> | 26 | #include <qpe/contact.h> |
27 | 27 | ||
28 | #include <qdir.h> | 28 | #include <qdir.h> |
29 | #include <qfile.h> | 29 | #include <qfile.h> |
30 | #include <qpushbutton.h> | 30 | #include <qpushbutton.h> |
31 | #include <qlabel.h> | 31 | #include <qlabel.h> |
32 | #include <qtimer.h> | 32 | #include <qtimer.h> |
33 | #include <qpixmap.h> | 33 | #include <qpixmap.h> |
34 | #include <qlayout.h> | 34 | #include <qlayout.h> |
35 | #include <qhbox.h> | 35 | #include <qhbox.h> |
36 | #include <opie/otabwidget.h> | 36 | #include <opie/otabwidget.h> |
37 | #include <qdialog.h> | 37 | #include <qdialog.h> |
38 | #include <qwhatsthis.h> | ||
38 | 39 | ||
39 | 40 | ||
40 | struct TodayPlugin { | 41 | struct TodayPlugin { |
41 | QLibrary *library; | 42 | QLibrary *library; |
42 | TodayPluginInterface *iface; | 43 | TodayPluginInterface *iface; |
43 | TodayPluginObject *guiPart; | 44 | TodayPluginObject *guiPart; |
44 | QWidget *guiBox; | 45 | QWidget *guiBox; |
45 | QString name; | 46 | QString name; |
46 | bool active; | 47 | bool active; |
47 | int pos; | 48 | int pos; |
48 | }; | 49 | }; |
49 | 50 | ||
@@ -158,24 +159,25 @@ void Today::loadPlugins() { | |||
158 | } else { | 159 | } else { |
159 | plugin.active = false; | 160 | plugin.active = false; |
160 | } | 161 | } |
161 | plugin.guiPart = plugin.iface->guiPart(); | 162 | plugin.guiPart = plugin.iface->guiPart(); |
162 | 163 | ||
163 | // package the whole thing into a qwidget so it can be shown and hidden | 164 | // package the whole thing into a qwidget so it can be shown and hidden |
164 | plugin.guiBox = new QWidget( this ); | 165 | plugin.guiBox = new QWidget( this ); |
165 | QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox ); | 166 | QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox ); |
166 | QPixmap plugPix; | 167 | QPixmap plugPix; |
167 | plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( m_iconSize, m_iconSize ), 0 ); | 168 | plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( m_iconSize, m_iconSize ), 0 ); |
168 | OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox ); | 169 | OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox ); |
169 | plugIcon->setPixmap( plugPix ); | 170 | plugIcon->setPixmap( plugPix ); |
171 | QWhatsThis::add( plugIcon, tr("Click here to launch the associated app") ); | ||
170 | plugIcon->setName( plugin.guiPart->appName() ); | 172 | plugIcon->setName( plugin.guiPart->appName() ); |
171 | connect( plugIcon, SIGNAL( clicked() ), this, SLOT( startApplication() ) ); | 173 | connect( plugIcon, SIGNAL( clicked() ), this, SLOT( startApplication() ) ); |
172 | // a scrollview for each plugin | 174 | // a scrollview for each plugin |
173 | QScrollView* sv = new QScrollView( plugin.guiBox ); | 175 | QScrollView* sv = new QScrollView( plugin.guiBox ); |
174 | QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() ); | 176 | QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() ); |
175 | // not sure if that is good .-) | 177 | // not sure if that is good .-) |
176 | sv->setMinimumHeight( 10 ); | 178 | sv->setMinimumHeight( 10 ); |
177 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 179 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
178 | sv->setHScrollBarMode( QScrollView::AlwaysOff ); | 180 | sv->setHScrollBarMode( QScrollView::AlwaysOff ); |
179 | sv->setFrameShape( QFrame::NoFrame ); | 181 | sv->setFrameShape( QFrame::NoFrame ); |
180 | sv->addChild( plugWidget ); | 182 | sv->addChild( plugWidget ); |
181 | // make sure the icon is on the top alligned | 183 | // make sure the icon is on the top alligned |