summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koagendaview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp78
1 files changed, 45 insertions, 33 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 6e65a03..87993ae 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -23,6 +23,6 @@
-#include <qhbox.h>
-#include <qvbox.h>
+#include <q3hbox.h>
+#include <q3vbox.h>
#include <qlabel.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qlayout.h>
@@ -33,3 +33,3 @@
#include <qfontmetrics.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
#include <qtooltip.h>
@@ -38,2 +38,14 @@
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QPixmap>
+#include <QMouseEvent>
+#include <Q3GridLayout>
+#include <Q3ValueList>
+#include <QKeyEvent>
+#include <Q3HBoxLayout>
+#include <Q3VBoxLayout>
+#include <QPaintEvent>
+#include <Q3PtrList>
@@ -80,4 +92,4 @@ using namespace KOrg;
-TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) :
- QScrollView(parent,name,f)
+TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,Qt::WFlags f) :
+ Q3ScrollView(parent,name,f)
{
@@ -97,3 +109,3 @@ TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) :
- viewport()->setBackgroundMode( PaletteBackground );
+ viewport()->setBackgroundMode( Qt::PaletteBackground );
}
@@ -285,3 +297,3 @@ void TimeLabels::paintEvent(QPaintEvent*)
EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name)
- : QFrame(parent,name)
+ : Q3Frame(parent,name)
{
@@ -395,3 +407,3 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
- QBoxLayout *topLayout = new QVBoxLayout(this);
+ Q3BoxLayout *topLayout = new Q3VBoxLayout(this);
@@ -403,9 +415,9 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
topLayout->addWidget( mSplitterAgenda );
- mAllDayFrame = new QHBox(mSplitterAgenda);
- mAllDayFrame->setFocusPolicy(NoFocus);
+ mAllDayFrame = new Q3HBox(mSplitterAgenda);
+ mAllDayFrame->setFocusPolicy(Qt::NoFocus);
QWidget *agendaFrame = new QWidget(mSplitterAgenda);
- agendaFrame->setFocusPolicy(NoFocus);
+ agendaFrame->setFocusPolicy(Qt::NoFocus);
// Create all-day agenda widget
- mDummyAllDayLeft = new QVBox( mAllDayFrame );
+ mDummyAllDayLeft = new Q3VBox( mAllDayFrame );
@@ -422,5 +434,5 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) );
- mExpandButton->setFocusPolicy(NoFocus);
+ mExpandButton->setFocusPolicy(Qt::NoFocus);
mAllDayAgenda = new KOAgenda(1,mAllDayFrame);
- mAllDayAgenda->setFocusPolicy(NoFocus);
+ mAllDayAgenda->setFocusPolicy(Qt::NoFocus);
QLabel *dummyAllDayRight = new QLabel (mAllDayFrame);
@@ -431,3 +443,3 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
// Create agenda frame
- QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3);
+ Q3GridLayout *agendaLayout = new Q3GridLayout(agendaFrame,4,3);
// QHBox *agendaFrame = new QHBox(splitterAgenda);
@@ -439,6 +451,6 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
#endif
- mDayLabelsFrame = new QHBox(agendaFrame);
+ mDayLabelsFrame = new Q3HBox(agendaFrame);
//topLayout->addWidget(mDayLabelsFrame);
- mDayLabels = new QFrame (mDayLabelsFrame);
- mLayoutDayLabels = new QHBoxLayout(mDayLabels);
+ mDayLabels = new Q3Frame (mDayLabelsFrame);
+ mLayoutDayLabels = new Q3HBoxLayout(mDayLabels);
agendaLayout->addMultiCellWidget(mDayLabelsFrame ,0,0,0,2);
@@ -462,3 +474,3 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
agendaLayout->setColStretch(1,1);
- mAgenda->setFocusPolicy(NoFocus);
+ mAgenda->setFocusPolicy(Qt::NoFocus);
// Create event context menu for agenda
@@ -467,3 +479,3 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
#if 0
- mAllAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")),
+ mAllAgendaPopup->addAdditionalItem(QIcon(SmallIcon("bell")),
i18n("Toggle Alarm"),mAgenda,
@@ -920,5 +932,5 @@ int KOAgendaView::currentDateCount()
-QPtrList<Incidence> KOAgendaView::selectedIncidences()
+Q3PtrList<Incidence> KOAgendaView::selectedIncidences()
{
- QPtrList<Incidence> selected;
+ Q3PtrList<Incidence> selected;
Incidence *incidence;
@@ -989,4 +1001,4 @@ void KOAgendaView::updateConfig()
// ToolTips displaying summary of events
- KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance()
- ->mEnableToolTips);
+ /* TODO:hacker: KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance()
+ ->mEnableToolTips); */
@@ -1119,3 +1131,3 @@ void KOAgendaView::showDates( const QDate &start, const QDate &end )
-void KOAgendaView::showEvents(QPtrList<Event>)
+void KOAgendaView::showEvents(Q3PtrList<Event>)
{
@@ -1167,3 +1179,3 @@ void KOAgendaView::fillAgenda()
- QPtrList<Event> dayEvents;
+ Q3PtrList<Event> dayEvents;
@@ -1171,3 +1183,3 @@ void KOAgendaView::fillAgenda()
// Therefore, gtodoset all of them.
- QPtrList<Todo> todos = calendar()->todos();
+ Q3PtrList<Todo> todos = calendar()->todos();
@@ -1302,3 +1314,3 @@ void KOAgendaView::fillAgenda()
//if not KOPrefs::instance()->mShowTodoInAgenda, show overdue in agenda
- bool overdue = (!todo->isCompleted()) && (todo->dtDue() < today) && KOPrefs::instance()->mShowTodoInAgenda;
+ bool overdue = (!todo->isCompleted()) && (todo->dtDue() < (QDateTime)today) && KOPrefs::instance()->mShowTodoInAgenda;
bool fillIn = false;
@@ -1505,3 +1517,3 @@ void KOAgendaView::readSettings(KConfig *config)
//#ifndef KORG_NOSPLITTER
- QValueList<int> sizes = config->readIntListEntry("Separator AgendaView");
+ Q3ValueList<int> sizes = config->readIntListEntry("Separator AgendaView");
if (sizes.count() == 2) {
@@ -1526,3 +1538,3 @@ void KOAgendaView::writeSettings(KConfig *config)
//#ifndef KORG_NOSPLITTER
- QValueList<int> list = mSplitterAgenda->sizes();
+ Q3ValueList<int> list = mSplitterAgenda->sizes();
config->writeEntry("Separator AgendaView",list);
@@ -1543,3 +1555,3 @@ void KOAgendaView::setHolidayMasks()
if ( KOPrefs::instance()->mExcludeHolidays ) {
- QPtrList<Event> events = calendar()->events( date, true );
+ Q3PtrList<Event> events = calendar()->events( date, true );
Event *event;
@@ -1665,3 +1677,3 @@ void KOAgendaView::updateTodo( Todo * t, int )
else {
- bool overdue = (!t->isCompleted()) && (t->dtDue() < QDate::currentDate()) && KOPrefs::instance()->mShowTodoInAgenda ;
+ bool overdue = (!t->isCompleted()) && (t->dtDue() < (QDateTime)QDate::currentDate()) && KOPrefs::instance()->mShowTodoInAgenda ;
if ( overdue &&