summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/TODO2
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginconfig.cpp5
-rw-r--r--core/pim/today/plugins/todolist/todopluginconfig.cpp11
-rw-r--r--core/pim/today/today.cpp2
-rw-r--r--core/pim/today/todaybase.cpp7
-rw-r--r--core/pim/today/todaybase.h2
-rw-r--r--core/pim/today/todayconfig.cpp1
7 files changed, 21 insertions, 9 deletions
diff --git a/core/pim/today/TODO b/core/pim/today/TODO
index 49503bd..4dc22aa 100644
--- a/core/pim/today/TODO
+++ b/core/pim/today/TODO
@@ -1,15 +1,13 @@
TODO for today:
-- all icons clickable
-
- retail rom mail plugin (z)
- autostart on retail rom (Z)
* show "upcoming appointents the next days
* show alarm icons on alarm events (partly done)
* qcop integration for updating events?
diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
index 606916b..e93c82c 100644
--- a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
@@ -1,62 +1,67 @@
#include "datebookpluginconfig.h"
#include <qpe/config.h>
#include <qlayout.h>
#include <qtoolbutton.h>
#include <qlabel.h>
#include <qhbox.h>
+#include <qwhatsthis.h>
#include <qvbox.h>
DatebookPluginConfig::DatebookPluginConfig( QWidget* parent, const char* name)
: TodayConfigWidget( parent, name ) {
QVBoxLayout * layout = new QVBoxLayout( this );
layout->setMargin( 20 );
QHBox *box1 = new QHBox( this );
QLabel* TextLabel4 = new QLabel( box1, "TextLabel4" );
TextLabel4->setText( tr( "Show location" ) );
CheckBox1 = new QCheckBox( box1, "CheckBox1" );
+ QWhatsThis::add( CheckBox1 , tr( "Check this if the location of an appointment should be shown for each one" ) );
QHBox *box2 = new QHBox( this );
QLabel* TextLabel5 = new QLabel( box2 , "TextLabel5" );
TextLabel5->setText( tr( "Show notes" ) );
CheckBox2 = new QCheckBox( box2, "CheckBox2" );
+ QWhatsThis::add( CheckBox2 , tr( "Check this if the note attached to an appointment should be shown for each one" ) );
QHBox *box3 = new QHBox( this );
QLabel* TextLabel6 = new QLabel( box3, "All Day");
TextLabel6->setText( tr( "Show only later\n appointments") );
CheckBox3 = new QCheckBox ( box3, "CheckBox3" );
+ QWhatsThis::add( CheckBox3 , tr( "Check this if only appointments later then current time should be shown" ) );
QHBox *box4 = new QHBox( this );
QLabel *TextLabel3 = new QLabel( box4, "TextLabel3" );
TextLabel3->setText( tr( "How many \nappointment\n"
"should be \nshown?" ) );
SpinBox1 = new QSpinBox( box4, "SpinBox1" );
+ QWhatsThis::add( SpinBox1 , tr( "How many appointments should be shown maximal. In chronical order" ) );
SpinBox1->setMaxValue( 10 );
SpinBox1->setValue( 5 );
layout->addWidget( box1 );
layout->addWidget( box2 );
layout->addWidget( box3 );
layout->addWidget( box4 );
readConfig();
}
void DatebookPluginConfig::readConfig() {
Config cfg( "todaydatebookplugin" );
cfg.setGroup( "config" );
m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 );
SpinBox1->setValue( m_max_lines_meet );
m_show_location = cfg.readNumEntry( "showlocation", 1 );
CheckBox1->setChecked( m_show_location );
m_show_notes = cfg.readNumEntry( "shownotes", 0 );
CheckBox2->setChecked( m_show_notes );
m_only_later = cfg.readNumEntry( "onlylater", 1 );
CheckBox3->setChecked( m_only_later );
}
diff --git a/core/pim/today/plugins/todolist/todopluginconfig.cpp b/core/pim/today/plugins/todolist/todopluginconfig.cpp
index 110b2e0..56b7aa2 100644
--- a/core/pim/today/plugins/todolist/todopluginconfig.cpp
+++ b/core/pim/today/plugins/todolist/todopluginconfig.cpp
@@ -1,74 +1,77 @@
/*
* todopluginconfig.cpp
*
* copyright : (c) 2002 by Maximilian Reiß
* email : harlekin@handhelds.org
*
*/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "todopluginconfig.h"
#include <qpe/config.h>
#include <qlayout.h>
#include <qhbox.h>
#include <qtoolbutton.h>
#include <qlabel.h>
+#include <qwhatsthis.h>
TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name)
: TodayConfigWidget(parent, name ) {
QVBoxLayout * layout = new QVBoxLayout( this );
layout->setMargin( 20 );
QHBox *box1 = new QHBox( this );
QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" );
- TextLabel6->setText( tr( "How many\n tasks should \n"
- "be shown?" ) );
+ TextLabel6->setText( tr( "tasks shown " ) );
SpinBox2 = new QSpinBox( box1, "SpinBox2" );
SpinBox2->setMaxValue( 40 );
+ QWhatsThis::add( SpinBox2 , tr( "Set the maximum number of task that should be shown" ) );
+
+
QHBox *box2 = new QHBox( this );
QLabel* clipLabel = new QLabel( box2, "" );
- clipLabel->setText( tr( "Clip line after\n X chars" ) );
+ clipLabel->setText( tr( "Clip line after X chars" ) );
SpinBoxClip = new QSpinBox( box2, "SpinClip" );
SpinBoxClip->setMaxValue( 200 );
-
+ QWhatsThis::add( SpinBoxClip , tr( "After how many chars should be the info about the task be cut off" ) );
layout->addWidget( box1 );
layout->addWidget( box2 );
readConfig();
}
void TodolistPluginConfig::readConfig() {
Config cfg( "todaytodoplugin" );
cfg.setGroup( "config" );
m_max_lines_task = cfg.readNumEntry( "maxlinestask", 5 );
SpinBox2->setValue( m_max_lines_task );
m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 );
SpinBoxClip->setValue( m_maxCharClip );
}
void TodolistPluginConfig::writeConfig() {
Config cfg( "todaytodoplugin" );
cfg.setGroup( "config" );
m_max_lines_task = SpinBox2->value();
cfg.writeEntry( "maxlinestask", m_max_lines_task );
m_maxCharClip = SpinBoxClip->value();
cfg.writeEntry( "maxcharclip", m_maxCharClip );
cfg.write();
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 34ec3cb..dd98824 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -14,48 +14,49 @@
* *
***************************************************************************/
#include "today.h"
#include <opie/todayconfigwidget.h>
#include <qpe/config.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/resource.h>
#include <qpe/global.h>
#include <qpe/qpeapplication.h>
#include <qpe/contact.h>
#include <qdir.h>
#include <qfile.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qtimer.h>
#include <qpixmap.h>
#include <qlayout.h>
#include <qhbox.h>
#include <opie/otabwidget.h>
#include <qdialog.h>
+#include <qwhatsthis.h>
struct TodayPlugin {
QLibrary *library;
TodayPluginInterface *iface;
TodayPluginObject *guiPart;
QWidget *guiBox;
QString name;
bool active;
int pos;
};
static QValueList<TodayPlugin> pluginList;
Today::Today( QWidget* parent, const char* name, WFlags fl )
: TodayBase( parent, name, fl ) {
QObject::connect( (QObject*)ConfigButton, SIGNAL( clicked() ), this, SLOT( startConfig() ) );
QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT( editCard() ) );
#if defined(Q_WS_QWS)
#if !defined(QT_NO_COP)
QCopChannel *todayChannel = new QCopChannel( "QPE/Today" , this );
connect ( todayChannel, SIGNAL( received( const QCString &, const QByteArray &) ),
@@ -146,48 +147,49 @@ void Today::loadPlugins() {
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;
plugin.iface = iface;
plugin.name = QString(*it);
// 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( m_iconSize, m_iconSize ), 0 );
OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox );
plugIcon->setPixmap( plugPix );
+ QWhatsThis::add( plugIcon, tr("Click here to launch the associated app") );
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 );
boxLayout->setStretchFactor( plugIcon, 1 );
boxLayout->setStretchFactor( sv, 9 );
// "prebuffer" it in one more list, to get the sorting done
tempList.insert( plugin.name, plugin );
// on first start the list is off course empty
if ( m_allApplets.isEmpty() ) {
layout->addWidget( plugin.guiBox );
pluginList.append( plugin );
}
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp
index 352c9c1..12e8411 100644
--- a/core/pim/today/todaybase.cpp
+++ b/core/pim/today/todaybase.cpp
@@ -1,53 +1,54 @@
/*
* todaybase.cpp
*
* copyright : (c) 2002 by Maximilian Reiß
* email : harlekin@handhelds.org
*
*/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "todaybase.h"
#include <qframe.h>
#include <qlabel.h>
#include <qimage.h>
#include <qpixmap.h>
#include <qapplication.h>
+#include <qwhatsthis.h>
#include <qpe/resource.h>
-TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
- : QWidget( parent, name, fl ) {
+TodayBase::TodayBase( QWidget* parent, const char* name, WFlags )
+ : QWidget( parent, name, WStyle_ContextHelp ) {
QPixmap logo = Resource::loadPixmap( "today/today_logo"); // logo
QPixmap opiezilla = Resource::loadPixmap("today/opiezilla" ); //the opiezilla
QPixmap config = Resource::loadPixmap( "today/config" ); // config icon
layout = new QVBoxLayout( this );
QPalette pal = this->palette();
QColor col = pal.color( QPalette::Active, QColorGroup::Background );
pal.setColor( QPalette::Active, QColorGroup::Button, col );
pal.setColor( QPalette::Inactive, QColorGroup::Button, col );
pal.setColor( QPalette::Normal, QColorGroup::Button, col );
pal.setColor( QPalette::Disabled, QColorGroup::Button, col );
this->setPalette( pal );
// --- logo Section ---
QPalette pal2;
QColorGroup cg;
cg.setColor( QColorGroup::Text, white );
cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230 ), logo ) );
pal2.setActive( cg );
// today logo
Frame = new QLabel( this, "Frame" );
Frame->setPalette( pal2 );
@@ -59,45 +60,47 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
// Today text
QLabel* TodayLabel = new QLabel( Frame, "TodayText" );
TodayLabel->setGeometry( QRect( 10, 0, 168, 40 ) );
QFont TodayLabel_font( TodayLabel->font() );
TodayLabel_font.setBold( TRUE );
TodayLabel_font.setPointSize( 40 );
TodayLabel->setFont( TodayLabel_font );
TodayLabel->setBackgroundOrigin( QLabel::ParentOrigin );
TodayLabel->setText( "<font color=#FFFFFF>" + tr("Today") +"</font>" );
// date
DateLabel = new QLabel( Frame, "TextLabel1" );
DateLabel->setGeometry( QRect( 10, 35, 168, 12 ) );
QFont DateLabel_font( DateLabel->font() );
DateLabel_font.setBold( TRUE );
DateLabel->setFont( DateLabel_font );
DateLabel->setBackgroundOrigin( QLabel::ParentOrigin );
DateLabel->setTextFormat( RichText );
// Opiezilla
QLabel* Opiezilla = new QLabel( Frame, "OpieZilla" );
Opiezilla->setPixmap( opiezilla );
Opiezilla->setGeometry( QApplication::desktop()->width()-50 ,1, 45, 47 );
+ QWhatsThis::add( Opiezilla , tr( "Today by Maximilian Reiß" ) );
Opiezilla->setBackgroundOrigin( QLabel::ParentOrigin );
// Ownerfield
OwnerField = new OClickableLabel( this , "Owner" );
OwnerField->setGeometry( QRect( 0, 0, this->width(), 12 ) );
OwnerField->setAlignment( int (QLabel::AlignTop | QLabel::AlignLeft ) );
OwnerField->setMaximumHeight(12);
// config
ConfigButton = new OClickableLabel ( Frame, "PushButton1" );
ConfigButton->setGeometry( QRect( QApplication::desktop()->width()-80, 30, 25, 21 ) );
ConfigButton->setPixmap( config );
+ QWhatsThis::add( ConfigButton, tr( "Click here to get to the config dialog" ) );
ConfigButton->setBackgroundOrigin( QLabel::ParentOrigin );
}
/**
* D' tor
*/
TodayBase::~TodayBase() {
}
diff --git a/core/pim/today/todaybase.h b/core/pim/today/todaybase.h
index 7c50f32..340c7a6 100644
--- a/core/pim/today/todaybase.h
+++ b/core/pim/today/todaybase.h
@@ -12,42 +12,42 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef TODAYBASE_H
#define TODAYBASE_H
#include <qlayout.h>
#include <opie/oclickablelabel.h>
class QVBox;
class QGridLayout;
class QFrame;
class QLabel;
class QPushButton;
class QBoxLayout;
class TodayBase : public QWidget
{
Q_OBJECT
public:
- TodayBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ TodayBase( QWidget* parent = 0, const char* name = 0, WFlags = 0 );
~TodayBase();
QFrame* Frame4;
QPushButton* DatesButton;
QVBoxLayout* layout;
OClickableLabel* OwnerField;
QLabel* Frame;
QLabel* DateLabel;
QFrame* Frame15;
OClickableLabel* ConfigButton;
protected:
};
#endif
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp
index d15e2ab..f9dd8f7 100644
--- a/core/pim/today/todayconfig.cpp
+++ b/core/pim/today/todayconfig.cpp
@@ -48,48 +48,49 @@ public:
/**
* The class has currently quite some duplicate code.
* By that way it would be real easy to have it as seperate app in settings tab
*
*/
TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal )
: QDialog( parent, name, modal, WStyle_ContextHelp ) {
setCaption( tr( "Today config" ) );
QVBoxLayout *layout = new QVBoxLayout( this );
TabWidget3 = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom );
layout->addWidget( TabWidget3 );
tab_2 = new QWidget( TabWidget3, "tab_2" );
QVBoxLayout *tab2Layout = new QVBoxLayout( tab_2, 4 ,4 );
QLabel *l = new QLabel( tr( "Load which plugins in what order:" ), tab_2 );
tab2Layout->addWidget( l );
QHBox *hbox1 = new QHBox( tab_2 );
m_appletListView = new QListView( hbox1 );
m_appletListView->addColumn( "PluginList" );
m_appletListView->header()->hide();
m_appletListView->setSorting( -1 );
+ QWhatsThis::add( m_appletListView, tr( "Check a checkbox to activate/deactivate a plugin ore use the arrow buttons on the right to change the appearance order" ) );
QVBox *vbox1 = new QVBox( hbox1 );
new ToolButton( vbox1, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) );
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)" ) );
QWhatsThis::add( TextLabel2 , tr( "Check this if today should be autostarted on resume." ) );
CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" );
QWhatsThis::add( CheckBoxAuto, tr( "Check this if today should be autostarted on resume." ) );
QHBox *hbox_inactive = new QHBox( tab_3 );
TimeLabel = new QLabel( hbox_inactive, "TimeLabel" );
TimeLabel->setText( tr( "minutes inactive" ) );
QWhatsThis::add( TimeLabel , tr( "How many minutes has the PDA been suspended before the autostart feature kicks in on resume" ) );
SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner" );
QWhatsThis::add( SpinBoxTime , tr( "How many minutes has the PDA been suspended before the autostart feature kicks in on resume" ) );
QHBox *hbox_iconSize = new QHBox( tab_3 );
QLabel *iconSizeLabel = new QLabel( hbox_iconSize, "iconSizeLabel" );
iconSizeLabel->setText( tr( "Icon size" ) );