author | harlekin <harlekin> | 2003-03-30 22:05:20 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-03-30 22:05:20 (UTC) |
commit | 608a9f1537af0f0f679ec5f7358e9a9716604f8b (patch) (side-by-side diff) | |
tree | 7b08904230c170f9679937e3419149e3a82cee96 | |
parent | 9f185c144aa92c08d4d24721e1eba7782b51d366 (diff) | |
download | opie-608a9f1537af0f0f679ec5f7358e9a9716604f8b.zip opie-608a9f1537af0f0f679ec5f7358e9a9716604f8b.tar.gz opie-608a9f1537af0f0f679ec5f7358e9a9716604f8b.tar.bz2 |
changed header (gui) to layouts
-rw-r--r-- | core/pim/today/changelog | 7 | ||||
-rw-r--r-- | core/pim/today/opie-today.control | 2 | ||||
-rw-r--r-- | core/pim/today/today.cpp | 8 | ||||
-rw-r--r-- | core/pim/today/todaybase.cpp | 28 |
4 files changed, 22 insertions, 23 deletions
diff --git a/core/pim/today/changelog b/core/pim/today/changelog index 500090d..a77e581 100644 --- a/core/pim/today/changelog +++ b/core/pim/today/changelog @@ -1,52 +1,57 @@ +0.6.2 + +* header can now be made smaller +* changed header to different layout mode to play nicer with life rotation + 0.6.1 * datebook plugin now can now also show following days -+ changed refresh +* changed refresh * fixed one mem leak 0.6 * longer refresh intervals possible * plugins can decide now if they want to take part in refresh cycles 0.5.2 * refresh settings * only launch datebook config when clicked on a date ( opie only ) * less qcop trouble on sharps retail rom 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 made the "Today" string translatable. * some am/pm fixes * clickable labels now in libopie 0.3.2 * Autostart is now more configurable. You can decide how long the ipaq has to has been suspended, before autostart is triggered.(Opie only) * am/pm time optinal (autodetect) 0.3.1 * fixed the wrong color of the buttons * better translation (thanks carsten and others) * fixes memory leaks * bugfixes in calendar part, now location and note are working again. 0.3.0 diff --git a/core/pim/today/opie-today.control b/core/pim/today/opie-today.control index 40c2cdf..0e79d69 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.6-$SUB_VERSION +Version: 0.6,2-$SUB_VERSION Depends: opie-base, libopie1 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/today.cpp b/core/pim/today/today.cpp index 0b61bf8..d0cdd18 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp @@ -100,107 +100,99 @@ void Today::setRefreshTimer( int interval ) { */ void Today::setOwnerField() { QString file = Global::applicationFileName( "addressbook", "businesscard.vcf" ); if ( QFile::exists( file ) ) { Contact cont = Contact::readVCard( file )[0]; QString returnString = cont.fullName(); OwnerField->setText( "<b>" + tr ( "Owned by " ) + returnString + "</b>" ); } else { OwnerField->setText( "<b>" + tr ( "Please fill out the business card" ) + " </b>" ); } } /** * Set the owner field with a given QString, for example per qcop. */ void Today::setOwnerField( QString &message ) { if ( !message.isEmpty() ) { OwnerField->setText( "<b>" + message + "</b>" ); } } /** * 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 ); m_hideBanner = cfg.readNumEntry( "HideBanner", 0 ); setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) ); // set the date in top label QDate date = QDate::currentDate(); DateLabel->setText( QString( "<font color=#FFFFFF>" + TimeString::longDateString( date ) + "</font>" ) ); if ( layout ) { delete layout; } if ( m_hideBanner ) { Opiezilla->hide(); TodayLabel->hide(); - Frame->setMaximumHeight( 18 ); - Frame->setMinimumHeight( 18 ); - DateLabel->setGeometry( QRect( 10, 2, 168, 12 ) ); - ConfigButton->setGeometry( QRect( QApplication::desktop()->width()-20, 0, 25, 20 ) ); } else { Opiezilla->show(); TodayLabel->show(); - Frame->setMaximumHeight( 50 ); - Frame->setMinimumHeight( 50 ); - DateLabel->setGeometry( QRect( 10, 35, 168, 12 ) ); - ConfigButton->setGeometry( QRect( QApplication::desktop()->width()-80, 29, 25, 20 ) ); } layout = new QVBoxLayout( this ); layout->addWidget( Frame ); layout->addWidget( OwnerField ); } /** * Load the plugins */ void Today::loadPlugins() { init(); QValueList<TodayPlugin>::Iterator tit; if ( !pluginList.isEmpty() ) { for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { (*tit).guiBox->hide(); (*tit).guiBox->reparent( 0, QPoint( 0, 0 ) ); delete (*tit).guiBox; (*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 ) { QInterfacePtr<TodayPluginInterface> iface; QLibrary *lib = new QLibrary( path + "/" + *it ); qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() ); qDebug( QString(*it) ); TodayPlugin plugin; plugin.library = lib; plugin.iface = iface; plugin.name = QString(*it); QString type = (*it).left( (*it).find(".") ); diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp index a36ecaa..c896463 100644 --- a/core/pim/today/todaybase.cpp +++ b/core/pim/today/todaybase.cpp @@ -1,105 +1,107 @@ /* * todaybase.cpp * - * copyright : (c) 2002 by Maximilian Reiß + * copyright : (c) 2002, 2003 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 <qvbox.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 ) : 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( "SettingsIcon" ); // 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 + +// 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 ); + QHBoxLayout *frameLayout = new QHBoxLayout( Frame ); + QVBox *box1 = new QVBox( Frame ); // Today text - TodayLabel = new QLabel( Frame, "TodayText" ); - TodayLabel->setGeometry( QRect( 10, 1, 168, 40 ) ); + TodayLabel = new QLabel( box1, "TodayText" ); 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 ) ); + DateLabel = new QLabel( box1, "TextLabel1" ); QFont DateLabel_font( DateLabel->font() ); DateLabel_font.setBold( TRUE ); DateLabel->setFont( DateLabel_font ); DateLabel->setBackgroundOrigin( QLabel::ParentOrigin ); DateLabel->setTextFormat( RichText ); // Opiezilla 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, 29, 25, 20 ) ); ConfigButton->setPixmap( config ); QWhatsThis::add( ConfigButton, tr( "Click here to get to the config dialog" ) ); ConfigButton->setBackgroundOrigin( QLabel::ParentOrigin ); + + frameLayout->addWidget( box1 ); + frameLayout->addStretch( 2 ); + frameLayout->addWidget( ConfigButton, 0, AlignBottom ); + frameLayout->addWidget( Opiezilla ); } + /** * D' tor */ TodayBase::~TodayBase() { } |