summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-10-05 20:46:18 (UTC)
committer harlekin <harlekin>2002-10-05 20:46:18 (UTC)
commitd7f9d00fcc9261db9c4af4f1b4afde9d50e8a2a2 (patch) (side-by-side diff)
tree3afa0409bea98ca92ebfa269485f0845b3c96b6a
parentab196dbed05f9e534709a9c0b7f44eca65a72929 (diff)
downloadopie-d7f9d00fcc9261db9c4af4f1b4afde9d50e8a2a2.zip
opie-d7f9d00fcc9261db9c4af4f1b4afde9d50e8a2a2.tar.gz
opie-d7f9d00fcc9261db9c4af4f1b4afde9d50e8a2a2.tar.bz2
buttons resizable and clickable again
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/changelog4
-rw-r--r--core/pim/today/opie-today.control2
-rw-r--r--core/pim/today/plugins/datebook/datebookplugin.cpp4
-rw-r--r--core/pim/today/plugins/mail/mailplugin.cpp6
-rw-r--r--core/pim/today/plugins/todolist/todoplugin.cpp4
-rw-r--r--core/pim/today/plugins/todolist/todopluginwidget.cpp2
-rw-r--r--core/pim/today/today.cpp14
-rw-r--r--core/pim/today/today.h6
-rw-r--r--core/pim/today/todayconfig.cpp22
-rw-r--r--core/pim/today/todayconfig.h2
10 files changed, 49 insertions, 17 deletions
diff --git a/core/pim/today/changelog b/core/pim/today/changelog
index 5fd3284..25d63ef 100644
--- a/core/pim/today/changelog
+++ b/core/pim/today/changelog
@@ -1,4 +1,8 @@
+0.5.1
+
+* icons scalable and clickable again
+
0.5
* now fully plugin based
diff --git a/core/pim/today/opie-today.control b/core/pim/today/opie-today.control
index 6ea5090..28087f9 100644
--- a/core/pim/today/opie-today.control
+++ b/core/pim/today/opie-today.control
@@ -2,9 +2,9 @@ Files: bin/today apps/1Pim/today.desktop pics/today/*
Priority: optional
Section: opie/applications
Maintainer: Maximilian Reiß <harlekin@handhelds.org>
Architecture: arm
-Version: 0.5-$SUB_VERSION
+Version: 0.5.1-$SUB_VERSION
Depends: opie-base ($QPE_VERSION), libopie ($QPE_VERSION)
License: GPL
Description: today screen
This today screen app gives an overview of appointments
diff --git a/core/pim/today/plugins/datebook/datebookplugin.cpp b/core/pim/today/plugins/datebook/datebookplugin.cpp
index 4ebb178..cacdb65 100644
--- a/core/pim/today/plugins/datebook/datebookplugin.cpp
+++ b/core/pim/today/plugins/datebook/datebookplugin.cpp
@@ -29,9 +29,9 @@ DatebookPlugin::DatebookPlugin() {
DatebookPlugin::~DatebookPlugin() {
}
QString DatebookPlugin::pluginName() const {
- return "Datebook plugin";
+ return QObject::tr( "Datebook plugin");
}
double DatebookPlugin::versionNumber() const {
return 1.0;
@@ -53,7 +53,7 @@ TodayConfigWidget* DatebookPlugin::configWidget( QWidget* wid ) {
return new DatebookPluginConfig( wid , "Datebook" );
}
QString DatebookPlugin::appName() const {
- return QObject::tr( "Datebook" );
+ return "datebook";
}
diff --git a/core/pim/today/plugins/mail/mailplugin.cpp b/core/pim/today/plugins/mail/mailplugin.cpp
index 3ddf16e..1c90df4 100644
--- a/core/pim/today/plugins/mail/mailplugin.cpp
+++ b/core/pim/today/plugins/mail/mailplugin.cpp
@@ -25,13 +25,13 @@ MailPlugin::MailPlugin() {
MailPlugin::~MailPlugin() {
}
QString MailPlugin::pluginName() const {
- return "Mail plugin";
+ return QObject::tr( "Mail plugin" );
}
double MailPlugin::versionNumber() const {
- return 0.5;
+ return 0.6;
}
QString MailPlugin::pixmapNameWidget() const {
return "mail/desktopicon";
@@ -49,8 +49,8 @@ TodayConfigWidget* MailPlugin::configWidget( QWidget* wid ) {
return 0l;
}
QString MailPlugin::appName() const {
- return "Mail";
+ return "mail";
}
diff --git a/core/pim/today/plugins/todolist/todoplugin.cpp b/core/pim/today/plugins/todolist/todoplugin.cpp
index 19d9f37..09b54af 100644
--- a/core/pim/today/plugins/todolist/todoplugin.cpp
+++ b/core/pim/today/plugins/todolist/todoplugin.cpp
@@ -27,9 +27,9 @@ TodolistPlugin::TodolistPlugin() {
TodolistPlugin::~TodolistPlugin() {
}
QString TodolistPlugin::pluginName() const {
- return "Todolist plugin";
+ return QObject::tr( "Todolist plugin" );
}
double TodolistPlugin::versionNumber() const {
return 0.7;
@@ -51,8 +51,8 @@ TodayConfigWidget* TodolistPlugin::configWidget( QWidget* wid ) {
return new TodolistPluginConfig( wid , "Todolist" );
}
QString TodolistPlugin::appName() const {
- return QObject::tr( "Todolist" );
+ return "todolist";
}
diff --git a/core/pim/today/plugins/todolist/todopluginwidget.cpp b/core/pim/today/plugins/todolist/todopluginwidget.cpp
index d793aae..320969e 100644
--- a/core/pim/today/plugins/todolist/todopluginwidget.cpp
+++ b/core/pim/today/plugins/todolist/todopluginwidget.cpp
@@ -29,9 +29,9 @@
TodolistPluginWidget::TodolistPluginWidget( QWidget *parent, const char* name )
: QWidget( parent, name ) {
- todoLabel= 0l;
+ todoLabel = 0l;
todo = 0l;
if ( todo ) {
delete todo;
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 35758d5..34ec3cb 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -113,8 +113,10 @@ void Today::init() {
cfg.setGroup( "Plugins" );
m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' );
m_allApplets = cfg.readListEntry( "AllApplets", ',' );
+ cfg.setGroup( "General" );
+ m_iconSize = cfg.readNumEntry( "IconSize", 18 );
}
/**
@@ -134,9 +136,8 @@ void Today::loadPlugins() {
QStringList list = dir.entryList();
QStringList::Iterator it;
-
QMap<QString, TodayPlugin> tempList;
for ( it = list.begin(); it != list.end(); ++it ) {
TodayPluginInterface *iface = 0;
@@ -162,11 +163,13 @@ void Today::loadPlugins() {
// 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;
- plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( 18, 18 ), 0 );
+ plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( m_iconSize, m_iconSize ), 0 );
OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox );
plugIcon->setPixmap( plugPix );
+ plugIcon->setName( plugin.guiPart->appName() );
+ connect( plugIcon, SIGNAL( clicked() ), this, SLOT( startApplication() ) );
// a scrollview for each plugin
QScrollView* sv = new QScrollView( plugin.guiBox );
QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() );
// not sure if that is good .-)
@@ -250,9 +253,9 @@ void Today::draw() {
void Today::startConfig() {
TodayConfig conf( this, "dialog", true );
- TodayPlugin plugin;
+ TodayPlugin plugin;
QList<TodayConfigWidget> configWidgetList;
for ( int i = pluginList.count() - 1 ; i >= 0; i-- ) {
plugin = pluginList[i];
@@ -310,8 +313,13 @@ void Today::startAddressbook() {
e << QString( "addressbook" );
}
+void Today::startApplication() {
+ QCopEnvelope e( "QPE/System", "execute(QString)" );
+ e << QString( sender()->name() );
+}
+
/**
* launch addressbook (personal card)
*/
void Today::editCard() {
diff --git a/core/pim/today/today.h b/core/pim/today/today.h
index 92512b9..6f13df6 100644
--- a/core/pim/today/today.h
+++ b/core/pim/today/today.h
@@ -31,9 +31,9 @@
#include "todaybase.h"
#include <opie/todayplugininterface.h>
class QVBoxLayout;
-
+class OClickableLabel;
class Today : public TodayBase {
@@ -45,8 +45,9 @@ class Today : public TodayBase {
private slots:
void startConfig();
void startAddressbook();
+ void startApplication();
void editCard();
void refresh();
private:
@@ -63,11 +64,10 @@ private slots:
TodayConfig *conf;
QStringList m_excludeApplets;
QStringList m_allApplets;
- // QString m_autoStartTimer;
int m_newStart;
- // int m_autoStart;
+ int m_iconSize;
int m_maxCharClip;
};
#endif
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp
index 3fc5830..097965b 100644
--- a/core/pim/today/todayconfig.cpp
+++ b/core/pim/today/todayconfig.cpp
@@ -28,8 +28,9 @@
#include <qheader.h>
#include <qhbox.h>
#include <qvbox.h>
#include <qtoolbutton.h>
+#include <qtooltip.h>
class ToolButton : public QToolButton {
public:
@@ -80,13 +81,21 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal, WFlags
TextLabel2 = new QLabel( hbox_auto, "AutoStart" );
TextLabel2->setText( tr( "autostart on \nresume?\n (Opie only)" ) );
CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" );
QHBox *hbox_inactive = new QHBox( tab_3 );
- TimeLabel = new QLabel( hbox_inactive , "TimeLabel" );
+ TimeLabel = new QLabel( hbox_inactive, "TimeLabel" );
TimeLabel->setText( tr( "minutes inactive" ) );
SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner" );
+ QHBox *hbox_iconSize = new QHBox( tab_3 );
+ QLabel *iconSizeLabel = new QLabel( hbox_iconSize, "iconSizeLabel" );
+ iconSizeLabel->setText( tr( "Icon size" ) );
+ // iconSizeLabel->setToolTip( tr( "Set the icon size in pixel" ) );
+ SpinBoxIconSize = new QSpinBox( hbox_iconSize, "TimeSpinner" );
+ SpinBoxIconSize->setMaxValue( 32 );
+
tab3Layout->addWidget( hbox_auto );
tab3Layout->addWidget( hbox_inactive );
+ tab3Layout->addWidget( hbox_iconSize );
TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) );
m_applets_changed = false;
@@ -107,9 +116,9 @@ void TodayConfig::setAutoStart() {
if ( m_autoStart ) {
QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" );
e << QString( "add" );
e << QString( "today" );
- e << QString("%1").arg( m_autoStartTimer );
+ e << QString( "%1" ).arg( m_autoStartTimer );
} else {
QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" );
e << QString( "remove" );
e << QString( "today" );
@@ -126,8 +135,12 @@ void TodayConfig::readConfig() {
CheckBoxAuto->setChecked( m_autoStart );
m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 );
SpinBoxTime->setValue( m_autoStartTimer );
+ cfg.setGroup( "General" );
+ m_iconSize = cfg.readNumEntry( "IconSize", 18 );
+ SpinBoxIconSize->setValue( m_iconSize );
+
cfg.setGroup( "Plugins" );
m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' );
}
@@ -167,8 +180,13 @@ void TodayConfig::writeConfig() {
m_autoStart = CheckBoxAuto->isChecked();
cfg.writeEntry( "autostart", m_autoStart );
m_autoStartTimer = SpinBoxTime->value();
cfg.writeEntry( "autostartdelay", m_autoStartTimer );
+ m_iconSize = SpinBoxIconSize->value();
+
+ cfg.setGroup( "General" );
+ cfg.writeEntry( "IconSize", m_iconSize );
+
// set autostart settings
setAutoStart();
}
diff --git a/core/pim/today/todayconfig.h b/core/pim/today/todayconfig.h
index f23b850..aa227dd 100644
--- a/core/pim/today/todayconfig.h
+++ b/core/pim/today/todayconfig.h
@@ -54,8 +54,9 @@ private:
QMap<QString,QCheckListItem*> m_applets;
int m_autoStart;
int m_autoStartTimer;
+ int m_iconSize;
QStringList m_excludeApplets;
bool m_applets_changed;
QLabel* TextLabel2;
@@ -65,7 +66,8 @@ private:
QLabel* TextLabel1;
QSpinBox* SpinBox7;
QLabel* TimeLabel;
QSpinBox* SpinBoxTime;
+ QSpinBox* SpinBoxIconSize;
};
#endif