-rw-r--r-- | core/pim/today/today.cpp | 20 |
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 @@ -43,3 +43,3 @@ struct TodayPlugin { TodayPluginObject *guiPart; - QHBox *guiBox; + QWidget *guiBox; QString name; @@ -65,4 +65,2 @@ Today::Today( QWidget* parent, const char* name, WFlags fl ) - // pluginLayout = 0l; - setOwnerField(); @@ -167,3 +165,6 @@ void Today::loadPlugins() { - plugin.guiBox = new QHBox( this ); + // package the whole thing into a qwidget so it can be shown and hidden + plugin.guiBox = new QWidget( this ); + QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox ); + QPixmap plugPix; @@ -172,2 +173,4 @@ void Today::loadPlugins() { plugIcon->setPixmap( plugPix ); + + // a scrollview for each plugin QScrollView* sv = new QScrollView( plugin.guiBox ); @@ -181,6 +184,7 @@ void Today::loadPlugins() { - //plugin.guiBox->addWidget( plugIcon, 0, AlignTop ); - //plugin.guiBox->addWidget( sv, 0, AlignTop ); - plugin.guiBox->setStretchFactor( plugIcon, 1 ); - plugin.guiBox->setStretchFactor( sv, 9 ); + // make sure the icon is on the top alligned + boxLayout->addWidget( plugIcon, 0, AlignTop ); + boxLayout->addWidget( sv, 0, AlignTop ); + boxLayout->setStretchFactor( plugIcon, 1 ); + boxLayout->setStretchFactor( sv, 9 ); layout->addWidget( plugin.guiBox ); |