summaryrefslogtreecommitdiff
path: root/core/pim/today/today.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/today/today.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/today/today.cpp54
1 files changed, 20 insertions, 34 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index f052a9f..7537631 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -66,5 +66,3 @@ Today::Today( QWidget* parent, const char* name, WFlags fl )
setOwnerField();
- init();
- loadPlugins();
- draw();
+ refresh();
showMaximized();
@@ -120,3 +118,2 @@ void Today::init() {
Config cfg( "today" );
-
cfg.setGroup( "Applets" );
@@ -138,2 +135,3 @@ void Today::loadPlugins() {
+
QString path = QPEApplication::qpeDir() + "/plugins/today";
@@ -144,3 +142,2 @@ void Today::loadPlugins() {
- uint count = 0;
for ( it = list.begin(); it != list.end(); ++it ) {
@@ -158,2 +155,3 @@ void Today::loadPlugins() {
+ // find out if plugins should be shown
if ( m_excludeApplets.grep( *it ).isEmpty() ) {
@@ -178,3 +176,2 @@ void Today::loadPlugins() {
sv->setMinimumHeight( plugin.guiPart->minHeight() );
- //sv->setMaximumHeight( plugin.guiPart->maxHeight() );
sv->setResizePolicy( QScrollView::AutoOneFit );
@@ -192,3 +189,2 @@ void Today::loadPlugins() {
pluginList.append( plugin );
- count++;
} else {
@@ -233,4 +229,4 @@ void Today::draw() {
}
-
- layout->addItem( new QSpacerItem( 1,1, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
+ //layout->addStretch(0);
+ //layout->addItem( new QSpacerItem( 1,1, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
}
@@ -246,3 +242,2 @@ void Today::startConfig() {
TodayPlugin plugin;
-
QList<ConfigWidget> configWidgetList;
@@ -269,25 +264,24 @@ void Today::startConfig() {
}
+ refresh();
+ }
+}
- init();
- TodayPlugin plugin;
- QValueList<TodayPlugin> plugList;
- for ( uint i = 0; i < pluginList.count(); i++ ) {
- plugin = pluginList[i];
+/**
+ * Refresh for the view. Reload all applets
+ *
+ */
+void Today::refresh() {
+ init();
- if ( m_excludeApplets.grep( plugin.name ).isEmpty() ) {
- qDebug("CONFIG " + plugin.name + " ACTIVE");
- plugin.active = true;
- } else {
- qDebug("CONFIG " + plugin.name + " INACTIVE");
- plugin.active = false;
+ if ( layout ) {
+ delete layout;
}
- plugList.append( plugin );
- }
- pluginList = plugList;
+ layout = new QVBoxLayout( this );
+ layout->addWidget( Frame );
+ layout->addWidget( OwnerField );
+ loadPlugins();
draw();
}
-}
-
@@ -310,10 +304,2 @@ void Today::editCard() {
-/*
- * launches an App
- */
-void Today::launchApp( QString appName ) {
- QCopEnvelope e( "QPE/System", "execute(QString)" );
- e << QString( appName );
-}
-
Today::~Today() {