summaryrefslogtreecommitdiff
Side-by-side diff
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,12 +1,16 @@
+0.5.1
+
+* icons scalable and clickable again
+
0.5
* now fully plugin based
0.3.4
* "fill our business card now a clickable label"
* Several bugfixes regarding todo section.
0.3.3
* Changed the logo so it better scales to bigger display and also
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
@@ -1,16 +1,16 @@
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
and todos.
It also shows incoming and outgoing mails from opiemail.
When using Opie (opie.handhelds.org) today can be autostarted
on resume.
It is highly configurable.
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
@@ -21,39 +21,39 @@
#include "datebookplugin.h"
#include "datebookpluginwidget.h"
#include "datebookpluginconfig.h"
DatebookPlugin::DatebookPlugin() {
}
DatebookPlugin::~DatebookPlugin() {
}
QString DatebookPlugin::pluginName() const {
- return "Datebook plugin";
+ return QObject::tr( "Datebook plugin");
}
double DatebookPlugin::versionNumber() const {
return 1.0;
}
QString DatebookPlugin::pixmapNameWidget() const {
return "DateBook";
}
QWidget* DatebookPlugin::widget( QWidget* wid ) {
return new DatebookPluginWidget( wid, "Datebook" );
}
QString DatebookPlugin::pixmapNameConfig() const {
return "DateBook";
}
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
@@ -17,40 +17,40 @@
#include "mailplugin.h"
#include "mailpluginwidget.h"
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";
}
QWidget* MailPlugin::widget( QWidget * wid ) {
return new MailPluginWidget( wid, "Mail" );
}
QString MailPlugin::pixmapNameConfig() const {
return 0l;
}
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
@@ -19,40 +19,40 @@
#include "todoplugin.h"
#include "todopluginconfig.h"
#include "todopluginwidget.h"
TodolistPlugin::TodolistPlugin() {
}
TodolistPlugin::~TodolistPlugin() {
}
QString TodolistPlugin::pluginName() const {
- return "Todolist plugin";
+ return QObject::tr( "Todolist plugin" );
}
double TodolistPlugin::versionNumber() const {
return 0.7;
}
QString TodolistPlugin::pixmapNameWidget() const {
return "TodoList";
}
QWidget* TodolistPlugin::widget( QWidget *wid ) {
return new TodolistPluginWidget( wid, "Todolist" );
}
QString TodolistPlugin::pixmapNameConfig() const {
return "TodoList";
}
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
@@ -21,25 +21,25 @@
#include <qstring.h>
#include <qscrollview.h>
#include <qobject.h>
#include <qlayout.h>
#include <qpe/config.h>
#include <qpe/timestring.h>
#include <qpe/qcopenvelope_qws.h>
TodolistPluginWidget::TodolistPluginWidget( QWidget *parent, const char* name )
: QWidget( parent, name ) {
- todoLabel= 0l;
+ todoLabel = 0l;
todo = 0l;
if ( todo ) {
delete todo;
}
todo = new ToDoDB();
readConfig();
getTodo();
}
TodolistPluginWidget::~TodolistPluginWidget() {
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
@@ -105,46 +105,47 @@ void Today::setOwnerField( QString &message ) {
/**
* Init stuff needed for today. Reads the config file.
*/
void Today::init() {
// read config
Config cfg( "today" );
cfg.setGroup( "Plugins" );
m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' );
m_allApplets = cfg.readListEntry( "AllApplets", ',' );
+ cfg.setGroup( "General" );
+ m_iconSize = cfg.readNumEntry( "IconSize", 18 );
}
/**
* Load the plugins
*/
void Today::loadPlugins() {
QValueList<TodayPlugin>::Iterator tit;
for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) {
(*tit).library->unload();
delete (*tit).library;
}
pluginList.clear();
QString path = QPEApplication::qpeDir() + "/plugins/today";
QDir dir( path, "lib*.so" );
QStringList list = dir.entryList();
QStringList::Iterator it;
-
QMap<QString, TodayPlugin> tempList;
for ( it = list.begin(); it != list.end(); ++it ) {
TodayPluginInterface *iface = 0;
QLibrary *lib = new QLibrary( path + "/" + *it );
qDebug( "querying: %s", QString( path + "/" + *it ).latin1() );
if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
qDebug( "loading: %s", QString( path + "/" + *it ).latin1() );
qDebug( QString(*it) );
TodayPlugin plugin;
plugin.library = lib;
@@ -154,27 +155,29 @@ void Today::loadPlugins() {
// find out if plugins should be shown
if ( m_excludeApplets.grep( *it ).isEmpty() ) {
plugin.active = true;
} else {
plugin.active = false;
}
plugin.guiPart = plugin.iface->guiPart();
// 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 .-)
sv->setMinimumHeight( 10 );
sv->setResizePolicy( QScrollView::AutoOneFit );
sv->setHScrollBarMode( QScrollView::AlwaysOff );
sv->setFrameShape( QFrame::NoFrame );
sv->addChild( plugWidget );
// make sure the icon is on the top alligned
boxLayout->addWidget( plugIcon, 0, AlignTop );
boxLayout->addWidget( sv, 0, AlignTop );
@@ -242,25 +245,25 @@ void Today::draw() {
}
layout->addStretch(0);
}
/**
* The method for the configuration dialog.
*/
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];
// load the config widgets in the tabs
if ( plugin.guiPart->configWidget( this ) != 0l ) {
TodayConfigWidget* widget = plugin.guiPart->configWidget( conf.TabWidget3 );
configWidgetList.append( widget );
conf.TabWidget3->addTab( widget, plugin.guiPart->pixmapNameConfig()
, plugin.guiPart->appName() );
}
@@ -302,24 +305,29 @@ void Today::refresh() {
layout->addWidget( OwnerField );
loadPlugins();
draw();
}
void Today::startAddressbook() {
QCopEnvelope e( "QPE/System", "execute(QString)" );
e << QString( "addressbook" );
}
+void Today::startApplication() {
+ QCopEnvelope e( "QPE/System", "execute(QString)" );
+ e << QString( sender()->name() );
+}
+
/**
* launch addressbook (personal card)
*/
void Today::editCard() {
startAddressbook();
while( !QCopChannel::isRegistered( "QPE/Addressbook" ) ) {
qApp->processEvents();
}
QCopEnvelope v( "QPE/Addressbook", "editPersonalAndClose()" );
}
Today::~Today() {
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
@@ -23,51 +23,51 @@
#include <qdatetime.h>
#include <qlist.h>
#include <qhbox.h>
#include <qpe/qlibrary.h>
#include <qpe/event.h>
#include "todayconfig.h"
#include "todaybase.h"
#include <opie/todayplugininterface.h>
class QVBoxLayout;
-
+class OClickableLabel;
class Today : public TodayBase {
Q_OBJECT
public:
Today( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~Today();
private slots:
void startConfig();
void startAddressbook();
+ void startApplication();
void editCard();
void refresh();
private:
void init();
void setOwnerField();
void setOwnerField(QString &string);
void loadPlugins();
void draw();
private slots:
void channelReceived(const QCString &msg, const QByteArray & data);
private:
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
@@ -20,24 +20,25 @@
#include <qpe/resource.h>
#include <qpe/qcopenvelope_qws.h>
#include <qcheckbox.h>
#include <qlabel.h>
#include <qspinbox.h>
#include <qtabwidget.h>
#include <qlayout.h>
#include <qheader.h>
#include <qhbox.h>
#include <qvbox.h>
#include <qtoolbutton.h>
+#include <qtooltip.h>
class ToolButton : public QToolButton {
public:
ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE )
: QToolButton( parent, name ) {
setPixmap( Resource::loadPixmap( icon ) );
setAutoRaise( TRUE );
setFocusPolicy( QWidget::NoFocus );
setToggleButton( t );
connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot );
}
@@ -72,70 +73,82 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal, WFlags
new ToolButton( vbox1, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) );
tab2Layout->addWidget( hbox1 );
TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) );
tab_3 = new QWidget( TabWidget3, "tab_3" );
QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 );
tab3Layout->setMargin( 20 );
QHBox *hbox_auto = new QHBox( tab_3 );
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;
connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) );
readConfig();
showMaximized();
}
/**
* Autostart, uses the new (opie only) autostart method in the launcher code.
* If registered against that today ist started on each resume.
*/
void TodayConfig::setAutoStart() {
Config cfg( "today" );
cfg.setGroup( "Autostart" );
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" );
}
}
/**
* Read the config part
*/
void TodayConfig::readConfig() {
Config cfg( "today" );
cfg.setGroup( "Autostart" );
m_autoStart = cfg.readNumEntry( "autostart", 1 );
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", ',' );
}
/**
* Write the config part
*/
void TodayConfig::writeConfig() {
Config cfg( "today" );
cfg.setGroup( "Plugins" );
if ( m_applets_changed ) {
QStringList exclude;
@@ -159,24 +172,29 @@ void TodayConfig::writeConfig() {
}
}
cfg.writeEntry( "ExcludeApplets", exclude, ',' );
cfg.writeEntry( "IncludeApplets", include, ',' );
cfg.writeEntry( "AllApplets", all_applets, ',' );
}
cfg.setGroup( "Autostart" );
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();
}
void TodayConfig::moveSelectedUp() {
QListViewItem *item = m_appletListView->selectedItem();
if ( item && item->itemAbove() ) {
item->itemAbove()->moveItem( item );
}
}
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
@@ -46,26 +46,28 @@ protected slots:
void moveSelectedUp();
void moveSelectedDown();
private:
void setAutoStart();
void readConfig();
QListView* m_appletListView;
QMap<QString,QCheckListItem*> m_applets;
int m_autoStart;
int m_autoStartTimer;
+ int m_iconSize;
QStringList m_excludeApplets;
bool m_applets_changed;
QLabel* TextLabel2;
QCheckBox* CheckBoxAuto;
QWidget* tab_2;
QWidget* tab_3;
QLabel* TextLabel1;
QSpinBox* SpinBox7;
QLabel* TimeLabel;
QSpinBox* SpinBoxTime;
+ QSpinBox* SpinBoxIconSize;
};
#endif