summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/today/today.cpp4
-rw-r--r--core/pim/today/todaybase.cpp1
-rw-r--r--core/pim/today/todayconfig.cpp1
3 files changed, 2 insertions, 4 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 66a4152..51aba69 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -270,102 +270,102 @@ void Today::startConfig() {
*/
void Today::getDates() {
QDate date = QDate::currentDate();
if (AllDateBookEvents) delete AllDateBookEvents;
AllDateBookEvents = new QWidget( );
QVBoxLayout* layoutDates = new QVBoxLayout(AllDateBookEvents);
QValueList<EffectiveEvent> list = db->getEffectiveEvents(date, date);
qBubbleSort(list);
// printf("Get dates\n");
Config config( "qpe" );
// if 24 h format
//bool ampm = config.readBoolEntry( "AMPM", TRUE );
int count=0;
if ( list.count() > 0 ) {
for ( QValueList<EffectiveEvent>::ConstIterator it=list.begin();
it!=list.end(); ++it ) {
if ( count <= MAX_LINES_MEET ) {
QTime time = QTime::currentTime();
if (!ONLY_LATER) {
count++;
DateBookEvent *l=new DateBookEvent(*it, AllDateBookEvents, SHOW_LOCATION, SHOW_NOTES);
layoutDates->addWidget(l);
connect (l, SIGNAL(editEvent(const Event &)),
this, SLOT(editEvent(const Event &)));
} else if ((time.toString() <= TimeString::dateString((*it).event().end())) ) {
count++;
// show only later appointments
DateBookEventLater *l=new DateBookEventLater(*it, AllDateBookEvents, SHOW_LOCATION, SHOW_NOTES);
layoutDates->addWidget(l);
connect (l, SIGNAL(editEvent(const Event &)),
this, SLOT(editEvent(const Event &)));
}
}
}
if (ONLY_LATER && count==0) {
QLabel* noMoreEvents = new QLabel(AllDateBookEvents);
- noMoreEvents->setText("No more appointments today");
+ noMoreEvents->setText(tr("No more appointments today"));
layoutDates->addWidget(noMoreEvents);
}
} else {
QLabel* noEvents = new QLabel(AllDateBookEvents);
- noEvents->setText("No appointments today");
+ noEvents->setText(tr("No appointments today"));
layoutDates->addWidget(noEvents);
}
layoutDates->addItem(new QSpacerItem(1,1, QSizePolicy::Minimum, QSizePolicy::Expanding));
sv1->addChild(AllDateBookEvents);
AllDateBookEvents->show();
}
void Today::getMail() {
Config cfg("opiemail");
cfg.setGroup("today");
// how many lines should be showed in the task section
int NEW_MAILS = cfg.readNumEntry("newmails",0);
int OUTGOING = cfg.readNumEntry("outgoing",0);
QString output = tr("<b>%1</b> new mail(s), <b>%2</b> outgoing").arg(NEW_MAILS).arg(OUTGOING);
MailField->setText(output);
}
/*
* Get the todos
*/
void Today::getTodo() {
QString output;
QString tmpout;
int count = 0;
int ammount = 0;
// get overdue todos first
QValueList<ToDoEvent> overDueList = todo->overDue();
qBubbleSort(overDueList);
for ( QValueList<ToDoEvent>::Iterator it=overDueList.begin();
it!=overDueList.end(); ++it ) {
if (!(*it).isCompleted() && ( ammount < MAX_LINES_TASK) ) {
tmpout += "<font color=#e00000><b>-" +((*it).description()).mid(0, MAX_CHAR_CLIP) + "</b></font><br>";
ammount++;
}
}
// get total number of still open todos
QValueList<ToDoEvent> open = todo->rawToDos();
qBubbleSort(open);
for ( QValueList<ToDoEvent>::Iterator it=open.begin();
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp
index c0b8d34..dfcc34e 100644
--- a/core/pim/today/todaybase.cpp
+++ b/core/pim/today/todaybase.cpp
@@ -1,74 +1,73 @@
/*
* todaybase.cpp *
* ---------------------
*
* begin : Sun 10 17:20:00 CEST 2002
* copyright : (c) 2002 by Maximilian Reiß
* email : max.reiss@gmx.de
*
*/
/***************************************************************************
* *
* 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 <qpushbutton.h>
#include <qlayout.h>
#include <qvariant.h>
-#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>
#include <qscrollview.h>
#include <qvbox.h>
#include <qapplication.h>
#include <qpe/resource.h>
/*
* Constructs a TodayBase which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
QPixmap logo = Resource::loadPixmap( "today/today_logo"); // logo
QPixmap datebook = Resource::loadPixmap("DateBook"); // datebook
QPixmap todo = Resource::loadPixmap( "TodoList" ); // todo
QPixmap config = Resource::loadPixmap( "today/config" ); // config icon
QPixmap mail = Resource::loadPixmap( "today/mail" ); // mail icon
QPalette pal = this->palette();
QColor col = pal.color(QPalette::Active, QColorGroup::Background);
pal.setColor(QPalette::Active, QColorGroup::Button, col);
this->setPalette(pal);
QWidget *d = QApplication::desktop();
int w=d->width();
int h=d->height();
resize( w , h );
// hehe, qt is ...
getridoffuckingstrippeldlinesbutton = new QPushButton (this, "asdfsad" );
getridoffuckingstrippeldlinesbutton->setGeometry( QRect( -5, 10, 0, 0 ) );
QVBoxLayout * layout = new QVBoxLayout(this);
// --- 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 );
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp
index 7c690a7..a908d98 100644
--- a/core/pim/today/todayconfig.cpp
+++ b/core/pim/today/todayconfig.cpp
@@ -1,67 +1,66 @@
/****************************************************************************
** Form implementation generated from reading ui file 'todayconfig.ui'
**
** Created: Thu Feb 14 15:04:33 2002
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "todayconfig.h"
#include <qcheckbox.h>
#include <qframe.h>
#include <qlabel.h>
#include <qspinbox.h>
#include <qtabwidget.h>
#include <qwidget.h>
#include <qlayout.h>
#include <qvariant.h>
-#include <qtooltip.h>
#include <qwhatsthis.h>
/*
* Constructs a todayconfig which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
todayconfig::todayconfig( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "todayconfig" );
resize( 175, 232 );
setCaption( tr( "Today config" ) );
TabWidget3 = new QTabWidget( this, "TabWidget3" );
TabWidget3->setGeometry( QRect( 0, 0, 220, 320 ) );
TabWidget3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, TabWidget3->sizePolicy().hasHeightForWidth() ) );
TabWidget3->setAutoMask( FALSE );
TabWidget3->setTabShape( QTabWidget::Rounded );
tab = new QWidget( TabWidget3, "tab" );
Frame8 = new QFrame( tab, "Frame8" );
Frame8->setGeometry( QRect( -5, 0, 200, 300 ) );
Frame8->setFrameShape( QFrame::StyledPanel );
Frame8->setFrameShadow( QFrame::Raised );
TextLabel4 = new QLabel( Frame8, "TextLabel4" );
TextLabel4->setGeometry( QRect( 20, 65, 100, 60 ) );
TextLabel4->setText( tr( "Should the \n"
"location \n"
"be shown?" ) );
TextLabel5 = new QLabel( Frame8, "TextLabel5" );
TextLabel5->setGeometry( QRect( 20, 160, 120, 40 ) );
TextLabel5->setText( tr( "Should the notes \n"
"be shown?" ) );
CheckBox2 = new QCheckBox( Frame8, "CheckBox2" );
CheckBox2->setGeometry( QRect( 158, 170, 27, 21 ) );
//CheckBox2->setText( tr( "" ) );
CheckBox1 = new QCheckBox( Frame8, "CheckBox1" );
CheckBox1->setGeometry( QRect( 158, 65, 27, 50 ) );
//CheckBox1->setText( tr( "" ) );