summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-09-17 17:53:32 (UTC)
committer harlekin <harlekin>2002-09-17 17:53:32 (UTC)
commitd09947cc7ead59747feb10679ba6ba0a9db20a74 (patch) (unidiff)
treee33a831e8002608817728bfe821650a2a45c56d7
parenta1b2f800f53715452f75153218e33fcd8907bbbf (diff)
downloadopie-d09947cc7ead59747feb10679ba6ba0a9db20a74.zip
opie-d09947cc7ead59747feb10679ba6ba0a9db20a74.tar.gz
opie-d09947cc7ead59747feb10679ba6ba0a9db20a74.tar.bz2
icons back to the to
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/today/today.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 2095174..f052a9f 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -41,7 +41,7 @@ struct TodayPlugin {
41 QLibrary *library; 41 QLibrary *library;
42 TodayPluginInterface *iface; 42 TodayPluginInterface *iface;
43 TodayPluginObject *guiPart; 43 TodayPluginObject *guiPart;
44 QHBox *guiBox; 44 QWidget *guiBox;
45 QString name; 45 QString name;
46 bool active; 46 bool active;
47 int pos; 47 int pos;
@@ -63,8 +63,6 @@ Today::Today( QWidget* parent, const char* name, WFlags fl )
63#endif 63#endif
64#endif 64#endif
65 65
66 // pluginLayout = 0l;
67
68 setOwnerField(); 66 setOwnerField();
69 init(); 67 init();
70 loadPlugins(); 68 loadPlugins();
@@ -165,11 +163,16 @@ void Today::loadPlugins() {
165 } 163 }
166 plugin.guiPart = plugin.iface->guiPart(); 164 plugin.guiPart = plugin.iface->guiPart();
167 165
168 plugin.guiBox = new QHBox( this ); 166 // package the whole thing into a qwidget so it can be shown and hidden
167 plugin.guiBox = new QWidget( this );
168 QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox );
169
169 QPixmap plugPix; 170 QPixmap plugPix;
170 plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( 18, 18 ), 0 ); 171 plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( 18, 18 ), 0 );
171 OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox ); 172 OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox );
172 plugIcon->setPixmap( plugPix ); 173 plugIcon->setPixmap( plugPix );
174
175 // a scrollview for each plugin
173 QScrollView* sv = new QScrollView( plugin.guiBox ); 176 QScrollView* sv = new QScrollView( plugin.guiBox );
174 QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() ); 177 QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() );
175 sv->setMinimumHeight( plugin.guiPart->minHeight() ); 178 sv->setMinimumHeight( plugin.guiPart->minHeight() );
@@ -179,10 +182,11 @@ void Today::loadPlugins() {
179 sv->setFrameShape( QFrame::NoFrame ); 182 sv->setFrameShape( QFrame::NoFrame );
180 sv->addChild( plugWidget ); 183 sv->addChild( plugWidget );
181 184
182 //plugin.guiBox->addWidget( plugIcon, 0, AlignTop ); 185 // make sure the icon is on the top alligned
183 //plugin.guiBox->addWidget( sv, 0, AlignTop ); 186 boxLayout->addWidget( plugIcon, 0, AlignTop );
184 plugin.guiBox->setStretchFactor( plugIcon, 1 ); 187 boxLayout->addWidget( sv, 0, AlignTop );
185 plugin.guiBox->setStretchFactor( sv, 9 ); 188 boxLayout->setStretchFactor( plugIcon, 1 );
189 boxLayout->setStretchFactor( sv, 9 );
186 layout->addWidget( plugin.guiBox ); 190 layout->addWidget( plugin.guiBox );
187 191
188 pluginList.append( plugin ); 192 pluginList.append( plugin );