summaryrefslogtreecommitdiff
path: root/core
authorharlekin <harlekin>2002-04-27 17:06:35 (UTC)
committer harlekin <harlekin>2002-04-27 17:06:35 (UTC)
commit32f808191e255c82044f281f6032f336b75f2fc6 (patch) (side-by-side diff)
tree26edc161e8c646325eef15a4b50a14baad6594c4 /core
parent0fb2ea5d51271cfad323b69c4c191c946f45a5a0 (diff)
downloadopie-32f808191e255c82044f281f6032f336b75f2fc6.zip
opie-32f808191e255c82044f281f6032f336b75f2fc6.tar.gz
opie-32f808191e255c82044f281f6032f336b75f2fc6.tar.bz2
fixes for the logo part, looks better now on screen > 240 pixel width. Also now all the i18n guys can finally translate the Today string .-)
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/today.cpp4
-rw-r--r--core/pim/today/todaybase.cpp27
2 files changed, 21 insertions, 10 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 0ab7a2a..01d1a13 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -122,25 +122,25 @@ void Today::setOwnerField(QString &message) {
OwnerField->setText("<b>" + message + "</b>");
}
}
/*
* Autostart, uses the new (opie only) autostart method in the launcher code.
* If registered against that today ist started on each resume.
*/
void Today::autoStart() {
Config cfg("today");
cfg.setGroup("Autostart");
int AUTOSTART = cfg.readNumEntry("autostart",1);
- qDebug(QString("%1").arg(AUTOSTART));
+// qDebug(QString("%1").arg(AUTOSTART));
if (AUTOSTART) {
QCopEnvelope e("QPE/System", "autoStart(QString, QString, QString)");
e << QString("add");
e << QString("today");
e << AUTOSTART_TIMER;
} else {
qDebug("Nun in else bei autostart");
QCopEnvelope e("QPE/System", "autoStart(QString, QString)");
e << QString("remove");
e << QString("today");
}
}
@@ -470,24 +470,25 @@ Today::~Today() {
DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
QWidget* parent = 0,
int SHOW_LOCATION = 0,
int SHOW_NOTES = 0,
const char* name = 0,
WFlags fl = 0) :
ClickableLabel(parent,name,fl), event(ev) {
QString msg;
//QTime time = QTime::currentTime();
Config config( "qpe" );
+ config.setGroup( "Time" );
// if 24 h format
ampm = config.readBoolEntry( "AMPM", TRUE );
if (!ONLY_LATER) {
msg += "<B>" + (ev).description() + "</B>";
if ( (ev).event().hasAlarm() ) {
msg += " <b>[with alarm]</b>";
}
// include location or not
if (SHOW_LOCATION == 1) {
msg += "<BR><i>" + (ev).location() + "</i>";
@@ -536,24 +537,25 @@ QString DateBookEvent::ampmTime(QTime tm) {
DateBookEventLater::DateBookEventLater(const EffectiveEvent &ev,
QWidget* parent = 0,
int SHOW_LOCATION = 0,
int SHOW_NOTES = 0,
const char* name = 0,
WFlags fl = 0) :
ClickableLabel(parent,name,fl), event(ev) {
QString msg;
QTime time = QTime::currentTime();
Config config( "qpe" );
+ config.setGroup( "Time" );
// if 24 h format
ampm = config.readBoolEntry( "AMPM", TRUE );
if ((time.toString() <= TimeString::dateString((ev).event().end())) ) {
// show only later appointments
msg += "<B>" + (ev).description() + "</B>";
if ( (ev).event().hasAlarm() ) {
msg += " <b>[with alarm]</b>";
}
// include location or not
if (SHOW_LOCATION == 1) {
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp
index ae8763b..c6ea11f 100644
--- a/core/pim/today/todaybase.cpp
+++ b/core/pim/today/todaybase.cpp
@@ -35,33 +35,25 @@
/*
* 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);
- //pal.setColor(QPalette::Inactive, QColorGroup::Button, col);
- //pal.setColor(QPalette::Normal, QColorGroup::Button, col);
- //pal.setColor(QPalette::Disabled, QColorGroup::Button, col);
- //this->setPalette(pal);
-
+ QPixmap opiezilla = Resource::loadPixmap("today/opiezilla" ); //the opiezilla
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);
@@ -70,24 +62,41 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
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 );
Frame->setFrameShape( QFrame::StyledPanel );
Frame->setFrameShadow( QFrame::Raised );
Frame->setLineWidth( 0 );
Frame->setMaximumHeight(50);
Frame->setMinimumHeight(50);
+
+ // 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>");
+
+ // Opiezilla
+ QLabel* Opiezilla = new QLabel( Frame, "OpieZilla");
+ Opiezilla->setPixmap( opiezilla );
+ Opiezilla->setGeometry( this->width()-50 ,1, 45, 47);
+ Opiezilla->setBackgroundOrigin( QLabel::ParentOrigin );
+
// date
TextLabel1 = new QLabel( Frame, "TextLabel1" );
TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) );
QFont TextLabel1_font( TextLabel1->font() );
TextLabel1_font.setBold( TRUE );
TextLabel1->setFont( TextLabel1_font );
TextLabel1->setBackgroundOrigin( QLabel::ParentOrigin );
TextLabel1->setTextFormat( RichText );
OwnerField = new QLabel(this , "Owner" );
OwnerField->setGeometry(QRect(0,0, this->width(), 12 ));
OwnerField->setAlignment(int (QLabel::AlignTop | QLabel::AlignLeft ) );