summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--Rules.make2
-rw-r--r--libopie2/opiepim/core/oconversion.cpp39
-rw-r--r--libopie2/opiepim/core/oconversion.h7
-rw-r--r--libopie2/opiepim/core/opimcache.h10
-rw-r--r--libopie2/opiepim/core/opimmaintainer.cpp2
-rw-r--r--libopie2/opiepim/core/opimmaintainer.h5
-rw-r--r--libopie2/opiepim/core/opimresolver.cpp11
-rw-r--r--libopie2/opiepim/core/opimresolver.h12
-rw-r--r--libopie2/opiepim/core/opimstate.cpp5
-rw-r--r--libopie2/opiepim/core/opimstate.h7
-rw-r--r--libopie2/opiepim/core/opimxref.cpp12
-rw-r--r--libopie2/opiepim/core/opimxref.h10
-rw-r--r--libopie2/opiepim/core/opimxrefmanager.cpp14
-rw-r--r--libopie2/opiepim/core/opimxrefmanager.h9
-rw-r--r--libopie2/opiepim/core/opimxrefpartner.cpp12
-rw-r--r--libopie2/opiepim/core/opimxrefpartner.h3
-rw-r--r--libopie2/opiepim/core/orecur.cpp76
-rw-r--r--libopie2/opiepim/core/orecur.h11
-rw-r--r--libopie2/opiepim/core/otemplatebase.h9
-rw-r--r--libopie2/opiepim/core/otimezone.cpp88
-rw-r--r--libopie2/opiepim/core/otimezone.h11
-rw-r--r--libopie2/opieui/otabwidget.h6
-rw-r--r--libopie2/opieui/owait.cpp77
-rw-r--r--libopie2/opieui/owait.h57
24 files changed, 348 insertions, 147 deletions
diff --git a/Rules.make b/Rules.make
index 0360cc6..84b7dab 100644
--- a/Rules.make
+++ b/Rules.make
@@ -112,2 +112,4 @@ $(OPIEDIR)/stamp-headers :
( cd include/opie2 && ln -sf ../../libopie2/opiepim/*.h .; )
+ ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/*.h .; )
+ ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/backends/*.h .; )
( cd include/opie2 && ln -sf ../../libopie2/opieui/*.h .; )
diff --git a/libopie2/opiepim/core/oconversion.cpp b/libopie2/opiepim/core/oconversion.cpp
index b7eebef..160c2c6 100644
--- a/libopie2/opiepim/core/oconversion.cpp
+++ b/libopie2/opiepim/core/oconversion.cpp
@@ -2,3 +2,2 @@
This file is part of the Opie Project
- Copyright (C) The Main Author <main-author@whereever.org>
=. Copyright (C) The Opie Team <opie-devel@handhelds.org>
@@ -29,2 +28,3 @@
+/* OPIE */
#include <opie2/oconversion.h>
@@ -32,4 +32,4 @@
-
-namespace Opie {
+namespace Opie
+{
@@ -53,2 +53,3 @@ QString OConversion::dateToString( const QDate &d )
+
QDate OConversion::dateFromString( const QString& s )
@@ -73,3 +74,4 @@ QDate OConversion::dateFromString( const QString& s )
// but we isValid() again? -zecke
- if ( year < 1900 || year > 3000 ) {
+ if ( year < 1900 || year > 3000 )
+ {
qWarning( "PimContact year is not in range");
@@ -77,3 +79,4 @@ QDate OConversion::dateFromString( const QString& s )
}
- if ( month < 0 || month > 12 ) {
+ if ( month < 0 || month > 12 )
+ {
qWarning( "PimContact month is not in range");
@@ -81,3 +84,4 @@ QDate OConversion::dateFromString( const QString& s )
}
- if ( day < 0 || day > 31 ) {
+ if ( day < 0 || day > 31 )
+ {
qWarning( "PimContact day is not in range");
@@ -87,3 +91,4 @@ QDate OConversion::dateFromString( const QString& s )
date.setYMD( year, month, day );
- if ( !date.isValid() ) {
+ if ( !date.isValid() )
+ {
qWarning( "PimContact date is not valid");
@@ -94,4 +99,8 @@ QDate OConversion::dateFromString( const QString& s )
}
-QString OConversion::dateTimeToString( const QDateTime& dt ) {
- if (!dt.isValid() || dt.isNull() ) return QString::null;
+
+
+QString OConversion::dateTimeToString( const QDateTime& dt )
+{
+ if ( !dt.isValid() || dt.isNull() )
+ return QString::null;
@@ -111,9 +120,11 @@ QString OConversion::dateTimeToString( const QDateTime& dt ) {
- QString str = day + month + year + hour + min + sec;
-
- return str;
+ return day + month + year + hour + min + sec;
}
-QDateTime OConversion::dateTimeFromString( const QString& str) {
- if ( str.isEmpty() ) return QDateTime();
+
+QDateTime OConversion::dateTimeFromString( const QString& str )
+{
+
+ if ( str.isEmpty() )
+ return QDateTime();
int day = str.mid(0, 2).toInt();
diff --git a/libopie2/opiepim/core/oconversion.h b/libopie2/opiepim/core/oconversion.h
index 3c4fdf3..eeb97e5 100644
--- a/libopie2/opiepim/core/oconversion.h
+++ b/libopie2/opiepim/core/oconversion.h
@@ -29,7 +29,6 @@
-#ifndef __oconversion_h__
-#define __oconversion_h__
+#ifndef OCONVERSION_H
+#define OCONVERSION_H
-/* #include <time.h> */
-/* #include <sys/types.h> */
+/* QT */
#include <qdatetime.h>
diff --git a/libopie2/opiepim/core/opimcache.h b/libopie2/opiepim/core/opimcache.h
index e70a910..a033574 100644
--- a/libopie2/opiepim/core/opimcache.h
+++ b/libopie2/opiepim/core/opimcache.h
@@ -28,9 +28,11 @@
*/
-#ifndef OPIE_PIM_CACHE_H
-#define OPIE_PIM_CACHE_H
-
-#include <qintcache.h>
+#ifndef OPIMCACHE_H
+#define OPIMCACHE_H
+/* OPIE */
#include <opie2/opimrecord.h>
+/* QT */
+#include <qintcache.h>
+
namespace Opie {
diff --git a/libopie2/opiepim/core/opimmaintainer.cpp b/libopie2/opiepim/core/opimmaintainer.cpp
index b2eff12..b8d829a 100644
--- a/libopie2/opiepim/core/opimmaintainer.cpp
+++ b/libopie2/opiepim/core/opimmaintainer.cpp
@@ -29,3 +29,3 @@
-#include <opie2/opimmaintainer.h>
+#include "opimmaintainer.h"
diff --git a/libopie2/opiepim/core/opimmaintainer.h b/libopie2/opiepim/core/opimmaintainer.h
index 46bc9d2..e7e7eeb 100644
--- a/libopie2/opiepim/core/opimmaintainer.h
+++ b/libopie2/opiepim/core/opimmaintainer.h
@@ -28,5 +28,6 @@
*/
-#ifndef OPIE_PIM_MAINTAINER_H
-#define OPIE_PIM_MAINTAINER_H
+#ifndef OPIMMAINTAINER_H
+#define OPIMMAINTAINER_H
+/* QT */
#include <qstring.h>
diff --git a/libopie2/opiepim/core/opimresolver.cpp b/libopie2/opiepim/core/opimresolver.cpp
index eceabcb..73d7de1 100644
--- a/libopie2/opiepim/core/opimresolver.cpp
+++ b/libopie2/opiepim/core/opimresolver.cpp
@@ -28,11 +28,12 @@
*/
-#include <qcopchannel_qws.h>
-#include <qpe/qcopenvelope_qws.h>
+#include "opimresolver.h"
-#include <opie2/otodoaccess.h>
+/* OPIE */
#include <opie2/ocontactaccess.h>
+#include <opie2/otodoaccess.h>
+#include <qpe/qcopenvelope_qws.h>
-//#include "opimfactory.h"
-#include <opie2/opimresolver.h>
+/* QT */
+#include <qcopchannel_qws.h>
diff --git a/libopie2/opiepim/core/opimresolver.h b/libopie2/opiepim/core/opimresolver.h
index adc7c16..dd6f07f 100644
--- a/libopie2/opiepim/core/opimresolver.h
+++ b/libopie2/opiepim/core/opimresolver.h
@@ -28,5 +28,9 @@
*/
-#ifndef OPIE_PIM_RESOLVER
-#define OPIE_PIM_RESOLVER
+#ifndef OPIMRESOLVER_H
+#define OPIMRESOLVER_H
+/* OPIE */
+#include <opie2/otemplatebase.h>
+
+/* QT */
#include <qstring.h>
@@ -34,4 +38,2 @@
-#include <opie2/otemplatebase.h>
-
namespace Opie {
@@ -49,2 +51,3 @@ namespace Opie {
class OPimResolver {
+
public:
@@ -102,2 +105,3 @@ public:
OPimBase* backend( int rtti );
+
private:
diff --git a/libopie2/opiepim/core/opimstate.cpp b/libopie2/opiepim/core/opimstate.cpp
index 1013a1c..8aff558 100644
--- a/libopie2/opiepim/core/opimstate.cpp
+++ b/libopie2/opiepim/core/opimstate.cpp
@@ -28,6 +28,7 @@
*/
-#include <qshared.h>
-
#include "opimstate.h"
+/* QT */
+#include <qshared.h>
+
namespace Opie {
diff --git a/libopie2/opiepim/core/opimstate.h b/libopie2/opiepim/core/opimstate.h
index 78e8cd0..8336b3e 100644
--- a/libopie2/opiepim/core/opimstate.h
+++ b/libopie2/opiepim/core/opimstate.h
@@ -28,5 +28,6 @@
*/
-#ifndef OPIE_PIM_STATE_H
-#define OPIE_PIM_STATE_H
+#ifndef OPIMSTATE_H
+#define OPIMSTATE_H
+/* QT */
#include <qstring.h>
@@ -46,2 +47,3 @@ namespace Opie {
class OPimState {
+
public:
@@ -62,2 +64,3 @@ public:
int state()const;
+
private:
diff --git a/libopie2/opiepim/core/opimxref.cpp b/libopie2/opiepim/core/opimxref.cpp
index 85d3345..f58ebb5 100644
--- a/libopie2/opiepim/core/opimxref.cpp
+++ b/libopie2/opiepim/core/opimxref.cpp
@@ -28,3 +28,3 @@
*/
-#include <opie2/opimxref.h>
+#include "opimxref.h"
@@ -38,4 +38,3 @@ OPimXRef::OPimXRef( const OPimXRefPartner& one, const OPimXRefPartner& two )
}
-OPimXRef::OPimXRef()
- : m_partners(2)
+OPimXRef::OPimXRef():m_partners(2)
{
@@ -43,2 +42,3 @@ OPimXRef::OPimXRef()
}
+
OPimXRef::OPimXRef( const OPimXRef& ref) {
@@ -46,4 +46,6 @@ OPimXRef::OPimXRef( const OPimXRef& ref) {
}
+
OPimXRef::~OPimXRef() {
}
+
OPimXRef &OPimXRef::operator=( const OPimXRef& ref) {
@@ -54,2 +56,3 @@ OPimXRef &OPimXRef::operator=( const OPimXRef& ref) {
}
+
bool OPimXRef::operator==( const OPimXRef& oper ) {
@@ -62,2 +65,3 @@ OPimXRefPartner OPimXRef::partner( enum Partners par) const{
}
+
void OPimXRef::setPartner( enum Partners par, const OPimXRefPartner& part) {
@@ -65,2 +69,3 @@ void OPimXRef::setPartner( enum Partners par, const OPimXRefPartner& part) {
}
+
bool OPimXRef::containsString( const QString& string ) const{
@@ -71,2 +76,3 @@ bool OPimXRef::containsString( const QString& string ) const{
}
+
bool OPimXRef::containsUid( int uid ) const{
diff --git a/libopie2/opiepim/core/opimxref.h b/libopie2/opiepim/core/opimxref.h
index 820c9c4..f3e814e 100644
--- a/libopie2/opiepim/core/opimxref.h
+++ b/libopie2/opiepim/core/opimxref.h
@@ -29,5 +29,9 @@
-#ifndef OPIM_XREF_H
-#define OPIM_XREF_H
+#ifndef OPIMXREF_H
+#define OPIMXREF_H
+/* OPIE */
+#include <opie2/opimxrefpartner.h>
+
+/* QT */
#include <qarray.h>
@@ -35,4 +39,2 @@
-#include <opie2/opimxrefpartner.h>
-
namespace Opie {
diff --git a/libopie2/opiepim/core/opimxrefmanager.cpp b/libopie2/opiepim/core/opimxrefmanager.cpp
index bf6fed6..e7c6c5a 100644
--- a/libopie2/opiepim/core/opimxrefmanager.cpp
+++ b/libopie2/opiepim/core/opimxrefmanager.cpp
@@ -28,3 +28,3 @@
*/
-#include <opie2/opimxrefmanager.h>
+#include "opimxrefmanager.h"
@@ -34,2 +34,3 @@ OPimXRefManager::OPimXRefManager() {
}
+
OPimXRefManager::OPimXRefManager( const OPimXRefManager& ref) {
@@ -37,4 +38,6 @@ OPimXRefManager::OPimXRefManager( const OPimXRefManager& ref) {
}
+
OPimXRefManager::~OPimXRefManager() {
}
+
OPimXRefManager &OPimXRefManager::operator=( const OPimXRefManager& ref) {
@@ -43,2 +46,3 @@ OPimXRefManager &OPimXRefManager::operator=( const OPimXRefManager& ref) {
}
+
bool OPimXRefManager::operator==( const OPimXRefManager& /*ref*/) {
@@ -48,2 +52,3 @@ bool OPimXRefManager::operator==( const OPimXRefManager& /*ref*/) {
}
+
void OPimXRefManager::add( const OPimXRef& ref) {
@@ -51,2 +56,3 @@ void OPimXRefManager::add( const OPimXRef& ref) {
}
+
void OPimXRefManager::remove( const OPimXRef& ref) {
@@ -54,2 +60,3 @@ void OPimXRefManager::remove( const OPimXRef& ref) {
}
+
void OPimXRefManager::replace( const OPimXRef& ref) {
@@ -58,2 +65,3 @@ void OPimXRefManager::replace( const OPimXRef& ref) {
}
+
void OPimXRefManager::clear() {
@@ -61,2 +69,3 @@ void OPimXRefManager::clear() {
}
+
QStringList OPimXRefManager::apps()const {
@@ -75,2 +84,3 @@ QStringList OPimXRefManager::apps()const {
}
+
OPimXRef::ValueList OPimXRefManager::list()const {
@@ -78,2 +88,3 @@ OPimXRef::ValueList OPimXRefManager::list()const {
}
+
OPimXRef::ValueList OPimXRefManager::list( const QString& appName )const{
@@ -89,2 +100,3 @@ OPimXRef::ValueList OPimXRefManager::list( const QString& appName )const{
}
+
OPimXRef::ValueList OPimXRefManager::list( int uid )const {
diff --git a/libopie2/opiepim/core/opimxrefmanager.h b/libopie2/opiepim/core/opimxrefmanager.h
index fa2d7f4..b80a645 100644
--- a/libopie2/opiepim/core/opimxrefmanager.h
+++ b/libopie2/opiepim/core/opimxrefmanager.h
@@ -28,9 +28,12 @@
*/
-#ifndef OPIM_XREF_MANAGER_H
-#define OPIM_XREF_MANAGER_H
-#include <qstringlist.h>
+#ifndef OPIMXREFMANAGER_H
+#define OPIMXREFMANAGER_H
+/* OPIE */
#include <opie2/opimxref.h>
+/* QT */
+#include <qstringlist.h>
+
namespace Opie {
diff --git a/libopie2/opiepim/core/opimxrefpartner.cpp b/libopie2/opiepim/core/opimxrefpartner.cpp
index f6ccc7f..3741bc3 100644
--- a/libopie2/opiepim/core/opimxrefpartner.cpp
+++ b/libopie2/opiepim/core/opimxrefpartner.cpp
@@ -28,3 +28,3 @@
*/
-#include <opie2/opimxrefpartner.h>
+#include "opimxrefpartner.h"
@@ -36,2 +36,3 @@ OPimXRefPartner::OPimXRefPartner( const QString& appName,
}
+
OPimXRefPartner::OPimXRefPartner( const OPimXRefPartner& ref ) {
@@ -39,4 +40,6 @@ OPimXRefPartner::OPimXRefPartner( const OPimXRefPartner& ref ) {
}
+
OPimXRefPartner::~OPimXRefPartner() {
}
+
OPimXRefPartner &OPimXRefPartner::operator=( const OPimXRefPartner& par ) {
@@ -48,2 +51,3 @@ OPimXRefPartner &OPimXRefPartner::operator=( const OPimXRefPartner& par ) {
}
+
bool OPimXRefPartner::operator==( const OPimXRefPartner& par ) {
@@ -55,2 +59,3 @@ bool OPimXRefPartner::operator==( const OPimXRefPartner& par ) {
}
+
QString OPimXRefPartner::service()const {
@@ -58,2 +63,3 @@ QString OPimXRefPartner::service()const {
}
+
int OPimXRefPartner::uid()const {
@@ -61,2 +67,3 @@ int OPimXRefPartner::uid()const {
}
+
int OPimXRefPartner::field()const {
@@ -64,2 +71,3 @@ int OPimXRefPartner::field()const {
}
+
void OPimXRefPartner::setService( const QString& appName ) {
@@ -67,2 +75,3 @@ void OPimXRefPartner::setService( const QString& appName ) {
}
+
void OPimXRefPartner::setUid( int uid ) {
@@ -70,2 +79,3 @@ void OPimXRefPartner::setUid( int uid ) {
}
+
void OPimXRefPartner::setField( int field ) {
diff --git a/libopie2/opiepim/core/opimxrefpartner.h b/libopie2/opiepim/core/opimxrefpartner.h
index 6853d5b..005dbc0 100644
--- a/libopie2/opiepim/core/opimxrefpartner.h
+++ b/libopie2/opiepim/core/opimxrefpartner.h
@@ -31,2 +31,3 @@
+/* QT */
#include <qstring.h>
@@ -42,2 +43,3 @@ namespace Opie {
class OPimXRefPartner {
+
public:
@@ -58,2 +60,3 @@ public:
void setField( int field );
+
private:
diff --git a/libopie2/opiepim/core/orecur.cpp b/libopie2/opiepim/core/orecur.cpp
index 033f264..5e2da25 100644
--- a/libopie2/opiepim/core/orecur.cpp
+++ b/libopie2/opiepim/core/orecur.cpp
@@ -29,12 +29,16 @@
-#include <time.h>
+#include "orecur.h"
-#include <qshared.h>
+/* OPIE */
+#include <opie2/otimezone.h>
+#include <qpe/timeconversion.h>
-#include <qtopia/timeconversion.h>
+/* QT */
+#include <qshared.h>
-#include <opie2/otimezone.h>
-#include <opie2/orecur.h>
+/* STD */
+#include <time.h>
namespace Opie {
+
struct ORecur::Data : public QShared {
@@ -79,2 +83,4 @@ ORecur::ORecur( const ORecur& rec)
}
+
+
ORecur::~ORecur() {
@@ -85,2 +91,4 @@ ORecur::~ORecur() {
}
+
+
void ORecur::deref() {
@@ -91,2 +99,4 @@ void ORecur::deref() {
}
+
+
bool ORecur::operator==( const ORecur& )const {
@@ -94,2 +104,4 @@ bool ORecur::operator==( const ORecur& )const {
}
+
+
ORecur &ORecur::operator=( const ORecur& re) {
@@ -103,2 +115,4 @@ ORecur &ORecur::operator=( const ORecur& re) {
}
+
+
bool ORecur::doesRecur()const {
@@ -106,2 +120,4 @@ bool ORecur::doesRecur()const {
}
+
+
/*
@@ -120,2 +136,4 @@ bool ORecur::doesRecur( const QDate& date ) {
}
+
+
// FIXME unuglify!
@@ -131,2 +149,4 @@ bool ORecur::nextOcurrence( const QDate& from, QDate& next ) {
}
+
+
bool ORecur::p_nextOccurrence( const QDate& from, QDate& next ) {
@@ -403,2 +423,4 @@ bool ORecur::p_nextOccurrence( const QDate& from, QDate& next ) {
}
+
+
ORecur::RepeatType ORecur::type()const{
@@ -406,2 +428,4 @@ ORecur::RepeatType ORecur::type()const{
}
+
+
int ORecur::frequency()const {
@@ -409,2 +433,4 @@ int ORecur::frequency()const {
}
+
+
int ORecur::position()const {
@@ -412,2 +438,4 @@ int ORecur::position()const {
}
+
+
char ORecur::days() const{
@@ -415,2 +443,4 @@ char ORecur::days() const{
}
+
+
bool ORecur::hasEndDate()const {
@@ -418,2 +448,4 @@ bool ORecur::hasEndDate()const {
}
+
+
QDate ORecur::endDate()const {
@@ -421,2 +453,4 @@ QDate ORecur::endDate()const {
}
+
+
QDate ORecur::start()const{
@@ -424,2 +458,4 @@ QDate ORecur::start()const{
}
+
+
QDateTime ORecur::createdDateTime()const {
@@ -427,2 +463,4 @@ QDateTime ORecur::createdDateTime()const {
}
+
+
int ORecur::repetition()const {
@@ -430,2 +468,4 @@ int ORecur::repetition()const {
}
+
+
QString ORecur::service()const {
@@ -433,2 +473,4 @@ QString ORecur::service()const {
}
+
+
ORecur::ExceptionList& ORecur::exceptions() {
@@ -436,2 +478,4 @@ ORecur::ExceptionList& ORecur::exceptions() {
}
+
+
void ORecur::setType( const RepeatType& z) {
@@ -440,2 +484,4 @@ void ORecur::setType( const RepeatType& z) {
}
+
+
void ORecur::setFrequency( int freq ) {
@@ -444,2 +490,4 @@ void ORecur::setFrequency( int freq ) {
}
+
+
void ORecur::setPosition( int pos ) {
@@ -448,2 +496,4 @@ void ORecur::setPosition( int pos ) {
}
+
+
void ORecur::setDays( char c ) {
@@ -452,2 +502,4 @@ void ORecur::setDays( char c ) {
}
+
+
void ORecur::setEndDate( const QDate& dt) {
@@ -456,2 +508,4 @@ void ORecur::setEndDate( const QDate& dt) {
}
+
+
void ORecur::setCreatedDateTime( const QDateTime& t) {
@@ -460,2 +514,4 @@ void ORecur::setCreatedDateTime( const QDateTime& t) {
}
+
+
void ORecur::setHasEndDate( bool b) {
@@ -464,2 +520,4 @@ void ORecur::setHasEndDate( bool b) {
}
+
+
void ORecur::setRepitition( int rep ) {
@@ -468,2 +526,4 @@ void ORecur::setRepitition( int rep ) {
}
+
+
void ORecur::setService( const QString& app ) {
@@ -472,2 +532,4 @@ void ORecur::setService( const QString& app ) {
}
+
+
void ORecur::setStart( const QDate& dt ) {
@@ -476,2 +538,4 @@ void ORecur::setStart( const QDate& dt ) {
}
+
+
void ORecur::checkOrModify() {
@@ -494,2 +558,4 @@ void ORecur::checkOrModify() {
}
+
+
QString ORecur::toString()const {
diff --git a/libopie2/opiepim/core/orecur.h b/libopie2/opiepim/core/orecur.h
index 60508f5..7808897 100644
--- a/libopie2/opiepim/core/orecur.h
+++ b/libopie2/opiepim/core/orecur.h
@@ -29,7 +29,6 @@
-#ifndef OPIE_RECUR_H
-#define OPIE_RECUR_H
-
-#include <sys/types.h>
+#ifndef ORECUR_H
+#define ORECUR_H
+/* QT */
#include <qdatetime.h>
@@ -38,2 +37,4 @@
+/* STD */
+#include <sys/types.h>
@@ -45,2 +46,3 @@ namespace Opie {
class ORecur {
+
public:
@@ -116,2 +118,3 @@ public:
QString toString()const;
+
private:
diff --git a/libopie2/opiepim/core/otemplatebase.h b/libopie2/opiepim/core/otemplatebase.h
index 17d9961..58cbfeb 100644
--- a/libopie2/opiepim/core/otemplatebase.h
+++ b/libopie2/opiepim/core/otemplatebase.h
@@ -28,9 +28,10 @@
*/
-#ifndef OPIE_TEMPLATE_BASE_H
-#define OPIE_TEMPLATE_BASE_H
-
-#include <qarray.h>
+#ifndef OTEMPLATEBASE_H
+#define OTEMPLATEBASE_H
+/* OPIE */
#include <opie2/opimrecord.h>
+/* QT */
+#include <qarray.h>
diff --git a/libopie2/opiepim/core/otimezone.cpp b/libopie2/opiepim/core/otimezone.cpp
index dab68af..e67715f 100644
--- a/libopie2/opiepim/core/otimezone.cpp
+++ b/libopie2/opiepim/core/otimezone.cpp
@@ -29,12 +29,14 @@
+#include "otimezone.h"
+
+/* STD */
#include <stdio.h>
#include <stdlib.h>
-
#include <sys/types.h>
-#include <opie2/otimezone.h>
+namespace Opie
+{
-namespace Opie {
-
- QDateTime utcTime( time_t t) {
+QDateTime utcTime( time_t t )
+{
tm* broken = ::gmtime( &t );
@@ -45,5 +47,7 @@ namespace Opie {
}
- QDateTime utcTime( time_t t, const QString& zone) {
+QDateTime utcTime( time_t t, const QString& zone )
+{
QCString org = ::getenv( "TZ" );
#ifndef Q_OS_MACX // Following line causes bus errors on Mac
+
::setenv( "TZ", zone.latin1(), true );
@@ -55,2 +59,3 @@ namespace Opie {
#warning "Need a replacement for MacOSX!!"
+
tm* broken = ::localtime( &t );
@@ -64,3 +69,4 @@ namespace Opie {
}
- time_t to_Time_t( const QDateTime& utc, const QString& str ) {
+time_t to_Time_t( const QDateTime& utc, const QString& str )
+{
QDate d = utc.date();
@@ -78,2 +84,3 @@ namespace Opie {
#ifndef Q_OS_MACX // Following line causes bus errors on Mac
+
::setenv( "TZ", str.latin1(), true );
@@ -85,4 +92,6 @@ namespace Opie {
#warning "Need a replacement for MacOSX!!"
+
time_t ti = ::mktime( &broken );
#endif
+
return ti;
@@ -91,10 +100,15 @@ namespace Opie {
-namespace Opie {
+namespace Opie
+{
OTimeZone::OTimeZone( const ZoneName& zone )
- : m_name(zone) {
-}
-OTimeZone::~OTimeZone() {
-}
+ : m_name( zone )
+{}
+
+
+OTimeZone::~OTimeZone()
+{}
-bool OTimeZone::isValid()const {
+
+bool OTimeZone::isValid() const
+{
return !m_name.isEmpty();
@@ -106,14 +120,26 @@ bool OTimeZone::isValid()const {
*/
-QDateTime OTimeZone::toLocalDateTime( const QDateTime& dt) {
+QDateTime OTimeZone::toLocalDateTime( const QDateTime& dt )
+{
return OTimeZone::current().toDateTime( dt, *this );
}
-QDateTime OTimeZone::toUTCDateTime( const QDateTime& dt ) {
+
+
+QDateTime OTimeZone::toUTCDateTime( const QDateTime& dt )
+{
return OTimeZone::utc().toDateTime( dt, *this );
}
-QDateTime OTimeZone::fromUTCDateTime( time_t t) {
+
+
+QDateTime OTimeZone::fromUTCDateTime( time_t t )
+{
return utcTime( t );
}
-QDateTime OTimeZone::toDateTime( time_t t) {
+
+
+QDateTime OTimeZone::toDateTime( time_t t )
+{
return utcTime( t, m_name );
}
+
+
/*
@@ -122,3 +148,4 @@ QDateTime OTimeZone::toDateTime( time_t t) {
*/
-QDateTime OTimeZone::toDateTime( const QDateTime& dt, const OTimeZone& zone ) {
+QDateTime OTimeZone::toDateTime( const QDateTime& dt, const OTimeZone& zone )
+{
time_t utc = to_Time_t( dt, zone.m_name );
@@ -127,9 +154,18 @@ QDateTime OTimeZone::toDateTime( const QDateTime& dt, const OTimeZone& zone ) {
}
-time_t OTimeZone::fromDateTime( const QDateTime& time ) {
+
+
+time_t OTimeZone::fromDateTime( const QDateTime& time )
+{
return to_Time_t( time, m_name );
}
-time_t OTimeZone::fromUTCDateTime( const QDateTime& time ) {
+
+
+time_t OTimeZone::fromUTCDateTime( const QDateTime& time )
+{
return to_Time_t( time, "UTC" );
}
-OTimeZone OTimeZone::current() {
+
+
+OTimeZone OTimeZone::current()
+{
QCString str = ::getenv("TZ");
@@ -138,6 +174,12 @@ OTimeZone OTimeZone::current() {
}
-OTimeZone OTimeZone::utc() {
+
+
+OTimeZone OTimeZone::utc()
+{
return OTimeZone("UTC");
}
-QString OTimeZone::timeZone()const {
+
+
+QString OTimeZone::timeZone() const
+{
return m_name;
diff --git a/libopie2/opiepim/core/otimezone.h b/libopie2/opiepim/core/otimezone.h
index 28ae6cb..f0b4022 100644
--- a/libopie2/opiepim/core/otimezone.h
+++ b/libopie2/opiepim/core/otimezone.h
@@ -29,8 +29,11 @@
-#ifndef OPIE_TIME_ZONE_H
-#define OPIE_TIME_ZONE_H
+#ifndef OTIMEZONE_H
+#define OTIMEZONE_H
-#include <time.h>
+/* QT */
#include <qdatetime.h>
+/* STD */
+#include <time.h>
+
namespace Opie
@@ -44,2 +47,3 @@ namespace Opie
class OTimeZone {
+
public:
@@ -94,2 +98,3 @@ class OTimeZone {
QString timeZone()const;
+
private:
diff --git a/libopie2/opieui/otabwidget.h b/libopie2/opieui/otabwidget.h
index 51d1c6d..c7d32c2 100644
--- a/libopie2/opieui/otabwidget.h
+++ b/libopie2/opieui/otabwidget.h
@@ -2,4 +2,3 @@
                This file is part of the Opie Project
-
-              Copyright (c) 2002 Dan Williams <williamsdr@acm.org>
+              Copyright (C) 2002 Dan Williams <williamsdr@acm.org>
=.
@@ -71,4 +70,4 @@ class OTabWidget : public QWidget
Q_OBJECT
-public:
+ public:
/**
@@ -109,3 +108,2 @@ public:
*/
- // FIXME WFlags? -zecke
OTabWidget( QWidget * = 0, const char * = 0, TabStyle = Global, TabPosition = Top );
diff --git a/libopie2/opieui/owait.cpp b/libopie2/opieui/owait.cpp
index 0fdf08d..8bb4ed6 100644
--- a/libopie2/opieui/owait.cpp
+++ b/libopie2/opieui/owait.cpp
@@ -1,25 +1,30 @@
-/* This file is part of the OPIE libraries
- Copyright (C) 2003 Maximilian Reiss (harlekin@handhelds.org)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+/*
+                This file is part of the Opie Project
+              Copyright (C) 2003 Maximilian Reiss <harlekin@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; either version 2 of the License,
+     ._= =}       : or (at your option) any later version.
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This program is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+    : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qpe/qpeapplication.h>
-#include <qpainter.h>
+*/
@@ -27,4 +32,10 @@
+/* OPIE */
+#include <qpe/qpeapplication.h>
#include <qpe/resource.h>
+/* QT */
+#include <qlayout.h>
+#include <qpainter.h>
+
static int frame = 0;
@@ -41,3 +52,4 @@ static int frame = 0;
OWait::OWait(QWidget *parent, const char* msg, bool dispIcon )
- :QDialog(parent, msg, TRUE,WStyle_Customize) {
+ :QDialog( parent, msg, TRUE, WStyle_Customize )
+{
@@ -62,3 +74,4 @@ OWait::OWait(QWidget *parent, const char* msg, bool dispIcon )
-void OWait::timerEvent( QTimerEvent * ) {
+void OWait::timerEvent( QTimerEvent * )
+{
frame = (++frame) % 4;
@@ -67,3 +80,4 @@ void OWait::timerEvent( QTimerEvent * ) {
-void OWait::paintEvent( QPaintEvent * ) {
+void OWait::paintEvent( QPaintEvent * )
+{
QPainter p( m_lb );
@@ -72,3 +86,4 @@ void OWait::paintEvent( QPaintEvent * ) {
-void OWait::show() {
+void OWait::show()
+{
@@ -80,3 +95,4 @@ void OWait::show() {
-void OWait::hide() {
+void OWait::hide()
+{
killTimers();
@@ -87,3 +103,4 @@ void OWait::hide() {
-void OWait::setTimerLength( int length ) {
+void OWait::setTimerLength( int length )
+{
m_timerLength = length;
@@ -91,3 +108,3 @@ void OWait::setTimerLength( int length ) {
-OWait::~OWait() {
-}
+OWait::~OWait()
+{}
diff --git a/libopie2/opieui/owait.h b/libopie2/opieui/owait.h
index cbfc8d6..3267064 100644
--- a/libopie2/opieui/owait.h
+++ b/libopie2/opieui/owait.h
@@ -1,28 +1,38 @@
-/* This file is part of the OPIE libraries
- Copyright (C) 2003 Maximilian Reiss (harlekin@handhelds.org)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+/*
+                This file is part of the Opie Project
+              Copyright (C) 2003 Maximilian Reiss <harlekin@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; either version 2 of the License,
+     ._= =}       : or (at your option) any later version.
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This program is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+    : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-*/
-
+*/
-#ifndef WAITPOPUP_H
-#define WAITPOPUP_H
+#ifndef OWAIT_H
+#define OWAIT_H
+/* QT */
#include <qdialog.h>
-#include <qpixmap.h>
#include <qlabel.h>
+#include <qpixmap.h>
#include <qtimer.h>
@@ -36,4 +46,4 @@
*/
-class OWait : public QDialog {
-
+class OWait : public QDialog
+{
Q_OBJECT
@@ -41,3 +51,2 @@ class OWait : public QDialog {
public:
- // FIXME Wflags -zecke?
OWait(QWidget *parent=0,const char* name=0, bool dispIcon=TRUE);