summaryrefslogtreecommitdiff
path: root/core/pim/today
Side-by-side diff
Diffstat (limited to 'core/pim/today') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/plugins/addressbook/addresspluginconfig.cpp10
-rw-r--r--core/pim/today/plugins/addressbook/addresspluginwidget.cpp12
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginconfig.h12
-rw-r--r--core/pim/today/plugins/todolist/todopluginconfig.h9
4 files changed, 26 insertions, 17 deletions
diff --git a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp
index b79c679..8863192 100644
--- a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp
+++ b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp
@@ -69,24 +69,30 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char*
SpinBoxClip->setMaxValue( 200 );
QWhatsThis::add( SpinBoxClip , tr( "After how many chars should be the info about the task be cut off" ) );
#endif
// Look ahead settings
QHBox *box3 = new QHBox( this );
QLabel* daysLabel = new QLabel( box3, "" );
daysLabel->setText( tr( "Days look ahead: " ) );
SpinDaysClip = new QSpinBox( box3, "SpinDays" );
SpinDaysClip->setMaxValue( 200 );
QWhatsThis::add( SpinDaysClip , tr( "How many days we should search forward" ) );
+// QHBox *box4 = new QHBox( this );
+
+// QLabel* colorLabel = new QLabel( box4, "" );
+// colorLabel->setText( tr( "To activate settings: Restart application !" ) );
+
+
QHBox *box5 = new QHBox( this );
QLabel* colorLabel2 = new QLabel( box5, "" );
colorLabel2->setText( tr( "Set Headline Color: " ) );
headlineColor = new OColorButton( box5, black , "headlineColor" );
QWhatsThis::add( headlineColor , tr( "Colors for the headlines !" ) );
QHBox *box6 = new QHBox( this );
// Entry color settings
QLabel* colorLabel3= new QLabel( box6, "" );
colorLabel3->setText( tr( "Set Entry Color: " ) );
entryColor = new OColorButton( box6, black , "entryColor" );
QWhatsThis::add( entryColor , tr( "This color will be used for shown birthdays/anniversaries !" ) );
@@ -95,27 +101,27 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char*
QHBox *box7 = new QHBox( this );
QLabel* colorLabel5 = new QLabel( box7, "" );
colorLabel5->setText( tr( "Set Urgent\nColor if below " ) );
SpinUrgentClip = new QSpinBox( box7, "SpinDays" );
SpinUrgentClip->setMaxValue( 200 );
QLabel* colorLabel6 = new QLabel( box7, "" );
colorLabel6->setText( tr( " days: " ) );
urgentColor = new OColorButton( box7, red , "urgentColor" );
QWhatsThis::add( urgentColor , tr( "This urgent color will be used if we are close to the event !" ) );
QWhatsThis::add( SpinUrgentClip , tr( "The urgent color will be used if the birthday/anniversary is closer than given days !" ) );
- layout->addWidget( b_group );
+ //layout->addWidget( box4 );
layout->addWidget( box1 );
- // layout->addWidget( box2 );
+ //layout->addWidget( box2 );
layout->addWidget( box3 );
layout->addWidget( box5 );
layout->addWidget( box6 );
layout->addWidget( box7 );
readConfig();
}
void AddressBookPluginConfig::readConfig() {
Config cfg( "todayaddressplugin" );
cfg.setGroup( "config" );
diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
index dad09db..d47bc0b 100644
--- a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
+++ b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
@@ -93,38 +93,42 @@ void AddressBookPluginWidget::getAddress() {
layoutTodo = new QVBoxLayout( this );
}
if ( ! addressLabel ) {
addressLabel = new OClickableLabel( this );
connect( addressLabel, SIGNAL( clicked() ), this, SLOT( startAddressBook() ) );
layoutTodo->addWidget( addressLabel );
}
QString output;
// Check whether the database provide the search option..
- if ( !m_contactdb->hasQuerySettings( OContactAccess::DateDiff ) ){
+ if ( !m_contactdb->hasQuerySettings( OContactAccess::DateDiff ) ){
// Libopie seems to be old..
output = QObject::tr( "Database does not provide this search query ! Please upgrade libOpie !<br>" );
addressLabel->setText( output );
return;
}
-
+
// Define the query for birthdays and start search..
QDate lookAheadDate = QDate::currentDate().addDays( m_daysLookAhead );
int ammount = 0;
if ( m_showBirthdays ){
- qWarning("Searching from now (%s) until %s ! ",
- QDate::currentDate().toString().latin1(),
+ qWarning("Searching from now (%s) until %s ! ",
+ QDate::currentDate().toString().latin1(),
lookAheadDate.toString().latin1() );
+ }
+
+ if ( m_contactdb->hasQuerySettings( OContactAccess::DateDiff ) ){
+
OContact querybirthdays;
querybirthdays.setBirthday( lookAheadDate );
m_list = m_contactdb->queryByExample( querybirthdays,
OContactAccess::DateDiff );
if ( m_list.count() > 0 ){
output = "<font color=" + m_headlineColor + ">"
+ QObject::tr( "Next birthdays in <b> %1 </b> days:" )
.arg( m_daysLookAhead )
+ "</font> <br>";
for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) {
diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.h b/core/pim/today/plugins/datebook/datebookpluginconfig.h
index bc412dd..2d303fc 100644
--- a/core/pim/today/plugins/datebook/datebookpluginconfig.h
+++ b/core/pim/today/plugins/datebook/datebookpluginconfig.h
@@ -14,47 +14,45 @@
* *
***************************************************************************/
#ifndef DATEBOOK_PLUGIN_CONFIG_H
#define DATEBOOK_PLUGIN_CONFIG_H
#include <qcheckbox.h>
#include <qspinbox.h>
#include <opie/todayconfigwidget.h>
-class DatebookPluginConfig : public TodayConfigWidget {
+#include "datebookpluginconfigbase.h"
+
+class DatebookPluginConfig : public TodayConfigWidget {
Q_OBJECT
+
public:
DatebookPluginConfig( QWidget *parent, const char *name );
~DatebookPluginConfig();
void writeConfig();
private:
/**
* if changed then save
*/
bool changed();
void readConfig();
- QCheckBox* CheckBox2;
- QCheckBox* CheckBox1;
- QCheckBox* CheckBox3;
- QSpinBox* SpinBox1;
- QSpinBox* SpinBox2;
-
+ DatebookPluginConfigBase *m_gui;
// how many lines should be showed in the datebook section
int m_max_lines_meet;
// If location is to be showed too, 1 to activate it.
int m_show_location;
// if notes should be shown
int m_show_notes;
// should only later appointments be shown or all for the current day.
int m_only_later;
int m_more_days;
};
diff --git a/core/pim/today/plugins/todolist/todopluginconfig.h b/core/pim/today/plugins/todolist/todopluginconfig.h
index e09251c..54d35cf 100644
--- a/core/pim/today/plugins/todolist/todopluginconfig.h
+++ b/core/pim/today/plugins/todolist/todopluginconfig.h
@@ -8,48 +8,49 @@
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
#ifndef TODOLIST_PLUGIN_CONFIG_H
#define TODOLIST_PLUGIN_CONFIG_H
-//#include <qwidget.h>
#include <qspinbox.h>
#include <opie/todayconfigwidget.h>
+#include "todopluginconfigbase.h"
+
class TodolistPluginConfig : public TodayConfigWidget {
-Q_OBJECT
+ Q_OBJECT
public:
TodolistPluginConfig( QWidget *parent, const char *name );
~TodolistPluginConfig();
private:
/**
* if changed then save
*/
bool changed();
void readConfig();
void writeConfig();
+
+ TodoPluginConfigBase *m_gui;
- QSpinBox* SpinBox2;
- QSpinBox* SpinBoxClip;
// how many lines should be showed in the todolist section
int m_max_lines_task;
// clip the lines after X chars
int m_maxCharClip;
};