From a08aff328d4393031d5ba7d622c2b05705a89d73 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Wed, 04 Jul 2007 11:23:42 +0000 Subject: initial public commit of qt4 port --- (limited to 'korganizer/kowhatsnextview.cpp') diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index f88403c..bfe930f 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -18,14 +18,20 @@ */ #include -#include +#include #include #include #include #include +#include #ifdef DESKTOP_VERSION -#include +#include +//Added by qt3to4: +#include +#include +#include +#include #endif #include #include @@ -42,7 +48,7 @@ #include "koprefs.h" #include "koeventviewerdialog.h" #include "koeventviewer.h" -#include +#include #include "kowhatsnextview.h" using namespace KOrg; @@ -56,7 +62,7 @@ void WhatsNextTextBrowser::setSource(const QString& n) emit showIncidence(n); return; } else { - QTextBrowser::setSource(n); + Q3TextBrowser::setSource(n); } } void WhatsNextTextBrowser::printMe() @@ -72,7 +78,7 @@ void WhatsNextTextBrowser::printMe() return; QPainter p; p.begin ( &printer ); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); float dx, dy; int wid = (m.width() * 9)/10; dx = (float) wid/(float)contentsWidth (); @@ -103,19 +109,19 @@ KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent, setFont( KOPrefs::instance()->mWhatsNextFont ); mView = new WhatsNextTextBrowser(this); connect(mView,SIGNAL(showIncidence(const QString &)),SLOT(showIncidence(const QString &))); - QStyleSheet* stsh = mView->styleSheet(); - QStyleSheetItem * style ; + Q3StyleSheet* stsh = mView->styleSheet(); + Q3StyleSheetItem * style ; style = stsh->item ("h2" ); if ( style ) { - style->setMargin(QStyleSheetItem::MarginAll,0); + style->setMargin(Q3StyleSheetItem::MarginAll,0); } style = stsh->item ("h3" ); if ( style ) { - style->setMargin(QStyleSheetItem::MarginAll,0); + style->setMargin(Q3StyleSheetItem::MarginAll,0); } mEventViewer = 0; - QBoxLayout *topLayout = new QVBoxLayout(this); + Q3BoxLayout *topLayout = new Q3VBoxLayout(this); // topLayout->addWidget(mDateLabel); topLayout->addWidget(mView); mTimer = new QTimer( this ); @@ -144,9 +150,9 @@ void KOWhatsNextView::clearList() mTimer->stop(); mView->setText(" "); } -QPtrList KOWhatsNextView::selectedIncidences() +Q3PtrList KOWhatsNextView::selectedIncidences() { - QPtrList eventList; + Q3PtrList eventList; return eventList; } @@ -219,8 +225,8 @@ void KOWhatsNextView::updateView() mText += "\n"; int iii; mTodos.clear(); - QPtrList events; - QPtrList todos = calendar()->todos(); + Q3PtrList events; + Q3PtrList todos = calendar()->todos(); Todo * todo; //mText += "

" + i18n("Events: ") + "

\n"; int daysToShow = KOPrefs::instance()->mWhatsNextDays ; @@ -454,7 +460,7 @@ void KOWhatsNextView::showDates(const QDate &, const QDate &) updateView(); } -void KOWhatsNextView::showEvents(QPtrList) +void KOWhatsNextView::showEvents(Q3PtrList) { } @@ -741,7 +747,7 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) ind += "-"; mText += "\n"; } - QPtrList Relations = ev->relations(); + Q3PtrList Relations = ev->relations(); Incidence *to; for (to=Relations.first();to;to=Relations.next()) { if (!((Todo*)to)->isCompleted() && ((Todo*)to)->priority() <= mCurrentMaxPrio ) -- cgit v0.9.0.2