summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-02-21 18:19:56 (UTC)
committer harlekin <harlekin>2003-02-21 18:19:56 (UTC)
commit3b37e71ad7dd41555763d15a16c691b503780de8 (patch) (side-by-side diff)
tree9fa7d1145a1e4dc30da8c90fef55e1c3b0d1065c
parent0bb9d0f9e7da80f0ae3b91d4ebbb7aab4d2b9df7 (diff)
downloadopie-3b37e71ad7dd41555763d15a16c691b503780de8.zip
opie-3b37e71ad7dd41555763d15a16c691b503780de8.tar.gz
opie-3b37e71ad7dd41555763d15a16c691b503780de8.tar.bz2
got rid of some unneeded includes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.cpp4
-rw-r--r--core/pim/today/plugins/todolist/todoplugin.h1
-rw-r--r--core/pim/today/today.cpp8
-rw-r--r--core/pim/today/today.h7
-rw-r--r--core/pim/today/todaybase.cpp1
5 files changed, 3 insertions, 18 deletions
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
index 3a7360d..97fb77e 100644
--- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
@@ -1,79 +1,79 @@
/*
* datebookpluginwidget.cpp
*
* copyright : (c) 2002 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 "datebookpluginwidget.h"
#include <qpe/timestring.h>
#include <qpe/config.h>
#include <qdatetime.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qtl.h>
#include <qscrollview.h>
#include <qtimer.h>
-DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name)
- : QWidget(parent, name ) {
+DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name )
+ : QWidget(parent, name ) {
db = 0l;
m_layoutDates = 0l;
if ( db ) {
delete db;
}
db = new DateBookDB;
if ( m_layoutDates ) {
delete m_layoutDates;
}
m_layoutDates = new QVBoxLayout( this );
m_layoutDates->setAutoAdd( true );
m_eventsList.setAutoDelete( true );
readConfig();
getDates();
}
DatebookPluginWidget::~DatebookPluginWidget() {
delete db;
delete m_layoutDates;
}
void DatebookPluginWidget::readConfig() {
Config cfg( "todaydatebookplugin" );
cfg.setGroup( "config" );
m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 );
m_show_location = cfg.readNumEntry( "showlocation", 1 );
m_show_notes = cfg.readNumEntry( "shownotes", 0 );
m_onlyLater = cfg.readNumEntry( "onlylater", 1 );
m_moreDays = cfg.readNumEntry( "moredays", 0 );
}
void DatebookPluginWidget::refresh() {
m_eventsList.clear();
getDates();
}
/**
* Get all events that are in the datebook xml file for today
*/
void DatebookPluginWidget::getDates() {
QDate date = QDate::currentDate();
diff --git a/core/pim/today/plugins/todolist/todoplugin.h b/core/pim/today/plugins/todolist/todoplugin.h
index 7a2235c..d7b51b4 100644
--- a/core/pim/today/plugins/todolist/todoplugin.h
+++ b/core/pim/today/plugins/todolist/todoplugin.h
@@ -1,50 +1,49 @@
/*
* todoplugin.h
*
* copyright : (c) 2002 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. *
* *
***************************************************************************/
#ifndef TODOLIST_PLUGIN_H
#define TODOLIST_PLUGIN_H
#include <qstring.h>
#include <qguardedptr.h>
#include <qwidget.h>
-#include <opie/tododb.h>
#include <opie/oclickablelabel.h>
#include <opie/todayplugininterface.h>
#include "todopluginwidget.h"
class TodolistPlugin : public TodayPluginObject {
public:
TodolistPlugin();
~TodolistPlugin();
QString pluginName() const;
double versionNumber() const;
QString pixmapNameWidget() const;
QWidget* widget(QWidget *);
QString pixmapNameConfig() const;
TodayConfigWidget* configWidget(QWidget *);
QString appName() const;
bool excludeFromRefresh() const;
void refresh();
private:
QGuardedPtr<TodolistPluginWidget> m_widget;
};
#endif
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 2497ee1..5e5d373 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -1,88 +1,80 @@
/*
* today.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. *
* *
***************************************************************************/
#define QTOPIA_INTERNAL_LANGLIST
#include "today.h"
-#include <opie/todayconfigwidget.h>
#include <qpe/config.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/resource.h>
#include <qpe/global.h>
#include <qpe/qpeapplication.h>
#include <qpe/contact.h>
#include <qdir.h>
#include <qfile.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
#include <qtimer.h>
-#include <qpixmap.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <opie/otabwidget.h>
-#include <qdialog.h>
#include <qwhatsthis.h>
#include <qtranslator.h>
struct TodayPlugin {
TodayPlugin() : library( 0 ), iface( 0 ), guiPart( 0 ), guiBox( 0 ) {}
QLibrary *library;
QInterfacePtr<TodayPluginInterface> iface;
TodayPluginObject *guiPart;
QWidget *guiBox;
QString name;
bool active;
bool excludeRefresh;
int pos;
};
static QValueList<TodayPlugin> pluginList;
Today::Today( QWidget* parent, const char* name, WFlags fl )
: TodayBase( parent, name, fl ) {
QObject::connect( (QObject*)ConfigButton, SIGNAL( clicked() ), this, SLOT( startConfig() ) );
QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT( editCard() ) );
#if defined(Q_WS_QWS)
#if !defined(QT_NO_COP)
QCopChannel *todayChannel = new QCopChannel( "QPE/Today" , this );
connect ( todayChannel, SIGNAL( received( const QCString &, const QByteArray &) ),
this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) );
#endif
#endif
setOwnerField();
m_refreshTimer = new QTimer( this );
connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
m_refreshTimer->start( 15000 );
//init();
loadPlugins();
showMaximized();
}
/**
* Qcop receive method.
*/
void Today::channelReceived( const QCString &msg, const QByteArray & data ) {
QDataStream stream( data, IO_ReadOnly );
if ( msg == "message(QString)" ) {
QString message;
stream >> message;
diff --git a/core/pim/today/today.h b/core/pim/today/today.h
index 24f5611..3802feb 100644
--- a/core/pim/today/today.h
+++ b/core/pim/today/today.h
@@ -1,76 +1,71 @@
/*
* today.h
*
* 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. *
* *
***************************************************************************/
#ifndef TODAY_H
#define TODAY_H
-#include <opie/tododb.h>
-
-#include <qdatetime.h>
-#include <qlist.h>
-#include <qhbox.h>
#include <qpe/qlibrary.h>
-#include <qpe/event.h>
#include "todayconfig.h"
#include "todaybase.h"
+
#include <opie/todayplugininterface.h>
class QVBoxLayout;
class OClickableLabel;
class Today : public TodayBase {
Q_OBJECT
public:
Today( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~Today();
private slots:
void startConfig();
void startApplication();
void editCard();
void refresh();
private:
void init();
void setOwnerField();
void setOwnerField(QString &string);
void loadPlugins();
void draw();
void setRefreshTimer( int );
private slots:
void channelReceived(const QCString &msg, const QByteArray & data);
private:
TodayConfig *conf;
QStringList m_excludeApplets;
QStringList m_allApplets;
QTimer *m_refreshTimer;
bool m_refreshTimerEnabled;
int m_newStart;
int m_iconSize;
int m_maxCharClip;
};
#endif
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp
index 9a93b56..826e253 100644
--- a/core/pim/today/todaybase.cpp
+++ b/core/pim/today/todaybase.cpp
@@ -1,67 +1,66 @@
/*
* todaybase.cpp
*
* copyright : (c) 2002 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 <qframe.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( "today/config" ); // 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
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, 1, 168, 40 ) );
QFont TodayLabel_font( TodayLabel->font() );
TodayLabel_font.setBold( TRUE );
TodayLabel_font.setPointSize( 40 );
TodayLabel->setFont( TodayLabel_font );