summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-03-30 22:28:09 (UTC)
committer harlekin <harlekin>2003-03-30 22:28:09 (UTC)
commit0b6d158a2a2b52d83ad4b1046ce9dbffff2190e6 (patch) (side-by-side diff)
treee9e62695cf309a14bcffa31dc3dd70f652629211
parent608a9f1537af0f0f679ec5f7358e9a9716604f8b (diff)
downloadopie-0b6d158a2a2b52d83ad4b1046ce9dbffff2190e6.zip
opie-0b6d158a2a2b52d83ad4b1046ce9dbffff2190e6.tar.gz
opie-0b6d158a2a2b52d83ad4b1046ce9dbffff2190e6.tar.bz2
layout changes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/today.cpp2
-rw-r--r--core/pim/today/todaybase.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index d0cdd18..4ec690c 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -251,97 +251,97 @@ void Today::loadPlugins() {
layout->addWidget( plugin.guiBox );
pluginList.append( plugin );
}
// if plugin is not yet in the list, add it to the layout too
else if ( !m_allApplets.contains( plugin.name ) ) {
layout->addWidget( plugin.guiBox );
pluginList.append( plugin );
}
} else {
qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() );
delete lib;
}
}
if ( !m_allApplets.isEmpty() ) {
TodayPlugin tempPlugin;
QStringList::Iterator stringit;
for( stringit = m_allApplets.begin(); stringit != m_allApplets.end(); ++stringit ) {
tempPlugin = ( tempList.find( *stringit ) ).data();
if ( !( (tempPlugin.name).isEmpty() ) ) {
layout->addWidget( tempPlugin.guiBox );
pluginList.append( tempPlugin );
}
}
}
draw();
}
/**
* Repaint method. Reread all fields.
*/
void Today::draw() {
if ( pluginList.count() == 0 ) {
QLabel *noPlugins = new QLabel( this );
noPlugins->setText( tr( "No plugins found" ) );
layout->addWidget( noPlugins );
return;
}
uint count = 0;
TodayPlugin plugin;
for ( uint i = 0; i < pluginList.count(); i++ ) {
plugin = pluginList[i];
- if ( plugin.active ) {
+ if ( plugin.active ) {
// qDebug( plugin.name + " is ACTIVE " );
plugin.guiBox->show();
} else {
// qDebug( plugin.name + " is INACTIVE" );
plugin.guiBox->hide();
}
count++;
}
if ( count == 0 ) {
QLabel *noPluginsActive = new QLabel( this );
noPluginsActive->setText( tr( "No plugins activated" ) );
layout->addWidget( noPluginsActive );
}
layout->addStretch(0);
}
/**
* The method for the configuration dialog.
*/
void Today::startConfig() {
// disconnect timer to prevent problems while being on config dialog
disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
m_refreshTimer->stop( );
TodayConfig conf( this, "dialog", true );
TodayPlugin plugin;
QList<TodayConfigWidget> configWidgetList;
for ( int i = pluginList.count() - 1; i >= 0; i-- ) {
plugin = pluginList[i];
// load the config widgets in the tabs
if ( plugin.guiPart->configWidget( this ) != 0l ) {
TodayConfigWidget* widget = plugin.guiPart->configWidget( conf.TabWidget3 );
configWidgetList.append( widget );
conf.TabWidget3->addTab( widget, plugin.guiPart->pixmapNameConfig()
, plugin.guiPart->appName() );
}
// set the order/activate tab
conf.pluginManagement( plugin.name, plugin.guiPart->pluginName(),
Resource::loadPixmap( plugin.guiPart->pixmapNameWidget() ) );
}
if ( conf.exec() == QDialog::Accepted ) {
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp
index c896463..7beed34 100644
--- a/core/pim/today/todaybase.cpp
+++ b/core/pim/today/todaybase.cpp
@@ -1,106 +1,108 @@
/*
* todaybase.cpp
*
* 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 <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 );
+ layout = 0L;
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 );
Frame->setFrameShape( QFrame::StyledPanel );
Frame->setFrameShadow( QFrame::Raised );
Frame->setLineWidth( 0 );
+ Frame->setMaximumHeight( 50 );
QHBoxLayout *frameLayout = new QHBoxLayout( Frame );
QVBox *box1 = new QVBox( Frame );
+ box1->setMinimumWidth( 100 );
// Today text
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( 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 );
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->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() {
}