summaryrefslogtreecommitdiffabout
path: root/korganizer/kowhatsnextview.cpp
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer/kowhatsnextview.cpp
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'korganizer/kowhatsnextview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kowhatsnextview.cpp38
1 files changed, 22 insertions, 16 deletions
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index f88403c..bfe930f 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -17,16 +17,22 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <qlayout.h>
-#include <qtextbrowser.h>
+#include <q3textbrowser.h>
#include <qtextcodec.h>
#include <qfileinfo.h>
#include <qlabel.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#ifdef DESKTOP_VERSION
-#include <qpaintdevicemetrics.h>
+#include <q3paintdevicemetrics.h>
+//Added by qt3to4:
+#include <Q3PtrList>
+#include <QHideEvent>
+#include <Q3VBoxLayout>
+#include <QShowEvent>
#endif
#include <kglobal.h>
#include <klocale.h>
#include <kdebug.h>
@@ -41,9 +47,9 @@
#include "koglobals.h"
#include "koprefs.h"
#include "koeventviewerdialog.h"
#include "koeventviewer.h"
-#include <qstylesheet.h>
+#include <q3stylesheet.h>
#include "kowhatsnextview.h"
using namespace KOrg;
void WhatsNextTextBrowser::setSource(const QString& n)
@@ -55,9 +61,9 @@ void WhatsNextTextBrowser::setSource(const QString& n)
} else if (n.startsWith("todo:")) {
emit showIncidence(n);
return;
} else {
- QTextBrowser::setSource(n);
+ Q3TextBrowser::setSource(n);
}
}
void WhatsNextTextBrowser::printMe()
{
@@ -71,9 +77,9 @@ void WhatsNextTextBrowser::printMe()
if (!printer.setup() )
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 ();
dy = (float)(m.height()) / (float)contentsHeight ();
@@ -102,21 +108,21 @@ KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent,
// mDateLabel->setAlignment(AlignCenter);
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 );
connect(mTimer,SIGNAL( timeout() ),this, SLOT(updateView()));
@@ -143,11 +149,11 @@ void KOWhatsNextView::clearList()
{
mTimer->stop();
mView->setText(" ");
}
-QPtrList<Incidence> KOWhatsNextView::selectedIncidences()
+Q3PtrList<Incidence> KOWhatsNextView::selectedIncidences()
{
- QPtrList<Incidence> eventList;
+ Q3PtrList<Incidence> eventList;
return eventList;
}
@@ -218,10 +224,10 @@ void KOWhatsNextView::updateView()
#endif
mText += "</td></tr>\n<tr bgcolor=\"#EAF8FA\"><td>";
int iii;
mTodos.clear();
- QPtrList<Event> events;
- QPtrList<Todo> todos = calendar()->todos();
+ Q3PtrList<Event> events;
+ Q3PtrList<Todo> todos = calendar()->todos();
Todo * todo;
//mText += "<h2>" + i18n("Events: ") + "</h2>\n";
int daysToShow = KOPrefs::instance()->mWhatsNextDays ;
bool itemAdded = false;
@@ -453,9 +459,9 @@ void KOWhatsNextView::showDates(const QDate &, const QDate &)
{
updateView();
}
-void KOWhatsNextView::showEvents(QPtrList<Event>)
+void KOWhatsNextView::showEvents(Q3PtrList<Event>)
{
}
void KOWhatsNextView::changeEventDisplay(Event *, int action)
@@ -740,9 +746,9 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub )
else {
ind += "-";
mText += "</li>\n";
}
- QPtrList<Incidence> Relations = ev->relations();
+ Q3PtrList<Incidence> Relations = ev->relations();
Incidence *to;
for (to=Relations.first();to;to=Relations.next()) {
if (!((Todo*)to)->isCompleted() && ((Todo*)to)->priority() <= mCurrentMaxPrio )
appendTodo( to, ind , true );