summaryrefslogtreecommitdiff
authorzecke <zecke>2004-03-14 18:58:59 (UTC)
committer zecke <zecke>2004-03-14 18:58:59 (UTC)
commitd91c046d1faaf9fb039bda5cc186c96d4ff2c227 (patch) (side-by-side diff)
treec196f20c933d46cc913c9460f02ce3274bd21fc9
parentddfee0836adbd62be48888fbe05e7a79481e81c9 (diff)
downloadopie-d91c046d1faaf9fb039bda5cc186c96d4ff2c227.zip
opie-d91c046d1faaf9fb039bda5cc186c96d4ff2c227.tar.gz
opie-d91c046d1faaf9fb039bda5cc186c96d4ff2c227.tar.bz2
Opie DP changes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/config.in2
-rw-r--r--core/pim/datebook/datebook.pro2
-rw-r--r--core/pim/datebook/datebookweeklst.cpp1
-rw-r--r--core/pim/datebook/datebookweeklst.h4
-rw-r--r--core/pim/datebook/dateentryimpl.cpp2
-rw-r--r--core/pim/datebook/main.cpp3
6 files changed, 8 insertions, 6 deletions
diff --git a/core/pim/datebook/config.in b/core/pim/datebook/config.in
index aa3e8fc..dd9c798 100644
--- a/core/pim/datebook/config.in
+++ b/core/pim/datebook/config.in
@@ -1,4 +1,4 @@
config DATEBOOK
boolean "opie-datebook (a datebook/appointment manager)"
default "y"
- depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE
+ depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIEUI2
diff --git a/core/pim/datebook/datebook.pro b/core/pim/datebook/datebook.pro
index f3b5a59..2b2efaa 100644
--- a/core/pim/datebook/datebook.pro
+++ b/core/pim/datebook/datebook.pro
@@ -1,40 +1,40 @@
CONFIG += qt warn_on release quick-app
HEADERS = datebookday.h \
datebook.h \
dateentryimpl.h \
datebookdayheaderimpl.h \
datebooksettings.h \
datebookweek.h \
datebookweeklst.h \
datebookweekheaderimpl.h \
repeatentry.h \
noteentryimpl.h \
onoteedit.h \
datebookdayallday.h
SOURCES = main.cpp \
datebookday.cpp \
datebook.cpp \
dateentryimpl.cpp \
datebookdayheaderimpl.cpp \
datebooksettings.cpp \
datebookweek.cpp \
datebookweeklst.cpp \
datebookweekheaderimpl.cpp \
repeatentry.cpp \
noteentryimpl.cpp \
onoteedit.cpp \
datebookdayallday.cpp
INTERFACES = dateentry.ui \
datebookdayheader.ui \
datebookweekheader.ui \
datebookweeklstheader.ui \
datebookweeklstdayhdr.ui \
repeatentrybase.ui \
datebooksettingsbase.ui \
noteentry.ui
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe -lopie
+LIBS += -lqpe -lopieui2
TARGET = datebook
include ( $(OPIEDIR)/include.pro )
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp
index af40143..30c925d 100644
--- a/core/pim/datebook/datebookweeklst.cpp
+++ b/core/pim/datebook/datebookweeklst.cpp
@@ -1,63 +1,64 @@
#include "datebookweeklst.h"
#include "datebook.h"
#include <qpe/datebookmonth.h>
#include <qpe/config.h>
#include <qpe/resource.h>
#include <qlayout.h>
#include <qtoolbutton.h>
#include <qtl.h>
bool calcWeek(const QDate &d, int &week, int &year,bool startOnMonday = false);
+using namespace Opie::Ui;
DateBookWeekLstHeader::DateBookWeekLstHeader(bool onM, QWidget* parent, const char* name, WFlags fl)
: DateBookWeekLstHeaderBase(parent, name, fl)
{
setBackgroundMode( PaletteButton );
labelDate->setBackgroundMode( PaletteButton );
forwardweek->setBackgroundMode( PaletteButton );
forwardweek->setPixmap( Resource::loadPixmap("forward") );
forwardmonth->setBackgroundMode( PaletteButton );
forwardmonth->setPixmap( Resource::loadPixmap("fastforward") );
backweek->setBackgroundMode( PaletteButton );
backweek->setPixmap( Resource::loadPixmap("back") );
backmonth->setBackgroundMode( PaletteButton );
backmonth->setPixmap( Resource::loadPixmap("fastback") );
DateBookWeekLstHeaderBaseLayout->setSpacing(0);
DateBookWeekLstHeaderBaseLayout->setMargin(0);
//setSizePolicy(QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding));
setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed));
connect(backmonth, SIGNAL(clicked()), this, SLOT(prevMonth()));
connect(backweek, SIGNAL(clicked()), this, SLOT(prevWeek()));
connect(forwardweek, SIGNAL(clicked()), this, SLOT(nextWeek()));
connect(forwardmonth, SIGNAL(clicked()), this, SLOT(nextMonth()));
connect(labelDate, SIGNAL(clicked()), this, SLOT(pickDate()));
connect(dbl, SIGNAL(toggled(bool)), this, SIGNAL(setDbl(bool)));
bStartOnMonday=onM;
}
DateBookWeekLstHeader::~DateBookWeekLstHeader(){}
void DateBookWeekLstHeader::setDate(const QDate &d) {
int year,week,dayofweek;
date=d;
dayofweek=d.dayOfWeek();
if(bStartOnMonday)
dayofweek--;
else if( dayofweek == 7 )
/* we already have the right day -7 would lead to the same week */
dayofweek = 0;
date=date.addDays(-dayofweek);
calcWeek(date,week,year,bStartOnMonday);
QDate start=date;
QDate stop=start.addDays(6);
labelDate->setText( QString::number(start.day()) + "." +
Calendar::nameOfMonth( start.month() ) + "-" +
QString::number(stop.day()) + "." +
Calendar::nameOfMonth( stop.month()) +" ("+
tr("w")+":"+QString::number( week ) +")");
diff --git a/core/pim/datebook/datebookweeklst.h b/core/pim/datebook/datebookweeklst.h
index f683ce7..32fa23f 100644
--- a/core/pim/datebook/datebookweeklst.h
+++ b/core/pim/datebook/datebookweeklst.h
@@ -1,109 +1,109 @@
#ifndef DATEBOOKWEEKLST
#define DATEBOOKWEEKLST
#include <qwidget.h>
#include <qdatetime.h>
#include <qpe/event.h>
#include <qlabel.h>
#include <qscrollview.h>
#include "datebookweeklstheader.h"
#include "datebookweeklstdayhdr.h"
-#include <opie/oclickablelabel.h>
+#include <opie2/oclickablelabel.h>
class QDateTime;
class DateBookDB;
class DateBookWeekLstHeader: public DateBookWeekLstHeaderBase
{
Q_OBJECT
public:
DateBookWeekLstHeader(bool onM, QWidget* parent = 0, const char* name = 0,
WFlags fl = 0 );
~DateBookWeekLstHeader();
void setDate(const QDate &d);
public slots:
void nextWeek();
void prevWeek();
void nextMonth();
void prevMonth();
void pickDate();
void setDate(int y, int m, int d);
signals:
void dateChanged(QDate &newdate);
void setDbl(bool on);
private:
QDate date;
// bool onMonday;
bool bStartOnMonday;
};
class DateBookWeekLstDayHdr: public DateBookWeekLstDayHdrBase
{
Q_OBJECT
public:
DateBookWeekLstDayHdr(const QDate &d, bool onM,
QWidget* parent = 0, const char* name = 0,
WFlags fl = 0 );
public slots:
void showDay();
void newEvent();
signals:
void showDate(int y, int m, int d);
void addEvent(const QDateTime &start, const QDateTime &stop,
const QString &str, const QString &location);
private:
QDate date;
};
-class DateBookWeekLstEvent: public OClickableLabel
+class DateBookWeekLstEvent: public Opie::Ui::OClickableLabel
{
Q_OBJECT
public:
DateBookWeekLstEvent(const EffectiveEvent &ev, int weeklistviewconfig =1,
QWidget* parent = 0, const char* name = 0,
WFlags fl = 0);
signals:
void editEvent(const Event &e);
private slots:
void editMe();
private:
const EffectiveEvent event;
};
class DateBookWeekLstView: public QWidget
{
Q_OBJECT
public:
DateBookWeekLstView(QValueList<EffectiveEvent> &ev, const QDate &d, bool onM,
QWidget* parent = 0, const char* name = 0,
WFlags fl = 0 );
~DateBookWeekLstView();
signals:
void editEvent(const Event &e);
void showDate(int y, int m, int d);
void addEvent(const QDateTime &start, const QDateTime &stop,
const QString &str, const QString &location);
private:
bool bStartOnMonday;
protected slots:
void keyPressEvent(QKeyEvent *);
};
class DateBookWeekLstDblView: public QWidget {
Q_OBJECT
public:
DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1,
QValueList<EffectiveEvent> &ev2,
QDate &d, bool onM,
QWidget* parent = 0, const char* name = 0,
WFlags fl = 0 );
signals:
void editEvent(const Event &e);
void showDate(int y, int m, int d);
void addEvent(const QDateTime &start, const QDateTime &stop,
const QString &str, const QString &location);
};
diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp
index 57bcd89..dbff18f 100644
--- a/core/pim/datebook/dateentryimpl.cpp
+++ b/core/pim/datebook/dateentryimpl.cpp
@@ -1,80 +1,80 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
** This file is part of Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "dateentryimpl.h"
#include "repeatentry.h"
#include <qpe/qpeapplication.h>
#include <qpe/categoryselect.h>
#include <qpe/datebookmonth.h>
#include <qpe/tzselect.h>
#include <qlineedit.h>
#include <qspinbox.h>
-#include <opie/otimepicker.h>
+#include <opie2/otimepicker.h>
#include "onoteedit.h"
#include <stdlib.h>
#include <stdio.h>
/*
* Constructs a DateEntry which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
DateEntry::DateEntry( bool startOnMonday, const QDateTime &start,
const QDateTime &end, bool whichClock, QWidget* parent,
const char* name )
: DateEntryBase( parent, name ),
ampm( whichClock ),
startWeekOnMonday( startOnMonday ),
m_showStart(true)
{
init();
setDates(start,end);
setFocusProxy(comboDescription);
}
bool DateEntry::eventFilter(QObject *obj, QEvent *ev )
{
if( ev->type() == QEvent::FocusIn ){
if( obj == comboStart ){
timePickerStart->setHour(startTime.hour());
timePickerStart->setMinute(startTime.minute());
TimePickerLabel->setText( tr("Start Time" ) );
m_showStart= true;
}else if( obj == comboEnd ){
timePickerStart->setHour(endTime.hour());
timePickerStart->setMinute(endTime.minute());
TimePickerLabel->setText( tr("End Time") );
m_showStart = false;
}
} else if( ev->type() == QEvent::FocusOut ){
// if( obj == comboEnd ){
// QString s;
// s.sprintf("%.2d:%.2d",endTime.hour(), endTime.minute());
// comboEnd->setText(s);
// }
// else if( obj == comboStart ){
// QString s;
diff --git a/core/pim/datebook/main.cpp b/core/pim/datebook/main.cpp
index 421e457..3cb60af 100644
--- a/core/pim/datebook/main.cpp
+++ b/core/pim/datebook/main.cpp
@@ -1,24 +1,25 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
** This file is part of Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "datebook.h"
-#include <opie/oapplicationfactory.h>
+#include <opie2/oapplicationfactory.h>
+using namespace Opie::Core;
OPIE_EXPORT_APP( OApplicationFactory<DateBook> )