summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/plugins/datebook/datebookevent.cpp4
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.cpp6
-rw-r--r--core/pim/today/today.cpp58
-rw-r--r--core/pim/today/today.h9
-rw-r--r--core/pim/today/todaybase.cpp16
-rw-r--r--core/pim/today/todayconfig.cpp4
6 files changed, 40 insertions, 57 deletions
diff --git a/core/pim/today/plugins/datebook/datebookevent.cpp b/core/pim/today/plugins/datebook/datebookevent.cpp
index 1caf061..d4e8e1e 100644
--- a/core/pim/today/plugins/datebook/datebookevent.cpp
+++ b/core/pim/today/plugins/datebook/datebookevent.cpp
@@ -32,2 +32,4 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
+ setAlignment( AlignTop );
+
QString msg;
@@ -92,4 +94,2 @@ QString DateBookEvent::ampmTime( QTime tm ) {
-//extern QPEApplication *todayApp;
-
/*
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
index e4667ae..7948656 100644
--- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
@@ -61,2 +61,4 @@ void DatebookPluginWidget::getDates() {
QVBoxLayout* layoutDates = new QVBoxLayout( this );
+ layoutDates->setSpacing( 1 );
+ layoutDates->setMargin( 1 );
@@ -107,4 +109,4 @@ void DatebookPluginWidget::getDates() {
}
-
- layoutDates->addItem( new QSpacerItem( 1,1, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
+ //layoutDates->addStretch(0);
+// layoutDates->addItem( new QSpacerItem( 1,1, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
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];
- if ( m_excludeApplets.grep( plugin.name ).isEmpty() ) {
- qDebug("CONFIG " + plugin.name + " ACTIVE");
- plugin.active = true;
- } else {
- qDebug("CONFIG " + plugin.name + " INACTIVE");
- plugin.active = false;
- }
- plugList.append( plugin );
- }
- pluginList = plugList;
+/**
+ * Refresh for the view. Reload all applets
+ *
+ */
+void Today::refresh() {
+ init();
- draw();
+ if ( layout ) {
+ delete layout;
}
-}
+ 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() {
diff --git a/core/pim/today/today.h b/core/pim/today/today.h
index 0a9a705..672adc4 100644
--- a/core/pim/today/today.h
+++ b/core/pim/today/today.h
@@ -44,8 +44,7 @@ class Today : public TodayBase {
- private slots:
+private slots:
void startConfig();
void startAddressbook();
- void launchApp( QString appName );
void editCard();
- void draw();
+ void refresh();
@@ -56,2 +55,4 @@ private:
void loadPlugins();
+ void draw();
+
@@ -64,4 +65,2 @@ private slots:
- QVBoxLayout *pluginLayout;
-
// QString m_autoStartTimer;
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp
index 74f4fa0..800ca5d 100644
--- a/core/pim/today/todaybase.cpp
+++ b/core/pim/today/todaybase.cpp
@@ -36,2 +36,4 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
+ QVBoxLayout *mainLayout = new QVBoxLayout( this );
+
QPalette pal = this->palette();
@@ -79,5 +81,5 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
// Opiezilla
- QLabel* Opiezilla = new QLabel( Frame, "OpieZilla");
+ QLabel* Opiezilla = new QLabel( Frame, "OpieZilla" );
Opiezilla->setPixmap( opiezilla );
- Opiezilla->setGeometry( QApplication::desktop()->width()-50 ,1, 45, 47);
+ Opiezilla->setGeometry( QApplication::desktop()->width()-50 ,1, 45, 47 );
Opiezilla->setBackgroundOrigin( QLabel::ParentOrigin );
@@ -86,3 +88,3 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
OwnerField = new OClickableLabel( this , "Owner" );
- OwnerField->setGeometry( QRect( 0,0, this->width(), 12 ));
+ OwnerField->setGeometry( QRect( 0, 0, this->width(), 12 ) );
OwnerField->setAlignment( int (QLabel::AlignTop | QLabel::AlignLeft ) );
@@ -92,9 +94,5 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
ConfigButton = new OClickableLabel ( Frame, "PushButton1" );
- ConfigButton->setGeometry( QRect( QApplication::desktop()->width()-80, 30, 25, 21 ) );
- ConfigButton->setPixmap( config );
+ ConfigButton->setGeometry( QRect( QApplication::desktop()->width()-80, 30, 25, 21 ) );
+ ConfigButton->setPixmap( config );
ConfigButton->setBackgroundOrigin( QLabel::ParentOrigin );
-
- // -- layout --
- layout->addWidget( Frame );
- layout->addWidget( OwnerField );
}
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp
index 79c4d1f..4f23471 100644
--- a/core/pim/today/todayconfig.cpp
+++ b/core/pim/today/todayconfig.cpp
@@ -59,4 +59,2 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal, WFlags
TabWidget3 = new QTabWidget( this, "TabWidget3" );
- // TabWidget3->setFrameShape( QFrame::NoFrame );
- //TabWidget3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, TabWidget3->sizePolicy().hasHeightForWidth() ) );
TabWidget3->setAutoMask( FALSE );
@@ -124,3 +122,3 @@ void TodayConfig::setAutoStart() {
QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" );
- e << QString( "remove");
+ e << QString( "remove" );
e << QString( "today" );