]> Git trees. - libqmvoc.git/commitdiff
Use all my script to port it.
authorLaurent Montel <montel@kde.org>
Mon, 1 Aug 2005 16:10:18 +0000 (16:10 +0000)
committerLaurent Montel <montel@kde.org>
Mon, 1 Aug 2005 16:10:18 +0000 (16:10 +0000)
I hope now we can port kdeedu and not remove it as previously

svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=442095

15 files changed:
extdate/extdatepicker.cpp
extdate/extdatepicker.h
extdate/extdatetbl.cpp
extdate/extdatetbl.h
extdate/extdatetimeedit.cpp
extdate/extdatetimeedit.h
extdate/extdatewidget.cpp
extdate/testwidget.cpp
extdate/testwidget.h
kdeeducore/keduvocdata.h
kdeeduplot/kplotobject.h
kdeeduplot/kplotwidget.cpp
kdeeduplot/kplotwidget.h
kdeeduui/kdeeduglossary.cpp
kdeeduui/kdeeduglossary.h

index d64fca492b314c0ef76b8c1dc555edd68c0736a6..334b5eee5b2a57678c55ee1b57af0f38990d8773 100644 (file)
 #include <qstyle.h>
 #include <qtoolbutton.h>
 #include <qtooltip.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
+//Added by qt3to4:
+#include <QKeyEvent>
+#include <QEvent>
+#include <Q3Frame>
+#include <QHBoxLayout>
+#include <QBoxLayout>
+#include <QVBoxLayout>
+#include <QResizeEvent>
 
 #include <kdialog.h>
 #include <klocale.h>
@@ -84,19 +92,19 @@ void ExtDatePicker::fillWeeksCombo(const ExtDate &date)
 }
 
 ExtDatePicker::ExtDatePicker(QWidget *parent, ExtDate dt, const char *name)
-  : QFrame(parent,name)
+  : Q3Frame(parent,name)
 {
   init( dt );
 }
 
-ExtDatePicker::ExtDatePicker(QWidget *parent, ExtDate dt, const char *name, WFlags f)
-  : QFrame(parent,name, f)
+ExtDatePicker::ExtDatePicker(QWidget *parent, ExtDate dt, const char *name, Qt::WFlags f)
+  : Q3Frame(parent,name, f)
 {
   init( dt );
 }
 
 ExtDatePicker::ExtDatePicker( QWidget *parent, const char *name )
-  : QFrame(parent,name)
+  : Q3Frame(parent,name)
 {
   init( ExtDate::currentDate() );
 }
@@ -212,8 +220,8 @@ ExtDatePicker::eventFilter(QObject *o, QEvent *e )
    if ( e->type() == QEvent::KeyPress ) {
       QKeyEvent *k = (QKeyEvent *)e;
 
-      if ( (k->key() == Qt::Key_Prior) ||
-           (k->key() == Qt::Key_Next)  ||
+      if ( (k->key() == Qt::Key_PageUp) ||
+           (k->key() == Qt::Key_PageDown)  ||
            (k->key() == Qt::Key_Up)    ||
            (k->key() == Qt::Key_Down) )
        {
@@ -222,7 +230,7 @@ ExtDatePicker::eventFilter(QObject *o, QEvent *e )
           return true; // eat event
        }
    }
-   return QFrame::eventFilter( o, e );
+   return Q3Frame::eventFilter( o, e );
 }
 
 void
@@ -351,7 +359,7 @@ ExtDatePicker::selectMonthClicked()
   ExtDate date = table->getDate();
   int i, month, months = d->calendar->monthsInYear(date);
 
-  QPopupMenu popup(selectMonth);
+  Q3PopupMenu popup(selectMonth);
 
   for (i = 1; i <= months; i++)
     popup.insertItem(d->calendar->monthName(i, d->calendar->year(date)), i);
@@ -375,7 +383,7 @@ ExtDatePicker::selectYearClicked()
 {
 //  const ExtCalendarSystem * calendar = KGlobal::locale()->calendar();
 
-  if (selectYear->state() == QButton::Off)
+  if (selectYear->state() == QCheckBox::Off)
   {
     return;
   }
index 82a0f287182aa6ff10c1482f0dd10c299a1956ab..a1a176a927802a8fed386a47034f63b6e85b92e1 100644 (file)
 
 
 #include "extdatetime.h"
+//Added by qt3to4:
+#include <Q3Frame>
+#include <QResizeEvent>
+#include <QEvent>
 
 class QLineEdit;
 class QToolButton;
@@ -49,7 +53,7 @@ class ExtDateTable;
  *
  * @short A date selection widget.
  **/
-class KDE_EXPORT ExtDatePicker: public QFrame
+class KDE_EXPORT ExtDatePicker: public Q3Frame
 {
   Q_OBJECT
 //  Q_PROPERTY( ExtDate date READ date WRITE setDate)
@@ -71,7 +75,7 @@ public:
   ExtDatePicker(QWidget *parent,
              ExtDate,
              const char *name,
-             WFlags f); // ### KDE 4.0: Merge
+             Qt::WFlags f); // ### KDE 4.0: Merge
 
   /**
    * Standard qt widget constructor. The initial date will be the
index 704d4b9c852de0f07760e40446650c9890f88f4c..cea09fd3061ce9ceca7302d00b78ced2d6e41c82 100644 (file)
 #include <knotifyclient.h>
 #include "kpopupmenu.h"
 #include <qpainter.h>
-#include <qdict.h>
+#include <q3dict.h>
+//Added by qt3to4:
+#include <QWheelEvent>
+#include <QFocusEvent>
+#include <QKeyEvent>
+#include <QEvent>
+#include <Q3Frame>
+#include <QResizeEvent>
+#include <QMouseEvent>
 #include <assert.h>
 
 
@@ -77,7 +85,7 @@ public:
      QColor bgColor;
      BackgroundMode bgMode;
    };
-   QDict <DatePaintingMode> customPaintingModes;
+   Q3Dict <DatePaintingMode> customPaintingModes;
    ExtCalendarSystem *calendar;
 };
 
@@ -107,7 +115,7 @@ ExtDateValidator::date(const QString& text, ExtDate& ed) const
       ed = tmp;
       return Acceptable;
     } else
-      return Valid;
+      return QValidator::Intermediate;
 }
 
 void
@@ -116,8 +124,8 @@ ExtDateValidator::fixup( QString& ) const
 
 }
 
-ExtDateTable::ExtDateTable(QWidget *parent, ExtDate date_, const char* name, WFlags f)
-  : QGridView(parent, name, f)
+ExtDateTable::ExtDateTable(QWidget *parent, ExtDate date_, const char* name, Qt::WFlags f)
+  : Q3GridView(parent, name, f)
 {
   d = new ExtDateTablePrivate;
   setFontSize(10);
@@ -126,7 +134,7 @@ ExtDateTable::ExtDateTable(QWidget *parent, ExtDate date_, const char* name, WFl
       kdDebug() << "ExtDateTable ctor: WARNING: Given date is invalid, using current date." << endl;
       date_=ExtDate::currentDate();
     }
-  setFocusPolicy( QWidget::StrongFocus );
+  setFocusPolicy( Qt::StrongFocus );
   setNumRows(7); // 6 weeks max + headline
   setNumCols(7); // 7 days a week
   setHScrollBarMode(AlwaysOff);
@@ -219,7 +227,7 @@ ExtDateTable::paintCell(QPainter *painter, int row, int col)
           painter->drawRect(0, 0, w, h);
           painter->setPen(textColor);
         }
-      painter->drawText(0, 0, w, h-1, AlignCenter,
+      painter->drawText(0, 0, w, h-1, Qt::AlignCenter,
                         d->calendar->weekDayName(daynum, true), -1, &rect);
       painter->setPen(colorGroup().text());
       painter->moveTo(0, h-1);
@@ -293,7 +301,7 @@ ExtDateTable::paintCell(QPainter *painter, int row, int col)
 
       if ( paintRect ) painter->drawRect(0, 0, w, h);
       painter->setPen(pen);
-      painter->drawText(0, 0, w, h, AlignCenter, text, -1, &rect);
+      painter->drawText(0, 0, w, h, Qt::AlignCenter, text, -1, &rect);
     }
   if(rect.width()>maxCell.width()) maxCell.setWidth(rect.width());
   if(rect.height()>maxCell.height()) maxCell.setHeight(rect.height());
@@ -349,8 +357,8 @@ ExtDateTable::keyPressEvent( QKeyEvent *e )
     case Key_N:
         setDate(ExtDate::currentDate());
         return;
-    case Key_Return:
-    case Key_Enter:
+    case Qt::Key_Return:
+    case Qt::Key_Enter:
         emit tableClicked();
         return;
     default:
@@ -363,7 +371,7 @@ ExtDateTable::keyPressEvent( QKeyEvent *e )
 void
 ExtDateTable::viewportResizeEvent(QResizeEvent * e)
 {
-  QGridView::viewportResizeEvent(e);
+  Q3GridView::viewportResizeEvent(e);
 
   setCellWidth(viewport()->width()/7);
   setCellHeight(viewport()->height()/7);
@@ -509,13 +517,13 @@ ExtDateTable::getDate() const
 void ExtDateTable::focusInEvent( QFocusEvent *e )
 {
 //    repaintContents(false);
-    QGridView::focusInEvent( e );
+    Q3GridView::focusInEvent( e );
 }
 
 void ExtDateTable::focusOutEvent( QFocusEvent *e )
 {
 //    repaintContents(false);
-    QGridView::focusOutEvent( e );
+    Q3GridView::focusOutEvent( e );
 }
 
 QSize
@@ -541,7 +549,7 @@ bool ExtDateTable::popupMenuEnabled() const
    return d->popupMenuEnabled;
 }
 
-void ExtDateTable::setCustomDatePainting(const ExtDate &date, const QColor &fgColor, BackgroundMode bgMode, const QColor &bgColor)
+void ExtDateTable::setCustomDatePainting(const ExtDate &date, const QColor &fgColor, Qt::BackgroundMode bgMode, const QColor &bgColor)
 {
     if (!fgColor.isValid())
     {
@@ -574,7 +582,7 @@ ExtDateInternalWeekSelector::ExtDateInternalWeekSelector
   // -----
   font=KGlobalSettings::generalFont();
   setFont(font);
-  setFrameStyle(QFrame::NoFrame);
+  setFrameStyle(Q3Frame::NoFrame);
   setValidator(val);
   connect(this, SIGNAL(returnPressed()), SLOT(weekEnteredSlot()));
 }
@@ -639,7 +647,7 @@ ExtDateInternalMonthPicker::~ExtDateInternalMonthPicker() {
 
 ExtDateInternalMonthPicker::ExtDateInternalMonthPicker
 (const ExtDate & date, QWidget* parent, const char* name)
-  : QGridView(parent, name),
+  : Q3GridView(parent, name),
     result(0) // invalid
 {
 //FIXME: Can't uncomment the following unless ExtDate is moved to kdelibs
@@ -654,7 +662,7 @@ ExtDateInternalMonthPicker::ExtDateInternalMonthPicker
   setFont(font);
   setHScrollBarMode(AlwaysOff);
   setVScrollBarMode(AlwaysOff);
-  setFrameStyle(QFrame::NoFrame);
+  setFrameStyle(Q3Frame::NoFrame);
   setNumCols(3);
   d = new ExtDateInternalMonthPrivate(date.year(), date.month(), date.day());
   // For monthsInYear != 12
@@ -821,7 +829,7 @@ ExtDateInternalYearSelector::ExtDateInternalYearSelector
   // -----
   font=KGlobalSettings::generalFont();
   setFont(font);
-  setFrameStyle(QFrame::NoFrame);
+  setFrameStyle(Q3Frame::NoFrame);
   // set year limits (perhaps we should get rid of limits altogether)
   //there si also a year limit in ExtCalendarSystemGregorian...
   val->setRange(-50000, 50000);
@@ -874,11 +882,11 @@ ExtDateInternalYearSelector::setYear(int year)
 }
 
 KPopupFrame::KPopupFrame(QWidget* parent, const char*  name)
-  : QFrame(parent, name, WType_Popup),
+  : Q3Frame(parent, name, Qt::WType_Popup),
     result(0), // rejected
     main(0)
 {
-  setFrameStyle(QFrame::Box|QFrame::Raised);
+  setFrameStyle(Q3Frame::Box|Q3Frame::Raised);
   setMidLineWidth(2);
 }
 
index b41d1ebeeb15cea6bea93d6f15470aa9aec5e9a7..ddb976613245d909cf2b2a4004674a22e807d691 100644 (file)
 #define EXTDATETBL_H
 
 #include <qvalidator.h>
-#include <qgridview.h>
+#include <q3gridview.h>
+//Added by qt3to4:
+#include <QWheelEvent>
+#include <QFocusEvent>
+#include <QKeyEvent>
+#include <Q3Frame>
+#include <QResizeEvent>
+#include <QMouseEvent>
 #include <klineedit.h>
 #include "extcalendarsystemgregorian.h"
 
@@ -65,7 +72,7 @@ private:
 * @version $Id$
 * @author Tim Gilman, Mirko Boehm
 */
-class ExtDateInternalMonthPicker : public QGridView
+class ExtDateInternalMonthPicker : public Q3GridView
 {
   Q_OBJECT
 protected:
@@ -174,7 +181,7 @@ private:
  * @author Tim Gilman, Mirko Boehm
  * @version $Id$
  */
-class KPopupFrame : public QFrame
+class KPopupFrame : public Q3Frame
 {
   Q_OBJECT
 protected:
@@ -229,7 +236,7 @@ public:
 
 private:
 
-  virtual bool close(bool alsoDelete) { return QFrame::close(alsoDelete); }
+  virtual bool close(bool alsoDelete) { return Q3Frame::close(alsoDelete); }
 protected:
   virtual void virtual_hook( int id, void* data );
 private:
@@ -262,7 +269,7 @@ public:
  * @version $Id$
  * @author Tim Gilman, Mirko Boehm
  */
-class ExtDateTable : public QGridView
+class ExtDateTable : public Q3GridView
 {
     Q_OBJECT
     //Q_PROPERTY( ExtDate date READ getDate WRITE setDate )
@@ -274,7 +281,7 @@ public:
      */
     ExtDateTable(QWidget *parent=0,
               ExtDate date=ExtDate::currentDate(),
-              const char* name=0, WFlags f=0);
+              const char* name=0, Qt::WFlags f=0);
 
     /**
      * The destructor.
@@ -323,7 +330,7 @@ public:
      *
      * @since 3.2
      */
-    void setCustomDatePainting( const ExtDate &date, const QColor &fgColor, BackgroundMode bgMode=NoBgMode, const QColor &bgColor=QColor());
+    void setCustomDatePainting( const ExtDate &date, const QColor &fgColor, Qt::BackgroundMode bgMode=NoBgMode, const QColor &bgColor=QColor());
 
     /**
      * Unsets the custom painting of a date so that the date is painted as usual.
index 3b89c10290ff8d35bf95284efa24c0794ea411f7..5fa4c3abcdb248075edfee152d34d42ac1d294c0 100644 (file)
 //#include "../kernel/qrichtext_p.h"
 #include <private/qinternal_p.h>
 #include <private/qrichtext_p.h>
-#include <qrangecontrol.h>
+#include <q3rangecontrol.h>
 #include <qapplication.h>
 #include <qpixmap.h>
 #include <qapplication.h>
-#include <qvaluelist.h>
+#include <q3valuelist.h>
 #include <qstring.h>
 #include <qstyle.h>
-#include <qdatetimeedit.h> //need for QTimeEdit
+#include <q3datetimeedit.h> //need for QTimeEdit
+//Added by qt3to4:
+#include <QPaintEvent>
+#include <QResizeEvent>
+#include <QMouseEvent>
+#include <QTimerEvent>
+#include <QKeyEvent>
+#include <QEvent>
+#include <QWheelEvent>
 
 #define EXTDATETIMEEDIT_HIDDEN_CHAR '0'
 
@@ -336,16 +344,16 @@ private:
     QTextCursor *cursor;
     QSize sz;
     int focusSec;
-    QValueList< QNumberSection > sections;
+    Q3ValueList< QNumberSection > sections;
     QString sep;
     int offset;
 };
 
-class ExtDateTimeSpinWidget : public QSpinWidget
+class ExtDateTimeSpinWidget : public Q3SpinWidget
 {
 public:
     ExtDateTimeSpinWidget( QWidget *parent, const char *name )
-       : QSpinWidget( parent, name )
+       : Q3SpinWidget( parent, name )
     {
     }
 
@@ -363,7 +371,7 @@ protected:
 
        if ( section == -1 )
            return;
-       QSpinWidget::wheelEvent( e );
+       Q3SpinWidget::wheelEvent( e );
     }
 #endif
 };
@@ -374,7 +382,7 @@ protected:
 */
 ExtDateTimeEditor::ExtDateTimeEditor( ExtDateTimeEditBase * parent,
                                  const char * name )
-    : QWidget( parent, name, WNoAutoErase )
+    : QWidget( parent, name, Qt::WNoAutoErase )
 {
     d = new ExtDateTimeEditorPrivate();
     cw = parent;
@@ -526,8 +534,8 @@ bool ExtDateTimeEditor::eventFilter( QObject *o, QEvent *e )
            case Key_Backspace:
                if ( ::qt_cast<ExtDateEdit*>(cw) )
                    ((ExtDateEdit*)cw)->removeFirstNumber( d->focusSection() );
-               else if ( ::qt_cast<QTimeEdit*>(cw) )
-                   ((QTimeEdit*)cw)->removeFirstNumber( d->focusSection() );
+               else if ( ::qt_cast<Q3TimeEdit*>(cw) )
+                   ((Q3TimeEdit*)cw)->removeFirstNumber( d->focusSection() );
                return TRUE;
            case Key_Delete:
                cw->removeLastNumber( d->focusSection() );
@@ -577,11 +585,11 @@ bool ExtDateTimeEditor::eventFilter( QObject *o, QEvent *e )
                            repaint( rect(), FALSE );
                    }
                    return TRUE;
-               } else if ( !txt.isEmpty() && ::qt_cast<QTimeEdit*>(cw) && focusSection() == (int) d->sectionCount()-1 ) {
+               } else if ( !txt.isEmpty() && ::qt_cast<Q3TimeEdit*>(cw) && focusSection() == (int) d->sectionCount()-1 ) {
                    // the first character of the AM/PM indicator toggles if the section has focus
-                   QTimeEdit *te = (QTimeEdit*)cw;
+                   Q3TimeEdit *te = (Q3TimeEdit*)cw;
                    QTime time = te->time();
-                   if ( lAMPM && lAM && lPM && (te->display()&QTimeEdit::AMPM) ) {
+                   if ( lAMPM && lAM && lPM && (te->display()&Q3TimeEdit::AMPM) ) {
                        if ( txt[0] == (*lAM).lower()[0] && time.hour() >= 12 ) {
                            time.setHMS( time.hour()-12, time.minute(), time.second(), time.msec() );
                            te->setTime( time );
@@ -747,7 +755,7 @@ public:
     ExtDate max;
     bool changed;
     ExtDateTimeEditor *ed;
-    QSpinWidget *controls;
+    Q3SpinWidget *controls;
 };
 
 
@@ -1675,7 +1683,7 @@ public:
     QTime max;
     bool changed;
     ExtDateTimeEditor *ed;
-    QSpinWidget *controls;
+    Q3SpinWidget *controls;
 };
 
 /*!
@@ -2620,7 +2628,7 @@ void ExtDateTimeEdit::init()
 {
     d = new ExtDateTimeEditPrivate();
     de = new ExtDateEdit( this, "qt_datetime_dateedit" );
-    te = new QTimeEdit( this, "qt_datetime_timeedit" );
+    te = new Q3TimeEdit( this, "qt_datetime_timeedit" );
     d->adv = FALSE;
     connect( de, SIGNAL( valueChanged( const ExtDate& ) ),
             this, SLOT( newValue( const ExtDate& ) ) );
index 048f7aa3542ff29b8990e10c71ab4a2b1cdf8cf4..c636356fa289414cf9a2327ccfca0536012d4cec 100644 (file)
 #endif // QT_H
 
 #include "extdatetime.h"
+//Added by qt3to4:
+#include <QMouseEvent>
+#include <QTimerEvent>
+#include <QResizeEvent>
+#include <QEvent>
+#include <QPaintEvent>
 
 #ifndef QT_NO_DATETIMEEDIT
 
-class QTimeEdit;
+class Q3TimeEdit;
 
 class ExtDateTimeEditBase : public QWidget
 {
@@ -249,7 +255,7 @@ public:
     ExtDateTime dateTime() const;
 
     ExtDateEdit* dateEdit() { return de; }
-    QTimeEdit* timeEdit() { return te; }
+    Q3TimeEdit* timeEdit() { return te; }
 
     virtual void setAutoAdvance( bool advance );
     bool autoAdvance() const;
@@ -270,7 +276,7 @@ protected slots:
 
 private:
     ExtDateEdit* de;
-    QTimeEdit* te;
+    Q3TimeEdit* te;
     ExtDateTimeEditPrivate* d;
 
 #if defined(Q_DISABLE_COPY)
index d323172cf0b7e60a98171db3e6429838d3b931be..77ba9ac86352c1056213a3c300a676c525539fb7 100644 (file)
@@ -23,6 +23,8 @@
 #include <qcombobox.h>
 #include <qlayout.h>
 #include <qlineedit.h>
+//Added by qt3to4:
+#include <QHBoxLayout>
 
 #include <knuminput.h>
 #include <kdialog.h>
index 4dcd91c892d34745cfe4c9208a999c43085a3115..18c233348a8073985c402812840967367ff16a73 100644 (file)
@@ -20,6 +20,8 @@
 #include <klineedit.h>
 #include <qlayout.h>
 #include <qlabel.h>
+//Added by qt3to4:
+#include <QGridLayout>
 
 #include "extdatepicker.h"
 #include "extdatewidget.h"
index ef69f8b6a282bae37e32d5dd578cf27cc82b97b1..267645cc9b0bd2b9c7e58e4bed72458fc4eea0a7 100644 (file)
@@ -19,6 +19,8 @@
 #define TESTWIDGET_H
 
 #include <kmainwindow.h>
+//Added by qt3to4:
+#include <QGridLayout>
 
 class KDatePicker;
 class KLineEdit;
index 3a18ffc73632d8d777b2a2e9708fe6ed965a8cfa..c55b11634a48fcd78e88bc57f4159c7a45dbf284 100644 (file)
@@ -20,7 +20,7 @@
 #define KEDUVOCDATA_H
 
 #include <qdom.h>
-#include <qvaluelist.h>
+#include <q3valuelist.h>
 #include <kdemacros.h>
 
 class KDE_EXPORT KEduVocDataItem
@@ -40,7 +40,7 @@ private:
     QDomElement domElement;
 };
 
-typedef QValueList<KEduVocDataItem> KEduVocDataItemList;
+typedef Q3ValueList<KEduVocDataItem> KEduVocDataItemList;
 
 class KDE_EXPORT KEduVocData
 {
index 52d7954037cb5125c4127314c8b66e4832d7df4b..d22f8f7ee834408def4aadfaa3a1600306711d25 100644 (file)
@@ -1,3 +1,5 @@
+//Added by qt3to4:
+#include <Q3PtrList>
 /***************************************************************************
                           kplotobject.h - A list of points to be plotted
                              -------------------
@@ -169,7 +171,7 @@ public:
        */
        DPoint* point( unsigned int i ) { return pList.at(i); }
 
-       QPtrList<DPoint>* points() { return &pList; }
+       Q3PtrList<DPoint>* points() { return &pList; }
 
 /**@short Add a point to the object's list.
        *@param p the DPoint to add.
@@ -196,7 +198,7 @@ public:
        void clearPoints() { pList.clear(); }
 
 private:
-       QPtrList<DPoint> pList;
+       Q3PtrList<DPoint> pList;
        PTYPE Type;
        unsigned int Size, Parameter;
        QString Color, Name;
index eb527ba06ec8790fd30692c56bb4335a71b6d1dc..3146e1d651ee93841d6677bc8a163648c799b07f 100644 (file)
 #include <kdebug.h>
 #include <qpainter.h>
 #include <qpixmap.h>
+//Added by qt3to4:
+#include <Q3PointArray>
+#include <QResizeEvent>
+#include <QPaintEvent>
 
 #include "kplotwidget.h"
 #include "kplotwidget.moc"
 
 KPlotWidget::KPlotWidget( double x1, double x2, double y1, double y2, QWidget *parent, const char* name )
- : QWidget( parent, name, WNoAutoErase ),
+ : QWidget( parent, name, Qt::WNoAutoErase ),
    dXtick(0.0), dYtick(0.0),
    nmajX(0), nminX(0), nmajY(0), nminY(0),
    ShowTickMarks( true ), ShowTickLabels( true ), ShowGrid( false )
  {
-       setBackgroundMode( QWidget::NoBackground );
+       setBackgroundMode( Qt::NoBackground );
 
        //set DataRect
        setLimits( x1, x2, y1, y2 );
@@ -184,7 +188,7 @@ void KPlotWidget::drawObjects( QPainter *p ) {
 
                                case KPlotObject::CURVE :
                                {
-                                       p->setPen( QPen( QColor( po->color() ), po->size(), (QPen::PenStyle)po->param() ) );
+                                       p->setPen( QPen( QColor( po->color() ), po->size(), (Qt::PenStyle)po->param() ) );
                                        DPoint *dp = po->points()->first();
                                        p->moveTo( dp->qpoint( PixRect, DataRect ) );
                                        for ( dp = po->points()->next(); dp; dp = po->points()->next() )
@@ -195,16 +199,16 @@ void KPlotWidget::drawObjects( QPainter *p ) {
                                case KPlotObject::LABEL : //draw label centered at point in x, and slightly below point in y.
                                {
                                        QPoint q = po->points()->first()->qpoint( PixRect, DataRect );
-                                       p->drawText( q.x()-20, q.y()+6, 40, 10, Qt::AlignCenter | Qt::DontClip, po->name() );
+                                       p->drawText( q.x()-20, q.y()+6, 40, 10, Qt::AlignCenter | Qt::TextDontClip, po->name() );
                                        break;
                                }
 
                                case KPlotObject::POLYGON :
                                {
-                                       p->setPen( QPen( QColor( po->color() ), po->size(), (QPen::PenStyle)po->param() ) );
+                                       p->setPen( QPen( QColor( po->color() ), po->size(), (Qt::PenStyle)po->param() ) );
                                        p->setBrush( po->color() );
 
-                                       QPointArray a( po->count() );
+                                       Q3PointArray a( po->count() );
 
                                        unsigned int i=0;
                                        for ( DPoint *dp = po->points()->first(); dp; dp = po->points()->next() )
@@ -297,7 +301,7 @@ void KPlotWidget::drawBox( QPainter *p ) {
                                        QString str = QString( "%1" ).arg( lab, BottomAxis.labelFieldWidth(), BottomAxis.labelFmt(), BottomAxis.labelPrec() );
                                        if ( px > 0 && px < PixRect.width() ) {
                                                QRect r( px - BIGTICKSIZE, PixRect.height()+BIGTICKSIZE, 2*BIGTICKSIZE, BIGTICKSIZE );
-                                               p->drawText( r, Qt::AlignCenter | Qt::DontClip, str );
+                                               p->drawText( r, Qt::AlignCenter | Qt::TextDontClip, str );
                                        }
                                }
                
@@ -343,7 +347,7 @@ void KPlotWidget::drawBox( QPainter *p ) {
                                        QString str = QString( "%1" ).arg( lab, LeftAxis.labelFieldWidth(), LeftAxis.labelFmt(), LeftAxis.labelPrec() );
                                        if ( py > 0 && py < PixRect.height() ) {
                                                QRect r( -2*BIGTICKSIZE, py-SMALLTICKSIZE, 2*BIGTICKSIZE, 2*SMALLTICKSIZE );
-                                               p->drawText( r, Qt::AlignCenter | Qt::DontClip, str );
+                                               p->drawText( r, Qt::AlignCenter | Qt::TextDontClip, str );
                                        }
                                }
        
index b24e31bf019e0fd5dd046e77cfe7610e7812bf96..dd6bd1cf8612a8ea632dd249f7fc3eecdfd1b52a 100644 (file)
 #define _KPLOTWIDGET_H_
 
 #include <qwidget.h>
+//Added by qt3to4:
+#include <QPixmap>
+#include <QResizeEvent>
+#include <QPaintEvent>
+#include <Q3PtrList>
 #include "kplotobject.h"
 #include "kplotaxis.h"
 
@@ -248,7 +253,7 @@ protected:
        //Limits of the plot area in data units
        DRect DataRect;
        //List of KPlotObjects
-       QPtrList<KPlotObject> ObjectList;
+       Q3PtrList<KPlotObject> ObjectList;
 
        //Colors
        QColor cBackground, cForeground, cGrid;
index 9d126db15fece4dab12c0dd64c08aa004d3af897..c735035695eadd8bb7fa7d9746c9f5e78ca62c5d 100644 (file)
 
 #include <qfile.h>
 #include <qlabel.h>
-#include <qheader.h>
+#include <q3header.h>
 #include <qlayout.h>
 #include <qpushbutton.h>
 #include <qsplitter.h>
 #include <qstringlist.h>
 #include <qtoolbutton.h>
+//Added by qt3to4:
+#include <QKeyEvent>
+#include <QHBoxLayout>
+#include <Q3ValueList>
+#include <QVBoxLayout>
 
 Glossary::Glossary()
 {
@@ -49,7 +54,7 @@ bool Glossary::loadLayout( QDomDocument &Document, const KURL& url )
                return false;
        }
 
-        if (!layoutFile.open(IO_ReadOnly))
+        if (!layoutFile.open(QIODevice::ReadOnly))
                 return false;
 
         ///Check if document is well-formed
@@ -80,7 +85,7 @@ Glossary* Glossary::readFromXML( const KURL& url, const QString& path )
 
        if ( glossary->loadLayout( doc, url ) )
        {
-               QValueList<GlossaryItem*> itemList;
+               Q3ValueList<GlossaryItem*> itemList;
                itemList = glossary->readItems( doc );
                glossary->setItemlist( itemList );
                glossary->fixImagePath();
@@ -92,8 +97,8 @@ Glossary* Glossary::readFromXML( const KURL& url, const QString& path )
 void Glossary::fixImagePath()
 {
        kdDebug() << "Glossary::fixImagePath()" << endl;
-       QValueList<GlossaryItem*>::iterator it = m_itemlist.begin();
-       const QValueList<GlossaryItem*>::iterator itEnd = m_itemlist.end();
+       Q3ValueList<GlossaryItem*>::iterator it = m_itemlist.begin();
+       const Q3ValueList<GlossaryItem*>::iterator itEnd = m_itemlist.end();
        QString path = m_picturepath;
        QString firstpart = "<img src=\"";
        firstpart += path;
@@ -105,9 +110,9 @@ void Glossary::fixImagePath()
        }
 }
        
-QValueList<GlossaryItem*> Glossary::readItems( QDomDocument &itemDocument )
+Q3ValueList<GlossaryItem*> Glossary::readItems( QDomDocument &itemDocument )
 {
-       QValueList<GlossaryItem*> list;
+       Q3ValueList<GlossaryItem*> list;
 
        QDomNodeList itemList;
        QDomNodeList refNodeList;
@@ -206,7 +211,7 @@ GlossaryDialog::GlossaryDialog( bool folded, QWidget *parent, const char *name)
        m_htmlpart = new KHTMLPart( vs, "html-part" );
  
        connect( m_htmlpart->browserExtension(), SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), this, SLOT( displayItem( const KURL &, const KParts::URLArgs & ) ) );
-       connect( m_glosstree, SIGNAL(clicked( QListViewItem * )), this, SLOT(slotClicked( QListViewItem * )));
+       connect( m_glosstree, SIGNAL(clicked( Q3ListViewItem * )), this, SLOT(slotClicked( Q3ListViewItem * )));
        connect( clear, SIGNAL(clicked()), m_search, SLOT(clear()));
  
        resize( 600, 400 );
@@ -230,9 +235,9 @@ void GlossaryDialog::displayItem( const KURL& url, const KParts::URLArgs& )
        QString myurl = url.host().lower();
        m_search->setText( "" );
        m_search->updateSearch( "" );
-       QListViewItem *found = 0;
-       QListViewItemIterator it( m_glosstree );
-       QListViewItem *item;
+       Q3ListViewItem *found = 0;
+       Q3ListViewItemIterator it( m_glosstree );
+       Q3ListViewItem *item;
        while ( it.current() )
        {
                item = it.current();
@@ -250,16 +255,16 @@ void GlossaryDialog::updateTree()
 {
        m_glosstree->clear();
 
-       QValueList<Glossary*>::const_iterator itGl = m_glossaries.begin();
-       const QValueList<Glossary*>::const_iterator itGlEnd = m_glossaries.end();
+       Q3ValueList<Glossary*>::const_iterator itGl = m_glossaries.begin();
+       const Q3ValueList<Glossary*>::const_iterator itGlEnd = m_glossaries.end();
        
        for ( ; itGl != itGlEnd ; ++itGl )
        {
-               QValueList<GlossaryItem*> items = ( *itGl )->itemlist();
-               QValueList<GlossaryItem*>::iterator it = items.begin();
-               const QValueList<GlossaryItem*>::iterator itEnd = items.end();
+               Q3ValueList<GlossaryItem*> items = ( *itGl )->itemlist();
+               Q3ValueList<GlossaryItem*>::iterator it = items.begin();
+               const Q3ValueList<GlossaryItem*>::iterator itEnd = items.end();
 
-               QListViewItem *main = new QListViewItem( m_glosstree, ( *itGl )->name() );
+               Q3ListViewItem *main = new Q3ListViewItem( m_glosstree, ( *itGl )->name() );
                main->setExpandable( true );
                main->setSelectable( false );
                //XXX TMP!!!
@@ -270,17 +275,17 @@ void GlossaryDialog::updateTree()
                        if ( foldinsubtrees )
                        {
                                QChar thisletter = ( *it )->name().upper()[0];
-                               QListViewItem *thisletteritem = findTreeWithLetter( thisletter, main );
+                               Q3ListViewItem *thisletteritem = findTreeWithLetter( thisletter, main );
                                if ( !thisletteritem )
                                {
-                                       thisletteritem = new QListViewItem( main, thisletter );
+                                       thisletteritem = new Q3ListViewItem( main, thisletter );
                                        thisletteritem->setExpandable( true );
                                        thisletteritem->setSelectable( false );
                                }
-                               new QListViewItem( thisletteritem, ( *it )->name() );
+                               new Q3ListViewItem( thisletteritem, ( *it )->name() );
                        }
                        else
-                               new QListViewItem( main, ( *it )->name() );
+                               new Q3ListViewItem( main, ( *it )->name() );
                }
                main->sort();
        }
@@ -298,9 +303,9 @@ void GlossaryDialog::addGlossary( Glossary* newgloss )
        updateTree();
 }
 
-QListViewItem* GlossaryDialog::findTreeWithLetter( const QChar& l, QListViewItem* i )
+Q3ListViewItem* GlossaryDialog::findTreeWithLetter( const QChar& l, Q3ListViewItem* i )
 {
-       QListViewItem *it = i->firstChild();
+       Q3ListViewItem *it = i->firstChild();
        while ( it )
        {
                if ( it->text(0)[0] == l )
@@ -310,7 +315,7 @@ QListViewItem* GlossaryDialog::findTreeWithLetter( const QChar& l, QListViewItem
        return 0;
 }
 
-void GlossaryDialog::slotClicked( QListViewItem *item )
+void GlossaryDialog::slotClicked( Q3ListViewItem *item )
 {
        if ( !item )
                return;
@@ -320,8 +325,8 @@ void GlossaryDialog::slotClicked( QListViewItem *item )
         * in the m_itemList. When it is found the HTML will be
         * generated
         */
-       QValueList<Glossary*>::iterator itGl = m_glossaries.begin();
-       const QValueList<Glossary*>::iterator itGlEnd = m_glossaries.end();
+       Q3ValueList<Glossary*>::iterator itGl = m_glossaries.begin();
+       const Q3ValueList<Glossary*>::iterator itGlEnd = m_glossaries.end();
        bool found = false;
        GlossaryItem *i = 0;
 
@@ -329,9 +334,9 @@ void GlossaryDialog::slotClicked( QListViewItem *item )
        
        while ( !found && itGl != itGlEnd )
        {
-               QValueList<GlossaryItem*> items = ( *itGl )->itemlist();
-               QValueList<GlossaryItem*>::const_iterator it = items.begin();
-               const QValueList<GlossaryItem*>::const_iterator itEnd = items.end();
+               Q3ValueList<GlossaryItem*> items = ( *itGl )->itemlist();
+               Q3ValueList<GlossaryItem*>::const_iterator it = items.begin();
+               const Q3ValueList<GlossaryItem*>::const_iterator itEnd = items.end();
                while ( !found && it != itEnd )
                {
                        if ( ( *it )->name() == item->text( 0 ) )
index bd60958bf78b5db7085f504d04da4213e942f399..1a5958da983f180a344e93d3536f410b67e9fe3a 100644 (file)
 
 #include <khtml_part.h>
 #include <kdialogbase.h>
+//Added by qt3to4:
+#include <Q3ValueList>
+#include <QKeyEvent>
 
 class QChar;
 class QDomDocument;
-class QListViewItem;
+class Q3ListViewItem;
 class KListView;
 class KListViewSearchLine;
 class KActionCollection;
@@ -47,7 +50,7 @@ class Glossary
                        m_itemlist.append( item );
                }
 
-               QValueList<GlossaryItem*> itemlist()const{
+               Q3ValueList<GlossaryItem*> itemlist()const{
                        return m_itemlist;
                }
 
@@ -81,7 +84,7 @@ class Glossary
                /**
                 * sets the internal list of items to @p list
                 */
-               void setItemlist( QValueList<GlossaryItem*> list ){
+               void setItemlist( Q3ValueList<GlossaryItem*> list ){
                        m_itemlist = list;
                }
 
@@ -132,7 +135,7 @@ class Glossary
                 * the information of the items and return them as a
                 * QValueList<GlossaryItem*>
                 */
-               virtual QValueList<GlossaryItem*> readItems( QDomDocument &itemDocument );
+               virtual Q3ValueList<GlossaryItem*> readItems( QDomDocument &itemDocument );
                
                QString m_backgroundpicture;
 
@@ -159,7 +162,7 @@ class Glossary
                 */
                bool loadLayout( QDomDocument& doc, const KURL& url );
        
-               QValueList<GlossaryItem*> m_itemlist;
+               Q3ValueList<GlossaryItem*> m_itemlist;
                
                /**
                 * the name of the glossary
@@ -255,7 +258,7 @@ class GlossaryDialog : public KDialogBase
                void addGlossary( Glossary* newgloss );
 
        private:
-               QValueList<Glossary*> m_glossaries;
+               Q3ValueList<Glossary*> m_glossaries;
 
                /**
                 * if true the items will be displayed folded
@@ -270,12 +273,12 @@ class GlossaryDialog : public KDialogBase
 
                KActionCollection* m_actionCollection;
 
-               QListViewItem* findTreeWithLetter( const QChar&, QListViewItem* );
+               Q3ListViewItem* findTreeWithLetter( const QChar&, Q3ListViewItem* );
 
                KListViewSearchLine *m_search;
 
        private slots:
-               void slotClicked( QListViewItem * );
+               void slotClicked( Q3ListViewItem * );
                /**
                 * The user clicked on a href. Emit the corresponding item
                 */