summaryrefslogtreecommitdiffabout
path: root/microkde
Side-by-side diff
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/KDGanttMinimizeSplitter.cpp194
-rw-r--r--microkde/KDGanttMinimizeSplitter.h35
-rwxr-xr-xmicrokde/fncolordialog.h16
-rw-r--r--microkde/kapplication.cpp33
-rw-r--r--microkde/kcolorbutton.cpp3
-rw-r--r--microkde/kconfig.cpp30
-rw-r--r--microkde/kconfig.h6
-rw-r--r--microkde/kdatepickernew.cpp2
-rw-r--r--microkde/kdatetbl.cpp99
-rw-r--r--microkde/kdatetbl.h20
-rw-r--r--microkde/kdebug.h4
-rw-r--r--microkde/kdecore/kcatalogue.cpp4
-rw-r--r--microkde/kdecore/kconfigbase.h4
-rw-r--r--microkde/kdecore/klibloader.cpp29
-rw-r--r--microkde/kdecore/klibloader.h10
-rw-r--r--microkde/kdecore/klocale.cpp23
-rw-r--r--microkde/kdecore/klocale.h4
-rw-r--r--microkde/kdecore/kmdcodec.cpp139
-rw-r--r--microkde/kdecore/kmdcodec.h38
-rw-r--r--microkde/kdecore/kprefs.cpp16
-rw-r--r--microkde/kdecore/kprefs.h10
-rw-r--r--microkde/kdecore/kshortcut.h8
-rw-r--r--microkde/kdecore/kstandarddirs.cpp24
-rw-r--r--microkde/kdecore/kstandarddirs.h10
-rw-r--r--microkde/kdeui/kaction.cpp75
-rw-r--r--microkde/kdeui/kaction.h26
-rw-r--r--microkde/kdeui/kactionclasses.cpp111
-rw-r--r--microkde/kdeui/kactionclasses.h51
-rw-r--r--microkde/kdeui/kactioncollection.cpp50
-rw-r--r--microkde/kdeui/kactioncollection.h4
-rw-r--r--microkde/kdeui/kbuttonbox.cpp18
-rw-r--r--microkde/kdeui/kbuttonbox.h4
-rw-r--r--microkde/kdeui/kguiitem.cpp14
-rw-r--r--microkde/kdeui/kguiitem.h12
-rw-r--r--microkde/kdeui/kjanuswidget.cpp140
-rw-r--r--microkde/kdeui/kjanuswidget.h56
-rw-r--r--microkde/kdeui/klistbox.cpp56
-rw-r--r--microkde/kdeui/klistbox.h25
-rw-r--r--microkde/kdeui/klistview.cpp337
-rw-r--r--microkde/kdeui/klistview.h121
-rw-r--r--microkde/kdeui/kmainwindow.cpp97
-rw-r--r--microkde/kdeui/kmainwindow.h19
-rw-r--r--microkde/kdeui/knuminput.cpp61
-rw-r--r--microkde/kdeui/knuminput.h15
-rw-r--r--microkde/kdeui/kpopupmenu.cpp5
-rw-r--r--microkde/kdeui/kpopupmenu.h6
-rw-r--r--microkde/kdeui/kseparator.cpp18
-rw-r--r--microkde/kdeui/kseparator.h8
-rw-r--r--microkde/kdeui/ksqueezedtextlabel.cpp3
-rw-r--r--microkde/kdeui/ksqueezedtextlabel.h2
-rw-r--r--microkde/kdeui/kstdaction.cpp2
-rw-r--r--microkde/kdeui/ktoolbar.cpp185
-rw-r--r--microkde/kdeui/ktoolbar.h68
-rw-r--r--microkde/kdeui/ktoolbarbutton.cpp106
-rw-r--r--microkde/kdeui/ktoolbarbutton.h17
-rw-r--r--microkde/kdeui/ktoolbarhandler.cpp26
-rw-r--r--microkde/kdeui/ktoolbarhandler.h10
-rw-r--r--microkde/kdeui/kxmlguiclient.cpp12
-rw-r--r--microkde/kdeui/kxmlguiclient.h6
-rw-r--r--microkde/kdialog.cpp10
-rw-r--r--microkde/kdialog.h6
-rw-r--r--microkde/kdialogbase.cpp20
-rw-r--r--microkde/kdialogbase.h16
-rw-r--r--microkde/keditlistbox.cpp33
-rw-r--r--microkde/keditlistbox.h16
-rw-r--r--microkde/kfiledialog.cpp14
-rw-r--r--microkde/kfontdialog.cpp4
-rw-r--r--microkde/kglobal.cpp5
-rw-r--r--microkde/kglobalsettings.cpp1
-rw-r--r--microkde/kiconloader.cpp12
-rw-r--r--microkde/kiconloader.h4
-rw-r--r--microkde/kio/kfile/kurlrequester.cpp10
-rw-r--r--microkde/kio/kfile/kurlrequester.h4
-rw-r--r--microkde/kio/kio/kdirwatch.cpp12
-rw-r--r--microkde/kio/kio/kdirwatch_p.h10
-rw-r--r--microkde/klineedit.h2
-rw-r--r--microkde/klineeditdlg.h4
-rw-r--r--microkde/kresources/configdialog.cpp17
-rw-r--r--microkde/kresources/configpage.cpp38
-rw-r--r--microkde/kresources/configpage.h10
-rw-r--r--microkde/kresources/factory.cpp6
-rw-r--r--microkde/kresources/factory.h4
-rw-r--r--microkde/kresources/kcmkresources.cpp7
-rw-r--r--microkde/kresources/manager.h8
-rw-r--r--microkde/kresources/managerimpl.cpp10
-rw-r--r--microkde/kresources/managerimpl.h8
-rw-r--r--microkde/kresources/resource.h4
-rw-r--r--microkde/kresources/selectdialog.cpp22
-rw-r--r--microkde/kresources/selectdialog.h10
-rw-r--r--microkde/ksystemtray.cpp3
-rw-r--r--microkde/ksystemtray.h2
-rw-r--r--microkde/ktempfile.cpp4
-rw-r--r--microkde/ktempfile.h4
-rw-r--r--microkde/ktextedit.cpp16
-rw-r--r--microkde/ktextedit.h6
-rw-r--r--microkde/kurl.cpp30
-rw-r--r--microkde/kurl.h14
-rw-r--r--microkde/kutils/kcmultidialog.cpp16
-rw-r--r--microkde/kutils/kcmultidialog.h8
-rw-r--r--microkde/microkde.pro4
-rw-r--r--microkde/microkdeE.pro2
-rw-r--r--microkde/ofileselector_p.cpp2
-rw-r--r--microkde/ofileselector_p.h2
-rw-r--r--microkde/qlayoutengine_p.h8
104 files changed, 1617 insertions, 1358 deletions
diff --git a/microkde/KDGanttMinimizeSplitter.cpp b/microkde/KDGanttMinimizeSplitter.cpp
index 72c4e60..4172cd0 100644
--- a/microkde/KDGanttMinimizeSplitter.cpp
+++ b/microkde/KDGanttMinimizeSplitter.cpp
@@ -39,19 +39,28 @@
#include "qbitmap.h"
#if QT_VERSION >= 0x030000
-#include "qptrlist.h"
-#include "qmemarray.h"
+#include "q3ptrlist.h"
+#include "q3memarray.h"
#else
#include <qlist.h>
#include <qarray.h>
-#define QPtrList QList
-#define QMemArray QArray
+#define Q3PtrList QList
+#define Q3MemArray QArray
#endif
#include "qlayoutengine_p.h"
-#include "qobjectlist.h"
+#include "qobject.h"
#include "qstyle.h"
#include "qapplication.h" //sendPostedEvents
-#include <qvaluelist.h>
+#include <q3valuelist.h>
#include <qcursor.h>
-#include <qframe.h>
+#include <q3frame.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3PointArray>
+#include <QPixmap>
+#include <QResizeEvent>
+#include <QMouseEvent>
+#include <QChildEvent>
+#include <QEvent>
+#include <QPaintEvent>
#ifndef KDGANTT_MASTER_CVS
//#include "KDGanttMinimizeSplitter.moc"
@@ -66,8 +75,8 @@ static int mouseOffset;
static int opaqueOldPos = -1; //### there's only one mouse, but this is a bit risky
-class KDRubberBand: public QFrame
+class KDRubberBand: public Q3Frame
{
public:
- KDRubberBand( QWidget *parent, const char * name, WFlags f ) :QFrame ( parent, name, f ) {;}
+ KDRubberBand( QWidget *parent, const char * name, Qt::WFlags f ) :Q3Frame ( parent, name, f ) {;}
protected:
@@ -81,7 +90,8 @@ protected:
KDGanttSplitterHandle::KDGanttSplitterHandle( Qt::Orientation o,
KDGanttMinimizeSplitter *parent, const char * name )
- : QWidget( parent, name ), _activeButton( 0 ), _collapsed( false )
+ : _activeButton( 0 ), _collapsed( false )
{
-
+ setObjectName(name);
+ setParent(parent);
if ( QApplication::desktop()->width() > 320 && QApplication::desktop()->width() < 650 ) {
mSizeHint = QSize(7,7);
@@ -107,8 +117,8 @@ void KDGanttSplitterHandle::setOrientation( Qt::Orientation o )
orient = o;
#ifndef QT_NO_CURSOR
- if ( o == KDGanttMinimizeSplitter::Horizontal )
- setCursor( splitHCursor );
+ if ( o == Qt::Horizontal )
+ setCursor( Qt::splitHCursor );
else
- setCursor( splitVCursor );
+ setCursor( Qt::splitVCursor );
#endif
}
@@ -118,5 +128,5 @@ void KDGanttSplitterHandle::mouseMoveEvent( QMouseEvent *e )
{
updateCursor( e->pos() );
- if ( !(e->state()&LeftButton) )
+ if ( !(e->state()&Qt::LeftButton) )
return;
@@ -138,5 +148,5 @@ void KDGanttSplitterHandle::mouseMoveEvent( QMouseEvent *e )
void KDGanttSplitterHandle::mousePressEvent( QMouseEvent *e )
{
- if ( e->button() == LeftButton ) {
+ if ( e->button() == Qt::LeftButton ) {
_activeButton = onButton( e->pos() );
mouseOffset = s->pick(e->pos());
@@ -150,11 +160,11 @@ void KDGanttSplitterHandle::updateCursor( const QPoint& p)
{
if ( onButton( p ) != 0 ) {
- setCursor( arrowCursor );
+ setCursor( Qt::arrowCursor );
}
else {
- if ( orient == KDGanttMinimizeSplitter::Horizontal )
- setCursor( splitHCursor );
+ if ( orient == Qt::Horizontal )
+ setCursor( Qt::splitHCursor );
else
- setCursor( splitVCursor );
+ setCursor( Qt::splitVCursor );
}
}
@@ -196,5 +206,5 @@ void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
}
else {
- if ( !opaque() && e->button() == LeftButton ) {
+ if ( !opaque() && e->button() == Qt::LeftButton ) {
QCOORD pos = s->pick(parentWidget()->mapFromGlobal(e->globalPos()))
- mouseOffset;
@@ -212,8 +222,8 @@ void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
int KDGanttSplitterHandle::onButton( const QPoint& p )
{
- QValueList<QPointArray> list = buttonRegions();
+ Q3ValueList<Q3PointArray> list = buttonRegions();
int index = 1;
int add = 12;
- for( QValueList<QPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) {
+ for( Q3ValueList<Q3PointArray>::Iterator it = list.begin(); it != list.end(); ++it ) {
QRect rect = (*it).boundingRect();
rect.setLeft( rect.left()- add );
@@ -230,7 +240,7 @@ int KDGanttSplitterHandle::onButton( const QPoint& p )
-QValueList<QPointArray> KDGanttSplitterHandle::buttonRegions()
+Q3ValueList<Q3PointArray> KDGanttSplitterHandle::buttonRegions()
{
- QValueList<QPointArray> list;
+ Q3ValueList<Q3PointArray> list;
int sw = 8;
@@ -239,5 +249,5 @@ QValueList<QPointArray> KDGanttSplitterHandle::buttonRegions()
int voffset[] = { (int) -sw*3, (int) sw*3 };
for ( int i = 0; i < 2; i++ ) {
- QPointArray arr;
+ Q3PointArray arr;
if ( !_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Right ||
_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Left) {
@@ -312,9 +322,9 @@ void KDGanttSplitterHandle::paintEvent( QPaintEvent * )
p.setPen( col );
- QValueList<QPointArray> list = buttonRegions();
+ Q3ValueList<Q3PointArray> list = buttonRegions();
int index = 1;
if ( mUseOffset )
p.translate( 0, 1 );
- for ( QValueList<QPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) {
+ for ( Q3ValueList<Q3PointArray>::Iterator it = list.begin(); it != list.end(); ++it ) {
if ( index == _activeButton ) {
@@ -378,10 +388,10 @@ public:
QSplitterData() : opaque( FALSE ), firstShow( TRUE ) {}
- QPtrList<QSplitterLayoutStruct> list;
+ Q3PtrList<QSplitterLayoutStruct> list;
bool opaque;
bool firstShow;
};
-void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos,
+void kdganttGeomCalc( Q3MemArray<QLayoutStruct> &chain, int start, int count, int pos,
int space, int spacer );
#endif // DOXYGEN_SKIP_INTERNAL
@@ -462,10 +472,11 @@ static QSize minSizeHint( const QWidget* w )
*/
KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( QWidget *parent, const char *name )
- :QFrame(parent,name,WPaintUnclipped)
+ :Q3Frame(parent,name)
{
+ setAttribute(Qt::WA_PaintUnclipped);
mRubberBand = 0;
mFirstHandle = 0;
#if QT_VERSION >= 232
- orient = Horizontal;
+ orient = Qt::Horizontal;
init();
#endif
@@ -476,8 +487,8 @@ KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( QWidget *parent, const char *n
and \a name arguments being passed on to the QFrame constructor.
*/
-KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Orientation o, QWidget *parent, const char *name )
- :QFrame(parent,name,WPaintUnclipped)
+KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Qt::Orientation o, QWidget *parent, const char *name )
+ :Q3Frame(parent,name)
{
-
+ setAttribute(Qt::WA_PaintUnclipped);
mRubberBand = 0;
mFirstHandle = 0;
@@ -506,5 +517,5 @@ void KDGanttMinimizeSplitter::init()
{
data = new QSplitterData;
- if ( orient == Horizontal )
+ if ( orient == Qt::Horizontal )
setSizePolicy( QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum) );
else
@@ -535,5 +546,5 @@ void KDGanttMinimizeSplitter::toggle()
The possible orientations are Qt:Vertical and Qt::Horizontal (the default).
*/
-void KDGanttMinimizeSplitter::setOrientation( Orientation o )
+void KDGanttMinimizeSplitter::setOrientation( Qt::Orientation o )
{
#if QT_VERSION >= 232
@@ -542,5 +553,5 @@ void KDGanttMinimizeSplitter::setOrientation( Orientation o )
orient = o;
- if ( orient == Horizontal )
+ if ( orient == Qt::Horizontal )
setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) );
else
@@ -587,6 +598,6 @@ QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool firs
tmp += w->name();
newHandle = new KDGanttSplitterHandle( orientation(), this, tmp.latin1() );
- if ( ! mFirstHandle )
- mFirstHandle = newHandle;
+ if ( ! mFirstHandle )
+ mFirstHandle = newHandle;
s->wid = newHandle;
newHandle->setId(data->list.count());
@@ -601,5 +612,5 @@ QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool firs
s->mode = Stretch;
s->wid = w;
- if ( !testWState( WState_Resized ) && w->sizeHint().isValid() )
+ if ( !testAttribute( Qt::WA_Resized ) && w->sizeHint().isValid() )
s->sizer = pick( w->sizeHint() );
else
@@ -622,18 +633,24 @@ QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool firs
void KDGanttMinimizeSplitter::childEvent( QChildEvent *c )
{
- if ( c->type() == QEvent::ChildInserted ) {
+ if ( c->type() == QEvent::ChildAdded ) {
if ( !c->child()->isWidgetType() )
return;
- if ( ((QWidget*)c->child())->testWFlags( WType_TopLevel ) )
+ QWidget *cw = (QWidget*)c->child();
+
+ if ( (cw->windowFlags())&Qt::Window )
+ return;
+
+ // avoid infinite recursion
+ if(cw->objectName().startsWith("qt_splithandle_"))
return;
QSplitterLayoutStruct *s = data->list.first();
while ( s ) {
- if ( s->wid == c->child() )
+ if ( s->wid == cw )
return;
s = data->list.next();
}
- addWidget( (QWidget*)c->child() );
+ addWidget( cw );
recalc( isVisible() );
@@ -671,15 +688,15 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
#ifdef DESKTOP_VERSION
QPainter paint( this );
- paint.setPen( gray );
- paint.setBrush( gray );
- paint.setRasterOp( XorROP );
+ paint.setPen( Qt::gray );
+ paint.setBrush( Qt::gray );
+ paint.setCompositionMode( QPainter::CompositionMode_Xor );
QRect r = contentsRect();
const int rBord = 3; //Themable????
#if QT_VERSION >= 0x030000
- int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this);
+ int sw = style()->pixelMetric(QStyle::PM_SplitterWidth, 0, this);
#else
int sw = style().splitterWidth();
#endif
- if ( orient == Horizontal ) {
+ if ( orient == Qt::Horizontal ) {
if ( opaqueOldPos >= 0 )
paint.drawRect( opaqueOldPos + sw/2 - rBord , r.y(),
@@ -697,5 +714,5 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
#else
if ( !mRubberBand ) {
- mRubberBand = new KDRubberBand( 0, "rubber", WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop);
+ mRubberBand = new KDRubberBand( 0, "rubber", Qt::WStyle_NoBorder | Qt::WStyle_Customize | Qt::WStyle_StaysOnTop);
mRubberBand->setFrameStyle( Box | Raised );
//mRubberBand->setPalette( QPalette ( Qt::red.light(),Qt::red.dark() ) );
@@ -711,5 +728,5 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
}
int sw = style().splitterWidth();
- if ( orient == Horizontal ) {
+ if ( orient == Qt::Horizontal ) {
if ( p >= 0 ) {
QPoint geo = mapToGlobal (QPoint ( p + sw/2 - rBord, r.y()));
@@ -733,5 +750,5 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
bool KDGanttMinimizeSplitter::event( QEvent *e )
{
- if ( e->type() == QEvent::LayoutHint || ( e->type() == QEvent::Show && data->firstShow ) ) {
+ if ( e->type() == QEvent::LayoutRequest || ( e->type() == QEvent::Show && data->firstShow ) ) {
recalc( isVisible() );
if ( e->type() == QEvent::Show )
@@ -756,5 +773,5 @@ void KDGanttMinimizeSplitter::drawSplitter( QPainter *p,
style().drawPrimitive(QStyle::PE_Splitter, p, QRect(x, y, w, h), colorGroup(),
(orientation() == Qt::Horizontal ?
- QStyle::Style_Horizontal : 0));
+ QStyle::State_Horizontal : 0));
#endif
}
@@ -797,7 +814,7 @@ void KDGanttMinimizeSplitter::moveSplitter( QCOORD p, int id )
p = adjustPos( p, id );
QSplitterLayoutStruct *s = data->list.at(id);
- int oldP = orient == Horizontal ? s->wid->x() : s->wid->y();
+ int oldP = orient == Qt::Horizontal ? s->wid->x() : s->wid->y();
bool upLeft;
- if ( false && orient == Horizontal ) {
+ if ( false && orient == Qt::Horizontal ) {
p += s->wid->width();
upLeft = p > oldP;
@@ -814,6 +831,6 @@ void KDGanttMinimizeSplitter::moveSplitter( QCOORD p, int id )
void KDGanttMinimizeSplitter::setG( QWidget *w, int p, int s, bool isSplitter )
{
- if ( orient == Horizontal ) {
- if ( false && orient == Horizontal && !isSplitter )
+ if ( orient == Qt::Horizontal ) {
+ if ( false && orient == Qt::Horizontal && !isSplitter )
p = contentsRect().width() - p - s;
w->setGeometry( p, contentsRect().y(), s, contentsRect().height() );
@@ -841,5 +858,5 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
int pos1, pos2;
int dd = s->sizer;
- if( false && orient == Horizontal ) {
+ if( false && orient == Qt::Horizontal ) {
pos1 = pos;
pos2 = pos + dd;
@@ -857,5 +874,5 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
} else {
int dd, newLeft, nextPos;
- if( false && orient == Horizontal ) {
+ if( false && orient == Qt::Horizontal ) {
dd = w->geometry().right() - pos;
dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize())));
@@ -894,5 +911,5 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
int dd = s->sizer;
int pos1, pos2;
- if( false && orient == Horizontal ) {
+ if( false && orient == Qt::Horizontal ) {
pos2 = pos - dd;
pos1 = pos2 + 1;
@@ -911,5 +928,5 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
int left = pick( w->pos() );
int right, dd,/* newRight,*/ newLeft, nextPos;
- if ( false && orient == Horizontal ) {
+ if ( false && orient == Qt::Horizontal ) {
dd = pos - left + 1;
dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize())));
@@ -989,7 +1006,7 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max )
}
QRect r = contentsRect();
- if ( orient == Horizontal && false ) {
+ if ( orient == Qt::Horizontal && false ) {
#if QT_VERSION >= 0x030000
- int splitterWidth = style().pixelMetric(QStyle::PM_SplitterWidth, this);
+ int splitterWidth = style()->pixelMetric(QStyle::PM_SplitterWidth, 0,this);
#else
int splitterWidth = style().splitterWidth();
@@ -1031,5 +1048,5 @@ void KDGanttMinimizeSplitter::doResize()
int i;
int n = data->list.count();
- QMemArray<QLayoutStruct> a( n );
+ Q3MemArray<QLayoutStruct> a( n );
for ( i = 0; i< n; i++ ) {
a[i].init();
@@ -1133,5 +1150,5 @@ void KDGanttMinimizeSplitter::recalc( bool update )
maxt = mint;
- if ( orient == Horizontal ) {
+ if ( orient == Qt::Horizontal ) {
setMaximumSize( maxl, maxt );
setMinimumSize( minl, mint );
@@ -1268,11 +1285,8 @@ QSize KDGanttMinimizeSplitter::sizeHint() const
int l = 0;
int t = 0;
- if ( children() ) {
- const QObjectList * c = children();
- QObjectListIt it( *c );
- QObject * o;
-
- while( (o=it.current()) != 0 ) {
- ++it;
+ if ( !children().empty() ) {
+ const QObjectList c = children();
+ for(QObjectList::const_iterator i=c.begin();i!=c.end();++i) {
+ QObject * o = *i;
if ( o->isWidgetType() &&
!((QWidget*)o)->isHidden() ) {
@@ -1285,5 +1299,5 @@ QSize KDGanttMinimizeSplitter::sizeHint() const
}
}
- return orientation() == Horizontal ? QSize( l, t ) : QSize( t, l );
+ return orientation() == Qt::Horizontal ? QSize( l, t ) : QSize( t, l );
}
@@ -1298,11 +1312,8 @@ QSize KDGanttMinimizeSplitter::minimumSizeHint() const
int l = 0;
int t = 0;
- if ( children() ) {
- const QObjectList * c = children();
- QObjectListIt it( *c );
- QObject * o;
-
- while( (o=it.current()) != 0 ) {
- ++it;
+ if ( !children().empty() ) {
+ const QObjectList c = children();
+ for(QObjectList::const_iterator i=c.begin();i!=c.end();++i) {
+ QObject * o = *i;
if ( o->isWidgetType() &&
!((QWidget*)o)->isHidden() ) {
@@ -1315,5 +1326,5 @@ QSize KDGanttMinimizeSplitter::minimumSizeHint() const
}
}
- return orientation() == Horizontal ? QSize( l, t ) : QSize( t, l );
+ return orientation() == Qt::Horizontal ? QSize( l, t ) : QSize( t, l );
}
@@ -1403,11 +1414,12 @@ bool KDGanttMinimizeSplitter::isHidden( QWidget *w ) const
*/
-QValueList<int> KDGanttMinimizeSplitter::sizes() const
+Q3ValueList<int> KDGanttMinimizeSplitter::sizes() const
{
+ /* TODO: hacker
if ( !testWState(WState_Polished) ) {
QWidget* that = (QWidget*) this;
that->polish();
- }
- QValueList<int> list;
+ } */
+ Q3ValueList<int> list;
QSplitterLayoutStruct *s = data->list.first();
while ( s ) {
@@ -1434,8 +1446,8 @@ QValueList<int> KDGanttMinimizeSplitter::sizes() const
*/
-void KDGanttMinimizeSplitter::setSizes( QValueList<int> list )
+void KDGanttMinimizeSplitter::setSizes( Q3ValueList<int> list )
{
processChildEvents();
- QValueList<int>::Iterator it = list.begin();
+ Q3ValueList<int>::Iterator it = list.begin();
QSplitterLayoutStruct *s = data->list.first();
while ( s && it != list.end() ) {
@@ -1457,5 +1469,5 @@ void KDGanttMinimizeSplitter::setSizes( QValueList<int> list )
void KDGanttMinimizeSplitter::processChildEvents()
{
- QApplication::sendPostedEvents( this, QEvent::ChildInserted );
+ QApplication::sendPostedEvents( this, QEvent::ChildAdded );
}
@@ -1469,5 +1481,5 @@ void KDGanttMinimizeSplitter::styleChange( QStyle& old )
#if QT_VERSION >= 0x030000
- int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this);
+ int sw = style()->pixelMetric(QStyle::PM_SplitterWidth, 0, this);
#else
int sw = style().splitterWidth();
@@ -1480,5 +1492,5 @@ void KDGanttMinimizeSplitter::styleChange( QStyle& old )
}
doResize();
- QFrame::styleChange( old );
+ Q3Frame::styleChange( old );
}
@@ -1513,5 +1525,5 @@ static inline int fRound( int i ) {
return ( i % 256 < 128 ) ? i / 256 : 1 + i / 256;
}
-void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos,
+void kdganttGeomCalc( Q3MemArray<QLayoutStruct> &chain, int start, int count, int pos,
int space, int spacer )
{
diff --git a/microkde/KDGanttMinimizeSplitter.h b/microkde/KDGanttMinimizeSplitter.h
index 3042e0a..338d965 100644
--- a/microkde/KDGanttMinimizeSplitter.h
+++ b/microkde/KDGanttMinimizeSplitter.h
@@ -1,2 +1,9 @@
+//Added by qt3to4:
+#include <Q3PointArray>
+#include <QPaintEvent>
+#include <QResizeEvent>
+#include <QChildEvent>
+#include <QMouseEvent>
+#include <QEvent>
/* -*- Mode: C++ -*-
$Id$
@@ -36,6 +43,6 @@
#ifndef QT_H
-#include "qframe.h"
-#include "qvaluelist.h"
+#include "q3frame.h"
+#include "q3valuelist.h"
#endif // QT_H
@@ -45,5 +52,5 @@ class QSplitterLayoutStruct;
class KDGanttSplitterHandle;
class KDRubberBand;
-class KDGanttMinimizeSplitter : public QFrame
+class KDGanttMinimizeSplitter : public Q3Frame
{
Q_OBJECT
@@ -57,9 +64,9 @@ public:
KDGanttMinimizeSplitter( QWidget* parent=0, const char* name=0 );
- KDGanttMinimizeSplitter( Orientation, QWidget* parent=0, const char* name=0 );
+ KDGanttMinimizeSplitter( Qt::Orientation, QWidget* parent=0, const char* name=0 );
~KDGanttMinimizeSplitter();
- virtual void setOrientation( Orientation );
- Orientation orientation() const { return orient; }
+ virtual void setOrientation( Qt::Orientation );
+ Qt::Orientation orientation() const { return orient; }
void setMinimizeDirection( Direction );
@@ -78,6 +85,6 @@ public:
QSize minimumSizeHint() const;
- QValueList<int> sizes() const;
- void setSizes( QValueList<int> );
+ Q3ValueList<int> sizes() const;
+ void setSizes( Q3ValueList<int> );
KDGanttSplitterHandle* firstHandle(){ return mFirstHandle;}
void expandPos( int id, int* min, int* max );
@@ -115,12 +122,12 @@ private:
QCOORD pick( const QPoint &p ) const
- { return orient == Horizontal ? p.x() : p.y(); }
+ { return orient == Qt::Horizontal ? p.x() : p.y(); }
QCOORD pick( const QSize &s ) const
- { return orient == Horizontal ? s.width() : s.height(); }
+ { return orient == Qt::Horizontal ? s.width() : s.height(); }
QCOORD trans( const QPoint &p ) const
- { return orient == Vertical ? p.x() : p.y(); }
+ { return orient == Qt::Vertical ? p.x() : p.y(); }
QCOORD trans( const QSize &s ) const
- { return orient == Vertical ? s.width() : s.height(); }
+ { return orient == Qt::Vertical ? s.width() : s.height(); }
KDGanttSplitterHandle* mFirstHandle;
QSplitterData *data;
@@ -128,5 +135,5 @@ private:
private:
- Orientation orient;
+ Qt::Orientation orient;
Direction _direction;
#ifndef DOXYGEN_SKIP_INTERNAL
@@ -164,5 +171,5 @@ public:
protected:
- QValueList<QPointArray> buttonRegions();
+ Q3ValueList<Q3PointArray> buttonRegions();
void paintEvent( QPaintEvent * );
void mouseMoveEvent( QMouseEvent * );
diff --git a/microkde/fncolordialog.h b/microkde/fncolordialog.h
index 615d2ed..52356be 100755
--- a/microkde/fncolordialog.h
+++ b/microkde/fncolordialog.h
@@ -36,10 +36,10 @@
// FNPaletteBase
//-----------------------------------------------------------------------------
-class Q_EXPORT FNPaletteBase : public QWidget
+class /* Q_EXPORT */ FNPaletteBase : public QWidget
{
Q_OBJECT
public:
- FNPaletteBase(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
+ FNPaletteBase(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0);
@@ -79,9 +79,9 @@ signals:
// FNColorPalette
//-----------------------------------------------------------------------------
-class Q_EXPORT FNColorPalette : public FNPaletteBase
+class /* Q_EXPORT */ FNColorPalette : public FNPaletteBase
{
Q_OBJECT
public:
- FNColorPalette(QColor c, QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
+ FNColorPalette(QColor c, QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0);
virtual ~FNColorPalette();
};
@@ -93,9 +93,9 @@ public:
// FNHSVPalette
//-----------------------------------------------------------------------------
-class Q_EXPORT FNHSVPalette : public FNPaletteBase
+class /*Q_EXPORT */ FNHSVPalette : public FNPaletteBase
{
Q_OBJECT
public:
- FNHSVPalette(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
+ FNHSVPalette(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0);
virtual ~FNHSVPalette();
public slots:
@@ -112,9 +112,9 @@ protected:
// FNColorDialog
//-----------------------------------------------------------------------------
-class Q_EXPORT FNColorDialog : public QDialog
+class /*Q_EXPORT */FNColorDialog : public QDialog
{
Q_OBJECT
public:
- FNColorDialog(QWidget* parent=0, const char* name=0, WFlags f=0);
+ FNColorDialog(QWidget* parent=0, const char* name=0, Qt::WFlags f=0);
virtual ~FNColorDialog();
void setColor(QColor c);
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp
index d7c12bb..b058d54 100644
--- a/microkde/kapplication.cpp
+++ b/microkde/kapplication.cpp
@@ -7,9 +7,12 @@
#include <qstring.h>
#include <qfile.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qdialog.h>
#include <qlayout.h>
-#include <qtextbrowser.h>
+#include <q3textbrowser.h>
#include <qregexp.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
int KApplication::random()
@@ -76,8 +79,8 @@ void KApplication::showFile(QString caption, QString fn)
#endif
QFile file( fileName );
- if (!file.open( IO_ReadOnly ) ) {
+ if (!file.open( QIODevice::ReadOnly ) ) {
return ;
}
- QTextStream ts( &file );
+ Q3TextStream ts( &file );
text = ts.read();
file.close();
@@ -90,17 +93,17 @@ bool KApplication::convert2latin1(QString fileName)
QString text;
QFile file( fileName );
- if (!file.open( IO_ReadOnly ) ) {
+ if (!file.open( QIODevice::ReadOnly ) ) {
return false;
}
- QTextStream ts( &file );
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ Q3TextStream ts( &file );
+ ts.setEncoding( Q3TextStream::UnicodeUTF8 );
text = ts.read();
file.close();
- if (!file.open( IO_WriteOnly ) ) {
+ if (!file.open( QIODevice::WriteOnly ) ) {
return false;
}
- QTextStream tsIn( &file );
- tsIn.setEncoding( QTextStream::Latin1 );
+ Q3TextStream tsIn( &file );
+ tsIn.setEncoding( Q3TextStream::Latin1 );
tsIn << text.latin1();
file.close();
@@ -113,9 +116,9 @@ void KApplication::showText(QString caption, QString text)
QDialog dia( 0, "name", true ); ;
dia.setCaption( caption );
- QVBoxLayout* lay = new QVBoxLayout( &dia );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( &dia );
lay->setSpacing( 3 );
lay->setMargin( 3 );
KTextEdit tb ( &dia );
- tb.setWordWrap( QMultiLineEdit::WidgetWidth );
+ tb.setWordWrap( Q3MultiLineEdit::WidgetWidth );
lay->addWidget( &tb );
tb.setText( text );
@@ -134,5 +137,5 @@ void KApplication::showText(QString caption, QString text)
#include <qdir.h>
#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include "kglobal.h"
#include "klocale.h"
@@ -145,10 +148,10 @@ class KBackupPrefs : public QDialog
{
setCaption( i18n("Backup Failed!") );
- QVBoxLayout* lay = new QVBoxLayout( this );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( this );
lay->setSpacing( 3 );
lay->setMargin( 3 );
QLabel * lab = new QLabel( message, this );
lay->addWidget( lab );
- QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Choose action"), this );
+ Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Choose action"), this );
lay->addWidget( format );
format->setExclusive ( true ) ;
diff --git a/microkde/kcolorbutton.cpp b/microkde/kcolorbutton.cpp
index 197bea2..16618fc 100644
--- a/microkde/kcolorbutton.cpp
+++ b/microkde/kcolorbutton.cpp
@@ -2,4 +2,5 @@
#include "kcolordialog.h"
#include "qapplication.h"
+#include <QDesktopWidget>
@@ -7,4 +8,6 @@
#ifdef DESKTOP_VERSION
#include <qcolordialog.h>
+//Added by qt3to4:
+#include <QPixmap>
#endif
void KColorButton:: edit()
diff --git a/microkde/kconfig.cpp b/microkde/kconfig.cpp
index 940196e..12063ca 100644
--- a/microkde/kconfig.cpp
+++ b/microkde/kconfig.cpp
@@ -1,5 +1,7 @@
#include <qfile.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qwidget.h>
+//Added by qt3to4:
+#include <Q3ValueList>
#include "kdebug.h"
@@ -54,9 +56,9 @@ QString KConfig::group() const {
//US added method
-QValueList<int> KConfig::readIntListEntry( const QString & key)
+Q3ValueList<int> KConfig::readIntListEntry( const QString & key)
{
// qDebug("KConfig::readIntListEntry key=%s:", key.latin1());
- QValueList<int> result;
+ Q3ValueList<int> result;
QMap<QString,QString>::ConstIterator mit = mStringMap.find( mGroup + key );
@@ -112,5 +114,5 @@ QString KConfig::readEntry( const QString &key, const QString &def )
QSize KConfig::readSizeEntry( const QString &key, QSize* def )
{
- QValueList<int> intlist = readIntListEntry(key);
+ Q3ValueList<int> intlist = readIntListEntry(key);
if (intlist.count() < 2)
@@ -195,9 +197,9 @@ QDateTime KConfig::readDateTimeEntry( const QString &key, const QDateTime *def )
//US added method
-void KConfig::writeEntry( const QString &key, const QValueList<int> &value)
+void KConfig::writeEntry( const QString &key, const Q3ValueList<int> &value)
{
QStringList valuesAsStrings;
- QValueList<int>::ConstIterator it;
+ Q3ValueList<int>::ConstIterator it;
for( it = value.begin(); it != value.end(); ++it )
@@ -247,5 +249,5 @@ void KConfig::writeEntry( const QString & e, const QColor & c )
void KConfig::writeEntry( const QString & e, const QSize & s )
{
- QValueList<int> intlist;
+ Q3ValueList<int> intlist;
intlist << s.width() << s.height();
writeEntry( e, intlist );
@@ -272,5 +274,5 @@ void KConfig::load()
QFile f( mFileName );
- if ( !f.open( IO_ReadOnly ) ) {
+ if ( !f.open( QIODevice::ReadOnly ) ) {
//qDebug("KConfig: could not open file %s ",mFileName.latin1() );
return;
@@ -280,10 +282,10 @@ void KConfig::load()
mStringMap.clear();
- QTextStream t( &f );
- t.setEncoding( QTextStream::Latin1 );
+ Q3TextStream t( &f );
+ t.setEncoding( Q3TextStream::Latin1 );
QString line = t.readLine();
while ( !line.isNull() ) {
- QStringList tokens = QStringList::split( ",", line );
+ QStringList tokens = line.split(',');
if ( tokens[0] == "bool" ) {
bool value = false;
@@ -324,5 +326,5 @@ void KConfig::sync()
QFile f( mFileName );
- if ( !f.open( IO_WriteOnly ) ) {
+ if ( !f.open( QIODevice::WriteOnly ) ) {
qDebug("KConfig::sync() Can't open file %s ",mFileName.latin1() );
@@ -331,6 +333,6 @@ void KConfig::sync()
}
- QTextStream t( &f );
- t.setEncoding( QTextStream::Latin1 );
+ Q3TextStream t( &f );
+ t.setEncoding( Q3TextStream::Latin1 );
QMap<QString,bool>::ConstIterator itBool;
for( itBool = mBoolMap.begin(); itBool != mBoolMap.end(); ++itBool ) {
diff --git a/microkde/kconfig.h b/microkde/kconfig.h
index 1a1038f..7b91e44 100644
--- a/microkde/kconfig.h
+++ b/microkde/kconfig.h
@@ -4,5 +4,5 @@
#include <qstring.h>
#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <q3valuelist.h>
#include <qcolor.h>
#include <qfont.h>
@@ -58,5 +58,5 @@ class KConfig
//US added method readIntListEntry
- QValueList<int> readIntListEntry( const QString &);
+ Q3ValueList<int> readIntListEntry( const QString &);
int readNumEntry( const QString &, int def=0 );
@@ -70,5 +70,5 @@ class KConfig
bool hasKey( const QString &);
- void writeEntry( const QString &, const QValueList<int>& );
+ void writeEntry( const QString &, const Q3ValueList<int>& );
void writeEntry( const QString &, int );
void writeEntry( const QString &key , unsigned int value) { writeEntry( key, int( value ) ); }
diff --git a/microkde/kdatepickernew.cpp b/microkde/kdatepickernew.cpp
index f60a422..8f8001e 100644
--- a/microkde/kdatepickernew.cpp
+++ b/microkde/kdatepickernew.cpp
@@ -314,5 +314,5 @@ KDatePicker::selectMonthClicked()
int i, month, months = calendar->monthsInYear(date);
- QPopupMenu popup(selectMonth);
+ Q3PopupMenu popup(selectMonth);
for (i = 1; i <= months; i++)
diff --git a/microkde/kdatetbl.cpp b/microkde/kdatetbl.cpp
index 353f78d..10dc449 100644
--- a/microkde/kdatetbl.cpp
+++ b/microkde/kdatetbl.cpp
@@ -45,4 +45,12 @@
#include <qpainter.h>
#include <qdialog.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QFocusEvent>
+#include <Q3Frame>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <QEvent>
#include <assert.h>
#include <qapplication.h>
@@ -70,5 +78,5 @@ KDateValidator::date(const QString& text, QDate& d) const
return Acceptable;
} else
- return Valid;
+ return QValidator::Intermediate;
}
@@ -79,6 +87,6 @@ KDateValidator::fixup( QString& ) const
}
-KDateTable::KDateTable(QWidget *parent, QDate date_, const char* name, WFlags f)
- : QGridView(parent, name, f)
+KDateTable::KDateTable(QWidget *parent, QDate date_, const char* name, Qt::WFlags f)
+ : Q3GridView(parent, name, f)
{
setFont( KGlobalSettings::generalFont() );
@@ -87,5 +95,5 @@ KDateTable::KDateTable(QWidget *parent, QDate date_, const char* name, WFlags f)
date_=QDate::currentDate();
}
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( Qt::StrongFocus );
setNumRows(7); // 6 weeks max + headline
setNumCols(7); // 7 days a week
@@ -94,5 +102,5 @@ KDateTable::KDateTable(QWidget *parent, QDate date_, const char* name, WFlags f)
viewport()->setBackgroundColor(QColor(220,245,255));
#if 0
- viewport()->setEraseColor(lightGray);
+ viewport()->setEraseColor(Qt::lightGray);
#endif
mMarkCurrent = false;
@@ -109,5 +117,5 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
int h=cellHeight();
int pos;
- QBrush brushBlue(blue);
+ QBrush brushBlue(Qt::blue);
QBrush brushLightblue(QColor(220,245,255));
QFont _font=font();
@@ -134,16 +142,15 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
painter->setBrush(brushLightblue);
painter->drawRect(0, 0, w, h);
- painter->setPen(blue);
+ painter->setPen(Qt::blue);
} else {
- painter->setPen(blue);
+ painter->setPen(Qt::blue);
painter->setBrush(brushBlue);
painter->drawRect(0, 0, w, h);
- painter->setPen(white);
+ painter->setPen(Qt::white);
}
- painter->drawText(0, 0, w, h-1, AlignCenter,
+ painter->drawText(0, 0, w, h-1, Qt::AlignCenter,
daystr, -1, &rect);
- painter->setPen(black);
- painter->moveTo(0, h-1);
- painter->lineTo(w-1, h-1);
+ painter->setPen(Qt::black);
+ painter->drawLine(0, h-1, w-1, h-1);
// ----- draw the weekday:
} else {
@@ -162,8 +169,8 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
text.setNum(pos-firstday-numdays+1);
}
- painter->setPen(gray);
+ painter->setPen(Qt::gray);
} else { // paint a day of the current month
text.setNum(pos-firstday+1);
- painter->setPen(black);
+ painter->setPen(Qt::black);
}
@@ -172,21 +179,21 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
{
if(mMarkCurrent && firstday+QDate::currentDate().day()-1==pos)
- painter->setPen(green);
+ painter->setPen(Qt::green);
else
- painter->setPen(red);
+ painter->setPen(Qt::red);
if(hasFocus())
{
- painter->setBrush(darkRed);
- pen=white;
+ painter->setBrush(Qt::darkRed);
+ pen=QColor(Qt::white);
} else {
- painter->setBrush(darkGray);
- pen=white;
+ painter->setBrush(Qt::darkGray);
+ pen=QColor(Qt::white);
}
} else {
if(mMarkCurrent && firstday+QDate::currentDate().day()-1==pos)
{
- painter->setPen(green);
- painter->setBrush(darkGreen);
- pen=white;
+ painter->setPen(Qt::green);
+ painter->setBrush(Qt::darkGreen);
+ pen=QColor(Qt::white);
} else {
painter->setBrush(QColor(220,245,255));
@@ -196,5 +203,5 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
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);
}
/*
@@ -275,5 +282,5 @@ void
KDateTable::viewportResizeEvent(QResizeEvent * e)
{
- QGridView::viewportResizeEvent(e);
+ Q3GridView::viewportResizeEvent(e);
setCellWidth(viewport()->width()/7);
@@ -410,5 +417,5 @@ void KDateTable::focusInEvent( QFocusEvent *e )
{
repaintContents(false);
- QGridView::focusInEvent( e );
+ Q3GridView::focusInEvent( e );
}
@@ -416,5 +423,5 @@ void KDateTable::focusOutEvent( QFocusEvent *e )
{
repaintContents(false);
- QGridView::focusOutEvent( e );
+ Q3GridView::focusOutEvent( e );
}
@@ -433,5 +440,5 @@ KDateTable::sizeHint() const
KDateInternalMonthPicker::KDateInternalMonthPicker
(QWidget* parent, const char* name)
- : QGridView(parent, name),
+ : Q3GridView(parent, name),
result(0) // invalid
{
@@ -452,5 +459,5 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOff);
- setFrameStyle(QFrame::NoFrame);
+ setFrameStyle(Q3Frame::NoFrame);
setNumRows(4);
setNumCols(3);
@@ -458,5 +465,5 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
// setTableFlags(Tbl_clipCellPainting);
#if 0
- viewport()->setEraseColor(lightGray); // for consistency with the datepicker
+ viewport()->setEraseColor(Qt::lightGray); // for consistency with the datepicker
#endif
// ----- find the preferred size
@@ -488,5 +495,5 @@ void
KDateInternalMonthPicker::setupPainter(QPainter *p)
{
- p->setPen(black);
+ p->setPen(Qt::black);
}
@@ -506,5 +513,5 @@ KDateInternalMonthPicker::paintCell(QPainter* painter, int row, int col)
index=3*row+col+1;
text=KGlobal::locale()->monthName(index, false);
- painter->drawText(0, 0, cellWidth(), cellHeight(), AlignCenter, text);
+ painter->drawText(0, 0, cellWidth(), cellHeight(), Qt::AlignCenter, text);
if ( activeCol == col && activeRow == row )
painter->drawRect( 0, 0, cellWidth(), cellHeight() );
@@ -514,5 +521,5 @@ void
KDateInternalMonthPicker::contentsMousePressEvent(QMouseEvent *e)
{
- if(!isEnabled() || e->button() != LeftButton)
+ if(!isEnabled() || e->button() != Qt::LeftButton)
{
KNotifyClient::beep();
@@ -541,5 +548,5 @@ void
KDateInternalMonthPicker::contentsMouseMoveEvent(QMouseEvent *e)
{
- if (e->state() & LeftButton)
+ if (e->state() & Qt::LeftButton)
{
int row, col;
@@ -615,5 +622,5 @@ KDateInternalYearSelector::KDateInternalYearSelector
setFont(font);
#if 0
- setFrameStyle(QFrame::NoFrame);
+ setFrameStyle(Q3Frame::NoFrame);
#endif
// we have to respect the limits of QDate here, I fear:
@@ -662,9 +669,9 @@ KDateInternalYearSelector::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);
}
@@ -673,5 +680,5 @@ void
KPopupFrame::keyPressEvent(QKeyEvent* e)
{
- if(e->key()==Key_Escape)
+ if(e->key()==Qt::Key_Escape)
{
result=0; // rejected
@@ -757,5 +764,5 @@ void KDateTable::virtual_hook( int, void* )
KDateInternalWeekPicker::KDateInternalWeekPicker
(QWidget* parent, const char* name)
- : QGridView(parent, name),
+ : Q3GridView(parent, name),
result(0) // invalid
{
@@ -774,5 +781,5 @@ KDateInternalWeekPicker::KDateInternalWeekPicker
setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOff);
- setFrameStyle(QFrame::NoFrame);
+ setFrameStyle(Q3Frame::NoFrame);
if ( QApplication::desktop()->height() > 240 ) {
setNumRows(13);
@@ -785,5 +792,5 @@ KDateInternalWeekPicker::KDateInternalWeekPicker
// setTableFlags(Tbl_clipCellPainting);
#if 0
- viewport()->setEraseColor(lightGray); // for consistency with the datepicker
+ viewport()->setEraseColor(Qt::lightGray); // for consistency with the datepicker
#endif
// ----- find the preferred size
@@ -819,5 +826,5 @@ void
KDateInternalWeekPicker::setupPainter(QPainter *p)
{
- p->setPen(black);
+ p->setPen(Qt::black);
}
@@ -837,5 +844,5 @@ KDateInternalWeekPicker::paintCell(QPainter* painter, int row, int col)
index=numCols()*row+col+1;
text=QString::number( index );
- painter->drawText(0, 0, cellWidth(), cellHeight(), AlignCenter, text);
+ painter->drawText(0, 0, cellWidth(), cellHeight(), Qt::AlignCenter, text);
if ( activeCol == col && activeRow == row )
painter->drawRect( 0, 0, cellWidth(), cellHeight() );
@@ -845,5 +852,5 @@ void
KDateInternalWeekPicker::contentsMousePressEvent(QMouseEvent *e)
{
- if(!isEnabled() || e->button() != LeftButton)
+ if(!isEnabled() || e->button() != Qt::LeftButton)
{
KNotifyClient::beep();
@@ -872,5 +879,5 @@ void
KDateInternalWeekPicker::contentsMouseMoveEvent(QMouseEvent *e)
{
- if (e->state() & LeftButton)
+ if (e->state() & Qt::LeftButton)
{
int row, col;
diff --git a/microkde/kdatetbl.h b/microkde/kdatetbl.h
index 87808df..2d3d2cf 100644
--- a/microkde/kdatetbl.h
+++ b/microkde/kdatetbl.h
@@ -22,7 +22,13 @@
#include <qvalidator.h>
-#include <qgridview.h>
+#include <q3gridview.h>
#include <qlineedit.h>
#include <qdatetime.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QMouseEvent>
+#include <Q3Frame>
+#include <QKeyEvent>
+#include <QFocusEvent>
/**
@@ -32,5 +38,5 @@
* @author Tim Gilman, Mirko Boehm
*/
-class KDateInternalMonthPicker : public QGridView
+class KDateInternalMonthPicker : public Q3GridView
{
Q_OBJECT
@@ -128,5 +134,5 @@ private:
* @version $Id$
*/
-class KPopupFrame : public QFrame
+class KPopupFrame : public Q3Frame
{
Q_OBJECT
@@ -183,5 +189,5 @@ 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 );
@@ -216,5 +222,5 @@ public:
* @author Tim Gilman, Mirko Boehm
*/
-class KDateTable : public QGridView
+class KDateTable : public Q3GridView
{
Q_OBJECT
@@ -225,5 +231,5 @@ public:
KDateTable(QWidget *parent=0,
QDate date=QDate::currentDate(),
- const char* name=0, WFlags f=0);
+ const char* name=0, Qt::WFlags f=0);
/**
* Returns a recommended size for the widget.
@@ -308,5 +314,5 @@ private:
#endif // KDATETBL_H
-class KDateInternalWeekPicker : public QGridView
+class KDateInternalWeekPicker : public Q3GridView
{
Q_OBJECT
diff --git a/microkde/kdebug.h b/microkde/kdebug.h
index bb9cfe3..534943c 100644
--- a/microkde/kdebug.h
+++ b/microkde/kdebug.h
@@ -5,4 +5,6 @@
#include <qstring.h>
+//Added by qt3to4:
+#include <Q3CString>
@@ -65,5 +67,5 @@ class kdbgstream {
return *this;
}
- kdbgstream &operator<<(const QCString&) {
+ kdbgstream &operator<<(const Q3CString&) {
return *this;
}
diff --git a/microkde/kdecore/kcatalogue.cpp b/microkde/kdecore/kcatalogue.cpp
index 97ac326..1600b08 100644
--- a/microkde/kdecore/kcatalogue.cpp
+++ b/microkde/kdecore/kcatalogue.cpp
@@ -21,4 +21,6 @@
#include <qfile.h>
+//Added by qt3to4:
+#include <Q3CString>
#include <kdebug.h>
@@ -89,5 +91,5 @@ void KCatalogue::setFileName( const QString & fileName )
doUnload();
- QCString newFileName = QFile::encodeName( fileName );
+ Q3CString newFileName = QFile::encodeName( fileName );
if ( !fileName.isEmpty() )
diff --git a/microkde/kdecore/kconfigbase.h b/microkde/kdecore/kconfigbase.h
index 7e56d11..1ef6a04 100644
--- a/microkde/kdecore/kconfigbase.h
+++ b/microkde/kdecore/kconfigbase.h
@@ -27,4 +27,6 @@
#include "kconfig.h"
+//Added by qt3to4:
+#include <Q3CString>
/**
@@ -83,5 +85,5 @@ public:
{ _config->setGroup( group ); }
- KConfigGroupSaver( KConfig* config, const QCString &group )
+ KConfigGroupSaver( KConfig* config, const Q3CString &group )
: _config(config), _oldgroup(config->group())
{ _config->setGroup( group ); }
diff --git a/microkde/kdecore/klibloader.cpp b/microkde/kdecore/klibloader.cpp
index 6d0475a..0b54eb6 100644
--- a/microkde/kdecore/klibloader.cpp
+++ b/microkde/kdecore/klibloader.cpp
@@ -21,7 +21,10 @@
#include <qfile.h>
#include <qtimer.h>
-#include <qobjectdict.h>
-#include <qwidgetlist.h>
+#include <q3objectdict.h>
#include <qwidget.h>
+#include <qwidget.h>
+//Added by qt3to4:
+#include <Q3CString>
+#include <Q3PtrList>
#include "kapplication.h"
@@ -46,5 +49,5 @@
-template class QAsciiDict<KLibrary>;
+template class Q3AsciiDict<KLibrary>;
#include <stdlib.h> //getenv
@@ -121,5 +124,5 @@ KLibrary::~KLibrary()
if ( m_objs.count() > 0 )
{
- QPtrListIterator<QObject> it( m_objs );
+ Q3PtrListIterator<QObject> it( m_objs );
for ( ; it.current() ; ++it )
{
@@ -153,5 +156,5 @@ KLibFactory* KLibrary::factory()
return m_factory;
- QCString symname;
+ Q3CString symname;
symname.sprintf("init_%s", name().latin1() );
@@ -306,6 +309,6 @@ class KLibLoaderPrivate
{
public:
- QPtrList<KLibWrapPrivate> loaded_stack;
- QPtrList<KLibWrapPrivate> pending_close;
+ Q3PtrList<KLibWrapPrivate> loaded_stack;
+ Q3PtrList<KLibWrapPrivate> pending_close;
enum {UNKNOWN, UNLOAD, DONT_UNLOAD} unload_mode;
@@ -349,5 +352,5 @@ KLibLoader::~KLibLoader()
// kdDebug(150) << "Deleting KLibLoader " << this << " " << name() << endl;
- QAsciiDictIterator<KLibWrapPrivate> it( m_libs );
+ Q3AsciiDictIterator<KLibWrapPrivate> it( m_libs );
for (; it.current(); ++it )
{
@@ -365,5 +368,5 @@ KLibLoader::~KLibLoader()
QString KLibLoader::findLibrary( const char * name/*US , const KInstance * instance*/ )
{
- QCString libname( name );
+ Q3CString libname( name );
// only append ".la" if there is no extension
@@ -422,5 +425,5 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta
#ifndef NDEBUG
kdDebug(150) << "library=" << libname << ": No file names " << libname.data() << " found in paths." << endl;
- self()->d->errorMessage = i18n("Library files for \"%1\" not found in paths").arg(libname);
+ self()->d->errorMessage = i18n("Library files for \"%1\" not found in paths").arg(QString(libname));
qDebug("KLibLoader::library could not find library: %s", libname.data());
@@ -470,5 +473,5 @@ KLibrary* KLibLoader::library( const char *name )
/* Test if this library was loaded at some time, but got
unloaded meanwhile, whithout being dlclose()'ed. */
- QPtrListIterator<KLibWrapPrivate> it(d->loaded_stack);
+ Q3PtrListIterator<KLibWrapPrivate> it(d->loaded_stack);
for (; it.current(); ++it) {
if (it.current()->name == name)
@@ -551,5 +554,5 @@ void KLibLoader::slotLibraryDestroyed()
const KLibrary *lib = static_cast<const KLibrary *>( sender() );
- QAsciiDictIterator<KLibWrapPrivate> it( m_libs );
+ Q3AsciiDictIterator<KLibWrapPrivate> it( m_libs );
for (; it.current(); ++it )
if ( it.current()->lib == lib )
@@ -570,5 +573,5 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap)
/* First delete all KLibrary objects in pending_close, but _don't_ unload
the DSO behind it. */
- QPtrListIterator<KLibWrapPrivate> it(d->pending_close);
+ Q3PtrListIterator<KLibWrapPrivate> it(d->pending_close);
for (; it.current(); ++it) {
wrap = it.current();
diff --git a/microkde/kdecore/klibloader.h b/microkde/kdecore/klibloader.h
index ed57109..53d146e 100644
--- a/microkde/kdecore/klibloader.h
+++ b/microkde/kdecore/klibloader.h
@@ -22,6 +22,6 @@
#include <qstring.h>
#include <qstringlist.h>
-#include <qasciidict.h>
-#include <qptrlist.h>
+#include <q3asciidict.h>
+#include <q3ptrlist.h>
#include <kglobal.h>
@@ -53,5 +53,5 @@ class KLibrary : public QObject
{
friend class KLibLoader;
- friend class QAsciiDict<KLibrary>;
+ friend class Q3AsciiDict<KLibrary>;
Q_OBJECT
@@ -128,5 +128,5 @@ private:
//US void * m_handle;
QLibrary* m_handle;
- QPtrList<QObject> m_objs;
+ Q3PtrList<QObject> m_objs;
QTimer *m_timer;
KLibraryPrivate *d;
@@ -288,5 +288,5 @@ private slots:
private:
void close_pending( KLibWrapPrivate * );
- QAsciiDict<KLibWrapPrivate> m_libs;
+ Q3AsciiDict<KLibWrapPrivate> m_libs;
static KLibLoader* s_self;
diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp
index 1d8ae9f..dd310fa 100644
--- a/microkde/kdecore/klocale.cpp
+++ b/microkde/kdecore/klocale.cpp
@@ -1,4 +1,5 @@
#include <qregexp.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#include "kdebug.h"
@@ -12,6 +13,6 @@
-QDict<QString> *mLocaleDict = 0;
-void setLocaleDict( QDict<QString> * dict )
+Q3Dict<QString> *mLocaleDict = 0;
+void setLocaleDict( Q3Dict<QString> * dict )
{
mLocaleDict = dict;
@@ -46,5 +47,5 @@ void addExist(const char *text,QString trans )
#include <qfile.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qtextcodec.h>
#endif
@@ -54,8 +55,8 @@ void dumpMissing()
QString fileName = "/tmp/usernewtrans.txt";
QFile file( fileName );
- if (!file.open( IO_WriteOnly ) ) {
+ if (!file.open( QIODevice::WriteOnly ) ) {
return ;
}
- QTextStream ts( &file );
+ Q3TextStream ts( &file );
ts.setCodec( QTextCodec::codecForName("utf8") );
@@ -71,8 +72,8 @@ void dumpMissing()
QString fileName = "/tmp/usertrans.txt";
QFile file( fileName );
- if (!file.open( IO_WriteOnly ) ) {
+ if (!file.open( QIODevice::WriteOnly ) ) {
return ;
}
- QTextStream ts( &file );
+ Q3TextStream ts( &file );
ts.setCodec( QTextCodec::codecForName("utf8") );
@@ -468,5 +469,5 @@ QString KLocale::formatDateTime(const QDateTime &pDateTime,
else if ( intIntDateFormat == Format1 )
format = "%1 %2";
- else if ( intIntDateFormat == ISODate )
+ else if ( intIntDateFormat == Qt::ISODate )
format = "%1T%2";
@@ -528,5 +529,5 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con
c = fmt.at(fmtpos++);
- switch (c)
+ switch (c.unicode())
{
case 'a':
@@ -639,5 +640,5 @@ QTime KLocale::readTime(const QString &intstr, bool seconds, bool *ok) const
c = Format.at(Formatpos++);
- switch (c)
+ switch (c.unicode())
{
case 'p':
@@ -735,5 +736,5 @@ QDateTime KLocale::readDateTime(const QString &intstr,
QDate m_date = readDate(date, dformat, &ok1);
- QTime m_time = readTime(time, tformat, &ok2);
+ QTime m_time = readTime(time, !tformat.isEmpty(), &ok2);
QDateTime m_dt;
diff --git a/microkde/kdecore/klocale.h b/microkde/kdecore/klocale.h
index 58e0b39..840fc9d 100644
--- a/microkde/kdecore/klocale.h
+++ b/microkde/kdecore/klocale.h
@@ -5,5 +5,5 @@
#include <qstringlist.h>
#include <qdatetime.h>
-#include <qdict.h>
+#include <q3dict.h>
#ifndef I18N_NOOP
@@ -12,5 +12,5 @@
class KCalendarSystem;
-void setLocaleDict( QDict<QString> * dict );
+void setLocaleDict( Q3Dict<QString> * dict );
QString i18n(const char *text);
QString i18n(const char *hint, const char *text);
diff --git a/microkde/kdecore/kmdcodec.cpp b/microkde/kdecore/kmdcodec.cpp
index bc03569..db11e52 100644
--- a/microkde/kdecore/kmdcodec.cpp
+++ b/microkde/kdecore/kmdcodec.cpp
@@ -40,4 +40,6 @@
#include <kdebug.h>
#include "kmdcodec.h"
+//Added by qt3to4:
+#include <Q3CString>
#define KMD5_S11 7
@@ -148,12 +150,12 @@ static int rikFindChar(register const char * _s, const char c)
}
-QCString KCodecs::quotedPrintableEncode(const QByteArray& in, bool useCRLF)
+Q3CString KCodecs::quotedPrintableEncode(const QByteArray& in, bool useCRLF)
{
QByteArray out;
quotedPrintableEncode (in, out, useCRLF);
- return QCString (out.data(), out.size()+1);
+ return Q3CString (out.data(), out.size()+1);
}
-QCString KCodecs::quotedPrintableEncode(const QCString& str, bool useCRLF)
+Q3CString KCodecs::quotedPrintableEncode(const Q3CString& str, bool useCRLF)
{
if (str.isEmpty())
@@ -281,12 +283,12 @@ void KCodecs::quotedPrintableEncode(const QByteArray& in, QByteArray& out, bool
}
-QCString KCodecs::quotedPrintableDecode(const QByteArray & in)
+Q3CString KCodecs::quotedPrintableDecode(const QByteArray & in)
{
QByteArray out;
quotedPrintableDecode (in, out);
- return QCString (out.data(), out.size()+1);
+ return Q3CString (out.data(), out.size()+1);
}
-QCString KCodecs::quotedPrintableDecode(const QCString & str)
+Q3CString KCodecs::quotedPrintableDecode(const Q3CString & str)
{
if (str.isEmpty())
@@ -356,5 +358,5 @@ void KCodecs::quotedPrintableDecode(const QByteArray& in, QByteArray& out)
}
-QCString KCodecs::base64Encode( const QCString& str, bool insertLFs )
+Q3CString KCodecs::base64Encode( const Q3CString& str, bool insertLFs )
{
if ( str.isEmpty() )
@@ -366,9 +368,9 @@ QCString KCodecs::base64Encode( const QCString& str, bool insertLFs )
}
-QCString KCodecs::base64Encode( const QByteArray& in, bool insertLFs )
+Q3CString KCodecs::base64Encode( const QByteArray& in, bool insertLFs )
{
QByteArray out;
base64Encode( in, out, insertLFs );
- return QCString( out.data(), out.size()+1 );
+ return Q3CString( out.data(), out.size()+1 );
}
@@ -406,13 +408,13 @@ void KCodecs::base64Encode( const QByteArray& in, QByteArray& out,
{
if ( count && (count%76) == 0 )
- out.at(didx++) = '\n';
+ out[didx++] = '\n';
count += 4;
}
- out.at(didx++) = Base64EncMap[(data[sidx] >> 2) & 077];
- out.at(didx++) = Base64EncMap[(data[sidx+1] >> 4) & 017 |
+ out[didx++] = Base64EncMap[(data[sidx] >> 2) & 077];
+ out[didx++] = Base64EncMap[(data[sidx+1] >> 4) & 017 |
(data[sidx] << 4) & 077];
- out.at(didx++) = Base64EncMap[(data[sidx+2] >> 6) & 003 |
+ out[didx++] = Base64EncMap[(data[sidx+2] >> 6) & 003 |
(data[sidx+1] << 2) & 077];
- out.at(didx++) = Base64EncMap[data[sidx+2] & 077];
+ out[didx++] = Base64EncMap[data[sidx+2] & 077];
sidx += 3;
}
@@ -422,16 +424,16 @@ void KCodecs::base64Encode( const QByteArray& in, QByteArray& out,
{
if ( insertLFs && (count > 0) && (count%76) == 0 )
- out.at(didx++) = '\n';
+ out[didx++] = '\n';
- out.at(didx++) = Base64EncMap[(data[sidx] >> 2) & 077];
+ out[didx++] = Base64EncMap[(data[sidx] >> 2) & 077];
if (sidx < len-1)
{
- out.at(didx++) = Base64EncMap[(data[sidx+1] >> 4) & 017 |
+ out[didx++] = Base64EncMap[(data[sidx+1] >> 4) & 017 |
(data[sidx] << 4) & 077];
- out.at(didx++) = Base64EncMap[(data[sidx+1] << 2) & 077];
+ out[didx++] = Base64EncMap[(data[sidx+1] << 2) & 077];
}
else
{
- out.at(didx++) = Base64EncMap[(data[sidx] << 4) & 077];
+ out[didx++] = Base64EncMap[(data[sidx] << 4) & 077];
}
}
@@ -439,11 +441,8 @@ void KCodecs::base64Encode( const QByteArray& in, QByteArray& out,
// Add padding
while (didx < out.size())
- {
- out.at(didx) = '=';
- didx++;
- }
+ out[didx++] = '=';
}
-QCString KCodecs::base64Decode( const QCString& str )
+Q3CString KCodecs::base64Decode( const Q3CString& str )
{
if ( str.isEmpty() )
@@ -455,9 +454,9 @@ QCString KCodecs::base64Decode( const QCString& str )
}
-QCString KCodecs::base64Decode( const QByteArray& in )
+Q3CString KCodecs::base64Decode( const QByteArray& in )
{
QByteArray out;
base64Decode( in, out );
- return QCString( out.data(), out.size()+1 );
+ return Q3CString( out.data(), out.size()+1 );
}
@@ -506,5 +505,5 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out )
(ch > 96 && ch < 123) || ch == '+' || ch == '/' || ch == '=')
{
- out.at(outIdx++) = Base64DecMap[ch];
+ out[outIdx++] = Base64DecMap[ch];
}
else
@@ -524,7 +523,7 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out )
while (didx < len-2)
{
- out.at(didx) = (((out.at(sidx) << 2) & 255) | ((out.at(sidx+1) >> 4) & 003));
- out.at(didx+1) = (((out.at(sidx+1) << 4) & 255) | ((out.at(sidx+2) >> 2) & 017));
- out.at(didx+2) = (((out.at(sidx+2) << 6) & 255) | (out.at(sidx+3) & 077));
+ out[didx] = (((out[sidx] << 2) & 255) | ((out[sidx+1] >> 4) & 003));
+ out[didx+1] = (((out[sidx+1] << 4) & 255) | ((out[sidx+2] >> 2) & 017));
+ out[didx+2] = (((out[sidx+2] << 6) & 255) | (out[sidx+3] & 077));
sidx += 4;
didx += 3;
@@ -533,8 +532,8 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out )
if (didx < len)
- out.at(didx) = (((out.at(sidx) << 2) & 255) | ((out.at(sidx+1) >> 4) & 003));
+ out[didx] = (((out[sidx] << 2) & 255) | ((out[sidx+1] >> 4) & 003));
if (++didx < len )
- out.at(didx) = (((out.at(sidx+1) << 4) & 255) | ((out.at(sidx+2) >> 2) & 017));
+ out[didx] = (((out[sidx+1] << 4) & 255) | ((out[sidx+2] >> 2) & 017));
// Resize the output buffer
@@ -543,5 +542,5 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out )
}
-QCString KCodecs::uuencode( const QCString& str )
+Q3CString KCodecs::uuencode( const Q3CString& str )
{
if ( str.isEmpty() )
@@ -554,9 +553,9 @@ QCString KCodecs::uuencode( const QCString& str )
}
-QCString KCodecs::uuencode( const QByteArray& in )
+Q3CString KCodecs::uuencode( const QByteArray& in )
{
QByteArray out;
uuencode( in, out );
- return QCString( out.data(), out.size()+1 );
+ return Q3CString( out.data(), out.size()+1 );
}
@@ -581,20 +580,20 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out )
{
// line length
- out.at(didx++) = UUEncMap[line_len];
+ out[didx++] = UUEncMap[line_len];
// 3-byte to 4-byte conversion + 0-63 to ascii printable conversion
for (unsigned int end = sidx+line_len; sidx < end; sidx += 3)
{
- out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077];
- out.at(didx++) = UUEncMap[(data[sidx+1] >> 4) & 017 |
+ out[didx++] = UUEncMap[(data[sidx] >> 2) & 077];
+ out[didx++] = UUEncMap[(data[sidx+1] >> 4) & 017 |
(data[sidx] << 4) & 077];
- out.at(didx++) = UUEncMap[(data[sidx+2] >> 6) & 003 |
+ out[didx++] = UUEncMap[(data[sidx+2] >> 6) & 003 |
(data[sidx+1] << 2) & 077];
- out.at(didx++) = UUEncMap[data[sidx+2] & 077];
+ out[didx++] = UUEncMap[data[sidx+2] & 077];
}
// line terminator
//for (unsigned int idx=0; idx < nl_len; idx++)
- //out.at(didx++) = nl[idx];
+ //out[didx++] = nl[idx];
memcpy(out.data()+didx, nl, nl_len);
didx += nl_len;
@@ -602,14 +601,14 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out )
// line length
- out.at(didx++) = UUEncMap[len-sidx];
+ out[didx++] = UUEncMap[len-sidx];
// 3-byte to 4-byte conversion + 0-63 to ascii printable conversion
while (sidx+2 < len)
{
- out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077];
- out.at(didx++) = UUEncMap[(data[sidx+1] >> 4) & 017 |
+ out[didx++] = UUEncMap[(data[sidx] >> 2) & 077];
+ out[didx++] = UUEncMap[(data[sidx+1] >> 4) & 017 |
(data[sidx] << 4) & 077];
- out.at(didx++) = UUEncMap[(data[sidx+2] >> 6) & 003 |
+ out[didx++] = UUEncMap[(data[sidx+2] >> 6) & 003 |
(data[sidx+1] << 2) & 077];
- out.at(didx++) = UUEncMap[data[sidx+2] & 077];
+ out[didx++] = UUEncMap[data[sidx+2] & 077];
sidx += 3;
}
@@ -617,16 +616,16 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out )
if (sidx < len-1)
{
- out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077];
- out.at(didx++) = UUEncMap[(data[sidx+1] >> 4) & 017 |
+ out[didx++] = UUEncMap[(data[sidx] >> 2) & 077];
+ out[didx++] = UUEncMap[(data[sidx+1] >> 4) & 017 |
(data[sidx] << 4) & 077];
- out.at(didx++) = UUEncMap[(data[sidx+1] << 2) & 077];
- out.at(didx++) = UUEncMap[0];
+ out[didx++] = UUEncMap[(data[sidx+1] << 2) & 077];
+ out[didx++] = UUEncMap[0];
}
else if (sidx < len)
{
- out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077];
- out.at(didx++) = UUEncMap[(data[sidx] << 4) & 077];
- out.at(didx++) = UUEncMap[0];
- out.at(didx++) = UUEncMap[0];
+ out[didx++] = UUEncMap[(data[sidx] >> 2) & 077];
+ out[didx++] = UUEncMap[(data[sidx] << 4) & 077];
+ out[didx++] = UUEncMap[0];
+ out[didx++] = UUEncMap[0];
}
@@ -640,5 +639,5 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out )
}
-QCString KCodecs::uudecode( const QCString& str )
+Q3CString KCodecs::uudecode( const Q3CString& str )
{
if ( str.isEmpty() )
@@ -651,9 +650,9 @@ QCString KCodecs::uudecode( const QCString& str )
}
-QCString KCodecs::uudecode( const QByteArray& in )
+Q3CString KCodecs::uudecode( const QByteArray& in )
{
QByteArray out;
uudecode( in, out );
- return QCString( out.data(), out.size()+1 );
+ return Q3CString( out.data(), out.size()+1 );
}
@@ -706,7 +705,7 @@ void KCodecs::uudecode( const QByteArray& in, QByteArray& out )
C = UUDecMap[(unsigned char) data[sidx+2]];
D = UUDecMap[(unsigned char) data[sidx+3]];
- out.at(didx++) = ( ((A << 2) & 255) | ((B >> 4) & 003) );
- out.at(didx++) = ( ((B << 4) & 255) | ((C >> 2) & 017) );
- out.at(didx++) = ( ((C << 6) & 255) | (D & 077) );
+ out[didx++] = ( ((A << 2) & 255) | ((B >> 4) & 003) );
+ out[didx++] = ( ((B << 4) & 255) | ((C >> 2) & 017) );
+ out[didx++] = ( ((C << 6) & 255) | (D & 077) );
sidx += 4;
}
@@ -717,5 +716,5 @@ void KCodecs::uudecode( const QByteArray& in, QByteArray& out )
A = UUDecMap[(unsigned char) data[sidx]];
B = UUDecMap[(unsigned char) data[sidx+1]];
- out.at(didx++) = ( ((A << 2) & 255) | ((B >> 4) & 003) );
+ out[didx++] = ( ((A << 2) & 255) | ((B >> 4) & 003) );
}
@@ -724,5 +723,5 @@ void KCodecs::uudecode( const QByteArray& in, QByteArray& out )
B = UUDecMap[(unsigned char) data[sidx+1]];
C = UUDecMap[(unsigned char) data[sidx+2]];
- out.at(didx++) = ( ((B << 4) & 255) | ((C >> 2) & 017) );
+ out[didx++] = ( ((B << 4) & 255) | ((C >> 2) & 017) );
}
@@ -762,5 +761,5 @@ KMD5::KMD5(const QByteArray& in)
}
-KMD5::KMD5(const QCString& in)
+KMD5::KMD5(const Q3CString& in)
{
init();
@@ -773,5 +772,5 @@ void KMD5::update(const QByteArray& in)
}
-void KMD5::update(const QCString& in)
+void KMD5::update(const Q3CString& in)
{
update(in.data(), int(in.length()));
@@ -874,5 +873,5 @@ bool KMD5::verify( const KMD5::Digest& digest)
}
-bool KMD5::verify( const QCString& hexdigest)
+bool KMD5::verify( const Q3CString& hexdigest)
{
finalize();
@@ -893,7 +892,7 @@ void KMD5::rawDigest( KMD5::Digest& bin )
-QCString KMD5::hexDigest()
+Q3CString KMD5::hexDigest()
{
- QCString s(33);
+ Q3CString s(33);
finalize();
@@ -906,5 +905,5 @@ QCString KMD5::hexDigest()
}
-void KMD5::hexDigest(QCString& s)
+void KMD5::hexDigest(Q3CString& s)
{
finalize();
@@ -916,5 +915,5 @@ void KMD5::hexDigest(QCString& s)
}
-QCString KMD5::base64Digest()
+Q3CString KMD5::base64Digest()
{
QByteArray ba(16);
@@ -957,5 +956,5 @@ void KMD5::transform( const unsigned char block[64] )
//US Q_ASSERT(!m_finalized); // not just a user error, since the method is private
- ASSERT(!m_finalized); // not just a user error, since the method is private
+ Q_ASSERT(!m_finalized); // not just a user error, since the method is private
/* Round 1 */
diff --git a/microkde/kdecore/kmdcodec.h b/microkde/kdecore/kmdcodec.h
index 2c4d611..616b683 100644
--- a/microkde/kdecore/kmdcodec.h
+++ b/microkde/kdecore/kmdcodec.h
@@ -40,4 +40,6 @@
#include <qstring.h>
#include <qiodevice.h>
+//Added by qt3to4:
+#include <Q3CString>
/**
@@ -82,5 +84,5 @@ public:
* @return quoted-printable encoded data.
*/
- static QCString quotedPrintableEncode(const QByteArray & in,
+ static Q3CString quotedPrintableEncode(const QByteArray & in,
bool useCRLF = true);
@@ -97,5 +99,5 @@ public:
* @return quoted-printable encoded data.
*/
- static QCString quotedPrintableEncode(const QCString & str,
+ static Q3CString quotedPrintableEncode(const Q3CString & str,
bool useCRLF = true);
@@ -130,5 +132,5 @@ public:
* @return decoded data.
*/
- static QCString quotedPrintableDecode(const QByteArray & in);
+ static Q3CString quotedPrintableDecode(const QByteArray & in);
/**
@@ -141,5 +143,5 @@ public:
* @return decoded data.
*/
- static QCString quotedPrintableDecode(const QCString & str);
+ static Q3CString quotedPrintableDecode(const Q3CString & str);
/**
@@ -176,5 +178,5 @@ public:
* @return a uuencoded data.
*/
- static QCString uuencode( const QByteArray& in );
+ static Q3CString uuencode( const QByteArray& in );
/**
@@ -187,5 +189,5 @@ public:
* @return the encoded string.
*/
- static QCString uuencode( const QCString& str );
+ static Q3CString uuencode( const Q3CString& str );
/**
@@ -216,5 +218,5 @@ public:
* @return a decoded string.
*/
- static QCString uudecode( const QByteArray& in );
+ static Q3CString uudecode( const QByteArray& in );
/**
@@ -227,5 +229,5 @@ public:
* @return a uudecoded string.
*/
- static QCString uudecode( const QCString& str );
+ static Q3CString uudecode( const Q3CString& str );
/**
@@ -264,5 +266,5 @@ public:
* @return a base64 encoded string.
*/
- static QCString base64Encode( const QByteArray& in, bool insertLFs = false);
+ static Q3CString base64Encode( const QByteArray& in, bool insertLFs = false);
/**
@@ -276,5 +278,5 @@ public:
* @return the decoded string.
*/
- static QCString base64Encode( const QCString& str, bool insertLFs = false );
+ static Q3CString base64Encode( const Q3CString& str, bool insertLFs = false );
/**
@@ -309,5 +311,5 @@ public:
* @return the decoded data.
*/
- static QCString base64Decode( const QByteArray& in );
+ static Q3CString base64Decode( const QByteArray& in );
/**
@@ -320,5 +322,5 @@ public:
* @return the decoded string.
*/
- static QCString base64Decode( const QCString& str );
+ static Q3CString base64Decode( const Q3CString& str );
/**
@@ -432,5 +434,5 @@ public:
* Same as above except it accepts a QByteArray as its argument.
*/
- KMD5(const QCString& a );
+ KMD5(const Q3CString& a );
/**
@@ -461,5 +463,5 @@ public:
* @param in message to be added to the digest (QByteArray).
*/
- void update(const QCString& in );
+ void update(const Q3CString& in );
/**
@@ -503,10 +505,10 @@ public:
* a hexadecimal representation.
*/
- QCString hexDigest ();
+ Q3CString hexDigest ();
/**
* @overload
*/
- void hexDigest(QCString&);
+ void hexDigest(Q3CString&);
/**
@@ -514,5 +516,5 @@ public:
* a base64-encoded representation.
*/
- QCString base64Digest ();
+ Q3CString base64Digest ();
/**
@@ -525,5 +527,5 @@ public:
* @overload
*/
- bool verify(const QCString&);
+ bool verify(const Q3CString&);
protected:
diff --git a/microkde/kdecore/kprefs.cpp b/microkde/kdecore/kprefs.cpp
index 0220a34..d4010fa 100644
--- a/microkde/kdecore/kprefs.cpp
+++ b/microkde/kdecore/kprefs.cpp
@@ -22,4 +22,6 @@
#include <qcolor.h>
+//Added by qt3to4:
+#include <Q3ValueList>
#include <kconfig.h>
@@ -141,6 +143,6 @@ class KPrefsItemStringList : public KPrefsItem {
class KPrefsItemIntList : public KPrefsItem {
public:
- KPrefsItemIntList(const QString &group,const QString &name,QValueList<int> *,
- const QValueList<int> &defaultValue=QValueList<int>());
+ KPrefsItemIntList(const QString &group,const QString &name,Q3ValueList<int> *,
+ const Q3ValueList<int> &defaultValue=Q3ValueList<int>());
virtual ~KPrefsItemIntList() {}
@@ -150,6 +152,6 @@ class KPrefsItemIntList : public KPrefsItem {
private:
- QValueList<int> *mReference;
- QValueList<int> mDefault;
+ Q3ValueList<int> *mReference;
+ Q3ValueList<int> mDefault;
};
@@ -365,5 +367,5 @@ void KPrefsItemStringList::readConfig(KConfig *config)
KPrefsItemIntList::KPrefsItemIntList(const QString &group,const QString &name,
- QValueList<int> *reference,const QValueList<int> &defaultValue) :
+ Q3ValueList<int> *reference,const Q3ValueList<int> &defaultValue) :
KPrefsItem(group,name)
{
@@ -506,6 +508,6 @@ void KPrefs::addItemStringList(const QString &key,QStringList *reference,
}
-void KPrefs::addItemIntList(const QString &key,QValueList<int> *reference,
- const QValueList<int> &defaultValue)
+void KPrefs::addItemIntList(const QString &key,Q3ValueList<int> *reference,
+ const Q3ValueList<int> &defaultValue)
{
addItem(new KPrefsItemIntList(*mCurrentGroup,key,reference,defaultValue));
diff --git a/microkde/kdecore/kprefs.h b/microkde/kdecore/kprefs.h
index 95d2724..d9d1572 100644
--- a/microkde/kdecore/kprefs.h
+++ b/microkde/kdecore/kprefs.h
@@ -22,9 +22,11 @@
// $Id$
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <qcolor.h>
#include <qfont.h>
#include <qsize.h>
#include <qstringlist.h>
+//Added by qt3to4:
+#include <Q3ValueList>
class KConfig;
@@ -284,6 +286,6 @@ class KPrefs {
this item.
*/
- void addItemIntList(const QString &key,QValueList<int> *reference,
- const QValueList<int> &defaultValue=QValueList<int>());
+ void addItemIntList(const QString &key,Q3ValueList<int> *reference,
+ const Q3ValueList<int> &defaultValue=Q3ValueList<int>());
protected:
@@ -311,5 +313,5 @@ class KPrefs {
KConfig *mConfig; // pointer to KConfig object
- QPtrList<KPrefsItem> mItems;
+ Q3PtrList<KPrefsItem> mItems;
};
diff --git a/microkde/kdecore/kshortcut.h b/microkde/kdecore/kshortcut.h
index 4813734..244d590 100644
--- a/microkde/kdecore/kshortcut.h
+++ b/microkde/kdecore/kshortcut.h
@@ -564,5 +564,5 @@ class KShortcut
* @see Qt::Key
*/
- KShortcut( int keyQt ) {}
+ KShortcut( int /*keyQt */) {}
/**
@@ -600,5 +600,5 @@ class KShortcut
* @see KKeySequence::KKeySequence(const QString&)
*/
- KShortcut( const char* shortcut ) {}
+ KShortcut( const char* /*shortcut */) {}
/**
@@ -609,5 +609,5 @@ class KShortcut
* @see KKeySequence::KKeySequence(const QString&)
*/
- KShortcut( const QString& shortcut ) {}
+ KShortcut( const QString& /*shortcut */) {}
~KShortcut() {}
@@ -817,5 +817,5 @@ class KShortcut
* @internal
*/
- QString toStringInternal( const KShortcut* pcutDefault = 0 ) const
+ QString toStringInternal( const KShortcut* /*pcutDefault*/ = 0 ) const
{
return "EMPTY IMPL.";
diff --git a/microkde/kdecore/kstandarddirs.cpp b/microkde/kdecore/kstandarddirs.cpp
index d5bfefd..f10934b 100644
--- a/microkde/kdecore/kstandarddirs.cpp
+++ b/microkde/kdecore/kstandarddirs.cpp
@@ -38,6 +38,6 @@
#include <qregexp.h>
-#include <qasciidict.h>
-#include <qdict.h>
+#include <q3asciidict.h>
+#include <q3dict.h>
#include <qdir.h>
#include <qfileinfo.h>
@@ -47,4 +47,6 @@
#include <qstringlist.h>
+//Added by qt3to4:
+#include <Q3CString>
#include "kstandarddirs.h"
@@ -60,13 +62,13 @@ QString KStandardDirs::mAppDir = QString::null;
-template class QDict<QStringList>;
+template class Q3Dict<QStringList>;
#if 0
-#include <qtextedit.h>
+#include <q3textedit.h>
void ddd( QString op )
{
- static QTextEdit * dot = 0;
+ static Q3TextEdit * dot = 0;
if ( ! dot )
- dot = new QTextEdit();
+ dot = new Q3TextEdit();
dot->show();
@@ -86,5 +88,5 @@ public:
bool restrictionsActive;
bool dataRestrictionActive;
- QAsciiDict<bool> restrictions;
+ Q3AsciiDict<bool> restrictions;
QStringList xdgdata_prefixes;
QStringList xdgconf_prefixes;
@@ -446,5 +448,5 @@ static void lookupDirectory(const QString& path, const QString &relPart,
*/
//US this should do the same:
- int pos = regexp.match(fn);
+ int pos = regexp.exactMatch(fn);
if (!recursive && !pos == 0)
continue; // No match
@@ -483,5 +485,5 @@ static void lookupDirectory(const QString& path, const QString &relPart,
*/
//US this should do the same:
- pos = regexp.match(fn);
+ pos = regexp.exactMatch(fn);
if (!pos == 0)
continue; // No match
@@ -1109,5 +1111,5 @@ bool KStandardDirs::makeDir(const QString& dir2, int mode)
int pos = target.find('/', i);
base += target.mid(i - 1, pos - i + 1);
- QCString baseEncoded = QFile::encodeName(base);
+ Q3CString baseEncoded = QFile::encodeName(base);
// bail out if we encountered a problem
//US if (stat(baseEncoded, &st) != 0)
@@ -1209,5 +1211,5 @@ QString readEnvPath(const char *env)
// return "";
//#else
- QCString c_path;
+ Q3CString c_path;
if ( getenv(env) != NULL )
c_path = QString ( getenv(env) );
diff --git a/microkde/kdecore/kstandarddirs.h b/microkde/kdecore/kstandarddirs.h
index 901384e..f0e28fc 100644
--- a/microkde/kdecore/kstandarddirs.h
+++ b/microkde/kdecore/kstandarddirs.h
@@ -25,5 +25,5 @@
#include <qstring.h>
-#include <qdict.h>
+#include <q3dict.h>
#include <qstringlist.h>
#include <kglobal.h>
@@ -575,9 +575,9 @@ public:
// Directory dictionaries
- QDict<QStringList> absolutes;
- QDict<QStringList> relatives;
+ Q3Dict<QStringList> absolutes;
+ Q3Dict<QStringList> relatives;
- mutable QDict<QStringList> dircache;
- mutable QDict<QString> savelocations;
+ mutable Q3Dict<QStringList> dircache;
+ mutable Q3Dict<QString> savelocations;
// Disallow assignment and copy-construction
diff --git a/microkde/kdeui/kaction.cpp b/microkde/kdeui/kaction.cpp
index d38a6d5..c2df381 100644
--- a/microkde/kdeui/kaction.cpp
+++ b/microkde/kdeui/kaction.cpp
@@ -29,4 +29,7 @@
#include <qtooltip.h>
+//Added by qt3to4:
+#include <Q3CString>
+#include <Q3ValueList>
//US#include <qwhatsthis.h>
//US#include <kaccel.h>
@@ -43,7 +46,7 @@
//US added this includefiles
#include <qmenubar.h>
-#include <qtoolbar.h>
-#include <qpopupmenu.h>
-#include <qiconset.h>
+#include <q3toolbar.h>
+#include <q3popupmenu.h>
+#include <qicon.h>
/**
@@ -88,5 +91,5 @@ public:
KAccel *m_kaccel;
- QValueList<KAccel*> m_kaccelList;
+ Q3ValueList<KAccel*> m_kaccelList;
QString m_groupText;
@@ -108,5 +111,5 @@ public:
};
- QValueList<Container> m_containers;
+ Q3ValueList<Container> m_containers;
};
@@ -131,5 +134,5 @@ KAction::KAction( const QString& text, const QString& sIconName, const KShortcut
}
-KAction::KAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+KAction::KAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot,
KActionCollection* parent, const char* name )
@@ -165,5 +168,5 @@ KAction::KAction( const QString& text, const KShortcut& cut,
initPrivate( text, cut, receiver, slot );
}
-KAction::KAction( const QString& text, const QIconSet& pix,
+KAction::KAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
QObject* parent, const char* name )
@@ -183,5 +186,5 @@ KAction::KAction( const QString& text, const QString& pix,
}
-KAction::KAction( const QString& text, const QIconSet& pix,
+KAction::KAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
const QObject* receiver, const char* slot, QObject* parent,
@@ -507,6 +510,6 @@ void KAction::updateShortcut( int i )
QWidget* w = container( i );
- if ( w->inherits( "QPopupMenu" ) ) {
- QPopupMenu* menu = static_cast<QPopupMenu*>(w);
+ if ( w->inherits( "Q3PopupMenu" ) ) {
+ Q3PopupMenu* menu = static_cast<Q3PopupMenu*>(w);
updateShortcut( menu, id );
}
@@ -519,5 +522,5 @@ void KAction::updateShortcut( int i )
}
-void KAction::updateShortcut( QPopupMenu* menu, int id )
+void KAction::updateShortcut( Q3PopupMenu* menu, int id )
{
/*US
@@ -622,5 +625,5 @@ void KAction::updateToolTip( int i )
if ( w->inherits( "KToolBar" ) )
QToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() );
- else if ( w->inherits( "QToolBar" ) )
+ else if ( w->inherits( "Q3ToolBar" ) )
QToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() );
}
@@ -647,7 +650,7 @@ int KAction::plug( QWidget *w, int index )
plugShortcut();
- if ( w->inherits("QPopupMenu") )
+ if ( w->inherits("Q3PopupMenu") )
{
- QPopupMenu* menu = static_cast<QPopupMenu*>( w );
+ Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( w );
int id;
// Don't insert shortcut into menu if it's already in a KAccel object.
@@ -722,5 +725,5 @@ int KAction::plug( QWidget *w, int index )
d->isEnabled(), d->plainText(), index/*US, instance*/ );
}
- bar->getButton( id_ )->setName( QCString("toolbutton_")+name() );
+ bar->getButton( id_ )->setName( Q3CString("toolbutton_")+name() );
//US if ( !d->whatsThis().isEmpty() )
@@ -750,7 +753,7 @@ void KAction::unplug( QWidget *w )
int id = itemId( i );
- if ( w->inherits( "QPopupMenu" ) )
+ if ( w->inherits( "Q3PopupMenu" ) )
{
- QPopupMenu *menu = static_cast<QPopupMenu *>( w );
+ Q3PopupMenu *menu = static_cast<Q3PopupMenu *>( w );
menu->removeItem( id );
}
@@ -863,6 +866,6 @@ void KAction::updateEnabled( int i )
QWidget *w = container( i );
- if ( w->inherits("QPopupMenu") )
- static_cast<QPopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
+ if ( w->inherits("Q3PopupMenu") )
+ static_cast<Q3PopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
else if ( w->inherits("QMenuBar") )
static_cast<QMenuBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
@@ -907,8 +910,8 @@ void KAction::updateText( int i )
QWidget *w = container( i );
- if ( w->inherits( "QPopupMenu" ) ) {
+ if ( w->inherits( "Q3PopupMenu" ) ) {
int id = itemId( i );
- static_cast<QPopupMenu*>(w)->changeItem( id, d->text() );
- updateShortcut( static_cast<QPopupMenu*>(w), id );
+ static_cast<Q3PopupMenu*>(w)->changeItem( id, d->text() );
+ updateShortcut( static_cast<Q3PopupMenu*>(w), id );
}
else if ( w->inherits( "QMenuBar" ) )
@@ -948,8 +951,8 @@ void KAction::updateIcon( int id )
QWidget* w = container( id );
- if ( w->inherits( "QPopupMenu" ) ) {
+ if ( w->inherits( "Q3PopupMenu" ) ) {
int itemId_ = itemId( id );
- static_cast<QPopupMenu*>(w)->changeItem( itemId_, d->iconSet( KIcon::Small ), d->text() );
- updateShortcut( static_cast<QPopupMenu*>(w), itemId_ );
+ static_cast<Q3PopupMenu*>(w)->changeItem( itemId_, d->iconSet( KIcon::Small ), d->text() );
+ updateShortcut( static_cast<Q3PopupMenu*>(w), itemId_ );
}
else if ( w->inherits( "QMenuBar" ) )
@@ -957,5 +960,5 @@ void KAction::updateIcon( int id )
else if ( w->inherits( "KToolBar" ) )
static_cast<KToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() );
- else if ( w->inherits( "QToolBar" ) )
+ else if ( w->inherits( "Q3ToolBar" ) )
{
qDebug("KAction::updateIcon has top be fixed");
@@ -969,5 +972,5 @@ QString KAction::icon() const
}
-void KAction::setIconSet( const QIconSet &iconset )
+void KAction::setIconSet( const QIcon &iconset )
{
d->setIconSet( iconset );
@@ -983,9 +986,9 @@ void KAction::updateIconSet( int id )
QWidget *w = container( id );
- if ( w->inherits( "QPopupMenu" ) )
+ if ( w->inherits( "Q3PopupMenu" ) )
{
int itemId_ = itemId( id );
- static_cast<QPopupMenu*>(w)->changeItem( itemId_, d->iconSet(), d->text() );
- updateShortcut( static_cast<QPopupMenu*>(w), itemId_ );
+ static_cast<Q3PopupMenu*>(w)->changeItem( itemId_, d->iconSet(), d->text() );
+ updateShortcut( static_cast<Q3PopupMenu*>(w), itemId_ );
}
else if ( w->inherits( "QMenuBar" ) )
@@ -1000,5 +1003,5 @@ void KAction::updateIconSet( int id )
}
-QIconSet KAction::iconSet( KIcon::Group group, int size ) const
+QIcon KAction::iconSet( KIcon::Group group, int size ) const
{
return d->iconSet( group, size );
@@ -1023,5 +1026,5 @@ void KAction::updateWhatsThis( int i )
{
qDebug("KAction::updateWhatsThis ...1 has top be fixed");
- QPopupMenu* pm = popupMenu( i );
+ Q3PopupMenu* pm = popupMenu( i );
if ( pm )
{
@@ -1065,8 +1068,8 @@ KToolBar* KAction::toolBar( int index ) const
}
-QPopupMenu* KAction::popupMenu( int index ) const
+Q3PopupMenu* KAction::popupMenu( int index ) const
{
//US return dynamic_cast<QPopupMenu *>( d->m_containers[ index ].m_container );
- return (QPopupMenu *)( d->m_containers[ index ].m_container );
+ return (Q3PopupMenu *)( d->m_containers[ index ].m_container );
}
@@ -1156,5 +1159,5 @@ int KAction::findContainer( const QWidget* widget ) const
{
int pos = 0;
- QValueList<KActionPrivate::Container>::ConstIterator it = d->m_containers.begin();
+ Q3ValueList<KActionPrivate::Container>::ConstIterator it = d->m_containers.begin();
while( it != d->m_containers.end() )
{
@@ -1171,5 +1174,5 @@ void KAction::removeContainer( int index )
{
int i = 0;
- QValueList<KActionPrivate::Container>::Iterator it = d->m_containers.begin();
+ Q3ValueList<KActionPrivate::Container>::Iterator it = d->m_containers.begin();
while( it != d->m_containers.end() )
{
diff --git a/microkde/kdeui/kaction.h b/microkde/kdeui/kaction.h
index 13e2e1e..5c690ec 100644
--- a/microkde/kdeui/kaction.h
+++ b/microkde/kdeui/kaction.h
@@ -30,6 +30,8 @@
//US #include <qkeysequence.h>
#include <qobject.h>
-#include <qvaluelist.h>
-#include <qguardedptr.h>
+#include <q3valuelist.h>
+#include <qpointer.h>
+//Added by qt3to4:
+#include <Q3PopupMenu>
#include <kguiitem.h>
#include <kshortcut.h>
@@ -41,8 +43,8 @@
class QMenuBar;
-class QPopupMenu;
+class Q3PopupMenu;
//USclass QComboBox;
//USclass QPoint;
-class QIconSet;
+class QIcon;
class QString;
class KToolBar;
@@ -260,5 +262,5 @@ public:
*/
- KAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot,
KActionCollection* parent, const char* name );
@@ -309,5 +311,5 @@ public:
* @obsolete
*/
- KAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
+ KAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
QObject* parent = 0, const char* name = 0 );
/**
@@ -319,5 +321,5 @@ public:
* @obsolete
*/
- KAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
/**
@@ -462,8 +464,8 @@ public:
* be chosen.
*/
- virtual QIconSet iconSet( KIcon::Group group, int size=0 ) const;
+ virtual QIcon iconSet( KIcon::Group group, int size=0 ) const;
#ifndef KDE_NO_COMPAT
- QIconSet iconSet() const
+ QIcon iconSet() const
{
return iconSet( KIcon::Small );
@@ -519,5 +521,5 @@ public slots:
* be chosen.
*/
- virtual void setIconSet( const QIconSet &iconSet );
+ virtual void setIconSet( const QIcon &iconSet );
virtual void setIcon( const QString& icon );
@@ -547,5 +549,5 @@ protected slots:
protected:
KToolBar* toolBar( int index ) const;
- QPopupMenu* popupMenu( int index ) const;
+ Q3PopupMenu* popupMenu( int index ) const;
void removeContainer( int index );
int findContainer( const QWidget* widget ) const;
@@ -556,5 +558,5 @@ protected:
virtual void updateShortcut( int i );
- virtual void updateShortcut( QPopupMenu* menu, int id );
+ virtual void updateShortcut( Q3PopupMenu* menu, int id );
virtual void updateGroup( int id );
virtual void updateText(int i );
diff --git a/microkde/kdeui/kactionclasses.cpp b/microkde/kdeui/kactionclasses.cpp
index 82e6c8b..c611865 100644
--- a/microkde/kdeui/kactionclasses.cpp
+++ b/microkde/kdeui/kactionclasses.cpp
@@ -29,7 +29,9 @@
#include <qfontdatabase.h>
-#include <qobjectlist.h>
+#include <qobject.h>
//US#include <qwhatsthis.h>
#include <qtimer.h>
+//Added by qt3to4:
+#include <Q3ValueList>
//US#include <kaccel.h>
@@ -49,11 +51,11 @@
#include <kconfigbase.h>
#include <qwidget.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
#include <qmenubar.h>
-#include <qmainwindow.h>
-#include <qtoolbar.h>
+#include <q3mainwindow.h>
+#include <q3toolbar.h>
#include <qcombobox.h>
-#include <qmainwindow.h>
-
+#include <q3mainwindow.h>
+#include <qcoreapplication.h>
static QFontDatabase *fontDataBase = 0;
@@ -84,5 +86,5 @@ static void get_fonts( QStringList &lst )
}
-static QValueList<int> get_standard_font_sizes()
+static Q3ValueList<int> get_standard_font_sizes()
{
if ( !fontDataBase ) {
@@ -121,5 +123,5 @@ KToggleAction::KToggleAction( const QString& text, const KShortcut& cut,
}
-KToggleAction::KToggleAction( const QString& text, const QIconSet& pix,
+KToggleAction::KToggleAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
QObject* parent, const char* name )
@@ -137,5 +139,5 @@ KToggleAction::KToggleAction( const QString& text, const QString& pix,
}
-KToggleAction::KToggleAction( const QString& text, const QIconSet& pix,
+KToggleAction::KToggleAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
const QObject* receiver,
@@ -170,5 +172,5 @@ KToggleAction::~KToggleAction()
int KToggleAction::plug( QWidget* widget, int index )
{
- if ( !widget->inherits("QPopupMenu") && !widget->inherits("KToolBar") )
+ if ( !widget->inherits("Q3PopupMenu") && !widget->inherits("KToolBar") )
{
kdWarning() << "Can not plug KToggleAction in " << widget->className() << endl;
@@ -185,9 +187,9 @@ int KToggleAction::plug( QWidget* widget, int index )
return _index;
- if ( widget->inherits("QPopupMenu") )
+ if ( widget->inherits("Q3PopupMenu") )
{
int id = itemId( _index );
- static_cast<QPopupMenu*>(widget)->setItemChecked( id, d->m_checked );
+ static_cast<Q3PopupMenu*>(widget)->setItemChecked( id, d->m_checked );
} else if ( widget->inherits( "KToolBar" ) ) {
@@ -215,11 +217,10 @@ void KToggleAction::setChecked( bool c )
if ( c && parent() && !exclusiveGroup().isEmpty() ) {
- const QObjectList *list = parent()->children();
- if ( list ) {
- QObjectListIt it( *list );
- for( ; it.current(); ++it ) {
- if ( it.current()->inherits( "KToggleAction" ) && it.current() != this &&
- static_cast<KToggleAction*>(it.current())->exclusiveGroup() == exclusiveGroup() ) {
- KToggleAction *a = static_cast<KToggleAction*>(it.current());
+ const QObjectList list = parent()->children();
+ if ( !list.empty() ) {
+ for(QObjectList::const_iterator it=list.begin();it!=list.end();++it) {
+ if ( (*it)->inherits( "KToggleAction" ) && (*it) != this &&
+ static_cast<KToggleAction*>((*it))->exclusiveGroup() == exclusiveGroup() ) {
+ KToggleAction *a = static_cast<KToggleAction*>(*it);
if( a->isChecked() ) {
a->setChecked( false );
@@ -236,6 +237,6 @@ void KToggleAction::updateChecked( int id )
QWidget *w = container( id );
- if ( w->inherits( "QPopupMenu" ) )
- static_cast<QPopupMenu*>(w)->setItemChecked( itemId( id ), d->m_checked );
+ if ( w->inherits( "Q3PopupMenu" ) )
+ static_cast<Q3PopupMenu*>(w)->setItemChecked( itemId( id ), d->m_checked );
else if ( w->inherits( "QMenuBar" ) )
static_cast<QMenuBar*>(w)->setItemChecked( itemId( id ), d->m_checked );
@@ -284,5 +285,5 @@ KRadioAction::KRadioAction( const QString& text, const KShortcut& cut,
}
-KRadioAction::KRadioAction( const QString& text, const QIconSet& pix,
+KRadioAction::KRadioAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
QObject* parent, const char* name )
@@ -298,5 +299,5 @@ KRadioAction::KRadioAction( const QString& text, const QString& pix,
}
-KRadioAction::KRadioAction( const QString& text, const QIconSet& pix,
+KRadioAction::KRadioAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
const QObject* receiver, const char* slot,
@@ -350,5 +351,5 @@ public:
bool m_edit;
bool m_menuAccelsEnabled;
- QPopupMenu *m_menu;
+ Q3PopupMenu *m_menu;
int m_current;
int m_comboWidth;
@@ -388,5 +389,5 @@ KSelectAction::KSelectAction( const QString& text, const KShortcut& cut,
}
-KSelectAction::KSelectAction( const QString& text, const QIconSet& pix,
+KSelectAction::KSelectAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
QObject* parent, const char* name )
@@ -404,5 +405,5 @@ KSelectAction::KSelectAction( const QString& text, const QString& pix,
}
-KSelectAction::KSelectAction( const QString& text, const QIconSet& pix,
+KSelectAction::KSelectAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
const QObject* receiver,
@@ -440,5 +441,5 @@ void KSelectAction::setCurrentItem( int id )
{
if ( id >= (int)d->m_list.count() ) {
- ASSERT(id < (int)d->m_list.count());
+ Q_ASSERT(id < (int)d->m_list.count());
return;
}
@@ -480,5 +481,5 @@ void KSelectAction::setComboWidth( int width )
}
-QPopupMenu* KSelectAction::popupMenu() const
+Q3PopupMenu* KSelectAction::popupMenu() const
{
kdDebug(129) << "KSelectAction::popupMenu()" << endl; // remove -- ellis
@@ -486,5 +487,5 @@ QPopupMenu* KSelectAction::popupMenu() const
{
//US d->m_menu = new KPopupMenu(0L, "KSelectAction::popupMenu()");
- d->m_menu = new QPopupMenu(0L, "QSelectAction::popupMenu()");
+ d->m_menu = new Q3PopupMenu(0L, "QSelectAction::popupMenu()");
setupMenu();
if ( d->m_current >= 0 )
@@ -644,10 +645,10 @@ int KSelectAction::plug( QWidget *widget, int index )
kdDebug(129) << "KAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis
- if ( widget->inherits("QPopupMenu") )
+ if ( widget->inherits("Q3PopupMenu") )
{
// Create the PopupMenu and store it in m_menu
(void)popupMenu();
- QPopupMenu* menu = static_cast<QPopupMenu*>( widget );
+ Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( widget );
int id;
@@ -683,5 +684,5 @@ int KSelectAction::plug( QWidget *widget, int index )
{
cb->setMaximumHeight( 34 );
- if (!isEditable()) cb->setFocusPolicy(QWidget::NoFocus);
+ if (!isEditable()) cb->setFocusPolicy(Qt::NoFocus);
cb->setMinimumWidth( cb->sizeHint().width() );
if ( d->m_comboWidth > 0 )
@@ -853,5 +854,5 @@ KListAction::KListAction( const QString& text, const KShortcut& cut,
}
-KListAction::KListAction( const QString& text, const QIconSet& pix,
+KListAction::KListAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
QObject* parent, const char* name )
@@ -869,5 +870,5 @@ KListAction::KListAction( const QString& text, const QString& pix,
}
-KListAction::KListAction( const QString& text, const QIconSet& pix,
+KListAction::KListAction( const QString& text, const QIcon& pix,
const KShortcut& cut, const QObject* receiver,
const char* slot, QObject* parent,
@@ -966,5 +967,5 @@ KRecentFilesAction::KRecentFilesAction( const QString& text,
KRecentFilesAction::KRecentFilesAction( const QString& text,
- const QIconSet& pix,
+ const QIcon& pix,
const KShortcut& cut,
QObject* parent, const char* name,
@@ -992,5 +993,5 @@ KRecentFilesAction::KRecentFilesAction( const QString& text,
KRecentFilesAction::KRecentFilesAction( const QString& text,
- const QIconSet& pix,
+ const QIcon& pix,
const KShortcut& cut,
const QObject* receiver,
@@ -1202,5 +1203,5 @@ KFontAction::KFontAction( const QString& text, const KShortcut& cut,
}
-KFontAction::KFontAction( const QString& text, const QIconSet& pix,
+KFontAction::KFontAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
QObject* parent, const char* name )
@@ -1224,5 +1225,5 @@ KFontAction::KFontAction( const QString& text, const QString& pix,
}
-KFontAction::KFontAction( const QString& text, const QIconSet& pix,
+KFontAction::KFontAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
const QObject* receiver, const char* slot,
@@ -1362,5 +1363,5 @@ KFontSizeAction::KFontSizeAction( const QString& text,
}
-KFontSizeAction::KFontSizeAction( const QString& text, const QIconSet& pix,
+KFontSizeAction::KFontSizeAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
QObject* parent, const char* name )
@@ -1378,5 +1379,5 @@ KFontSizeAction::KFontSizeAction( const QString& text, const QString& pix,
}
-KFontSizeAction::KFontSizeAction( const QString& text, const QIconSet& pix,
+KFontSizeAction::KFontSizeAction( const QString& text, const QIcon& pix,
const KShortcut& cut,
const QObject* receiver,
@@ -1415,7 +1416,7 @@ void KFontSizeAction::init()
setEditable( true );
- QValueList<int> sizes = get_standard_font_sizes();
+ Q3ValueList<int> sizes = get_standard_font_sizes();
QStringList lst;
- for ( QValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it )
+ for ( Q3ValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it )
lst.append( QString::number( *it ) );
@@ -1438,5 +1439,5 @@ void KFontSizeAction::setFontSize( int size )
if ( index == -1 ) {
// Insert at the correct position in the list (to keep sorting)
- QValueList<int> lst;
+ Q3ValueList<int> lst;
// Convert to list of ints
QStringList itemsList = items();
@@ -1451,5 +1452,5 @@ qDebug("KFontSizeAction::setFontSize heapsort not found.");
// Convert back to string list
QStringList strLst;
- for (QValueList<int>::Iterator it = lst.begin() ; it != lst.end() ; ++it)
+ for (Q3ValueList<int>::Iterator it = lst.begin() ; it != lst.end() ; ++it)
strLst.append( QString::number(*it) );
KSelectAction::setItems( strLst );
@@ -1493,5 +1494,5 @@ public:
{
//US m_popup = new KPopupMenu(0L,"KActionMenu::KActionMenuPrivate");
- m_popup = new QPopupMenu(0L,"KActionMenu::KActionMenuPrivate");
+ m_popup = new Q3PopupMenu(0L,"KActionMenu::KActionMenuPrivate");
m_delayed = true;
m_stickyMenu = true;
@@ -1503,5 +1504,5 @@ public:
//US KPopupMenu *m_popup;
- QPopupMenu *m_popup;
+ Q3PopupMenu *m_popup;
bool m_delayed;
bool m_stickyMenu;
@@ -1523,5 +1524,5 @@ KActionMenu::KActionMenu( const QString& text, QObject* parent,
}
-KActionMenu::KActionMenu( const QString& text, const QIconSet& icon,
+KActionMenu::KActionMenu( const QString& text, const QIcon& icon,
QObject* parent, const char* name )
: KAction( text, icon, 0, parent, name )
@@ -1553,5 +1554,5 @@ void KActionMenu::popup( const QPoint& global )
//US KPopupMenu* KActionMenu::popupMenu() const
-QPopupMenu* KActionMenu::popupMenu() const
+Q3PopupMenu* KActionMenu::popupMenu() const
{
return d->m_popup;
@@ -1593,7 +1594,7 @@ int KActionMenu::plug( QWidget* widget, int index )
*/
kdDebug(129) << "KAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis
- if ( widget->inherits("QPopupMenu") )
+ if ( widget->inherits("Q3PopupMenu") )
{
- QPopupMenu* menu = static_cast<QPopupMenu*>( widget );
+ Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( widget );
int id;
if ( hasIconSet() )
@@ -1782,10 +1783,10 @@ int KToolBarPopupAction::plug( QWidget *widget, int index )
//US KPopupMenu *KToolBarPopupAction::popupMenu() const
-QPopupMenu *KToolBarPopupAction::popupMenu() const
+Q3PopupMenu *KToolBarPopupAction::popupMenu() const
{
if ( !m_popup ) {
KToolBarPopupAction *that = const_cast<KToolBarPopupAction*>(this);
//US that->m_popup = new KPopupMenu;
- that->m_popup = new QPopupMenu;
+ that->m_popup = new Q3PopupMenu;
}
return m_popup;
@@ -1954,5 +1955,5 @@ void KWidgetAction::slotToolbarDestroyed()
//Q_ASSERT( m_widget ); // When exiting the app the widget could be destroyed before the toolbar.
- ASSERT( isPlugged() );
+ Q_ASSERT( isPlugged() );
if( !m_widget || !isPlugged() )
return;
@@ -1975,7 +1976,7 @@ KActionSeparator::~KActionSeparator()
int KActionSeparator::plug( QWidget *widget, int index )
{
- if ( widget->inherits("QPopupMenu") )
+ if ( widget->inherits("Q3PopupMenu") )
{
- QPopupMenu* menu = static_cast<QPopupMenu*>( widget );
+ Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( widget );
int id = menu->insertSeparator( index );
diff --git a/microkde/kdeui/kactionclasses.h b/microkde/kdeui/kactionclasses.h
index f6e7a0f..a9b9104 100644
--- a/microkde/kdeui/kactionclasses.h
+++ b/microkde/kdeui/kactionclasses.h
@@ -35,9 +35,12 @@
//US#include <kguiitem.h>
#include <kshortcut.h>
+//Added by qt3to4:
+#include <Q3CString>
+#include <Q3PopupMenu>
//US#include <kstdaction.h>
//US#include <kicontheme.h>
class QMenuBar;
-class QPopupMenu;
+class Q3PopupMenu;
//USclass QComboBox;
//USclass QPoint;
@@ -55,5 +58,5 @@ class KURL;
//US class KToolBar needs to be replaced
-class KToolBar;
+#include "ktoolbar.h"
class KActionCollection;
@@ -106,5 +109,5 @@ public:
* @param name An internal name for this action.
*/
- KToggleAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
+ KToggleAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
QObject* parent = 0, const char* name = 0 );
@@ -128,5 +131,5 @@ public:
* @param name An internal name for this action.
*/
- KToggleAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KToggleAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
@@ -247,5 +250,5 @@ public:
* @param name An internal name for this action.
*/
- KRadioAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
+ KRadioAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
QObject* parent = 0, const char* name = 0 );
@@ -269,5 +272,5 @@ public:
* @param name An internal name for this action.
*/
- KRadioAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KRadioAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
@@ -353,5 +356,5 @@ public:
* @param name An internal name for this action.
*/
- KSelectAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
+ KSelectAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
QObject* parent = 0, const char* name = 0 );
@@ -375,5 +378,5 @@ public:
* @param name An internal name for this action.
*/
- KSelectAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KSelectAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
@@ -439,5 +442,5 @@ public:
virtual int comboWidth() const;
- QPopupMenu* popupMenu() const;
+ Q3PopupMenu* popupMenu() const;
/**
@@ -568,5 +571,5 @@ public:
* @param name An internal name for this action.
*/
- KListAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
+ KListAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
QObject* parent = 0, const char* name = 0 );
@@ -590,5 +593,5 @@ public:
* @param name An internal name for this action.
*/
- KListAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KListAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot, QObject* parent,
const char* name = 0 );
@@ -686,5 +689,5 @@ public:
* @param maxItems The maximum number of files to display
*/
- KRecentFilesAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KRecentFilesAction( const QString& text, const QIcon& pix, const KShortcut& cut,
QObject* parent, const char* name = 0,
uint maxItems = 10 );
@@ -713,5 +716,5 @@ public:
* @param maxItems The maximum number of files to display
*/
- KRecentFilesAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KRecentFilesAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot,
QObject* parent, const char* name = 0,
@@ -835,9 +838,9 @@ public:
const QObject* receiver, const char* slot, QObject* parent,
const char* name = 0 );
- KFontAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
+ KFontAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
QObject* parent = 0, const char* name = 0 );
KFontAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
QObject* parent = 0, const char* name = 0 );
- KFontAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KFontAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot, QObject* parent,
const char* name = 0 );
@@ -874,9 +877,9 @@ public:
KFontSizeAction( const QString& text, const KShortcut& cut, const QObject* receiver,
const char* slot, QObject* parent, const char* name = 0 );
- KFontSizeAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
+ KFontSizeAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
QObject* parent = 0, const char* name = 0 );
KFontSizeAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
QObject* parent = 0, const char* name = 0 );
- KFontSizeAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
+ KFontSizeAction( const QString& text, const QIcon& pix, const KShortcut& cut,
const QObject* receiver, const char* slot,
QObject* parent, const char* name = 0 );
@@ -932,5 +935,5 @@ public:
KActionMenu( const QString& text, QObject* parent = 0,
const char* name = 0 );
- KActionMenu( const QString& text, const QIconSet& icon,
+ KActionMenu( const QString& text, const QIcon& icon,
QObject* parent = 0, const char* name = 0 );
KActionMenu( const QString& text, const QString& icon,
@@ -943,5 +946,5 @@ public:
//US KPopupMenu* popupMenu() const;
- QPopupMenu* popupMenu() const;
+ Q3PopupMenu* popupMenu() const;
void popup( const QPoint& global );
@@ -1068,5 +1071,5 @@ public:
*/
//US KPopupMenu *popupMenu() const;
- QPopupMenu *popupMenu() const;
+ Q3PopupMenu *popupMenu() const;
/**
@@ -1099,5 +1102,5 @@ public:
private:
//US KPopupMenu *m_popup;
- QPopupMenu *m_popup;
+ Q3PopupMenu *m_popup;
bool m_delayed:1;
bool m_stickyMenu:1;
@@ -1148,6 +1151,6 @@ public slots:
private:
- QCString m_toolBarName;
- QGuardedPtr<KToolBar> m_toolBar;
+ Q3CString m_toolBarName;
+ QPointer<KToolBar> m_toolBar;
protected:
virtual void virtual_hook( int id, void* data );
@@ -1196,5 +1199,5 @@ protected slots:
void slotToolbarDestroyed();
private:
- QGuardedPtr<QWidget> m_widget;
+ QPointer<QWidget> m_widget;
bool m_autoSized;
protected:
diff --git a/microkde/kdeui/kactioncollection.cpp b/microkde/kdeui/kactioncollection.cpp
index 69e5d02..4d66c7f 100644
--- a/microkde/kdeui/kactioncollection.cpp
+++ b/microkde/kdeui/kactioncollection.cpp
@@ -27,5 +27,7 @@
//US#include "kactionshortcutlist.h"
-#include <qptrdict.h>
+#include <q3ptrdict.h>
+//Added by qt3to4:
+#include <Q3ValueList>
//US#include <qvariant.h>
@@ -37,6 +39,6 @@
//US I included the following files
-#include <qasciidict.h>
-#include <qptrlist.h>
+#include <q3asciidict.h>
+#include <q3ptrlist.h>
#include "kaction.h"
#include <kglobal.h>
@@ -68,11 +70,11 @@ public:
//QValueList<QWidget*> m_widgetList;
//QValueList<KAccel*> m_kaccelList;
- QValueList<KActionCollection*> m_docList;
+ Q3ValueList<KActionCollection*> m_docList;
QWidget *m_widget;
KAccel *m_kaccel;
KAccel *m_builderKAccel;
- QAsciiDict<KAction> m_actionDict;
- QPtrDict< QPtrList<KAction> > m_dctHighlightContainers;
+ Q3AsciiDict<KAction> m_actionDict;
+ Q3PtrDict< Q3PtrList<KAction> > m_dctHighlightContainers;
bool m_highlight;
KAction *m_currentHighlightAction;
@@ -134,5 +136,5 @@ KActionCollection::~KActionCollection()
{
kdDebug(129) << "KActionCollection::~KActionCollection(): this = " << this << endl;
- for ( QAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) {
+ for ( Q3AsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) {
KAction* pAction = it.current();
if ( pAction->m_parentCollection == this )
@@ -366,5 +368,5 @@ KAction* KActionCollection::_take( KAction* action )
void KActionCollection::_clear()
{
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ Q3AsciiDictIterator<KAction> it( d->m_actionDict );
while ( it.current() )
_remove( it.current() );
@@ -387,5 +389,5 @@ KAction* KActionCollection::action( const char* name, const char* classname ) co
else {
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ Q3AsciiDictIterator<KAction> it( d->m_actionDict );
for( ; it.current(); ++it )
{
@@ -408,5 +410,5 @@ KAction* KActionCollection::action( const char* name, const char* classname ) co
KAction* KActionCollection::action( int index ) const
{
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ Q3AsciiDictIterator<KAction> it( d->m_actionDict );
it += index;
return it.current();
@@ -433,5 +435,5 @@ QStringList KActionCollection::groups() const
QStringList lst;
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ Q3AsciiDictIterator<KAction> it( d->m_actionDict );
for( ; it.current(); ++it )
if ( !it.current()->group().isEmpty() && !lst.contains( it.current()->group() ) )
@@ -445,5 +447,5 @@ KActionPtrList KActionCollection::actions( const QString& group ) const
KActionPtrList lst;
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ Q3AsciiDictIterator<KAction> it( d->m_actionDict );
for( ; it.current(); ++it )
if ( it.current()->group() == group )
@@ -459,5 +461,5 @@ KActionPtrList KActionCollection::actions() const
KActionPtrList lst;
- QAsciiDictIterator<KAction> it( d->m_actionDict );
+ Q3AsciiDictIterator<KAction> it( d->m_actionDict );
for( ; it.current(); ++it )
lst.append( it.current() );
@@ -509,11 +511,11 @@ void KActionCollection::connectHighlight( QWidget *container, KAction *action )
return;
- QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ];
+ Q3PtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ];
if ( !actionList )
{
- actionList = new QPtrList<KAction>;
+ actionList = new Q3PtrList<KAction>;
- if ( container->inherits( "QPopupMenu" ) )
+ if ( container->inherits( "Q3PopupMenu" ) )
{
connect( container, SIGNAL( highlighted( int ) ),
@@ -523,5 +525,5 @@ void KActionCollection::connectHighlight( QWidget *container, KAction *action )
}
//US else if ( container->inherits( "KToolBar" ) )
- else if ( container->inherits( "QToolBar" ) )
+ else if ( container->inherits( "Q3ToolBar" ) )
{
connect( container, SIGNAL( highlighted( int, bool ) ),
@@ -543,5 +545,5 @@ void KActionCollection::disconnectHighlight( QWidget *container, KAction *action
return;
- QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ];
+ Q3PtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ];
if ( !actionList )
@@ -626,10 +628,10 @@ void KActionCollection::slotDestroyed()
KAction *KActionCollection::findAction( QWidget *container, int id )
{
- QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ reinterpret_cast<void *>( container ) ];
+ Q3PtrList<KAction> *actionList = d->m_dctHighlightContainers[ reinterpret_cast<void *>( container ) ];
if ( !actionList )
return 0;
- QPtrListIterator<KAction> it( *actionList );
+ Q3PtrListIterator<KAction> it( *actionList );
for (; it.current(); ++it )
if ( it.current()->isPlugged( container, id ) )
@@ -645,7 +647,7 @@ KActionCollection KActionCollection::operator+(const KActionCollection &c ) cons
KActionCollection ret( *this );
- QValueList<KAction *> actions = c.actions();
- QValueList<KAction *>::ConstIterator it = actions.begin();
- QValueList<KAction *>::ConstIterator end = actions.end();
+ Q3ValueList<KAction *> actions = c.actions();
+ Q3ValueList<KAction *>::ConstIterator it = actions.begin();
+ Q3ValueList<KAction *>::ConstIterator end = actions.end();
for (; it != end; ++it )
ret.insert( *it );
@@ -671,5 +673,5 @@ KActionCollection &KActionCollection::operator+=( const KActionCollection &c )
{
kdWarning(129) << "KActionCollection::operator+=(): function is severely deprecated." << endl;
- QAsciiDictIterator<KAction> it(c.d->m_actionDict);
+ Q3AsciiDictIterator<KAction> it(c.d->m_actionDict);
for ( ; it.current(); ++it )
insert( it.current() );
diff --git a/microkde/kdeui/kactioncollection.h b/microkde/kdeui/kactioncollection.h
index b9466d0..50cb02a 100644
--- a/microkde/kdeui/kactioncollection.h
+++ b/microkde/kdeui/kactioncollection.h
@@ -31,4 +31,6 @@
//US #include <qkeysequence.h>
#include <qobject.h>
+//Added by qt3to4:
+#include <Q3ValueList>
//US#include <qvaluelist.h>
//US#include <qguardedptr.h>
@@ -61,5 +63,5 @@ class QWidget;
-typedef QValueList<KAction *> KActionPtrList;
+typedef Q3ValueList<KAction *> KActionPtrList;
/**
diff --git a/microkde/kdeui/kbuttonbox.cpp b/microkde/kdeui/kbuttonbox.cpp
index 83d622a..3ea6703 100644
--- a/microkde/kdeui/kbuttonbox.cpp
+++ b/microkde/kdeui/kbuttonbox.cpp
@@ -50,5 +50,7 @@
#include <kbuttonbox.h>
#include <qpushbutton.h>
-#include <qptrlist.h>
+#include <q3ptrlist.h>
+//Added by qt3to4:
+#include <QResizeEvent>
#include <assert.h>
@@ -63,5 +65,5 @@ public:
};
-template class QPtrList<KButtonBox::Item>;
+template class Q3PtrList<KButtonBox::Item>;
class KButtonBoxPrivate {
@@ -71,8 +73,8 @@ public:
unsigned short orientation;
bool activated;
- QPtrList<KButtonBox::Item> buttons;
+ Q3PtrList<KButtonBox::Item> buttons;
};
-KButtonBox::KButtonBox(QWidget *parent, Orientation _orientation,
+KButtonBox::KButtonBox(QWidget *parent, Qt::Orientation _orientation,
int border, int autoborder)
: QWidget(parent)
@@ -150,5 +152,5 @@ void KButtonBox::placeButtons() {
unsigned int i;
- if(data->orientation == Horizontal) {
+ if(data->orientation == Qt::Horizontal) {
// calculate free size and stretches
int fs = width() - 2 * data->border;
@@ -252,5 +254,5 @@ QSize KButtonBox::sizeHint() const {
s = bs;
- if(data->orientation == Horizontal)
+ if(data->orientation == Qt::Horizontal)
dw += s.width();
else
@@ -262,5 +264,5 @@ QSize KButtonBox::sizeHint() const {
}
- if(data->orientation == Horizontal)
+ if(data->orientation == Qt::Horizontal)
return QSize(dw, bs.height() + 2 * data->border);
else
@@ -271,5 +273,5 @@ QSize KButtonBox::sizeHint() const {
QSizePolicy KButtonBox::sizePolicy() const
{
- return data->orientation == Horizontal?
+ return data->orientation == Qt::Horizontal?
QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) :
QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum );
diff --git a/microkde/kdeui/kbuttonbox.h b/microkde/kdeui/kbuttonbox.h
index 1104366..2e0f41d 100644
--- a/microkde/kdeui/kbuttonbox.h
+++ b/microkde/kdeui/kbuttonbox.h
@@ -22,4 +22,6 @@
#include <qwidget.h>
+//Added by qt3to4:
+#include <QResizeEvent>
class QPushButton;
@@ -49,5 +51,5 @@ public:
* are laid out from left to right.
*/
- KButtonBox(QWidget *parent, Orientation _orientation = Horizontal,
+ KButtonBox(QWidget *parent, Qt::Orientation _orientation = Qt::Horizontal,
int border = 0, int _autoborder = 6);
diff --git a/microkde/kdeui/kguiitem.cpp b/microkde/kdeui/kguiitem.cpp
index 828c5e6..c91ffb7 100644
--- a/microkde/kdeui/kguiitem.cpp
+++ b/microkde/kdeui/kguiitem.cpp
@@ -21,5 +21,5 @@
#include <qregexp.h>
#include <qstring.h>
-#include <qiconset.h>
+#include <qicon.h>
#include <qpixmap.h>
@@ -63,5 +63,5 @@ public:
QString m_statusText;
QString m_iconName;
- QIconSet m_iconSet;
+ QIcon m_iconSet;
bool m_hasIcon : 1;
bool m_enabled : 1;
@@ -83,5 +83,5 @@ KGuiItem::KGuiItem( const QString &text, const QString &iconName,
}
-KGuiItem::KGuiItem( const QString &text, const QIconSet &iconSet,
+KGuiItem::KGuiItem( const QString &text, const QIcon &iconSet,
const QString &toolTip, const QString &whatsThis )
{
@@ -125,5 +125,5 @@ QString KGuiItem::plainText() const {
}
-QIconSet KGuiItem::iconSet( KIcon::Group group, int size /*US, KInstance* instance */ ) const
+QIcon KGuiItem::iconSet( KIcon::Group group, int size /*US, KInstance* instance */ ) const
{
if( d->m_hasIcon )
@@ -149,5 +149,5 @@ QIconSet KGuiItem::iconSet( KIcon::Group group, int size /*US, KInstance* instan
}
else
- return QIconSet();
+ return QIcon();
}
@@ -178,5 +178,5 @@ void KGuiItem::setText( const QString &text ) {
}
-void KGuiItem::setIconSet( const QIconSet &iconset )
+void KGuiItem::setIconSet( const QIcon &iconset )
{
d->m_iconSet = iconset;
@@ -188,5 +188,5 @@ void KGuiItem::setIconName( const QString &iconName )
{
d->m_iconName = iconName;
- d->m_iconSet = QIconSet();
+ d->m_iconSet = QIcon();
d->m_hasIcon = !iconName.isEmpty();
}
diff --git a/microkde/kdeui/kguiitem.h b/microkde/kdeui/kguiitem.h
index 0079bb4..6f92137 100644
--- a/microkde/kdeui/kguiitem.h
+++ b/microkde/kdeui/kguiitem.h
@@ -24,7 +24,7 @@
#include <qstring.h>
-#include <qiconset.h>
+#include <qicon.h>
#include <qpixmap.h>
-#include <qvaluelist.h>
+#include <q3valuelist.h>
//US#include <kicontheme.h>
#include <kglobal.h>
@@ -43,5 +43,5 @@ public:
const QString &whatsThis = QString::null );
- KGuiItem( const QString &text, const QIconSet &iconSet,
+ KGuiItem( const QString &text, const QIcon &iconSet,
const QString &toolTip = QString::null,
const QString &whatsThis = QString::null );
@@ -54,8 +54,8 @@ public:
QString text() const;
QString plainText() const;
- QIconSet iconSet( KIcon::Group, int size = 0/*US , KInstance* instance = KGlobal::instance()*/) const;
+ QIcon iconSet( KIcon::Group, int size = 0/*US , KInstance* instance = KGlobal::instance()*/) const;
#ifndef KDE_NO_COMPAT
- QIconSet iconSet() const { return iconSet( KIcon::Small); }
+ QIcon iconSet() const { return iconSet( KIcon::Small); }
#endif
@@ -70,5 +70,5 @@ public:
void setText( const QString &text );
- void setIconSet( const QIconSet &iconset );
+ void setIconSet( const QIcon &iconset );
void setIconName( const QString &iconName );
void setToolTip( const QString &tooltip );
diff --git a/microkde/kdeui/kjanuswidget.cpp b/microkde/kdeui/kjanuswidget.cpp
index 462c44f..3d9173d 100644
--- a/microkde/kdeui/kjanuswidget.cpp
+++ b/microkde/kdeui/kjanuswidget.cpp
@@ -23,13 +23,21 @@
#include <qlayout.h>
#include <qlabel.h>
-#include <qwidgetstack.h>
+#include <q3widgetstack.h>
#include <qtabwidget.h>
-#include <qlistview.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qgrid.h>
+#include <q3listview.h>
+#include <q3hbox.h>
+#include <q3vbox.h>
+#include <q3grid.h>
#include <qpainter.h>
-#include <qobjectlist.h>
+#include <qobject.h>
#include <qstringlist.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3GridLayout>
+#include <Q3PtrList>
+#include <Q3Frame>
+#include <QEvent>
+#include <Q3VBoxLayout>
+#include <QShowEvent>
/*US
#include <qbitmap.h>
@@ -66,11 +74,11 @@
#include "kjanuswidget.h"
-class KJanusWidget::IconListItem : public QListBoxItem
+class KJanusWidget::IconListItem : public Q3ListBoxItem
{
public:
- IconListItem( QListBox *listbox, const QPixmap &pixmap,
+ IconListItem( Q3ListBox *listbox, const QPixmap &pixmap,
const QString &text );
- virtual int height( const QListBox *lb ) const;
- virtual int width( const QListBox *lb ) const;
+ virtual int height( const Q3ListBox *lb ) const;
+ virtual int width( const Q3ListBox *lb ) const;
int expandMinimumWidth( int width );
@@ -99,5 +107,5 @@ public:
};
-template class QPtrList<QListViewItem>;
+template class Q3PtrList<Q3ListViewItem>;
@@ -108,10 +116,10 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
mShowIconsInTreeList(false), d(0)
{
- QVBoxLayout *topLayout = new QVBoxLayout( this );
+ Q3VBoxLayout *topLayout = new Q3VBoxLayout( this );
if( mFace == TreeList || mFace == IconList )
{
d = new KJanusWidgetPrivate;
- QFrame *page = 0;
+ Q3Frame *page = 0;
if( mFace == TreeList )
{
@@ -146,5 +154,5 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
else
{
- QHBoxLayout *hbox = new QHBoxLayout( topLayout );
+ Q3HBoxLayout *hbox = new Q3HBoxLayout( topLayout );
mIconList = new IconListBox( this );
@@ -157,5 +165,5 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
connect( mIconList, SIGNAL(selectionChanged()), SLOT(slotShowPage()));
hbox->addSpacing( KDialog::marginHint() );
- page = new QFrame( this );
+ page = new Q3Frame( this );
hbox->addWidget( page, 10 );
}
@@ -166,5 +174,5 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
//
- QVBoxLayout *vbox = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ Q3VBoxLayout *vbox = new Q3VBoxLayout( page, 0, KDialog::spacingHint() );
mTitleLabel = new QLabel( QString::fromLatin1("Empty page"), page, "KJanusWidgetTitleLabel" );
@@ -176,8 +184,8 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
mTitleSep = new KSeparator( page );
- mTitleSep->setFrameStyle( QFrame::HLine|QFrame::Plain );
+ mTitleSep->setFrameStyle( Q3Frame::HLine|Q3Frame::Plain );
vbox->addWidget( mTitleSep );
- mPageStack = new QWidgetStack( page );
+ mPageStack = new Q3WidgetStack( page );
connect(mPageStack, SIGNAL(aboutToShow(QWidget *)),
SIGNAL(aboutToShowPage(QWidget *)));
@@ -200,5 +208,5 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
{
mFace = Plain;
- mPlainPage = new QFrame( this );
+ mPlainPage = new Q3Frame( this );
topLayout->addWidget( mPlainPage, 10 );
}
@@ -246,5 +254,5 @@ bool KJanusWidget::isValid() const
-QFrame *KJanusWidget::plainPage()
+Q3Frame *KJanusWidget::plainPage()
{
return( mPlainPage );
@@ -267,5 +275,5 @@ QWidget *KJanusWidget::FindParent()
}
-QFrame *KJanusWidget::addPage( const QStringList &items, const QString &header,
+Q3Frame *KJanusWidget::addPage( const QStringList &items, const QString &header,
const QPixmap &pixmap )
{
@@ -276,5 +284,5 @@ QFrame *KJanusWidget::addPage( const QStringList &items, const QString &header,
}
- QFrame *page = new QFrame( FindParent(), "page" );
+ Q3Frame *page = new Q3Frame( FindParent(), "page" );
addPageWidget( page, items, header, pixmap );
@@ -288,5 +296,5 @@ void KJanusWidget::pageGone( QObject *obj )
}
-void KJanusWidget::slotReopen( QListViewItem * item )
+void KJanusWidget::slotReopen( Q3ListViewItem * item )
{
if( item )
@@ -294,5 +302,5 @@ void KJanusWidget::slotReopen( QListViewItem * item )
}
-QFrame *KJanusWidget::addPage( const QString &itemName, const QString &header,
+Q3Frame *KJanusWidget::addPage( const QString &itemName, const QString &header,
const QPixmap &pixmap )
{
@@ -305,5 +313,5 @@ QFrame *KJanusWidget::addPage( const QString &itemName, const QString &header,
-QVBox *KJanusWidget::addVBoxPage( const QStringList &items,
+Q3VBox *KJanusWidget::addVBoxPage( const QStringList &items,
const QString &header,
const QPixmap &pixmap )
@@ -316,5 +324,5 @@ QVBox *KJanusWidget::addVBoxPage( const QStringList &items,
}
- QVBox *page = new QVBox(FindParent() , "vbox_page" );
+ Q3VBox *page = new Q3VBox(FindParent() , "vbox_page" );
page->setSpacing( KDialog::spacingHintSmall() );
addPageWidget( page, items, header, pixmap );
@@ -323,5 +331,5 @@ QVBox *KJanusWidget::addVBoxPage( const QStringList &items,
}
-QVBox *KJanusWidget::addVBoxPage( const QString &itemName,
+Q3VBox *KJanusWidget::addVBoxPage( const QString &itemName,
const QString &header,
const QPixmap &pixmap )
@@ -332,5 +340,5 @@ QVBox *KJanusWidget::addVBoxPage( const QString &itemName,
}
-QHBox *KJanusWidget::addHBoxPage( const QStringList &items,
+Q3HBox *KJanusWidget::addHBoxPage( const QStringList &items,
const QString &header,
const QPixmap &pixmap )
@@ -341,5 +349,5 @@ QHBox *KJanusWidget::addHBoxPage( const QStringList &items,
}
- QHBox *page = new QHBox(FindParent(), "hbox_page");
+ Q3HBox *page = new Q3HBox(FindParent(), "hbox_page");
page->setSpacing( KDialog::spacingHint() );
addPageWidget( page, items, header, pixmap );
@@ -348,5 +356,5 @@ QHBox *KJanusWidget::addHBoxPage( const QStringList &items,
}
-QHBox *KJanusWidget::addHBoxPage( const QString &itemName,
+Q3HBox *KJanusWidget::addHBoxPage( const QString &itemName,
const QString &header,
const QPixmap &pixmap )
@@ -357,5 +365,5 @@ QHBox *KJanusWidget::addHBoxPage( const QString &itemName,
}
-QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir,
+Q3Grid *KJanusWidget::addGridPage( int n, Qt::Orientation dir,
const QStringList &items,
const QString &header,
@@ -368,5 +376,5 @@ QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir,
}
- QGrid *page = new QGrid( n, dir, FindParent(), "page" );
+ Q3Grid *page = new Q3Grid( n, dir, FindParent(), "page" );
page->setSpacing( KDialog::spacingHint() );
addPageWidget( page, items, header, pixmap );
@@ -376,5 +384,5 @@ QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir,
-QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir,
+Q3Grid *KJanusWidget::addGridPage( int n, Qt::Orientation dir,
const QString &itemName,
const QString &header,
@@ -386,8 +394,8 @@ QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir,
}
-void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, QFrame *page)
+void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, Q3Frame *page)
{
bool isTop = true;
- QListViewItem *curTop = 0, *child, *last, *newChild;
+ Q3ListViewItem *curTop = 0, *child, *last, *newChild;
unsigned int index = 1;
QStringList curPath;
@@ -413,7 +421,7 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p
// new child.
if (isTop)
- newChild = new QListViewItem(mTreeList, name);
+ newChild = new Q3ListViewItem(mTreeList, name);
else
- newChild = new QListViewItem(curTop, name);
+ newChild = new Q3ListViewItem(curTop, name);
}
@@ -432,7 +440,7 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p
// the node had some children, but we didn't find the given name
if (isTop)
- newChild = new QListViewItem(mTreeList, last, name);
+ newChild = new Q3ListViewItem(mTreeList, last, name);
else
- newChild = new QListViewItem(curTop, last, name);
+ newChild = new Q3ListViewItem(curTop, last, name);
}
@@ -460,5 +468,5 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p
}
-void KJanusWidget::addPageWidget( QFrame *page, const QStringList &items,
+void KJanusWidget::addPageWidget( Q3Frame *page, const QStringList &items,
const QString &header,const QPixmap &pixmap )
{
@@ -551,13 +559,13 @@ bool KJanusWidget::setSwallowedWidget( QWidget *widget )
delete mSwallowPage->layout();
}
- QGridLayout *gbox = new QGridLayout( mSwallowPage, 1, 1, 0 );
+ Q3GridLayout *gbox = new Q3GridLayout( mSwallowPage, 1, 1, 0 );
//
// Hide old children
//
- QObjectList *l = (QObjectList*)mSwallowPage->children(); // silence please
- for( uint i=0; i < l->count(); i++ )
+ QObjectList l = mSwallowPage->children(); // silence please
+ for( uint i=0; i < l.count(); i++ )
{
- QObject *o = l->at(i);
+ QObject *o = l.at(i);
if( o->isWidgetType() )
{
@@ -598,5 +606,5 @@ bool KJanusWidget::slotShowPage()
if( mFace == TreeList )
{
- QListViewItem *node = mTreeList->selectedItem();
+ Q3ListViewItem *node = mTreeList->selectedItem();
if( node == 0 ) { return( false ); }
@@ -607,5 +615,5 @@ bool KJanusWidget::slotShowPage()
else if( mFace == IconList )
{
- QListBoxItem *node = mIconList->item( mIconList->currentItem() );
+ Q3ListBoxItem *node = mIconList->item( mIconList->currentItem() );
if( node == 0 ) { return( false ); }
QWidget *stackItem = mIconListToPageStack[node];
@@ -647,7 +655,7 @@ bool KJanusWidget::showPage( QWidget *w )
if( mFace == TreeList )
{
- QMap<QListViewItem *, QWidget *>::Iterator it;
+ QMap<Q3ListViewItem *, QWidget *>::Iterator it;
for (it = mTreeListToPageStack.begin(); it != mTreeListToPageStack.end(); ++it){
- QListViewItem *key = it.key();
+ Q3ListViewItem *key = it.key();
QWidget *val = it.data();
if (val == w) {
@@ -659,7 +667,7 @@ bool KJanusWidget::showPage( QWidget *w )
else
{
- QMap<QListBoxItem *, QWidget *>::Iterator it;
+ QMap<Q3ListBoxItem *, QWidget *>::Iterator it;
for (it = mIconListToPageStack.begin(); it != mIconListToPageStack.end(); ++it){
- QListBoxItem *key = it.key();
+ Q3ListBoxItem *key = it.key();
QWidget *val = it.data();
if (val == w) {
@@ -687,5 +695,5 @@ int KJanusWidget::activePageIndex() const
{
if( mFace == TreeList) {
- QListViewItem *node = mTreeList->selectedItem();
+ Q3ListViewItem *node = mTreeList->selectedItem();
if( node == 0 ) { return -1; }
QWidget *stackItem = mTreeListToPageStack[node];
@@ -693,5 +701,5 @@ int KJanusWidget::activePageIndex() const
}
else if (mFace == IconList) {
- QListBoxItem *node = mIconList->item( mIconList->currentItem() );
+ Q3ListBoxItem *node = mIconList->item( mIconList->currentItem() );
if( node == 0 ) { return( false ); }
QWidget *stackItem = mIconListToPageStack[node];
@@ -762,5 +770,5 @@ void KJanusWidget::slotFontChanged()
// makes the treelist behave like the list of kcontrol
-void KJanusWidget::slotItemClicked(QListViewItem *it)
+void KJanusWidget::slotItemClicked(Q3ListViewItem *it)
{
if(it && (it->childCount()>0))
@@ -896,9 +904,9 @@ void KJanusWidget::unfoldTreeList( bool persist )
{
if( persist )
- connect( mTreeList, SIGNAL( collapsed( QListViewItem * ) ), this, SLOT( slotReopen( QListViewItem * ) ) );
+ connect( mTreeList, SIGNAL( collapsed( Q3ListViewItem * ) ), this, SLOT( slotReopen( Q3ListViewItem * ) ) );
else
- disconnect( mTreeList, SIGNAL( collapsed( QListViewItem * ) ), this, SLOT( slotReopen( QListViewItem * ) ) );
+ disconnect( mTreeList, SIGNAL( collapsed( Q3ListViewItem * ) ), this, SLOT( slotReopen( Q3ListViewItem * ) ) );
- for( QListViewItem * item = mTreeList->firstChild(); item; item = item->itemBelow() )
+ for( Q3ListViewItem * item = mTreeList->firstChild(); item; item = item->itemBelow() )
item->setOpen( true );
}
@@ -954,5 +962,5 @@ bool KJanusWidget::eventFilter( QObject *o, QEvent *e )
KJanusWidget::IconListBox::IconListBox( QWidget *parent, const char *name,
- WFlags f )
+ Qt::WFlags f )
:KListBox( parent, name, f ), mShowAll(false), mHeightValid(false),
mWidthValid(false)
@@ -966,5 +974,5 @@ void KJanusWidget::IconListBox::updateMinimumHeight()
{
int h = frameWidth()*2;
- for( QListBoxItem *i = item(0); i != 0; i = i->next() )
+ for( Q3ListBoxItem *i = item(0); i != 0; i = i->next() )
{
h += i->height( this );
@@ -981,5 +989,5 @@ void KJanusWidget::IconListBox::updateWidth()
{
int maxWidth = 10;
- for( QListBoxItem *i = item(0); i != 0; i = i->next() )
+ for( Q3ListBoxItem *i = item(0); i != 0; i = i->next() )
{
int w = ((IconListItem *)i)->width(this);
@@ -987,5 +995,5 @@ void KJanusWidget::IconListBox::updateWidth()
}
- for( QListBoxItem *i = item(0); i != 0; i = i->next() )
+ for( Q3ListBoxItem *i = item(0); i != 0; i = i->next() )
{
((IconListItem *)i)->expandMinimumWidth( maxWidth );
@@ -1023,7 +1031,7 @@ void KJanusWidget::IconListBox::setShowAll( bool showAll )
-KJanusWidget::IconListItem::IconListItem( QListBox *listbox, const QPixmap &pixmap,
+KJanusWidget::IconListItem::IconListItem( Q3ListBox *listbox, const QPixmap &pixmap,
const QString &text )
- : QListBoxItem( listbox )
+ : Q3ListBoxItem( listbox )
{
mPixmap = pixmap;
@@ -1084,5 +1092,5 @@ void KJanusWidget::IconListItem::paint( QPainter *painter )
}
-int KJanusWidget::IconListItem::height( const QListBox *lb ) const
+int KJanusWidget::IconListItem::height( const Q3ListBox *lb ) const
{
if( text().isEmpty() == true )
@@ -1097,5 +1105,5 @@ int KJanusWidget::IconListItem::height( const QListBox *lb ) const
-int KJanusWidget::IconListItem::width( const QListBox *lb ) const
+int KJanusWidget::IconListItem::width( const Q3ListBox *lb ) const
{
int wt = lb->fontMetrics().boundingRect(text()).width()+10;
@@ -1123,5 +1131,5 @@ void KJanusWidget::removePage( QWidget *page )
if ( mFace == TreeList )
{
- QMap<QListViewItem*, QWidget *>::Iterator i;
+ QMap<Q3ListViewItem*, QWidget *>::Iterator i;
for( i = mTreeListToPageStack.begin(); i != mTreeListToPageStack.end(); ++i )
if (i.data()==page)
@@ -1138,5 +1146,5 @@ void KJanusWidget::removePage( QWidget *page )
else if ( mFace == IconList )
{
- QMap<QListBoxItem*, QWidget *>::Iterator i;
+ QMap<Q3ListBoxItem*, QWidget *>::Iterator i;
for( i = mIconListToPageStack.begin(); i != mIconListToPageStack.end(); ++i )
if (i.data()==page)
diff --git a/microkde/kdeui/kjanuswidget.h b/microkde/kdeui/kjanuswidget.h
index 6d3f23d..72465ea 100644
--- a/microkde/kdeui/kjanuswidget.h
+++ b/microkde/kdeui/kjanuswidget.h
@@ -21,8 +21,14 @@
#define _KJANUS_WIDGET_H_
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <qwidget.h>
#include <qmap.h>
-#include <qgrid.h>
+#include <q3grid.h>
+//Added by qt3to4:
+#include <QShowEvent>
+#include <Q3Frame>
+#include <QPixmap>
+#include <QLabel>
+#include <QEvent>
#include <klistbox.h>
@@ -39,10 +45,10 @@
class KSeparator;
class KListView;
-class QWidgetStack;
+class Q3WidgetStack;
class QLabel;
class QTabWidget;
-class QListViewItem;
-class QVBox;
-class QHBox;
+class Q3ListViewItem;
+class Q3VBox;
+class Q3HBox;
/**
@@ -103,5 +109,5 @@ class KJanusWidget : public QWidget
{
public:
- IconListBox( QWidget *parent=0, const char *name=0, WFlags f=0 );
+ IconListBox( QWidget *parent=0, const char *name=0, Qt::WFlags f=0 );
void updateMinimumHeight();
void updateWidth();
@@ -194,5 +200,5 @@ class KJanusWidget : public QWidget
* @return The widget or 0 if the face in not Plain.
*/
- virtual QFrame *plainPage();
+ virtual Q3Frame *plainPage();
/**
@@ -215,5 +221,5 @@ class KJanusWidget : public QWidget
* Tabbed.
*/
- virtual QFrame *addPage(const QString &item,const QString &header=QString::null,
+ virtual Q3Frame *addPage(const QString &item,const QString &header=QString::null,
const QPixmap &pixmap=QPixmap() );
@@ -232,5 +238,5 @@ class KJanusWidget : public QWidget
* removed (you can re-add a page with the same name later.
**/
- virtual QFrame *addPage(const QStringList &items, const QString &header=QString::null,
+ virtual Q3Frame *addPage(const QStringList &items, const QString &header=QString::null,
const QPixmap &pixmap=QPixmap() );
@@ -254,5 +260,5 @@ class KJanusWidget : public QWidget
* @return The empty page or 0 if the face is not TreeList, IconList or
* Tabbed. */
- virtual QVBox *addVBoxPage( const QString &item,
+ virtual Q3VBox *addVBoxPage( const QString &item,
const QString &header=QString::null,
const QPixmap &pixmap=QPixmap() );
@@ -270,5 +276,5 @@ class KJanusWidget : public QWidget
* removed (you can re-add a page with the same name later.
**/
- virtual QVBox *addVBoxPage( const QStringList &items,
+ virtual Q3VBox *addVBoxPage( const QStringList &items,
const QString &header=QString::null,
const QPixmap &pixmap=QPixmap() );
@@ -294,5 +300,5 @@ class KJanusWidget : public QWidget
* Tabbed.
*/
- virtual QHBox *addHBoxPage( const QString &itemName,
+ virtual Q3HBox *addHBoxPage( const QString &itemName,
const QString &header=QString::null,
const QPixmap &pixmap=QPixmap() );
@@ -310,5 +316,5 @@ class KJanusWidget : public QWidget
* removed (you can re-add a page with the same name later.
**/
- virtual QHBox *addHBoxPage( const QStringList &items,
+ virtual Q3HBox *addHBoxPage( const QStringList &items,
const QString &header=QString::null,
const QPixmap &pixmap=QPixmap() );
@@ -338,5 +344,5 @@ class KJanusWidget : public QWidget
*/
//US changed Orientation into Direction for compatibility
- virtual QGrid *addGridPage( int n, QGrid::Direction dir,
+ virtual Q3Grid *addGridPage( int n, Qt::Orientation dir,
const QString &itemName,
const QString &header=QString::null,
@@ -356,5 +362,5 @@ class KJanusWidget : public QWidget
**/
//US changed Orientation into Direction for compatibility
- virtual QGrid *addGridPage( int n, QGrid::Direction dir,
+ virtual Q3Grid *addGridPage( int n, Qt::Orientation dir,
const QStringList &items,
const QString &header=QString::null,
@@ -518,13 +524,13 @@ class KJanusWidget : public QWidget
bool slotShowPage();
//US not yet implemented void slotFontChanged();
- void slotItemClicked(QListViewItem *it);
+ void slotItemClicked(Q3ListViewItem *it);
void pageGone( QObject *obj); // signal from the added page's "destroyed" signal
- void slotReopen(QListViewItem *item);
+ void slotReopen(Q3ListViewItem *item);
protected:
bool showPage( QWidget *w );
- void addPageWidget( QFrame *page, const QStringList &items,
+ void addPageWidget( Q3Frame *page, const QStringList &items,
const QString &header, const QPixmap &pixmap );
- void InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, QFrame *page);
+ void InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, Q3Frame *page);
QWidget *FindParent();
@@ -533,5 +539,5 @@ class KJanusWidget : public QWidget
// Obsolete members. Remove in KDE 4.
- QPtrList<QWidget> *mPageList;
+ Q3PtrList<QWidget> *mPageList;
QStringList *mTitleList;
@@ -539,8 +545,8 @@ class KJanusWidget : public QWidget
KListView *mTreeList;
IconListBox *mIconList;
- QWidgetStack *mPageStack;
+ Q3WidgetStack *mPageStack;
QLabel *mTitleLabel;
QTabWidget *mTabControl;
- QFrame *mPlainPage;
+ Q3Frame *mPlainPage;
QWidget *mSwallowPage;
QWidget *mActivePageWidget;
@@ -548,6 +554,6 @@ class KJanusWidget : public QWidget
//US QSplitter::ResizeMode mTreeListResizeMode;
bool mShowIconsInTreeList;
- QMap<QListViewItem *, QWidget *> mTreeListToPageStack;
- QMap<QListBoxItem *, QWidget *> mIconListToPageStack;
+ QMap<Q3ListViewItem *, QWidget *> mTreeListToPageStack;
+ QMap<Q3ListBoxItem *, QWidget *> mIconListToPageStack;
QMap<QString, QPixmap> mFolderIconMap;
QMap<QString, QStringList> mChildrenNames;
diff --git a/microkde/kdeui/klistbox.cpp b/microkde/kdeui/klistbox.cpp
index c65b892..71020b3 100644
--- a/microkde/kdeui/klistbox.cpp
+++ b/microkde/kdeui/klistbox.cpp
@@ -17,4 +17,9 @@
*/
#include <qtimer.h>
+//Added by qt3to4:
+#include <QEvent>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <QFocusEvent>
#include <kglobalsettings.h>
@@ -27,4 +32,5 @@
#ifdef Q_WS_X11
+#include <QX11Info>
#include <X11/Xlib.h>
#endif
@@ -32,15 +38,15 @@
#define Q_WS_QWS
#endif
-KListBox::KListBox( QWidget *parent, const char *name, WFlags f )
- : QListBox( parent, name, f )
+KListBox::KListBox( QWidget *parent, const char *name, Qt::WFlags f )
+ : Q3ListBox( parent, name, f )
{
connect( this, SIGNAL( onViewport() ),
this, SLOT( slotOnViewport() ) );
- connect( this, SIGNAL( onItem( QListBoxItem * ) ),
- this, SLOT( slotOnItem( QListBoxItem * ) ) );
+ connect( this, SIGNAL( onItem( Q3ListBoxItem * ) ),
+ this, SLOT( slotOnItem( Q3ListBoxItem * ) ) );
- connect( this, SIGNAL( mouseButtonClicked( int, QListBoxItem *,
+ connect( this, SIGNAL( mouseButtonClicked( int, Q3ListBoxItem *,
const QPoint & ) ),
- this, SLOT( slotMouseButtonClicked( int, QListBoxItem *,
+ this, SLOT( slotMouseButtonClicked( int, Q3ListBoxItem *,
const QPoint & ) ) );
/*US
@@ -61,5 +67,5 @@ KListBox::KListBox( QWidget *parent, const char *name, WFlags f )
}
-void KListBox::slotOnItem( QListBoxItem *item )
+void KListBox::slotOnItem( Q3ListBoxItem *item )
{
/*US
@@ -140,9 +146,9 @@ void KListBox::slotAutoSelect()
int root_x, root_y, win_x, win_y;
uint keybstate;
- XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child,
+ XQueryPointer( x11Info().display(), x11Info().appRootWindow(), &root, &child,
&root_x, &root_y, &win_x, &win_y, &keybstate );
#endif
- QListBoxItem* previousItem = item( currentItem() );
+ Q3ListBoxItem* previousItem = item( currentItem() );
setCurrentItem( m_pCurrentItem );
@@ -168,5 +174,5 @@ void KListBox::slotAutoSelect()
bool down = index( previousItem ) < index( m_pCurrentItem );
- QListBoxItem* it = down ? previousItem : m_pCurrentItem;
+ Q3ListBoxItem* it = down ? previousItem : m_pCurrentItem;
for (;it ; it = it->next() ) {
if ( down && it == m_pCurrentItem ) {
@@ -187,5 +193,5 @@ void KListBox::slotAutoSelect()
emit selectionChanged();
- if( selectionMode() == QListBox::Single )
+ if( selectionMode() == Q3ListBox::Single )
emit selectionChanged( m_pCurrentItem );
}
@@ -214,5 +220,5 @@ void KListBox::slotAutoSelect()
}
-void KListBox::emitExecute( QListBoxItem *item, const QPoint &pos )
+void KListBox::emitExecute( Q3ListBoxItem *item, const QPoint &pos )
{
#ifdef Q_WS_X11 //FIXME
@@ -221,5 +227,5 @@ void KListBox::emitExecute( QListBoxItem *item, const QPoint &pos )
int root_x, root_y, win_x, win_y;
uint keybstate;
- XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child,
+ XQueryPointer( x11Info().display(), x11Info().appRootWindow(), &root, &child,
&root_x, &root_y, &win_x, &win_y, &keybstate );
#endif
@@ -247,9 +253,9 @@ void KListBox::emitExecute( QListBoxItem *item, const QPoint &pos )
void KListBox::keyPressEvent(QKeyEvent *e)
{
- if( e->key() == Key_Escape )
+ if( e->key() == Qt::Key_Escape )
{
e->ignore();
}
- else if( e->key() == Key_F1 )
+ else if( e->key() == Qt::Key_F1 )
{
e->ignore();
@@ -257,5 +263,5 @@ void KListBox::keyPressEvent(QKeyEvent *e)
else
{
- QListBox::keyPressEvent(e);
+ Q3ListBox::keyPressEvent(e);
}
}
@@ -265,5 +271,5 @@ void KListBox::focusOutEvent( QFocusEvent *fe )
m_pAutoSelect->stop();
- QListBox::focusOutEvent( fe );
+ Q3ListBox::focusOutEvent( fe );
}
@@ -272,10 +278,10 @@ void KListBox::leaveEvent( QEvent *e )
m_pAutoSelect->stop();
- QListBox::leaveEvent( e );
+ Q3ListBox::leaveEvent( e );
}
void KListBox::contentsMousePressEvent( QMouseEvent *e )
{
- if( (selectionMode() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) {
+ if( (selectionMode() == Extended) && (e->state() & Qt::ShiftButton) && !(e->state() & Qt::ControlButton) ) {
bool block = signalsBlocked();
blockSignals( true );
@@ -286,24 +292,24 @@ void KListBox::contentsMousePressEvent( QMouseEvent *e )
}
- QListBox::contentsMousePressEvent( e );
+ Q3ListBox::contentsMousePressEvent( e );
}
void KListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e )
{
- QListBox::contentsMouseDoubleClickEvent( e );
+ Q3ListBox::contentsMouseDoubleClickEvent( e );
- QListBoxItem* item = itemAt( e->pos() );
+ Q3ListBoxItem* item = itemAt( e->pos() );
if( item ) {
emit doubleClicked( item, e->globalPos() );
- if( (e->button() == LeftButton) && !m_bUseSingle )
+ if( (e->button() == Qt::LeftButton) && !m_bUseSingle )
emitExecute( item, e->globalPos() );
}
}
-void KListBox::slotMouseButtonClicked( int btn, QListBoxItem *item, const QPoint &pos )
+void KListBox::slotMouseButtonClicked( int btn, Q3ListBoxItem *item, const QPoint &pos )
{
- if( (btn == LeftButton) && item )
+ if( (btn == Qt::LeftButton) && item )
emitExecute( item, pos );
}
diff --git a/microkde/kdeui/klistbox.h b/microkde/kdeui/klistbox.h
index 8023780..5ec514b 100644
--- a/microkde/kdeui/klistbox.h
+++ b/microkde/kdeui/klistbox.h
@@ -19,5 +19,10 @@
#define KLISTBOX_H
-#include <qlistbox.h>
+#include <q3listbox.h>
+//Added by qt3to4:
+#include <QMouseEvent>
+#include <QFocusEvent>
+#include <QKeyEvent>
+#include <QEvent>
/**
@@ -36,10 +41,10 @@
* @short A variant of @ref QListBox that honors KDE's system-wide settings.
**/
-class KListBox : public QListBox
+class KListBox : public Q3ListBox
{
Q_OBJECT
public:
- KListBox( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ KListBox( QWidget *parent = 0, const char *name = 0, Qt::WFlags f = 0 );
signals:
@@ -55,5 +60,5 @@ signals:
* connected to this signal.
*/
- void executed( QListBoxItem *item );
+ void executed( Q3ListBoxItem *item );
/**
@@ -68,5 +73,5 @@ signals:
* connected to this signal.
*/
- void executed( QListBoxItem *item, const QPoint &pos );
+ void executed( Q3ListBoxItem *item, const QPoint &pos );
/**
@@ -84,8 +89,8 @@ signals:
* to use @ref executed() instead.
*/
- void doubleClicked( QListBoxItem *item, const QPoint &pos );
+ void doubleClicked( Q3ListBoxItem *item, const QPoint &pos );
protected slots:
- void slotOnItem( QListBoxItem *item );
+ void slotOnItem( Q3ListBoxItem *item );
void slotOnViewport();
@@ -98,5 +103,5 @@ protected slots:
protected:
- void emitExecute( QListBoxItem *item, const QPoint &pos );
+ void emitExecute( Q3ListBoxItem *item, const QPoint &pos );
/**
@@ -124,5 +129,5 @@ protected:
//US bool m_bChangeCursorOverItem;
- QListBoxItem* m_pCurrentItem;
+ Q3ListBoxItem* m_pCurrentItem;
QTimer* m_pAutoSelect;
@@ -130,5 +135,5 @@ protected:
private slots:
- void slotMouseButtonClicked( int btn, QListBoxItem *item, const QPoint &pos );
+ void slotMouseButtonClicked( int btn, Q3ListBoxItem *item, const QPoint &pos );
protected:
diff --git a/microkde/kdeui/klistview.cpp b/microkde/kdeui/klistview.cpp
index 60f3084..0e98160 100644
--- a/microkde/kdeui/klistview.cpp
+++ b/microkde/kdeui/klistview.cpp
@@ -19,11 +19,25 @@
*/
-#include <qdragobject.h>
+#include <q3dragobject.h>
#include <qtimer.h>
-#include <qheader.h>
+#include <q3header.h>
#include <qcursor.h>
#include <qtooltip.h>
#include <qstyle.h>
#include <qpainter.h>
+//Added by qt3to4:
+#include <QDragLeaveEvent>
+#include <QKeyEvent>
+#include <Q3ValueList>
+#include <Q3PtrList>
+#include <QPixmap>
+#include <QDragEnterEvent>
+#include <QDragMoveEvent>
+#include <QDropEvent>
+#include <QResizeEvent>
+#include <QFocusEvent>
+#include <QMouseEvent>
+#include <QEvent>
+#include <QPaintEvent>
#include <kglobalsettings.h>
@@ -39,5 +53,5 @@
#ifndef _WIN32_
#define private public
-#include <qlistview.h>
+#include <q3listview.h>
#undef private
#endif
@@ -47,7 +61,8 @@
#include <qpe/qpeapplication.h>
#endif
+#include <Q3Action>
// /*US
-class KListView::Tooltip : public QToolTip
+class KListView::Tooltip /* TODO:hacker:TODO: : public QToolTip */
{
public:
@@ -68,5 +83,5 @@ private:
KListView::Tooltip::Tooltip (KListView* parent, QToolTipGroup* group)
- : QToolTip (parent, group),
+ : /* XXX:hacker:XXX: QToolTip (parent, group), */
mParent (parent)
{
@@ -124,5 +139,5 @@ public:
}
- QListViewItem* pCurrentItem;
+ Q3ListViewItem* pCurrentItem;
QTimer autoSelect;
@@ -130,5 +145,5 @@ public:
QTimer dragExpand;
- QListViewItem* dragOverItem;
+ Q3ListViewItem* dragOverItem;
QPoint dragOverPoint;
@@ -137,5 +152,5 @@ public:
//US KListViewLineEdit *editor;
- QValueList<int> renameable;
+ Q3ValueList<int> renameable;
bool cursorInExecuteArea:1;
@@ -171,6 +186,6 @@ public:
int mDropVisualizerWidth;
QRect mOldDropHighlighter;
- QListViewItem *afterItemDrop;
- QListViewItem *parentItemDrop;
+ Q3ListViewItem *afterItemDrop;
+ Q3ListViewItem *parentItemDrop;
QColor alternateBackground;
@@ -227,5 +242,5 @@ void KListViewLineEdit::load(QListViewItem *i, int c)
*/
-static int nextCol (KListView *pl, QListViewItem *pi, int start, int dir)
+static int nextCol (KListView *pl, Q3ListViewItem *pi, int start, int dir)
{
if (pi)
@@ -240,7 +255,7 @@ static int nextCol (KListView *pl, QListViewItem *pi, int start, int dir)
}
-static QListViewItem *prevItem (QListViewItem *pi)
+static Q3ListViewItem *prevItem (Q3ListViewItem *pi)
{
- QListViewItem *pa = pi->itemAbove();
+ Q3ListViewItem *pa = pi->itemAbove();
/* Does what the QListViewItem::previousSibling()
@@ -253,5 +268,5 @@ static QListViewItem *prevItem (QListViewItem *pi)
}
-static QListViewItem *lastQChild (QListViewItem *pi)
+static Q3ListViewItem *lastQChild (Q3ListViewItem *pi)
{
if (pi)
@@ -261,5 +276,5 @@ static QListViewItem *lastQChild (QListViewItem *pi)
* item.
*/
- for (QListViewItem *pt = pi->nextSibling(); pt; pt = pt->nextSibling())
+ for (Q3ListViewItem *pt = pi->nextSibling(); pt; pt = pt->nextSibling())
pi = pt;
}
@@ -329,8 +344,8 @@ bool KListViewLineEdit::event (QEvent *pe)
if ((k->key() == Qt::Key_Backtab || k->key() == Qt::Key_Tab) &&
p->tabOrderedRenaming() && p->itemsRenameable() &&
- !(k->state() & ControlButton || k->state() & AltButton))
+ !(k->state() & Qt::ControlButton || k->state() & AltButton))
{
selectNextCell(item, col,
- (k->key() == Key_Tab && !(k->state() & ShiftButton)));
+ (k->key() == Key_Tab && !(k->state() & Qt::ShiftButton)));
return true;
}
@@ -407,5 +422,5 @@ void KListViewLineEdit::slotSelectionChanged()
KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse )
- : QListView( parent, name ),
+ : Q3ListView( parent, name ),
d (new KListViewPrivate (this))
{
@@ -418,6 +433,6 @@ KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse
connect( this, SIGNAL( onViewport() ),
this, SLOT( slotOnViewport() ) );
- connect( this, SIGNAL( onItem( QListViewItem * ) ),
- this, SLOT( slotOnItem( QListViewItem * ) ) );
+ connect( this, SIGNAL( onItem( Q3ListViewItem * ) ),
+ this, SLOT( slotOnItem( Q3ListViewItem * ) ) );
connect (this, SIGNAL(contentsMoving(int,int)),
@@ -446,15 +461,15 @@ KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse
if (d->showContextMenusOnPress)
{
- connect (this, SIGNAL (rightButtonPressed (QListViewItem*, const QPoint&, int)),
- this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
+ connect (this, SIGNAL (rightButtonPressed (Q3ListViewItem*, const QPoint&, int)),
+ this, SLOT (emitContextMenu (Q3ListViewItem*, const QPoint&, int)));
}
else
{
- connect (this, SIGNAL (rightButtonClicked (QListViewItem*, const QPoint&, int)),
- this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
+ connect (this, SIGNAL (rightButtonClicked (Q3ListViewItem*, const QPoint&, int)),
+ this, SLOT (emitContextMenu (Q3ListViewItem*, const QPoint&, int)));
}
- connect (this, SIGNAL (menuShortCutPressed (KListView*, QListViewItem*)),
- this, SLOT (emitContextMenu (KListView*, QListViewItem*)));
+ connect (this, SIGNAL (menuShortCutPressed (KListView*, Q3ListViewItem*)),
+ this, SLOT (emitContextMenu (KListView*, Q3ListViewItem*)));
@@ -481,5 +496,5 @@ QSize KListView::sizeHint() const
//qDebug("KListView::QSize sizeHint() ");
#ifdef DESKTOP_VERSION
- return QListView::sizeHint();
+ return Q3ListView::sizeHint();
#else
return QSize ( 40, 40 );
@@ -504,5 +519,5 @@ bool KListView::isExecuteArea( int x )
}
-void KListView::slotOnItem( QListViewItem *item )
+void KListView::slotOnItem( Q3ListViewItem *item )
{
QPoint vp = viewport()->mapFromGlobal( QCursor::pos() );
@@ -535,10 +550,10 @@ void KListView::slotSettingsChanged(int category)
// qDebug("KListView::slotSettingsChanged: single%i", d->bUseSingle);
- disconnect(this, SIGNAL (mouseButtonClicked (int, QListViewItem*, const QPoint &, int)),
- this, SLOT (slotMouseButtonClicked (int, QListViewItem*, const QPoint &, int)));
+ disconnect(this, SIGNAL (mouseButtonClicked (int, Q3ListViewItem*, const QPoint &, int)),
+ this, SLOT (slotMouseButtonClicked (int, Q3ListViewItem*, const QPoint &, int)));
if( d->bUseSingle )
- connect (this, SIGNAL (mouseButtonClicked (int, QListViewItem*, const QPoint &, int)),
- this, SLOT (slotMouseButtonClicked( int, QListViewItem*, const QPoint &, int)));
+ connect (this, SIGNAL (mouseButtonClicked (int, Q3ListViewItem*, const QPoint &, int)),
+ this, SLOT (slotMouseButtonClicked( int, Q3ListViewItem*, const QPoint &, int)));
//US d->bChangeCursorOverItem = KGlobalSettings::changeCursorOverIcon();
@@ -612,5 +627,5 @@ void KListView::slotAutoSelect()
setFocus();
- QListViewItem* previousItem = currentItem();
+ Q3ListViewItem* previousItem = currentItem();
setCurrentItem( d->pCurrentItem );
@@ -633,5 +648,5 @@ void KListView::slotAutoSelect()
bool down = previousItem->itemPos() < d->pCurrentItem->itemPos();
- QListViewItemIterator lit( down ? previousItem : d->pCurrentItem );
+ Q3ListViewItemIterator lit( down ? previousItem : d->pCurrentItem );
for ( ; lit.current(); ++lit ) {
if ( down && lit.current() == d->pCurrentItem ) {
@@ -652,5 +667,5 @@ void KListView::slotAutoSelect()
emit selectionChanged();
- if( selectionMode() == QListView::Single )
+ if( selectionMode() == Q3ListView::Single )
emit selectionChanged( d->pCurrentItem );
}
@@ -685,5 +700,5 @@ void KListView::slotHeaderChanged()
}
-void KListView::emitExecute( int buttonstate, QListViewItem *item, const QPoint &pos, int c)
+void KListView::emitExecute( int buttonstate, Q3ListViewItem *item, const QPoint &pos, int c)
{
// qDebug("KListView::emitExecute buttonstate=%i", buttonstate);
@@ -702,5 +717,5 @@ void KListView::emitExecute( int buttonstate, QListViewItem *item, const QPoint
//Dont emit executed if in SC mode and Shift or Ctrl are pressed
- if( !( (buttonstate==ShiftButton) || (buttonstate==ControlButton) )) {
+ if( !( (buttonstate==Qt::ShiftButton) || (buttonstate==Qt::ControlButton) )) {
// if( !( ((keybstate & ShiftMask) || (keybstate & ControlMask)) ) ) {
@@ -715,5 +730,5 @@ void KListView::focusInEvent( QFocusEvent *fe )
{
// kdDebug()<<"KListView::focusInEvent()"<<endl;
- QListView::focusInEvent( fe );
+ Q3ListView::focusInEvent( fe );
if ((d->selectedBySimpleMove)
&& (d->selectionMode == FileManager)
@@ -748,5 +763,5 @@ void KListView::focusOutEvent( QFocusEvent *fe )
};
- QListView::focusOutEvent( fe );
+ Q3ListView::focusOutEvent( fe );
}
@@ -755,5 +770,5 @@ void KListView::leaveEvent( QEvent *e )
d->autoSelect.stop();
- QListView::leaveEvent( e );
+ Q3ListView::leaveEvent( e );
}
@@ -766,5 +781,5 @@ bool KListView::event( QEvent *e )
}
- return QListView::event(e);
+ return Q3ListView::event(e);
}
@@ -772,5 +787,5 @@ void KListView::contentsMousePressEvent( QMouseEvent *e )
{
//qDebug("KListView::contentsMousePressEvent");
- if( (selectionModeExt() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) )
+ if( (selectionModeExt() == Extended) && (e->state() & Qt::ShiftButton) && !(e->state() & Qt::ControlButton) )
{
bool block = signalsBlocked();
@@ -794,5 +809,5 @@ void KListView::contentsMousePressEvent( QMouseEvent *e )
QPoint p( contentsToViewport( e->pos() ) );
- QListViewItem *at = itemAt (p);
+ Q3ListViewItem *at = itemAt (p);
// true if the root decoration of the item "at" was clicked (i.e. the +/- sign)
@@ -802,5 +817,5 @@ void KListView::contentsMousePressEvent( QMouseEvent *e )
&& ( p.x() >= header()->cellPos( header()->mapToActual( 0 ) ) );
- if (e->button() == LeftButton && !rootDecoClicked)
+ if (e->button() == Qt::LeftButton && !rootDecoClicked)
{
//Start a drag
@@ -814,5 +829,5 @@ void KListView::contentsMousePressEvent( QMouseEvent *e )
}
- QListView::contentsMousePressEvent( e );
+ Q3ListView::contentsMousePressEvent( e );
}
@@ -820,10 +835,10 @@ void KListView::contentsMouseMoveEvent( QMouseEvent *e )
{
if (!dragEnabled() || d->startDragPos.isNull() || !d->validDrag) {
- QListView::contentsMouseMoveEvent (e);
+ Q3ListView::contentsMouseMoveEvent (e);
return;
}
QPoint vp = contentsToViewport(e->pos());
- QListViewItem *item = itemAt( vp );
+ Q3ListViewItem *item = itemAt( vp );
//do we process cursor changes at all?
@@ -854,5 +869,5 @@ void KListView::contentsMouseMoveEvent( QMouseEvent *e )
//(d->startDragPos - e->pos()).manhattanLength() > QApplication::startDragDistance())
{
- QListView::contentsMouseReleaseEvent( 0 );
+ Q3ListView::contentsMouseReleaseEvent( 0 );
startDrag();
d->startDragPos = QPoint();
@@ -863,5 +878,5 @@ void KListView::contentsMouseMoveEvent( QMouseEvent *e )
void KListView::contentsMouseReleaseEvent( QMouseEvent *e )
{
- if (e->button() == LeftButton)
+ if (e->button() == Qt::LeftButton)
{
// If the row was already selected, maybe we want to start an in-place editing
@@ -869,5 +884,5 @@ void KListView::contentsMouseReleaseEvent( QMouseEvent *e )
{
QPoint p( contentsToViewport( e->pos() ) );
- QListViewItem *at = itemAt (p);
+ Q3ListViewItem *at = itemAt (p);
if ( at )
{
@@ -891,5 +906,5 @@ void KListView::contentsMouseReleaseEvent( QMouseEvent *e )
d->startDragPos = QPoint();
}
- QListView::contentsMouseReleaseEvent( e );
+ Q3ListView::contentsMouseReleaseEvent( e );
}
@@ -902,6 +917,6 @@ void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e )
QPoint vp = contentsToViewport(e->pos());
- QListViewItem *item = itemAt( vp );
- emit QListView::doubleClicked( item ); // we do it now
+ Q3ListViewItem *item = itemAt( vp );
+ emit Q3ListView::doubleClicked( item ); // we do it now
int col = item ? header()->mapToLogical( header()->cellAt( vp.x() ) ) : -1;
@@ -912,5 +927,5 @@ void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e )
emit doubleClicked( item, e->globalPos(), col );
- if( (e->button() == LeftButton) && !d->bUseSingle ) {
+ if( (e->button() == Qt::LeftButton) && !d->bUseSingle ) {
//qDebug("KListView::contentsMouseDoubleClickEvent: emitExecute");
@@ -920,9 +935,9 @@ void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e )
}
-void KListView::slotMouseButtonClicked( int btn, QListViewItem *item, const QPoint &pos, int c )
+void KListView::slotMouseButtonClicked( int btn, Q3ListViewItem *item, const QPoint &pos, int c )
{
//qDebug("KListView::slotMouseButtonClicked");
- if( (btn == LeftButton) && item ) {
+ if( (btn == Qt::LeftButton) && item ) {
//qDebug("KListView::slotMouseButtonClicked: emitExecute");
@@ -962,10 +977,10 @@ qDebug("KListView::contentsDropEvent drag&drop not supported yet");
}
-void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme)
+void KListView::movableDropEvent (Q3ListViewItem* parent, Q3ListViewItem* afterme)
{
- QPtrList<QListViewItem> items, afterFirsts, afterNows;
- QListViewItem *current=currentItem();
+ Q3PtrList<Q3ListViewItem> items, afterFirsts, afterNows;
+ Q3ListViewItem *current=currentItem();
bool hasMoved=false;
- for (QListViewItem *i = firstChild(), *iNext=0; i != 0; i = iNext)
+ for (Q3ListViewItem *i = firstChild(), *iNext=0; i != 0; i = iNext)
{
iNext=i->itemBelow();
@@ -980,5 +995,5 @@ void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme)
i->setSelected(false);
- QListViewItem *afterFirst = i->itemAbove();
+ Q3ListViewItem *afterFirst = i->itemAbove();
if (!hasMoved)
@@ -1001,5 +1016,5 @@ void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme)
}
clearSelection();
- for (QListViewItem *i=items.first(); i != 0; i=items.next() )
+ for (Q3ListViewItem *i=items.first(); i != 0; i=items.next() )
i->setSelected(true);
if (current)
@@ -1087,12 +1102,12 @@ int KListView::depthToPixels( int depth )
}
-void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after)
+void KListView::findDrop(const QPoint &pos, Q3ListViewItem *&parent, Q3ListViewItem *&after)
{
QPoint p (contentsToViewport(pos));
// Get the position to put it in
- QListViewItem *atpos = itemAt(p);
+ Q3ListViewItem *atpos = itemAt(p);
- QListViewItem *above;
+ Q3ListViewItem *above;
if (!atpos) // put it at the end
above = lastItem();
@@ -1124,6 +1139,6 @@ void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewIte
// Ok, there's one more level of complexity. We may want to become a new
// sibling, but of an upper-level group, rather than the "above" item
- QListViewItem * betterAbove = above->parent();
- QListViewItem * last = above;
+ Q3ListViewItem * betterAbove = above->parent();
+ Q3ListViewItem * last = above;
while ( betterAbove )
{
@@ -1147,7 +1162,7 @@ void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewIte
}
-QListViewItem* KListView::lastChild () const
+Q3ListViewItem* KListView::lastChild () const
{
- QListViewItem* lastchild = firstChild();
+ Q3ListViewItem* lastchild = firstChild();
if (lastchild)
@@ -1157,9 +1172,9 @@ QListViewItem* KListView::lastChild () const
}
-QListViewItem *KListView::lastItem() const
+Q3ListViewItem *KListView::lastItem() const
{
- QListViewItem* last = lastChild();
+ Q3ListViewItem* last = lastChild();
- for (QListViewItemIterator it (last); it.current(); ++it)
+ for (Q3ListViewItemIterator it (last); it.current(); ++it)
last = it.current();
@@ -1188,10 +1203,10 @@ qDebug("KListView::startDrag drag&drop not supported yet.");
}
-QDragObject *KListView::dragObject()
+Q3DragObject *KListView::dragObject()
{
if (!currentItem())
return 0;
- return new QStoredDrag("application/x-qlistviewitem", viewport());
+ return new Q3StoredDrag("application/x-qlistviewitem", viewport());
}
@@ -1247,8 +1262,8 @@ void KListView::setDropVisualizer(bool b)
}
-QPtrList<QListViewItem> KListView::selectedItems() const
+Q3PtrList<Q3ListViewItem> KListView::selectedItems() const
{
- QPtrList<QListViewItem> list;
- for (QListViewItem *i=firstChild(); i!=0; i=i->itemBelow())
+ Q3PtrList<Q3ListViewItem> list;
+ for (Q3ListViewItem *i=firstChild(); i!=0; i=i->itemBelow())
if (i->isSelected()) list.append(i);
return list;
@@ -1256,8 +1271,8 @@ QPtrList<QListViewItem> KListView::selectedItems() const
-void KListView::moveItem(QListViewItem *item, QListViewItem *parent, QListViewItem *after)
+void KListView::moveItem(Q3ListViewItem *item, Q3ListViewItem *parent, Q3ListViewItem *after)
{
// sanity check - don't move a item into it's own child structure
- QListViewItem *i = parent;
+ Q3ListViewItem *i = parent;
while(i)
{
@@ -1297,6 +1312,6 @@ void KListView::setDropVisualizerWidth (int w)
}
-QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent,
- QListViewItem *after)
+QRect KListView::drawDropVisualizer(QPainter *p, Q3ListViewItem *parent,
+ Q3ListViewItem *after)
{
QRect insertmarker;
@@ -1309,5 +1324,5 @@ QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent,
if (after)
{
- QListViewItem* it = 0L;
+ Q3ListViewItem* it = 0L;
if (after->isOpen())
{
@@ -1339,10 +1354,10 @@ QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent,
// Remove for KDE 3.0.
if (p)
- p->fillRect(insertmarker, Dense4Pattern);
+ p->fillRect(insertmarker, Qt::Dense4Pattern);
return insertmarker;
}
-QRect KListView::drawItemHighlighter(QPainter *painter, QListViewItem *item)
+QRect KListView::drawItemHighlighter(QPainter *painter, Q3ListViewItem *item)
{
QRect r;
@@ -1377,5 +1392,5 @@ void KListView::cleanItemHighlighter ()
}
-void KListView::rename(QListViewItem *item, int c)
+void KListView::rename(Q3ListViewItem *item, int c)
{
if (d->renameable.contains(c))
@@ -1404,5 +1419,5 @@ void KListView::setRenameable (int col, bool yesno)
}
-void KListView::doneEditing(QListViewItem *item, int row)
+void KListView::doneEditing(Q3ListViewItem *item, int row)
{
emit itemRenamed(item, item->text(row), row);
@@ -1448,10 +1463,10 @@ bool KListView::dropHighlighter() const
}
-bool KListView::showTooltip(QListViewItem *item, const QPoint &, int column) const
+bool KListView::showTooltip(Q3ListViewItem *item, const QPoint &, int column) const
{
return ((tooltip(item, column).length()>0) && (column==tooltipColumn()));
}
-QString KListView::tooltip(QListViewItem *item, int column) const
+QString KListView::tooltip(Q3ListViewItem *item, int column) const
{
return item->text(column);
@@ -1483,5 +1498,5 @@ void KListView::keyPressEvent (QKeyEvent* e)
if (d->selectionMode != FileManager)
- QListView::keyPressEvent (e);
+ Q3ListView::keyPressEvent (e);
else
fileManagerKeyPressEvent (e);
@@ -1514,43 +1529,43 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
{
//don't care whether it's on the keypad or not
- int e_state=(e->state() & ~Keypad);
+ int e_state=(e->state() & ~Qt::Keypad);
int oldSelectionDirection(d->selectionDirection);
- if ((e->key()!=Key_Shift) && (e->key()!=Key_Control)
- && (e->key()!=Key_Meta) && (e->key()!=Key_Alt))
+ if ((e->key()!=Qt::Key_Shift) && (e->key()!=Qt::Key_Control)
+ && (e->key()!=Qt::Key_Meta) && (e->key()!=Qt::Key_Alt))
{
- if ((e_state==ShiftButton) && (!d->wasShiftEvent) && (!d->selectedBySimpleMove))
+ if ((e_state==Qt::ShiftButton) && (!d->wasShiftEvent) && (!d->selectedBySimpleMove))
selectAll(FALSE);
d->selectionDirection=0;
- d->wasShiftEvent = (e_state == ShiftButton);
+ d->wasShiftEvent = (e_state == Qt::ShiftButton);
};
- //d->wasShiftEvent = (e_state == ShiftButton);
+ //d->wasShiftEvent = (e_state == Qt::ShiftButton);
- QListViewItem* item = currentItem();
+ Q3ListViewItem* item = currentItem();
if (item==0) return;
- QListViewItem* repaintItem1 = item;
- QListViewItem* repaintItem2 = 0L;
- QListViewItem* visItem = 0L;
+ Q3ListViewItem* repaintItem1 = item;
+ Q3ListViewItem* repaintItem2 = 0L;
+ Q3ListViewItem* visItem = 0L;
- QListViewItem* nextItem = 0L;
+ Q3ListViewItem* nextItem = 0L;
int items = 0;
- bool shiftOrCtrl((e_state==ControlButton) || (e_state==ShiftButton));
+ bool shiftOrCtrl((e_state==Qt::ControlButton) || (e_state==Qt::ShiftButton));
int selectedItems(0);
- for (QListViewItem *tmpItem=firstChild(); tmpItem!=0; tmpItem=tmpItem->nextSibling())
+ for (Q3ListViewItem *tmpItem=firstChild(); tmpItem!=0; tmpItem=tmpItem->nextSibling())
if (tmpItem->isSelected()) selectedItems++;
if (((selectedItems==0) || ((selectedItems==1) && (d->selectedUsingMouse)))
- && (e_state==NoButton)
- && ((e->key()==Key_Down)
- || (e->key()==Key_Up)
- || (e->key()==Key_Next)
- || (e->key()==Key_Prior)
- || (e->key()==Key_Home)
- || (e->key()==Key_End)))
+ && (e_state==Qt::NoButton)
+ && ((e->key()==Qt::Key_Down)
+ || (e->key()==Qt::Key_Up)
+ || (e->key()==Qt::Key_Next)
+ || (e->key()==Qt::Key_Prior)
+ || (e->key()==Qt::Key_Home)
+ || (e->key()==Qt::Key_End)))
{
d->selectedBySimpleMove=true;
@@ -1564,10 +1579,10 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
switch (e->key())
{
- case Key_Escape:
+ case Qt::Key_Escape:
selectAll(FALSE);
emitSelectionChanged=TRUE;
break;
- case Key_Space:
+ case Qt::Key_Space:
//toggle selection of current item
if (d->selectedBySimpleMove)
@@ -1577,5 +1592,5 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
break;
- case Key_Insert:
+ case Qt::Key_Insert:
//toggle selection of current item and move to the next item
if (d->selectedBySimpleMove)
@@ -1601,5 +1616,5 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
break;
- case Key_Down:
+ case Qt::Key_Down:
nextItem=item->itemBelow();
//toggle selection of current item and move to the next item
@@ -1634,5 +1649,5 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
break;
- case Key_Up:
+ case Qt::Key_Up:
nextItem=item->itemAbove();
d->selectionDirection=-1;
@@ -1669,5 +1684,5 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
break;
- case Key_End:
+ case Qt::Key_End:
//move to the last item and toggle selection of all items inbetween
nextItem=item;
@@ -1694,5 +1709,5 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
break;
- case Key_Home:
+ case Qt::Key_Home:
// move to the first item and toggle selection of all items inbetween
nextItem = firstChild();
@@ -1716,5 +1731,5 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
break;
- case Key_Next:
+ case Qt::Key_Next:
items=visibleHeight()/item->height();
nextItem=item;
@@ -1752,5 +1767,5 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
break;
- case Key_Prior:
+ case Qt::Key_Prior:
items=visibleHeight()/item->height();
nextItem=item;
@@ -1786,15 +1801,15 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
break;
- case Key_Minus:
+ case Qt::Key_Minus:
if ( item->isOpen() )
setOpen( item, FALSE );
break;
- case Key_Plus:
+ case Qt::Key_Plus:
if ( !item->isOpen() && (item->isExpandable() || item->childCount()) )
setOpen( item, TRUE );
break;
default:
- bool realKey = ((e->key()!=Key_Shift) && (e->key()!=Key_Control)
- && (e->key()!=Key_Meta) && (e->key()!=Key_Alt));
+ bool realKey = ((e->key()!=Qt::Key_Shift) && (e->key()!=Qt::Key_Control)
+ && (e->key()!=Qt::Key_Meta) && (e->key()!=Qt::Key_Alt));
bool selectCurrentItem = (d->selectedBySimpleMove) && (item->isSelected());
@@ -1802,7 +1817,7 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
item->setSelected(false);
//this is mainly for the "goto filename beginning with pressed char" feature (aleXXX)
- QListView::SelectionMode oldSelectionMode = selectionMode();
- setSelectionMode (QListView::Multi);
- QListView::keyPressEvent (e);
+ Q3ListView::SelectionMode oldSelectionMode = selectionMode();
+ setSelectionMode (Q3ListView::Multi);
+ Q3ListView::keyPressEvent (e);
setSelectionMode (oldSelectionMode);
if (realKey && selectCurrentItem)
@@ -1851,9 +1866,9 @@ void KListView::setSelectionModeExt (SelectionModeExt mode)
case Extended:
case NoSelection:
- setSelectionMode (static_cast<QListView::SelectionMode>(static_cast<int>(mode)));
+ setSelectionMode (static_cast<Q3ListView::SelectionMode>(static_cast<int>(mode)));
break;
case FileManager:
- setSelectionMode (QListView::Extended);
+ setSelectionMode (Q3ListView::Extended);
break;
@@ -1869,5 +1884,5 @@ KListView::SelectionModeExt KListView::selectionModeExt () const
}
-int KListView::itemIndex( const QListViewItem *item ) const
+int KListView::itemIndex( const Q3ListViewItem *item ) const
{
if ( !item )
@@ -1877,5 +1892,5 @@ int KListView::itemIndex( const QListViewItem *item ) const
return 0;
else {
- QListViewItemIterator it(firstChild());
+ Q3ListViewItemIterator it(firstChild());
uint j = 0;
for (; it.current() && it.current() != item; ++it, ++j );
@@ -1888,5 +1903,5 @@ int KListView::itemIndex( const QListViewItem *item ) const
}
-QListViewItem* KListView::itemAtIndex(int index)
+Q3ListViewItem* KListView::itemAtIndex(int index)
{
if (index<0)
@@ -1894,5 +1909,5 @@ QListViewItem* KListView::itemAtIndex(int index)
int j(0);
- for (QListViewItemIterator it=firstChild(); it.current(); it++)
+ for (Q3ListViewItemIterator it=firstChild(); it.current(); it++)
{
if (j==index)
@@ -1904,5 +1919,5 @@ QListViewItem* KListView::itemAtIndex(int index)
-void KListView::emitContextMenu (KListView*, QListViewItem* i)
+void KListView::emitContextMenu (KListView*, Q3ListViewItem* i)
{
QPoint p;
@@ -1917,7 +1932,7 @@ void KListView::emitContextMenu (KListView*, QListViewItem* i)
}
-void KListView::emitContextMenu (QListViewItem* i, const QPoint& p, int col)
+void KListView::emitContextMenu (Q3ListViewItem* i, const QPoint& p, int col)
{
- QListViewItem* item = i;
+ Q3ListViewItem* item = i;
int c = col;
// do not trust the values for QListViewItem* i and int col;
@@ -1934,5 +1949,5 @@ void KListView::emitContextMenu (QListViewItem* i, const QPoint& p, int col)
void KListView::setAcceptDrops (bool val)
{
- QListView::setAcceptDrops (val);
+ Q3ListView::setAcceptDrops (val);
viewport()->setAcceptDrops (val);
}
@@ -1946,5 +1961,5 @@ int KListView::dropVisualizerWidth () const
void KListView::viewportPaintEvent(QPaintEvent *e)
{
- QListView::viewportPaintEvent(e);
+ Q3ListView::viewportPaintEvent(e);
if (d->mOldDropVisualizer.isValid() && e->rect().intersects(d->mOldDropVisualizer))
@@ -1953,5 +1968,5 @@ void KListView::viewportPaintEvent(QPaintEvent *e)
// This is where we actually draw the drop-visualizer
- painter.fillRect(d->mOldDropVisualizer, Dense4Pattern);
+ painter.fillRect(d->mOldDropVisualizer, Qt::Dense4Pattern);
}
if (d->mOldDropHighlighter.isValid() && e->rect().intersects(d->mOldDropHighlighter))
@@ -1989,5 +2004,5 @@ bool KListView::fullWidth() const
int KListView::addColumn(const QString& label, int width)
{
- int result = QListView::addColumn(label, width);
+ int result = Q3ListView::addColumn(label, width);
if (d->fullWidth) {
//US header()->setStretchEnabled(false, columns()-2);
@@ -1997,7 +2012,7 @@ int KListView::addColumn(const QString& label, int width)
}
-int KListView::addColumn(const QIconSet& iconset, const QString& label, int width)
+int KListView::addColumn(const QIcon& iconset, const QString& label, int width)
{
- int result = QListView::addColumn(iconset, label, width);
+ int result = Q3ListView::addColumn(iconset, label, width);
if (d->fullWidth) {
//US header()->setStretchEnabled(false, columns()-2);
@@ -2009,5 +2024,5 @@ int KListView::addColumn(const QIconSet& iconset, const QString& label, int widt
void KListView::removeColumn(int index)
{
- QListView::removeColumn(index);
+ Q3ListView::removeColumn(index);
//US if (d->fullWidth && index == columns()) header()->setStretchEnabled(true, columns()-1);
}
@@ -2015,5 +2030,5 @@ void KListView::removeColumn(int index)
void KListView::viewportResizeEvent(QResizeEvent* e)
{
- QListView::viewportResizeEvent(e);
+ Q3ListView::viewportResizeEvent(e);
}
@@ -2071,5 +2086,5 @@ void KListView::setSorting(int column, bool ascending)
d->sortColumn = column;
d->sortAscending = ascending;
- QListView::setSorting(column, ascending);
+ Q3ListView::setSorting(column, ascending);
}
@@ -2084,56 +2099,56 @@ bool KListView::ascendingSort(void) const
}
-KListViewItem::KListViewItem(QListView *parent)
- : QListViewItem(parent)
+KListViewItem::KListViewItem(Q3ListView *parent)
+ : Q3ListViewItem(parent)
{
init();
}
-KListViewItem::KListViewItem(QListViewItem *parent)
- : QListViewItem(parent)
+KListViewItem::KListViewItem(Q3ListViewItem *parent)
+ : Q3ListViewItem(parent)
{
init();
}
-KListViewItem::KListViewItem(QListView *parent, QListViewItem *after)
- : QListViewItem(parent, after)
+KListViewItem::KListViewItem(Q3ListView *parent, Q3ListViewItem *after)
+ : Q3ListViewItem(parent, after)
{
init();
}
-KListViewItem::KListViewItem(QListViewItem *parent, QListViewItem *after)
- : QListViewItem(parent, after)
+KListViewItem::KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after)
+ : Q3ListViewItem(parent, after)
{
init();
}
-KListViewItem::KListViewItem(QListView *parent,
+KListViewItem::KListViewItem(Q3ListView *parent,
QString label1, QString label2, QString label3, QString label4,
QString label5, QString label6, QString label7, QString label8)
- : QListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8)
+ : Q3ListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8)
{
init();
}
-KListViewItem::KListViewItem(QListViewItem *parent,
+KListViewItem::KListViewItem(Q3ListViewItem *parent,
QString label1, QString label2, QString label3, QString label4,
QString label5, QString label6, QString label7, QString label8)
- : QListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8)
+ : Q3ListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8)
{
init();
}
-KListViewItem::KListViewItem(QListView *parent, QListViewItem *after,
+KListViewItem::KListViewItem(Q3ListView *parent, Q3ListViewItem *after,
QString label1, QString label2, QString label3, QString label4,
QString label5, QString label6, QString label7, QString label8)
- : QListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
+ : Q3ListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
{
init();
}
-KListViewItem::KListViewItem(QListViewItem *parent, QListViewItem *after,
+KListViewItem::KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after,
QString label1, QString label2, QString label3, QString label4,
QString label5, QString label6, QString label7, QString label8)
- : QListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
+ : Q3ListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
{
init();
@@ -2213,10 +2228,10 @@ void KListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, in
else if (isAlternate()) {
//US if (listView()->viewport()->backgroundMode()==Qt::FixedColor)
- if (listView()->viewport()->backgroundMode()==QWidget::PaletteBackground)
+ if (listView()->viewport()->backgroundMode()==Qt::PaletteBackground)
_cg.setColor(QColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground());
else
_cg.setColor(QColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground());
}
- QListViewItem::paintCell(p, _cg, column, width, alignment);
+ Q3ListViewItem::paintCell(p, _cg, column, width, alignment);
}
diff --git a/microkde/kdeui/klistview.h b/microkde/kdeui/klistview.h
index 9f0d9fd..2176525 100644
--- a/microkde/kdeui/klistview.h
+++ b/microkde/kdeui/klistview.h
@@ -21,7 +21,18 @@
#define KLISTVIEW_H
-#include <qlistview.h>
-
-#include <qptrlist.h>
+#include <q3listview.h>
+
+#include <q3ptrlist.h>
+//Added by qt3to4:
+#include <QDragMoveEvent>
+#include <QDropEvent>
+#include <QDragLeaveEvent>
+#include <QPaintEvent>
+#include <QResizeEvent>
+#include <QFocusEvent>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <QEvent>
+#include <QDragEnterEvent>
//US
@@ -31,5 +42,5 @@ class QDragMoveEvent;
class QDragEnterEvent;
-class QDragObject;
+class Q3DragObject;
class KConfig;
class KLineEdit;
@@ -58,5 +69,5 @@ class KLineEdit;
* @version $Id$
*/
-class KListView : public QListView
+class KListView : public Q3ListView
{
Q_OBJECT
@@ -107,13 +118,13 @@ public:
*/
enum SelectionModeExt {
- Single = QListView::Single,
- Multi = QListView::Multi,
- Extended = QListView::Extended,
- NoSelection = QListView::NoSelection,
+ Single = Q3ListView::Single,
+ Multi = Q3ListView::Multi,
+ Extended = Q3ListView::Extended,
+ NoSelection = Q3ListView::NoSelection,
FileManager
};
void repaintContents( bool erase = true )
{
- QScrollView::repaintContents( contentsX(), contentsY(),
+ Q3ScrollView::repaintContents( contentsX(), contentsY(),
visibleWidth(), visibleHeight(), erase );
};
@@ -162,10 +173,10 @@ public:
* @return a list containing the currently selected items.
*/
- QPtrList<QListViewItem> selectedItems() const; // ### BIC: KDE 4: use an implicitly shared class! (QValueList?)
+ Q3PtrList<Q3ListViewItem> selectedItems() const; // ### BIC: KDE 4: use an implicitly shared class! (QValueList?)
/**
* Arbitrarily move @p item to @p parent, positioned immediately after item @p after.
*/
- void moveItem(QListViewItem *item, QListViewItem *parent, QListViewItem *after);
+ void moveItem(Q3ListViewItem *item, Q3ListViewItem *parent, Q3ListViewItem *after);
/**
@@ -174,5 +185,5 @@ public:
* @see lastChild()
*/
- QListViewItem *lastItem() const;
+ Q3ListViewItem *lastItem() const;
/**
@@ -181,5 +192,5 @@ public:
* @see lastItem()
*/
- QListViewItem* lastChild () const;
+ Q3ListViewItem* lastChild () const;
/**
@@ -277,5 +288,5 @@ public:
* all items into account not only the visible ones.
*/
- int itemIndex( const QListViewItem *item ) const;
+ int itemIndex( const Q3ListViewItem *item ) const;
/**
@@ -284,5 +295,5 @@ public:
* all items into account not only the visible ones.
*/
- QListViewItem* itemAtIndex(int index);
+ Q3ListViewItem* itemAtIndex(int index);
/**
@@ -315,5 +326,5 @@ public:
* Reimplemented for full width support
*/
- virtual int addColumn(const QIconSet& iconset, const QString& label, int width = -1);
+ virtual int addColumn(const QIcon& iconset, const QString& label, int width = -1);
/**
* Reimplemented for full width support
@@ -389,5 +400,5 @@ signals:
* connected to this signal.
*/
- void executed( QListViewItem *item );
+ void executed( Q3ListViewItem *item );
/**
@@ -402,5 +413,5 @@ signals:
* connected to this signal.
*/
- void executed( QListViewItem *item, const QPoint &pos, int c );
+ void executed( Q3ListViewItem *item, const QPoint &pos, int c );
/**
@@ -418,6 +429,6 @@ signals:
* to use @ref #executed() instead.
*/
- void doubleClicked( QListViewItem *item, const QPoint &pos, int c );
- void contextRequest( QListViewItem *item, const QPoint &pos, int c );
+ void doubleClicked( Q3ListViewItem *item, const QPoint &pos, int c );
+ void contextRequest( Q3ListViewItem *item, const QPoint &pos, int c );
/**
@@ -431,5 +442,5 @@ signals:
* @see #acceptDrop()
*/
- void dropped (QDropEvent * e, QListViewItem *after);
+ void dropped (QDropEvent * e, Q3ListViewItem *after);
/**
@@ -445,5 +456,5 @@ signals:
* the drop was above all items
*/
- void dropped (KListView* list, QDropEvent* e, QListViewItem* after);
+ void dropped (KListView* list, QDropEvent* e, Q3ListViewItem* after);
/**
@@ -459,5 +470,5 @@ signals:
* the drop was above all items
*/
- void dropped (KListView* list, QDropEvent* e, QListViewItem* parent, QListViewItem* after);
+ void dropped (KListView* list, QDropEvent* e, Q3ListViewItem* parent, Q3ListViewItem* after);
/**
@@ -472,5 +483,5 @@ signals:
* the drop was above all items
*/
- void dropped (QDropEvent* e, QListViewItem* parent, QListViewItem* after);
+ void dropped (QDropEvent* e, Q3ListViewItem* parent, Q3ListViewItem* after);
/**
@@ -503,5 +514,5 @@ signals:
* @param afterNow the item it's currently after.
*/
- void moved (QListViewItem *item, QListViewItem *afterFirst, QListViewItem *afterNow);
+ void moved (Q3ListViewItem *item, Q3ListViewItem *afterFirst, Q3ListViewItem *afterNow);
@@ -511,5 +522,5 @@ signals:
* with the first of afterFirst and afterNow.
*/
- void moved(QPtrList<QListViewItem> &items, QPtrList<QListViewItem> &afterFirst, QPtrList<QListViewItem> &afterNow);
+ void moved(Q3PtrList<Q3ListViewItem> &items, Q3PtrList<Q3ListViewItem> &afterFirst, Q3PtrList<Q3ListViewItem> &afterNow);
/**
@@ -520,10 +531,10 @@ signals:
* @param col is the renamed column.
*/
- void itemRenamed(QListViewItem* item, const QString &str, int col);
+ void itemRenamed(Q3ListViewItem* item, const QString &str, int col);
/**
* Same as above, but without the extra information.
*/
- void itemRenamed(QListViewItem* item);
+ void itemRenamed(Q3ListViewItem* item);
void signalDelete();
@@ -538,5 +549,5 @@ signals:
* @param item is the @ref currentItem() at the time the key was pressed. May be 0L.
*/
- void menuShortCutPressed (KListView* list, QListViewItem* item);
+ void menuShortCutPressed (KListView* list, Q3ListViewItem* item);
/**
@@ -548,5 +559,5 @@ signals:
* @param p is the point at which the menu should be shown.
*/
- void contextMenu (KListView* l, QListViewItem* i, const QPoint& p);
+ void contextMenu (KListView* l, Q3ListViewItem* i, const QPoint& p);
public slots:
@@ -554,5 +565,5 @@ public slots:
* Rename column @p c of @p item.
*/
- virtual void rename(QListViewItem *item, int c);
+ virtual void rename(Q3ListViewItem *item, int c);
/**
@@ -674,5 +685,5 @@ protected:
* before being passed to the above function.
*/
- inline bool below (QListViewItem* i, const QPoint& p)
+ inline bool below (Q3ListViewItem* i, const QPoint& p)
{
return below (itemRect(i), contentsToViewport(p));
@@ -690,5 +701,5 @@ protected:
*/
//US I added buttonstate to pass the current keyboard status
- void emitExecute( int buttonstate, QListViewItem *item, const QPoint &pos, int c);
+ void emitExecute( int buttonstate, Q3ListViewItem *item, const QPoint &pos, int c);
/**
@@ -722,10 +733,10 @@ protected:
* @return the tooltip for @p column of @p item.
*/
- virtual QString tooltip(QListViewItem* item, int column) const;
+ virtual QString tooltip(Q3ListViewItem* item, int column) const;
/**
* @return whether the tooltip for @p column of @p item shall be shown at point @p pos.
*/
- virtual bool showTooltip(QListViewItem *item, const QPoint &pos, int column) const;
+ virtual bool showTooltip(Q3ListViewItem *item, const QPoint &pos, int column) const;
/**
@@ -806,5 +817,5 @@ protected:
* @see setDragEnabled()
*/
- virtual QDragObject *dragObject();
+ virtual Q3DragObject *dragObject();
/**
@@ -822,5 +833,5 @@ protected:
* @return the rectangle that you painted to.
*/
- virtual QRect drawDropVisualizer (QPainter *p, QListViewItem *parent, QListViewItem *after);
+ virtual QRect drawDropVisualizer (QPainter *p, Q3ListViewItem *parent, Q3ListViewItem *after);
/**
@@ -830,5 +841,5 @@ protected:
* @return the rectangle that you painted to.
*/
- virtual QRect drawItemHighlighter(QPainter *painter, QListViewItem *item);
+ virtual QRect drawItemHighlighter(QPainter *painter, Q3ListViewItem *item);
/**
@@ -887,6 +898,6 @@ protected slots:
void slotSettingsChanged(int);
- void slotMouseButtonClicked( int btn, QListViewItem *item, const QPoint &pos, int c );
- void doneEditing(QListViewItem *item, int row);
+ void slotMouseButtonClicked( int btn, Q3ListViewItem *item, const QPoint &pos, int c );
+ void doneEditing(Q3ListViewItem *item, int row);
/**
@@ -903,10 +914,10 @@ protected slots:
* Emit the @ref contextMenu signal. This slot is for mouse actions.
*/
- void emitContextMenu (QListViewItem*, const QPoint&, int);
+ void emitContextMenu (Q3ListViewItem*, const QPoint&, int);
/**
* Emit the @ref #contextMenu signal. This slot is for key presses.
*/
- void emitContextMenu (KListView*, QListViewItem*);
+ void emitContextMenu (KListView*, Q3ListViewItem*);
/**
@@ -914,5 +925,5 @@ protected slots:
* @internal
*/
- void slotOnItem( QListViewItem *item );
+ void slotOnItem( Q3ListViewItem *item );
/**
@@ -940,5 +951,5 @@ protected:
* Handle dropEvent when itemsMovable() is set to true.
*/
- virtual void movableDropEvent (QListViewItem* parent, QListViewItem* afterme);
+ virtual void movableDropEvent (Q3ListViewItem* parent, Q3ListViewItem* afterme);
/**
@@ -948,5 +959,5 @@ protected:
* acceptDrag method without ugly casts
*/
- virtual void findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after);
+ virtual void findDrop(const QPoint &pos, Q3ListViewItem *&parent, Q3ListViewItem *&after);
/**
@@ -975,5 +986,5 @@ private:
* @short listview item with alternate background colour support
*/
-class KListViewItem : public QListViewItem
+class KListViewItem : public Q3ListViewItem
{
public:
@@ -984,10 +995,10 @@ public:
* (or subclasses).
*/
- KListViewItem(QListView *parent);
- KListViewItem(QListViewItem *parent);
- KListViewItem(QListView *parent, QListViewItem *after);
- KListViewItem(QListViewItem *parent, QListViewItem *after);
+ KListViewItem(Q3ListView *parent);
+ KListViewItem(Q3ListViewItem *parent);
+ KListViewItem(Q3ListView *parent, Q3ListViewItem *after);
+ KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after);
- KListViewItem(QListView *parent,
+ KListViewItem(Q3ListView *parent,
QString, QString = QString::null,
QString = QString::null, QString = QString::null,
@@ -995,5 +1006,5 @@ public:
QString = QString::null, QString = QString::null);
- KListViewItem(QListViewItem *parent,
+ KListViewItem(Q3ListViewItem *parent,
QString, QString = QString::null,
QString = QString::null, QString = QString::null,
@@ -1001,5 +1012,5 @@ public:
QString = QString::null, QString = QString::null);
- KListViewItem(QListView *parent, QListViewItem *after,
+ KListViewItem(Q3ListView *parent, Q3ListViewItem *after,
QString, QString = QString::null,
QString = QString::null, QString = QString::null,
@@ -1007,5 +1018,5 @@ public:
QString = QString::null, QString = QString::null);
- KListViewItem(QListViewItem *parent, QListViewItem *after,
+ KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after,
QString, QString = QString::null,
QString = QString::null, QString = QString::null,
diff --git a/microkde/kdeui/kmainwindow.cpp b/microkde/kdeui/kmainwindow.cpp
index fa678f2..bac0db8 100644
--- a/microkde/kdeui/kmainwindow.cpp
+++ b/microkde/kdeui/kmainwindow.cpp
@@ -22,5 +22,5 @@
Boston, MA 02111-1307, USA.
*/
-#include <qobjectlist.h>
+#include <qobject.h>
#include <qstringlist.h>
#include <qtimer.h>
@@ -28,4 +28,10 @@
#include <qstatusbar.h>
#include <qapplication.h>
+//Added by qt3to4:
+#include <QCloseEvent>
+#include <QPaintEvent>
+#include <QResizeEvent>
+#include <QChildEvent>
+#include <Q3PtrList>
@@ -55,5 +61,5 @@ static bool no_query_exit = false;
KMainWindow::KMainWindow( QWidget* parent, const char *name )
- : QMainWindow( parent, name ) /*LR, f ) with the default widget flag we cannot have fastload */ /*US, KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )*/
+ : Q3MainWindow( parent, name ) /*LR, f ) with the default widget flag we cannot have fastload */ /*US, KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )*/
{
mQToolBar = 0;
@@ -277,5 +283,5 @@ void KMainWindow::setCaption( const QString &caption, bool modified )
void KMainWindow::setPlainCaption( const QString &caption )
{
- QMainWindow::setCaption( caption );
+ Q3MainWindow::setCaption( caption );
#ifndef Q_WS_QWS
//US the following is disabled for the embedded version
@@ -422,8 +428,8 @@ void KMainWindow::createStandardStatusBarAction(){
}
-QToolBar *KMainWindow::tBar( )
+Q3ToolBar *KMainWindow::tBar( )
{
if ( ! mQToolBar )
- mQToolBar = new QToolBar( this );
+ mQToolBar = new Q3ToolBar( this );
return mQToolBar;
}
@@ -444,14 +450,15 @@ KToolBar *KMainWindow::toolBar( const char * name )
else
*/
- return new KToolBar(this, Top, false, name, honor_mode ); // non-XMLGUI
+ return new KToolBar(this, Qt::Top, false, name, honor_mode ); // non-XMLGUI
}
-QPtrListIterator<KToolBar> KMainWindow::toolBarIterator()
+Q3PtrListIterator<KToolBar> KMainWindow::toolBarIterator()
{
toolbarList.clear();
- QPtrList<QToolBar> lst;
- for ( int i = (int)QMainWindow::Unmanaged; i <= (int)Minimized; ++i ) {
- lst = toolBars( (ToolBarDock)i );
- for ( QToolBar *tb = lst.first(); tb; tb = lst.next() ) {
+ QList<Q3ToolBar*> lst;
+ for ( int i = (int)Qt::Unmanaged; i <= (int)Qt::Minimized; ++i ) {
+ lst = toolBars( (Qt::ToolBarDock)i );
+ for(QList<Q3ToolBar*>::iterator i=lst.begin();i!=lst.end();++i) {
+ Q3ToolBar *tb = *i;
if ( !tb->inherits( "KToolBar" ) )
continue;
@@ -459,5 +466,5 @@ QPtrListIterator<KToolBar> KMainWindow::toolBarIterator()
}
}
- return QPtrListIterator<KToolBar>( toolbarList );
+ return Q3PtrListIterator<KToolBar>( toolbarList );
}
@@ -470,5 +477,5 @@ void KMainWindow::setAutoSaveSettings( const QString & groupName, bool saveWindo
//US connect( this, SIGNAL( dockWindowPositionChanged( QDockWindow * ) ),
//US this, SLOT( setSettingsDirty() ) );
- connect( this, SIGNAL( toolBarPositionChanged(QToolBar *) ),
+ connect( this, SIGNAL( toolBarPositionChanged(Q3ToolBar *) ),
this, SLOT( setSettingsDirty() ) );
@@ -504,5 +511,5 @@ QString KMainWindow::autoSaveGroup() const
void KMainWindow::saveAutoSaveSettings()
{
- ASSERT( d->autoSaveSettings );
+ Q_ASSERT( d->autoSaveSettings );
//kdDebug(200) << "KMainWindow::saveAutoSaveSettings -> saving settings" << endl;
saveMainWindowSettings( KGlobal::config(), d->autoSaveGroup );
@@ -640,5 +647,5 @@ void KMainWindow::saveMainWindowSettings(KConfig *config, const QString &configG
int n = 1; // Toolbar counter. toolbars are counted from 1,
KToolBar *toolbar = 0;
- QPtrListIterator<KToolBar> it( toolBarIterator() );
+ Q3PtrListIterator<KToolBar> it( toolBarIterator() );
while ( ( toolbar = it.current() ) ) {
++it;
@@ -715,17 +722,19 @@ void KMainWindow::applyMainWindowSettings(KConfig *config, const QString &config
//US i = config->readListEntry (QString::fromLatin1("MenuBar"), entryList, ';');
entryList = config->readListEntry (QString::fromLatin1("MenuBar"));
- entry = entryList.first();
- if (entry==QString::fromLatin1("Disabled"))
- {
- mb->hide();
- } else
- {
- mb->show();
- }
+ if(!entryList.empty()) {
+ entry = entryList.first();
+ if (entry==QString::fromLatin1("Disabled"))
+ {
+ mb->hide();
+ } else
+ {
+ mb->show();
+ }
+ }
}
int n = 1; // Toolbar counter. toolbars are counted from 1,
KToolBar *toolbar;
- QPtrListIterator<KToolBar> it( toolBarIterator() ); // must use own iterator
+ Q3PtrListIterator<KToolBar> it( toolBarIterator() ); // must use own iterator
for ( ; it.current(); ++it) {
@@ -757,5 +766,5 @@ void KMainWindow::finalizeGUI( bool force )
// the toolbariterator should give them in the proper order.
// Both the XMLGUI and applySettings call this, hence "force" for the latter.
- QPtrListIterator<KToolBar> it( toolBarIterator() );
+ Q3PtrListIterator<KToolBar> it( toolBarIterator() );
for ( ; it.current() ; ++ it )
it.current()->positionYourself( force );
@@ -852,5 +861,5 @@ void KMainWindow::resizeEvent( QResizeEvent * e)
if ( d->autoSaveWindowSize )
setSettingsDirty();
- QMainWindow::resizeEvent( e );
+ Q3MainWindow::resizeEvent( e );
}
@@ -870,5 +879,5 @@ QMenuBar *KMainWindow::menuBar()
// trigger a re-layout and trigger a call to the private
// setMenuBar method.
- QMainWindow::menuBar();
+ Q3MainWindow::menuBar();
}
return mb;
@@ -885,5 +894,5 @@ QStatusBar *KMainWindow::statusBar()
// trigger a re-layout and trigger a call to the private
// setStatusBar method.
- QMainWindow::statusBar();
+ Q3MainWindow::statusBar();
}
return sb;
@@ -909,14 +918,8 @@ QMenuBar *KMainWindow::internalMenuBar()
{
//US QObjectList *l = queryList( "KMenuBar", 0, false, false );
- QObjectList *l = queryList( "QMenuBar", 0, false, false );
- if ( !l || !l->first() ) {
- delete l;
- return 0;
- }
-
-//US KMenuBar *m = (KMenuBar*)l->first();
- QMenuBar *m = (QMenuBar*)l->first();
- delete l;
- return m;
+ QObjectList l = queryList( "QMenuBar", 0, false, false );
+ if(l.empty())
+ return 0;
+ return (QMenuBar*)l.front();
}
@@ -925,24 +928,18 @@ QStatusBar *KMainWindow::internalStatusBar()
{
//US QObjectList *l = queryList( "KStatusBar", 0, false, false );
- QObjectList *l = queryList( "QStatusBar", 0, false, false );
- if ( !l || !l->first() ) {
- delete l;
- return 0;
- }
-
-//US KStatusBar *s = (KStatusBar*)l->first();
- QStatusBar *s = (QStatusBar*)l->first();
- delete l;
- return s;
+ QObjectList l = queryList( "QStatusBar", 0, false, false );
+ if(l.empty())
+ return 0;
+ return (QStatusBar*)l.front();
}
void KMainWindow::childEvent( QChildEvent* e)
{
- QMainWindow::childEvent( e );
+ Q3MainWindow::childEvent( e );
}
void KMainWindow::paintEvent( QPaintEvent * e)
{
- QMainWindow::paintEvent( e );
+ Q3MainWindow::paintEvent( e );
}
diff --git a/microkde/kdeui/kmainwindow.h b/microkde/kdeui/kmainwindow.h
index 2dc8033..a3ac82f 100644
--- a/microkde/kdeui/kmainwindow.h
+++ b/microkde/kdeui/kmainwindow.h
@@ -1,2 +1,7 @@
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QChildEvent>
+#include <QCloseEvent>
+#include <QPaintEvent>
/*
This file is part of the KDE libraries
@@ -51,10 +56,10 @@ class KAction;
#include <ktoolbarhandler.h>
#include <kxmlguiclient.h>
-#include <qmainwindow.h>
-#include <qptrlist.h>
+#include <q3mainwindow.h>
+#include <q3ptrlist.h>
class KActionCollection;
-class KMainWindow : public QMainWindow, virtual public KXMLGUIClient
+class KMainWindow : public Q3MainWindow, virtual public KXMLGUIClient
{
Q_OBJECT
@@ -321,10 +326,10 @@ public:
KToolBar *toolBar( const char *name=0 );
// method for getting rid of KDE-Crap
- QToolBar *tBar( );
+ Q3ToolBar *tBar( );
/**
* @return An iterator over the list of all toolbars for this window.
*/
- QPtrListIterator<KToolBar> toolBarIterator();
+ Q3PtrListIterator<KToolBar> toolBarIterator();
/**
@@ -759,5 +764,5 @@ private slots:
private:
- QToolBar * mQToolBar;
+ Q3ToolBar * mQToolBar;
//US KMenuBar *internalMenuBar();
QMenuBar *internalMenuBar();
@@ -768,5 +773,5 @@ private:
void initKMainWindow(const char *name);
- QPtrList<KToolBar> toolbarList;
+ Q3PtrList<KToolBar> toolbarList;
protected:
diff --git a/microkde/kdeui/knuminput.cpp b/microkde/kdeui/knuminput.cpp
index 335d6f4..da01a20 100644
--- a/microkde/kdeui/knuminput.cpp
+++ b/microkde/kdeui/knuminput.cpp
@@ -43,4 +43,7 @@
#include <qspinbox.h>
#include <qstyle.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QEvent>
#include <kglobal.h>
@@ -107,9 +110,9 @@ void KNumInput::setLabel(const QString & label, int a)
if (m_label) m_label->setText(label);
else m_label = new QLabel(label, this, "KNumInput::QLabel");
- m_label->setAlignment((a & (~(AlignTop|AlignBottom|AlignVCenter)))
- | AlignVCenter);
+ m_label->setAlignment((a & (~(Qt::AlignTop|Qt::AlignBottom|Qt::AlignVCenter)))
+ | Qt::AlignVCenter);
// if no vertical alignment set, use Top alignment
- if(!(a & (AlignTop|AlignBottom|AlignVCenter)))
- a |= AlignTop;
+ if(!(a & (Qt::AlignTop|Qt::AlignBottom|Qt::AlignVCenter)))
+ a |= Qt::AlignTop;
m_alignment = a;
}
@@ -132,5 +135,5 @@ void KNumInput::layout(bool deep)
m_sizeLabel = (m_label ? m_label->sizeHint() : QSize(0,0));
- if(m_label && (m_alignment & AlignVCenter))
+ if(m_label && (m_alignment & Qt::AlignVCenter))
m_colw1 = m_sizeLabel.width() + 4;
else
@@ -203,5 +206,5 @@ KIntSpinBox::KIntSpinBox(QWidget *parent, const char *name)
: QSpinBox(0, 99, 1, parent, name)
{
- editor()->setAlignment(AlignRight);
+ setAlignment(Qt::AlignRight);
val_base = 10;
setValue(0);
@@ -216,5 +219,5 @@ KIntSpinBox::KIntSpinBox(int lower, int upper, int step, int value, int base,
: QSpinBox(lower, upper, step, parent, name)
{
- editor()->setAlignment(AlignRight);
+ setAlignment(Qt::AlignRight);
val_base = base;
setValue(value);
@@ -244,7 +247,7 @@ int KIntSpinBox::mapTextToValue(bool* ok)
void KIntSpinBox::setEditFocus(bool mark)
{
- editor()->setFocus();
+ setFocus();
if(mark)
- editor()->selectAll();
+ selectAll();
}
@@ -326,5 +329,5 @@ void KIntNumInput::setRange(int lower, int upper, int step, bool slider)
m_spin->setLineStep(step);
- step = m_spin->lineStep(); // maybe QRangeControl didn't like out lineStep?
+ step = m_spin->singleStep(); // maybe QRangeControl didn't like out lineStep?
if(slider) {
@@ -333,5 +336,5 @@ void KIntNumInput::setRange(int lower, int upper, int step, bool slider)
else {
m_slider = new QSlider(lower, upper, step, m_spin->value(),
- QSlider::Horizontal, this);
+ Qt::Horizontal, this);
m_slider->setTickmarks(QSlider::Below);
connect(m_slider, SIGNAL(valueChanged(int)),
@@ -359,5 +362,5 @@ void KIntNumInput::setRange(int lower, int upper, int step, bool slider)
void KIntNumInput::setMinValue(int min)
{
- setRange(min, m_spin->maxValue(), m_spin->lineStep(), m_slider);
+ setRange(min, m_spin->maxValue(), m_spin->singleStep(), m_slider);
}
@@ -369,5 +372,5 @@ int KIntNumInput::minValue() const
void KIntNumInput::setMaxValue(int max)
{
- setRange(m_spin->minValue(), max, m_spin->lineStep(), m_slider);
+ setRange(m_spin->minValue(), max, m_spin->singleStep(), m_slider);
}
@@ -416,5 +419,5 @@ QSize KIntNumInput::minimumSizeHint() const
// if in extra row, then count it here
- if(m_label && (m_alignment & (AlignBottom|AlignTop)))
+ if(m_label && (m_alignment & (Qt::AlignBottom|Qt::AlignTop)))
h += 4 + m_sizeLabel.height();
else
@@ -425,5 +428,5 @@ QSize KIntNumInput::minimumSizeHint() const
w += m_colw1 + m_colw2;
- if(m_alignment & (AlignTop|AlignBottom))
+ if(m_alignment & (Qt::AlignTop|Qt::AlignBottom))
w = QMAX(w, m_sizeLabel.width() + 4);
@@ -445,10 +448,10 @@ void KIntNumInput::resizeEvent(QResizeEvent* e)
int h = 0;
- if(m_label && (m_alignment & AlignTop)) {
+ if(m_label && (m_alignment & Qt::AlignTop)) {
m_label->setGeometry(0, 0, e->size().width(), m_sizeLabel.height());
h += m_sizeLabel.height() + 4;
}
- if(m_label && (m_alignment & AlignVCenter))
+ if(m_label && (m_alignment & Qt::AlignVCenter))
m_label->setGeometry(0, 0, w, m_sizeSpin.height());
@@ -461,5 +464,5 @@ void KIntNumInput::resizeEvent(QResizeEvent* e)
h += m_sizeSpin.height() + 2;
- if(m_label && (m_alignment & AlignBottom))
+ if(m_label && (m_alignment & Qt::AlignBottom))
m_label->setGeometry(0, h, m_sizeLabel.width(), m_sizeLabel.height());
}
@@ -647,5 +650,5 @@ QSize KDoubleNumInput::minimumSizeHint() const
// if in extra row, then count it here
- if(m_label && (m_alignment & (AlignBottom|AlignTop)))
+ if(m_label && (m_alignment & (Qt::AlignBottom|Qt::AlignTop)))
h += 4 + m_sizeLabel.height();
else
@@ -656,5 +659,5 @@ QSize KDoubleNumInput::minimumSizeHint() const
w += m_colw1 + m_colw2;
- if(m_alignment & (AlignTop|AlignBottom))
+ if(m_alignment & (Qt::AlignTop|Qt::AlignBottom))
w = QMAX(w, m_sizeLabel.width() + 4);
@@ -667,10 +670,10 @@ void KDoubleNumInput::resizeEvent(QResizeEvent* e)
int h = 0;
- if(m_label && (m_alignment & AlignTop)) {
+ if(m_label && (m_alignment & Qt::AlignTop)) {
m_label->setGeometry(0, 0, e->size().width(), m_sizeLabel.height());
h += m_sizeLabel.height() + 4;
}
- if(m_label && (m_alignment & AlignVCenter))
+ if(m_label && (m_alignment & Qt::AlignVCenter))
m_label->setGeometry(0, 0, w, m_sizeEdit.height());
@@ -684,5 +687,5 @@ void KDoubleNumInput::resizeEvent(QResizeEvent* e)
h += m_sizeEdit.height() + 2;
- if(m_label && (m_alignment & AlignBottom))
+ if(m_label && (m_alignment & Qt::AlignBottom))
m_label->setGeometry(0, h, m_sizeLabel.width(), m_sizeLabel.height());
}
@@ -731,5 +734,5 @@ void KDoubleNumInput::setRange(double lower, double upper, double step,
int slmin = spin->minValue();
int slvalue = spin->value();
- int slstep = spin->lineStep();
+ int slstep = spin->singleStep();
if (m_slider) {
m_slider->setRange(slmin, slmax);
@@ -738,5 +741,5 @@ void KDoubleNumInput::setRange(double lower, double upper, double step,
} else {
m_slider = new QSlider(slmin, slmax, slstep, slvalue,
- QSlider::Horizontal, this);
+ Qt::Horizontal, this);
m_slider->setTickmarks(QSlider::Below);
// feedback line: when one moves, the other moves, too:
@@ -913,5 +916,5 @@ KDoubleSpinBox::KDoubleSpinBox( QWidget * parent, const char * name )
: QSpinBox( parent, name )
{
- editor()->setAlignment( Qt::AlignRight );
+ setAlignment( Qt::AlignRight );
d = new Private();
updateValidator();
@@ -923,5 +926,5 @@ KDoubleSpinBox::KDoubleSpinBox( double lower, double upper, double step,
: QSpinBox( parent, name )
{
- editor()->setAlignment( Qt::AlignRight );
+ setAlignment( Qt::AlignRight );
d = new Private();
setRange( lower, upper, step, precision );
@@ -1028,5 +1031,5 @@ void KDoubleSpinBox::setMaxValue( double value ) {
double KDoubleSpinBox::lineStep() const {
- return d->mapToDouble( base::lineStep() );
+ return d->mapToDouble( base::singleStep() );
}
@@ -1073,5 +1076,5 @@ void KDoubleSpinBox::updateValidator() {
d->mValidator = new KDoubleValidator( minValue(), maxValue(), precision(),
this, "d->mValidator" );
- base::setValidator( d->mValidator );
+ lineEdit()->setValidator( d->mValidator );
} else
d->mValidator->setRange( minValue(), maxValue(), precision() );
diff --git a/microkde/kdeui/knuminput.h b/microkde/kdeui/knuminput.h
index 123fefa..9f9e200 100644
--- a/microkde/kdeui/knuminput.h
+++ b/microkde/kdeui/knuminput.h
@@ -30,4 +30,9 @@
#include <qwidget.h>
#include <qspinbox.h>
+#include <QLineEdit>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QLabel>
+#include <QEvent>
class QLabel;
@@ -82,5 +87,5 @@ public:
*
*/
- virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop);
+ virtual void setLabel(const QString & label, int a = Qt::AlignLeft | Qt::AlignTop);
/**
@@ -303,5 +308,5 @@ public:
* @reimplemented
*/
- virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop);
+ virtual void setLabel(const QString & label, int a = Qt::AlignLeft | Qt::AlignTop);
/**
@@ -589,5 +594,5 @@ public:
* @reimplemented
*/
- virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop);
+ virtual void setLabel(const QString & label, int a = Qt::AlignLeft | Qt::AlignTop);
/**
* @reimplemented
@@ -759,4 +764,8 @@ public:
void setEditFocus(bool mark);
+ void setValidator(const QValidator *v) {
+ lineEdit()->setValidator(v);
+ }
+
protected:
diff --git a/microkde/kdeui/kpopupmenu.cpp b/microkde/kdeui/kpopupmenu.cpp
index 96d2a87..7e1503c 100644
--- a/microkde/kdeui/kpopupmenu.cpp
+++ b/microkde/kdeui/kpopupmenu.cpp
@@ -2,8 +2,11 @@
#include <kpopupmenu.h>
#include <qtimer.h>
+//Added by qt3to4:
+#include <QFocusEvent>
+#include <Q3PopupMenu>
KPopupMenu::KPopupMenu ( QWidget * parent, const char * name )
- : QPopupMenu ( parent, name ) {;}
+ : Q3PopupMenu ( parent, name ) {;}
diff --git a/microkde/kdeui/kpopupmenu.h b/microkde/kdeui/kpopupmenu.h
index fd00f36..1c903ad 100644
--- a/microkde/kdeui/kpopupmenu.h
+++ b/microkde/kdeui/kpopupmenu.h
@@ -2,5 +2,7 @@
#define KPOPUPMENU_H
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
+//Added by qt3to4:
+#include <QFocusEvent>
#ifdef DESKTOP_VERSION
#include <qmenubar.h>
@@ -10,5 +12,5 @@
#endif
-class KPopupMenu : public QPopupMenu
+class KPopupMenu : public Q3PopupMenu
{
Q_OBJECT
diff --git a/microkde/kdeui/kseparator.cpp b/microkde/kdeui/kseparator.cpp
index d028420..66000f0 100644
--- a/microkde/kdeui/kseparator.cpp
+++ b/microkde/kdeui/kseparator.cpp
@@ -19,4 +19,6 @@
#include <qstyle.h>
+//Added by qt3to4:
+#include <Q3Frame>
#include <kdebug.h>
@@ -27,6 +29,6 @@
#include "kseparator.h"
-KSeparator::KSeparator(QWidget* parent, const char* name, WFlags f)
- : QFrame(parent, name, f)
+KSeparator::KSeparator(QWidget* parent, const char* name, Qt::WFlags f)
+ : Q3Frame(parent, name, f)
{
setLineWidth(1);
@@ -37,6 +39,6 @@ KSeparator::KSeparator(QWidget* parent, const char* name, WFlags f)
-KSeparator::KSeparator(int orientation, QWidget* parent, const char* name, WFlags f)
- : QFrame(parent, name, f)
+KSeparator::KSeparator(int orientation, QWidget* parent, const char* name, Qt::WFlags f)
+ : Q3Frame(parent, name, f)
{
setLineWidth(1);
@@ -51,7 +53,7 @@ void KSeparator::setOrientation(int orientation)
switch(orientation)
{
- case Vertical:
+ case Qt::Vertical:
case VLine:
- setFrameStyle( QFrame::VLine | QFrame::Sunken );
+ setFrameStyle( Q3Frame::VLine | Q3Frame::Sunken );
setMinimumSize(2, 0);
break;
@@ -60,7 +62,7 @@ void KSeparator::setOrientation(int orientation)
kdWarning() << "KSeparator::setOrientation(): invalid orientation, using default orientation HLine" << endl;
- case Horizontal:
+ case Qt::Horizontal:
case HLine:
- setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ setFrameStyle( Q3Frame::HLine | Q3Frame::Sunken );
setMinimumSize(0, 2);
break;
diff --git a/microkde/kdeui/kseparator.h b/microkde/kdeui/kseparator.h
index 6d2712a..c673475 100644
--- a/microkde/kdeui/kseparator.h
+++ b/microkde/kdeui/kseparator.h
@@ -21,5 +21,5 @@
#define __KSEPARATOR_H__
-#include <qframe.h>
+#include <q3frame.h>
/**
@@ -29,5 +29,5 @@
* @version $Id$
*/
-class KSeparator : public QFrame
+class KSeparator : public Q3Frame
{
Q_OBJECT
@@ -37,5 +37,5 @@ class KSeparator : public QFrame
* Constructor.
**/
- KSeparator(QWidget* parent=0, const char* name=0, WFlags f=0);
+ KSeparator(QWidget* parent=0, const char* name=0, Qt::WFlags f=0);
/**
* Constructor.
@@ -45,5 +45,5 @@ class KSeparator : public QFrame
**/
KSeparator(int orientation, QWidget* parent=0, const char* name=0,
- WFlags f=0);
+ Qt::WFlags f=0);
/**
diff --git a/microkde/kdeui/ksqueezedtextlabel.cpp b/microkde/kdeui/ksqueezedtextlabel.cpp
index 37fa29a..e2c61fd 100644
--- a/microkde/kdeui/ksqueezedtextlabel.cpp
+++ b/microkde/kdeui/ksqueezedtextlabel.cpp
@@ -19,4 +19,7 @@
#include "ksqueezedtextlabel.h"
#include <qtooltip.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QLabel>
KSqueezedTextLabel::KSqueezedTextLabel( const QString &text , QWidget *parent, const char *name )
diff --git a/microkde/kdeui/ksqueezedtextlabel.h b/microkde/kdeui/ksqueezedtextlabel.h
index 1634adc..487d0b0 100644
--- a/microkde/kdeui/ksqueezedtextlabel.h
+++ b/microkde/kdeui/ksqueezedtextlabel.h
@@ -21,4 +21,6 @@
#include <qlabel.h>
+//Added by qt3to4:
+#include <QResizeEvent>
/**
diff --git a/microkde/kdeui/kstdaction.cpp b/microkde/kdeui/kstdaction.cpp
index cfd7b54..f0d162d 100644
--- a/microkde/kdeui/kstdaction.cpp
+++ b/microkde/kdeui/kstdaction.cpp
@@ -20,5 +20,5 @@
#include <qtoolbutton.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
//US #include <kaboutdata.h>
diff --git a/microkde/kdeui/ktoolbar.cpp b/microkde/kdeui/ktoolbar.cpp
index 027e5e9..02db316 100644
--- a/microkde/kdeui/ktoolbar.cpp
+++ b/microkde/kdeui/ktoolbar.cpp
@@ -26,7 +26,18 @@
#ifdef KDE_USE_FINAL
#undef Always
-#include <qdockwindow.h>
+#include <q3dockwindow.h>
#endif
-
+//Added by qt3to4:
+#include <Q3ValueList>
+#include <Q3PtrList>
+#include <QPixmap>
+#include <Q3Frame>
+#include <QResizeEvent>
+#include <QMouseEvent>
+#include <QChildEvent>
+#include <QEvent>
+#include <QShowEvent>
+#include <QDesktopWidget>
+#include <QBoxLayout>
@@ -41,5 +52,5 @@
#include <qstring.h>
#include <qrect.h>
-#include <qobjectlist.h>
+#include <qobject.h>
#include <qtimer.h>
#include <qstyle.h>
@@ -70,6 +81,6 @@
#include "kconfigbase.h"
-#include <qpopupmenu.h>
-#include <qmainwindow.h>
+#include <q3popupmenu.h>
+#include <q3mainwindow.h>
enum {
@@ -103,5 +114,5 @@ public:
//US oldPos = Qt::DockUnmanaged;
- oldPos = QMainWindow::Unmanaged;
+ oldPos = Qt::Unmanaged;
modified = m_isHorizontal = positioned = FALSE;
@@ -130,5 +141,5 @@ public:
QWidget *m_parent;
- QMainWindow::ToolBarDock oldPos;
+ Qt::ToolBarDock oldPos;
KXMLGUIClient *m_xmlguiClient;
@@ -137,15 +148,15 @@ public:
{
//US ToolBarInfo() : index( 0 ), offset( -1 ), newline( FALSE ), dock( Qt::DockTop ) {}
- ToolBarInfo() : index( 0 ), offset( -1 ), newline( FALSE ), dock( QMainWindow::Top ) {}
+ ToolBarInfo() : index( 0 ), offset( -1 ), newline( FALSE ), dock( Qt::DockTop ) {}
//US ToolBarInfo( Qt::Dock d, int i, bool n, int o ) : index( i ), offset( o ), newline( n ), dock( d ) {}
- ToolBarInfo( QMainWindow::ToolBarDock d, int i, bool n, int o ) : index( i ), offset( o ), newline( n ), dock( d ) {}
+ ToolBarInfo( Qt::ToolBarDock d, int i, bool n, int o ) : index( i ), offset( o ), newline( n ), dock( d ) {}
int index, offset;
bool newline;
//US Qt::Dock dock;
- QMainWindow::ToolBarDock dock;
+ Qt::ToolBarDock dock;
};
ToolBarInfo toolBarInfo;
- QValueList<int> iconSizes;
+ Q3ValueList<int> iconSizes;
QTimer repaintTimer;
@@ -159,13 +170,13 @@ public:
QString PositionDefault;
- QPtrList<QWidget> idleButtons;
+ Q3PtrList<QWidget> idleButtons;
};
-KToolBarSeparator::KToolBarSeparator(Orientation o , bool l, QToolBar *parent,
+KToolBarSeparator::KToolBarSeparator(Qt::Orientation o , bool l, Q3ToolBar *parent,
const char* name )
- :QFrame( parent, name ), line( l )
+ :Q3Frame( parent, name ), line( l )
{
- connect( parent, SIGNAL(orientationChanged(Orientation)),
- this, SLOT(setOrientation(Orientation)) );
+ connect( parent, SIGNAL(orientationChanged(Qt::Orientation)),
+ this, SLOT(setOrientation(Qt::Orientation)) );
setOrientation( o );
setBackgroundMode( parent->backgroundMode() );
@@ -173,9 +184,9 @@ KToolBarSeparator::KToolBarSeparator(Orientation o , bool l, QToolBar *parent,
}
-void KToolBarSeparator::setOrientation( Orientation o )
+void KToolBarSeparator::setOrientation( Qt::Orientation o )
{
orient = o;
if ( line ) {
- if ( orientation() == Vertical )
+ if ( orientation() == Qt::Vertical )
setFrameStyle( HLine + Sunken );
else
@@ -193,5 +204,5 @@ void KToolBarSeparator::styleChange( QStyle& )
QSize KToolBarSeparator::sizeHint() const
{
- return orientation() == Vertical ? QSize( 0, 6 ) : QSize( 6, 0 );
+ return orientation() == Qt::Vertical ? QSize( 0, 6 ) : QSize( 6, 0 );
}
@@ -203,10 +214,10 @@ QSizePolicy KToolBarSeparator::sizePolicy() const
KToolBar::KToolBar( QWidget *parent, const char *name, bool honorStyle, bool readConfig )
#ifdef DESKTOP_VERSION
- : QToolBar( QString::fromLatin1( name ),
- parent && parent->inherits( "QMainWindow" ) ? static_cast<QMainWindow*>(parent) : 0,
+ : Q3ToolBar( QString::fromLatin1( name ),
+ parent && parent->inherits( "Q3MainWindow" ) ? static_cast<Q3MainWindow*>(parent) : 0,
parent, FALSE,
name ? name : "mainToolBar")
#else
- : QPEToolBar( parent && parent->inherits( "QMainWindow" ) ? static_cast<QMainWindow*>(parent) : 0,
+ : QPEToolBar( parent && parent->inherits( "Q3MainWindow" ) ? static_cast<Q3MainWindow*>(parent) : 0,
QString::fromLatin1( name ))
@@ -217,7 +228,7 @@ KToolBar::KToolBar( QWidget *parent, const char *name, bool honorStyle, bool rea
}
-KToolBar::KToolBar( QMainWindow *parentWindow, QMainWindow::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig )
+KToolBar::KToolBar( Q3MainWindow *parentWindow, Qt::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig )
#ifdef DESKTOP_VERSION
- : QToolBar( QString::fromLatin1( name ),
+ : Q3ToolBar( QString::fromLatin1( name ),
parentWindow, dock, newLine,
name ? name : "mainToolBar")
@@ -232,7 +243,7 @@ KToolBar::KToolBar( QMainWindow *parentWindow, QMainWindow::ToolBarDock dock, bo
}
-KToolBar::KToolBar( QMainWindow *parentWindow, QWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig )
+KToolBar::KToolBar( Q3MainWindow *parentWindow, QWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig )
#ifdef DESKTOP_VERSION
- : QToolBar( QString::fromLatin1( name ),
+ : Q3ToolBar( QString::fromLatin1( name ),
parentWindow, dock, newLine,
name ? name : "mainToolBar")
@@ -281,6 +292,6 @@ void KToolBar::init( bool readConfig, bool honorStyle )
if ( mainWindow() )
- connect( mainWindow(), SIGNAL( toolBarPositionChanged( QToolBar * ) ),
- this, SLOT( toolBarPosChanged( QToolBar * ) ) );
+ connect( mainWindow(), SIGNAL( toolBarPositionChanged( Q3ToolBar * ) ),
+ this, SLOT( toolBarPosChanged( Q3ToolBar * ) ) );
// Hack to make sure we recalculate our size when we dock.
@@ -342,5 +353,5 @@ int KToolBar::insertButton(const QPixmap& pixmap, int id, const char *signal,
-int KToolBar::insertButton(const QString& icon, int id, QPopupMenu *popup,
+int KToolBar::insertButton(const QString& icon, int id, Q3PopupMenu *popup,
bool enabled, const QString &text, int index )
{
@@ -354,5 +365,5 @@ int KToolBar::insertButton(const QString& icon, int id, QPopupMenu *popup,
-int KToolBar::insertButton(const QPixmap& pixmap, int id, QPopupMenu *popup,
+int KToolBar::insertButton(const QPixmap& pixmap, int id, Q3PopupMenu *popup,
bool enabled, const QString &text, int index )
{
@@ -541,5 +552,5 @@ void KToolBar::setButtonIcon( int id, const QString& _icon )
}
-void KToolBar::setButtonIconSet( int id, const QIconSet& iconset )
+void KToolBar::setButtonIconSet( int id, const QIcon& iconset )
{
Id2WidgetMap::Iterator it = id2widget.find( id );
@@ -553,5 +564,5 @@ void KToolBar::setButtonIconSet( int id, const QIconSet& iconset )
-void KToolBar::setDelayedPopup (int id , QPopupMenu *_popup, bool toggle )
+void KToolBar::setDelayedPopup (int id , Q3PopupMenu *_popup, bool toggle )
{
Id2WidgetMap::Iterator it = id2widget.find( id );
@@ -788,5 +799,5 @@ void KToolBar::setItemAutoSized (int id, bool yes )
void KToolBar::clear ()
{
- QToolBar::clear();
+ Q3ToolBar::clear();
widget2id.clear();
id2widget.clear();
@@ -877,5 +888,5 @@ void KToolBar::setBarPos (BarPosition bpos)
return;
//US mainWindow()->moveDockWindow( this, (Dock)bpos );
- mainWindow()->moveToolBar( this, (QMainWindow::ToolBarDock)bpos );
+ mainWindow()->moveToolBar( this, (Qt::ToolBarDock)bpos );
}
@@ -883,13 +894,13 @@ void KToolBar::setBarPos (BarPosition bpos)
const KToolBar::BarPosition KToolBar::barPos()
{
- if ( !(QMainWindow*)mainWindow() )
+ if ( !(Q3MainWindow*)mainWindow() )
return KToolBar::Top;
//US Dock dock;
- QMainWindow::ToolBarDock dock;
+ Qt::ToolBarDock dock;
int dm1, dm2;
bool dm3;
- ((QMainWindow*)mainWindow())->getLocation( (QToolBar*)this, dock, dm1, dm3, dm2 );
+ ((Q3MainWindow*)mainWindow())->getLocation( (Q3ToolBar*)this, dock, dm1, dm3, dm2 );
//US if ( dock == DockUnmanaged ) {
- if ( dock == QMainWindow::Unmanaged ) {
+ if ( dock == Qt::Unmanaged ) {
return (KToolBar::BarPosition)Top;
}
@@ -968,5 +979,5 @@ void KToolBar::setIconText(IconText icontext, bool update)
// ugly hack to force a QMainWindow::triggerLayout( TRUE )
if ( mainWindow() ) {
- QMainWindow *mw = mainWindow();
+ Q3MainWindow *mw = mainWindow();
mw->setUpdatesEnabled( FALSE );
mw->setToolBarsMovable( !mw->toolBarsMovable() );
@@ -1005,5 +1016,5 @@ void KToolBar::setIconSize(int size, bool update)
// ugly hack to force a QMainWindow::triggerLayout( TRUE )
if ( mainWindow() ) {
- QMainWindow *mw = mainWindow();
+ Q3MainWindow *mw = mainWindow();
mw->setUpdatesEnabled( FALSE );
mw->setToolBarsMovable( !mw->toolBarsMovable() );
@@ -1063,8 +1074,8 @@ void KToolBar::setFlat (bool flag)
if ( flag )
//US mainWindow()->moveDockWindow( this, DockMinimized );
- mainWindow()->moveToolBar( this, QMainWindow::Minimized );
+ mainWindow()->moveToolBar( this, Qt::Minimized );
else
//US mainWindow()->moveDockWindow( this, DockTop );
- mainWindow()->moveToolBar( this, QMainWindow::Top );
+ mainWindow()->moveToolBar( this, Qt::Top );
// And remember to save the new look later
/*US
@@ -1250,7 +1261,7 @@ void KToolBar::mousePressEvent ( QMouseEvent *m )
if ( !mainWindow() )
return;
- QMainWindow *mw = mainWindow();
+ Q3MainWindow *mw = mainWindow();
if ( mw->toolBarsMovable() && d->m_enableContext ) {
- if ( m->button() == RightButton ) {
+ if ( m->button() == Qt::RightButton ) {
int i = contextMenu()->exec( m->globalPos(), 0 );
switch ( i ) {
@@ -1259,17 +1270,17 @@ void KToolBar::mousePressEvent ( QMouseEvent *m )
case CONTEXT_LEFT:
//US mw->moveDockWindow( this, DockLeft );
- mw->moveToolBar( this, QMainWindow::Left );
+ mw->moveToolBar( this, Qt::Left );
break;
case CONTEXT_RIGHT:
//US mw->moveDockWindow( this, DockRight );
- mw->moveToolBar( this, QMainWindow::Right );
+ mw->moveToolBar( this, Qt::Right );
break;
case CONTEXT_TOP:
//US mw->moveDockWindow( this, DockTop );
- mw->moveToolBar( this, QMainWindow::Top );
+ mw->moveToolBar( this, Qt::Top );
break;
case CONTEXT_BOTTOM:
//US mw->moveDockWindow( this, DockBottom );
- mw->moveToolBar( this, QMainWindow::Bottom );
+ mw->moveToolBar( this, Qt::Bottom );
break;
case CONTEXT_FLOAT:
@@ -1277,5 +1288,5 @@ void KToolBar::mousePressEvent ( QMouseEvent *m )
case CONTEXT_FLAT:
//US mw->moveDockWindow( this, DockMinimized );
- mw->moveToolBar( this, QMainWindow::Minimized );
+ mw->moveToolBar( this, Qt::Minimized );
break;
case CONTEXT_ICONS:
@@ -1333,5 +1344,5 @@ void KToolBar::rebuildLayout()
continue;
}
- if ( w->inherits( "QPopupMenu" ) )
+ if ( w->inherits( "Q3PopupMenu" ) )
continue;
l->addWidget( w );
@@ -1365,5 +1376,5 @@ void KToolBar::childEvent( QChildEvent *e )
QWidget * w = (QWidget*)e->child();
if ( e->type() == QEvent::ChildInserted ) {
- if ( !e->child()->inherits( "QPopupMenu" ) &&
+ if ( !e->child()->inherits( "Q3PopupMenu" ) &&
::qstrcmp( "qt_dockwidget_internal", e->child()->name() ) != 0 ) {
@@ -1376,8 +1387,8 @@ void KToolBar::childEvent( QChildEvent *e )
}
}
- } else {
+ } else if( e->type() == QEvent::ChildRemoved ) {
removeWidgetInternal( w );
}
- if ( isVisibleTo( 0 ) )
+ /* TODO:hacker: if ( isVisibleTo( 0 ) )
{
QBoxLayout *l = boxLayout();
@@ -1391,7 +1402,7 @@ void KToolBar::childEvent( QChildEvent *e )
}
layoutTimer->start( 50, TRUE );
- }
+ } */
}
- QToolBar::childEvent( e );
+ Q3ToolBar::childEvent( e );
}
@@ -1417,5 +1428,5 @@ void KToolBar::repaintMe()
{
setUpdatesEnabled( true );
- QToolBar::repaint( true );
+ Q3ToolBar::repaint( true );
qDebug(" KToolBar::repaintMe() ");
}
@@ -1424,10 +1435,10 @@ void KToolBar::showEvent( QShowEvent *e )
{
rebuildLayout();
- QToolBar::showEvent( e );
+ Q3ToolBar::showEvent( e );
}
void KToolBar::setStretchableWidget( QWidget *w )
{
- QToolBar::setStretchableWidget( w );
+ Q3ToolBar::setStretchableWidget( w );
stretchableWidget = w;
}
@@ -1435,5 +1446,5 @@ void KToolBar::setStretchableWidget( QWidget *w )
QSizePolicy KToolBar::sizePolicy() const
{
- if ( orientation() == Horizontal )
+ if ( orientation() == Qt::Horizontal )
return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
else
@@ -1443,5 +1454,5 @@ QSizePolicy KToolBar::sizePolicy() const
QSize KToolBar::sizeHint() const
{
- QSize sh = QToolBar::sizeHint();
+ QSize sh = Q3ToolBar::sizeHint();
//qDebug("%x KToolBar::sizeHint() %d %d ",this, QToolBar::sizeHint().width(),QToolBar::sizeHint().height() );
if ( sh.height() <= 20 || sh.width() < 60 )
@@ -1509,5 +1520,5 @@ QSize KToolBar::sizeHint() const
default:
- minSize = QToolBar::sizeHint();
+ minSize = Q3ToolBar::sizeHint();
break;
}
@@ -1533,10 +1544,10 @@ bool KToolBar::highlight() const
void KToolBar::hide()
{
- QToolBar::hide();
+ Q3ToolBar::hide();
}
void KToolBar::show()
{
- QToolBar::show();
+ Q3ToolBar::show();
}
@@ -1545,5 +1556,5 @@ void KToolBar::resizeEvent( QResizeEvent *e )
bool b = isUpdatesEnabled();
setUpdatesEnabled( FALSE );
- QToolBar::resizeEvent( e );
+ Q3ToolBar::resizeEvent( e );
if (b)
d->repaintTimer.start( 100, true );
@@ -1727,5 +1738,5 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGr
}
- QMainWindow *mw = mainWindow();
+ Q3MainWindow *mw = mainWindow();
// ...and if we should highlight
@@ -1806,17 +1817,17 @@ void KToolBar::applySettings(KConfig *config, const QString &_configGroup)
pos = DockMinimized;
*/
- QMainWindow::ToolBarDock pos(QMainWindow::Top);
+ Qt::ToolBarDock pos(Qt::DockTop);
if ( position == "Top" )
- pos = QMainWindow::Top;
+ pos = Qt::Top;
else if ( position == "Bottom" )
- pos = QMainWindow::Bottom;
+ pos = Qt::Bottom;
else if ( position == "Left" )
- pos = QMainWindow::Left;
+ pos = Qt::Left;
else if ( position == "Right" )
- pos = QMainWindow::Right;
+ pos = Qt::Right;
else if ( position == "Floating" )
- pos = QMainWindow::TornOff;
+ pos = Qt::TornOff;
else if ( position == "Flat" )
- pos = QMainWindow::Minimized;
+ pos = Qt::Minimized;
//kdDebug(220) << "KToolBar::applySettings hidden=" << hidden << endl;
@@ -1828,5 +1839,5 @@ void KToolBar::applySettings(KConfig *config, const QString &_configGroup)
if ( mainWindow() )
{
- QMainWindow *mw = mainWindow();
+ Q3MainWindow *mw = mainWindow();
//kdDebug(220) << "KToolBar::applySettings updating ToolbarInfo" << endl;
@@ -1863,5 +1874,5 @@ bool KToolBar::event( QEvent *e )
}
- return QToolBar::event( e );
+ return Q3ToolBar::event( e );
}
@@ -1881,12 +1892,12 @@ void KToolBar::slotRepaint()
}
-void KToolBar::toolBarPosChanged( QToolBar *tb )
+void KToolBar::toolBarPosChanged( Q3ToolBar *tb )
{
if ( tb != this )
return;
//US if ( d->oldPos == DockMinimized )
- if ( d->oldPos == QMainWindow::Minimized )
+ if ( d->oldPos == Qt::Minimized )
rebuildLayout();
- d->oldPos = (QMainWindow::ToolBarDock)barPos();
+ d->oldPos = (Qt::ToolBarDock)barPos();
/*US
if ( mainWindow() && mainWindow()->inherits( "KMainWindow" ) )
@@ -2032,5 +2043,5 @@ void KToolBar::getAttributes( QString &position, QString &icontext, int &index )
if ( mainWindow() ) {
- QMainWindow::ToolBarDock dock;
+ Qt::ToolBarDock dock;
bool newLine;
int offset;
@@ -2101,5 +2112,5 @@ void KToolBar::positionYourself( bool force )
//US KPopupMenu *KToolBar::contextMenu()
-QPopupMenu *KToolBar::contextMenu()
+Q3PopupMenu *KToolBar::contextMenu()
{
if ( context )
@@ -2109,9 +2120,9 @@ QPopupMenu *KToolBar::contextMenu()
// won't be deleted by QToolBar::clear().
//US context = new KPopupMenu( this, "qt_dockwidget_internal" );
- context = new QPopupMenu( this, "qt_dockwidget_internal" );
+ context = new Q3PopupMenu( this, "qt_dockwidget_internal" );
//US context->insertTitle(i18n("Toolbar Menu"));
//US KPopupMenu *orient = new KPopupMenu( context, "orient" );
- QPopupMenu *orient = new QPopupMenu( context, "orient" );
+ Q3PopupMenu *orient = new Q3PopupMenu( context, "orient" );
orient->insertItem( i18n("toolbar position string","Top"), CONTEXT_TOP );
orient->insertItem( i18n("toolbar position string","Left"), CONTEXT_LEFT );
@@ -2123,5 +2134,5 @@ QPopupMenu *KToolBar::contextMenu()
//US KPopupMenu *mode = new KPopupMenu( context, "mode" );
- QPopupMenu *mode = new QPopupMenu( context, "mode" );
+ Q3PopupMenu *mode = new Q3PopupMenu( context, "mode" );
mode->insertItem( i18n("Icons Only"), CONTEXT_ICONS );
mode->insertItem( i18n("Text Only"), CONTEXT_TEXT );
@@ -2130,8 +2141,8 @@ QPopupMenu *KToolBar::contextMenu()
//US KPopupMenu *size = new KPopupMenu( context, "size" );
- QPopupMenu *size = new QPopupMenu( context, "size" );
+ Q3PopupMenu *size = new Q3PopupMenu( context, "size" );
size->insertItem( i18n("Default"), CONTEXT_ICONSIZES );
// Query the current theme for available sizes
- QValueList<int> avSizes;
+ Q3ValueList<int> avSizes;
/*US
KIconTheme *theme = KGlobal::instance()->iconLoader()->theme();
@@ -2146,5 +2157,5 @@ QPopupMenu *KToolBar::contextMenu()
d->iconSizes = avSizes;
- QValueList<int>::Iterator it;
+ Q3ValueList<int>::Iterator it;
for (it=avSizes.begin(); it!=avSizes.end(); it++) {
QString text;
@@ -2219,6 +2230,6 @@ void KToolBar::slotContextAboutToShow()
}
- QValueList<int>::ConstIterator iIt = d->iconSizes.begin();
- QValueList<int>::ConstIterator iEnd = d->iconSizes.end();
+ Q3ValueList<int>::ConstIterator iIt = d->iconSizes.begin();
+ Q3ValueList<int>::ConstIterator iEnd = d->iconSizes.end();
for (; iIt != iEnd; ++iIt )
context->setItemChecked( CONTEXT_ICONSIZES + *iIt, false );
diff --git a/microkde/kdeui/ktoolbar.h b/microkde/kdeui/ktoolbar.h
index 3319fa8..4e00abd 100644
--- a/microkde/kdeui/ktoolbar.h
+++ b/microkde/kdeui/ktoolbar.h
@@ -27,25 +27,33 @@
#ifndef DESKTOP_VERSION
#define private public
-#include <qtoolbar.h>
+#include <q3toolbar.h>
#undef private
#include <qpe/qpetoolbar.h>
#else
-#include <qtoolbar.h>
+#include <q3toolbar.h>
#endif
-#include <qmainwindow.h>
+#include <q3mainwindow.h>
#include <qcombobox.h>
#include <qmap.h>
-#include <qptrlist.h>
+#include <q3ptrlist.h>
+//Added by qt3to4:
+#include <QPixmap>
+#include <QResizeEvent>
+#include <Q3PopupMenu>
+#include <QMouseEvent>
+#include <QChildEvent>
+#include <QEvent>
+#include <QShowEvent>
#include <kglobal.h>
-#include <qguardedptr.h>
-#include <qframe.h>
-#include <qiconset.h>
+#include <qpointer.h>
+#include <q3frame.h>
+#include <qicon.h>
class QDomElement;
class QSize;
class QPixmap;
-class QPopupMenu;
+class Q3PopupMenu;
class QStringList;
class QDomDocument;
@@ -64,20 +72,20 @@ class KXMLGUIClient;
class KToolBarPrivate;
-class KToolBarSeparator : public QFrame
+class KToolBarSeparator : public Q3Frame
{
Q_OBJECT
public:
- KToolBarSeparator( Orientation, bool l, QToolBar *parent, const char* name=0 );
+ KToolBarSeparator( Qt::Orientation, bool l, Q3ToolBar *parent, const char* name=0 );
QSize sizeHint() const;
- Orientation orientation() const { return orient; }
+ Qt::Orientation orientation() const { return orient; }
QSizePolicy sizePolicy() const;
bool showLine() const { return line; }
public slots:
- void setOrientation( Orientation );
+ void setOrientation( Qt::Orientation );
protected:
void styleChange( QStyle& );
private:
- Orientation orient;
+ Qt::Orientation orient;
bool line;
};
@@ -112,8 +120,8 @@ private:
#ifndef DESKTOP_VERSION
-#define QToolBar QPEToolBar
+#define Q3ToolBar QPEToolBar
#endif
- class KToolBar : public QToolBar
+ class KToolBar : public Q3ToolBar
{
Q_OBJECT
@@ -128,5 +136,5 @@ private:
Q_PROPERTY( QString text READ text WRITE setText )
#ifndef DESKTOP_VERSION
-#undef QToolBar
+#undef Q3ToolBar
#endif
public:
@@ -176,5 +184,5 @@ public:
* @param readConfig whether to apply the configuration (global and application-specific)
*/
- KToolBar( QMainWindow *parentWindow, QMainWindow::ToolBarDock dock /*= QMainWindow::Top*/, bool newLine = false,
+ KToolBar( Q3MainWindow *parentWindow, Qt::ToolBarDock dock /*= QMainWindow::Top*/, bool newLine = false,
const char *name = 0, bool honor_style = FALSE, bool readConfig = TRUE );
@@ -194,5 +202,5 @@ public:
* @param readConfig whether to apply the configuration (global and application-specific)
*/
- KToolBar( QMainWindow *parentWindow, QWidget *dock, bool newLine = false,
+ KToolBar( Q3MainWindow *parentWindow, QWidget *dock, bool newLine = false,
const char *name = 0, bool honor_style = FALSE, bool readConfig = TRUE );
@@ -304,5 +312,5 @@ public:
* with tables, drawings etc. Just don't fiddle with events there.
*/
- int insertButton(const QString& icon, int id, QPopupMenu *popup,
+ int insertButton(const QString& icon, int id, Q3PopupMenu *popup,
bool enabled, const QString&_text, int index=-1);
@@ -319,5 +327,5 @@ public:
* with tables, drawings etc. Just don't fiddle with events there.
*/
- int insertButton(const QPixmap& pixmap, int id, QPopupMenu *popup,
+ int insertButton(const QPixmap& pixmap, int id, Q3PopupMenu *popup,
bool enabled, const QString&_text, int index=-1);
@@ -360,5 +368,5 @@ public:
const QString& tooltiptext=QString::null,
int size=70, int index=-1,
- QComboBox::Policy policy = QComboBox::AtBottom);
+ QComboBox::Policy policy = QComboBox::InsertAtBottom);
/**
@@ -376,5 +384,5 @@ public:
const QString& tooltiptext=QString::null,
int size=70, int index=-1,
- QComboBox::Policy policy = QComboBox::AtBottom);
+ QComboBox::Policy policy = QComboBox::InsertAtBottom);
/**
@@ -466,5 +474,5 @@ public:
* Can be used while button is visible.
*/
- void setButtonIconSet( int id, const QIconSet& iconset );
+ void setButtonIconSet( int id, const QIcon& iconset );
/**
@@ -492,5 +500,5 @@ public:
* other popups.
*/
- void setDelayedPopup (int id , QPopupMenu *_popup, bool toggle = false);
+ void setDelayedPopup (int id , Q3PopupMenu *_popup, bool toggle = false);
/**
@@ -1061,5 +1069,5 @@ public:
public slots:
virtual void setIconText( const QString &txt )
- { QToolBar::setIconText( txt ); }
+ { Q3ToolBar::setIconText( txt ); }
void slotRepaint();
@@ -1078,5 +1086,5 @@ private slots:
void slotAppearanceChanged();
void slotIconChanged(int);
- void toolBarPosChanged( QToolBar *tb );
+ void toolBarPosChanged( Q3ToolBar *tb );
void slotContextAboutToShow();
void widgetDestroyed();
@@ -1091,5 +1099,5 @@ private:
void getAttributes( QString &position, QString &icontext, int &index );
//US KPopupMenu *contextMenu();
- QPopupMenu *contextMenu();
+ Q3PopupMenu *contextMenu();
QMap<QWidget*, int > widget2id;
@@ -1097,8 +1105,8 @@ private:
Id2WidgetMap id2widget;
//US KPopupMenu *context;
- QPopupMenu *context;
- QPtrList<QWidget> widgets;
+ Q3PopupMenu *context;
+ Q3PtrList<QWidget> widgets;
QTimer *layoutTimer;
- QGuardedPtr<QWidget> stretchableWidget, rightAligned;
+ QPointer<QWidget> stretchableWidget, rightAligned;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/microkde/kdeui/ktoolbarbutton.cpp b/microkde/kdeui/ktoolbarbutton.cpp
index 1d5d0e5..7b98b32 100644
--- a/microkde/kdeui/ktoolbarbutton.cpp
+++ b/microkde/kdeui/ktoolbarbutton.cpp
@@ -34,8 +34,12 @@
#include <qtooltip.h>
#include <qbitmap.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
#include <qcursor.h>
#include <qpainter.h>
#include <qlayout.h>
+//Added by qt3to4:
+#include <QPixmap>
+#include <QMouseEvent>
+#include <QEvent>
#include <kapplication.h>
@@ -49,5 +53,5 @@
#include <kmainwindow.h>
-template class QIntDict<KToolBarButton>;
+template class Q3IntDict<KToolBarButton>;
class KToolBarButtonPrivate
@@ -116,5 +120,5 @@ KToolBarButton::KToolBarButton( const QString& _icon, int _id,
//US d->m_instance = _instance;
- setFocusPolicy( NoFocus );
+ setFocusPolicy( Qt::NoFocus );
// connect all of our slots and start trapping events
@@ -147,5 +151,5 @@ KToolBarButton::KToolBarButton( const QPixmap& pixmap, int _id,
QToolButton::setTextLabel(txt);
- setFocusPolicy( NoFocus );
+ setFocusPolicy( Qt::NoFocus );
// connect all of our slots and start trapping events
@@ -162,5 +166,5 @@ KToolBarButton::KToolBarButton( const QPixmap& pixmap, int _id,
// set our pixmap and do our initial setup
- setIconSet( QIconSet( pixmap ));
+ setIconSet( QIcon( pixmap ));
modeChange();
}
@@ -293,5 +297,5 @@ void KToolBarButton::setIcon( const QString &icon )
}
-void KToolBarButton::setIconSet( const QIconSet &iconset )
+void KToolBarButton::setIconSet( const QIcon &iconset )
{
QToolButton::setIconSet( iconset );
@@ -306,6 +310,6 @@ void KToolBarButton::setPixmap( const QPixmap &pixmap )
return;
}
- QIconSet set = iconSet();
- set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Active );
+ QIcon set = iconSet();
+ set.setPixmap( pixmap, QIcon::Automatic, QIcon::Active );
QToolButton::setIconSet( set );
}
@@ -313,6 +317,6 @@ void KToolBarButton::setPixmap( const QPixmap &pixmap )
void KToolBarButton::setDefaultPixmap( const QPixmap &pixmap )
{
- QIconSet set = iconSet();
- set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Normal );
+ QIcon set = iconSet();
+ set.setPixmap( pixmap, QIcon::Automatic, QIcon::Normal );
QToolButton::setIconSet( set );
}
@@ -320,6 +324,6 @@ void KToolBarButton::setDefaultPixmap( const QPixmap &pixmap )
void KToolBarButton::setDisabledPixmap( const QPixmap &pixmap )
{
- QIconSet set = iconSet();
- set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Disabled );
+ QIcon set = iconSet();
+ set.setPixmap( pixmap, QIcon::Automatic, QIcon::Disabled );
QToolButton::setIconSet( set );
}
@@ -327,5 +331,5 @@ void KToolBarButton::setDisabledPixmap( const QPixmap &pixmap )
void KToolBarButton::setDefaultIcon( const QString& icon )
{
- QIconSet set = iconSet();
+ QIcon set = iconSet();
QPixmap pm;
if (!strcmp(d->m_parent->name(), "mainToolBar"))
@@ -335,5 +339,5 @@ void KToolBarButton::setDefaultIcon( const QString& icon )
pm = /*US d->m_instance->iconLoader()*/KGlobal::iconLoader()->loadIcon( icon, KIcon::Toolbar,
d->m_iconSize );
- set.setPixmap( pm, QIconSet::Automatic, QIconSet::Normal );
+ set.setPixmap( pm, QIcon::Automatic, QIcon::Normal );
QToolButton::setIconSet( set );
}
@@ -341,5 +345,5 @@ void KToolBarButton::setDefaultIcon( const QString& icon )
void KToolBarButton::setDisabledIcon( const QString& icon )
{
- QIconSet set = iconSet();
+ QIcon set = iconSet();
QPixmap pm;
if (!strcmp(d->m_parent->name(), "mainToolBar"))
@@ -349,9 +353,9 @@ void KToolBarButton::setDisabledIcon( const QString& icon )
pm = /*US d->m_instance->iconLoader()*/ KGlobal::iconLoader()->loadIcon( icon, KIcon::Toolbar,
d->m_iconSize );
- set.setPixmap( pm, QIconSet::Automatic, QIconSet::Disabled );
+ set.setPixmap( pm, QIcon::Automatic, QIcon::Disabled );
QToolButton::setIconSet( set );
}
-QPopupMenu *KToolBarButton::popup()
+QMenu *KToolBarButton::popup()
{
// obsolete
@@ -360,5 +364,5 @@ QPopupMenu *KToolBarButton::popup()
}
-void KToolBarButton::setPopup(QPopupMenu *p, bool)
+void KToolBarButton::setPopup(Q3PopupMenu *p, bool)
{
QToolButton::setPopup(p);
@@ -367,5 +371,5 @@ void KToolBarButton::setPopup(QPopupMenu *p, bool)
-void KToolBarButton::setDelayedPopup (QPopupMenu *p, bool)
+void KToolBarButton::setDelayedPopup (Q3PopupMenu *p, bool)
{
QToolButton::setPopup(p);
@@ -452,19 +456,25 @@ void KToolBarButton::drawButton( QPainter *_painter )
{
#ifdef DESKTOP_VERSION
- QStyle::SFlags flags = QStyle::Style_Default;
- QStyle::SCFlags active = QStyle::SC_None;
+ QStyle::State flags = QStyle::State_None;
+ QStyle::SubControls active = QStyle::SC_None;
if (isDown()) {
- flags |= QStyle::Style_Down;
+ flags |= QStyle::State_DownArrow;
active |= QStyle::SC_ToolButton;
}
- if (isEnabled()) flags |= QStyle::Style_Enabled;
- if (isOn()) flags |= QStyle::Style_On;
- if (isEnabled() && d->m_isRaised) flags |= QStyle::Style_Raised;
- if (hasFocus()) flags |= QStyle::Style_HasFocus;
+ if (isEnabled()) flags |= QStyle::State_Enabled;
+ if (isOn()) flags |= QStyle::State_On;
+ if (isEnabled() && d->m_isRaised) flags |= QStyle::State_Raised;
+ if (hasFocus()) flags |= QStyle::State_HasFocus;
+
+ QStyleOptionToolButton qsotb;
+ qsotb.initFrom(this);
+ qsotb.state = flags;
+ qsotb.activeSubControls = active;
+ qsotb.rect = rect();
+ qsotb.palette = palette();
// Draw a styled toolbutton
- style().drawComplexControl(QStyle::CC_ToolButton, _painter, this, rect(),
- colorGroup(), flags, QStyle::SC_ToolButton, active, QStyleOption());
+ style()->drawComplexControl(QStyle::CC_ToolButton, &qsotb, _painter, this);
#else
@@ -485,7 +495,7 @@ void KToolBarButton::drawButton( QPainter *_painter )
isOn() ? QIconSet::On : QIconSet::Off );
*/
- QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic,
- isEnabled() ? (d->m_isActive ? QIconSet::Active : QIconSet::Normal) :
- QIconSet::Disabled);
+ QPixmap pixmap = iconSet().pixmap( QIcon::Automatic,
+ isEnabled() ? (d->m_isActive ? QIcon::Active : QIcon::Normal) :
+ QIcon::Disabled);
if( !pixmap.isNull())
@@ -509,7 +519,7 @@ void KToolBarButton::drawButton( QPainter *_painter )
isOn() ? QIconSet::On : QIconSet::Off );
*/
- QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic,
- isEnabled() ? (d->m_isActive ? QIconSet::Active : QIconSet::Normal) :
- QIconSet::Disabled);
+ QPixmap pixmap = iconSet().pixmap( QIcon::Automatic,
+ isEnabled() ? (d->m_isActive ? QIcon::Active : QIcon::Normal) :
+ QIcon::Disabled);
if( !pixmap.isNull())
@@ -527,5 +537,5 @@ void KToolBarButton::drawButton( QPainter *_painter )
if (!textLabel().isNull())
{
- textFlags = AlignVCenter|AlignLeft;
+ textFlags = Qt::AlignVCenter|Qt::AlignLeft;
if (!pixmap.isNull())
dx = 4 + pixmap.width() + 2;
@@ -545,5 +555,5 @@ void KToolBarButton::drawButton( QPainter *_painter )
if (!textLabel().isNull())
{
- textFlags = AlignVCenter|AlignLeft;
+ textFlags = Qt::AlignVCenter|Qt::AlignLeft;
dx = (width() - fm.width(textLabel())) / 2;
dy = (height() - fm.lineSpacing()) / 2;
@@ -564,7 +574,7 @@ void KToolBarButton::drawButton( QPainter *_painter )
isOn() ? QIconSet::On : QIconSet::Off );
*/
- QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic,
- isEnabled() ? (d->m_isActive ? QIconSet::Active : QIconSet::Normal) :
- QIconSet::Disabled);
+ QPixmap pixmap = iconSet().pixmap( QIcon::Automatic,
+ isEnabled() ? (d->m_isActive ? QIcon::Active : QIcon::Normal) :
+ QIcon::Disabled);
if( !pixmap.isNull())
@@ -582,5 +592,5 @@ void KToolBarButton::drawButton( QPainter *_painter )
if (!textLabel().isNull())
{
- textFlags = AlignBottom|AlignHCenter;
+ textFlags = Qt::AlignBottom|Qt::AlignHCenter;
dx = (width() - fm.width(textLabel())) / 2;
dy = height() - fm.lineSpacing() - 4;
@@ -611,12 +621,16 @@ void KToolBarButton::drawButton( QPainter *_painter )
{
#ifdef DESKTOP_VERSION
- QStyle::SFlags arrowFlags = QStyle::Style_Default;
+ QStyle::State arrowFlags = QStyle::State_None;
+
+ if (isDown()) arrowFlags |= QStyle::State_DownArrow;
+ if (isEnabled()) arrowFlags |= QStyle::State_Enabled;
- if (isDown()) arrowFlags |= QStyle::Style_Down;
- if (isEnabled()) arrowFlags |= QStyle::Style_Enabled;
+ QStyleOption qso;
+ qso.initFrom(this);
+ qso.state = arrowFlags;
+ qso.rect = QRect(width()-7, height()-7, 7, 7);
+ qso.palette = palette();
- style().drawPrimitive(QStyle::PE_ArrowDown, _painter,
- QRect(width()-7, height()-7, 7, 7), colorGroup(),
- arrowFlags, QStyleOption() );
+ style()->drawPrimitive(QStyle::PE_IndicatorArrowDown, &qso, _painter);
#else
style().drawArrow(_painter, Qt::DownArrow, isDown(),
diff --git a/microkde/kdeui/ktoolbarbutton.h b/microkde/kdeui/ktoolbarbutton.h
index 9aaa13c..ad02e4e 100644
--- a/microkde/kdeui/ktoolbarbutton.h
+++ b/microkde/kdeui/ktoolbarbutton.h
@@ -27,6 +27,9 @@
#include <qpixmap.h>
#include <qtoolbutton.h>
-#include <qintdict.h>
+#include <q3intdict.h>
#include <qstring.h>
+//Added by qt3to4:
+#include <QEvent>
+#include <Q3PopupMenu>
#include <kglobal.h>
@@ -35,5 +38,5 @@ class KToolBarButtonPrivate;
//USclass KInstance;
class QEvent;
-class QPopupMenu;
+class Q3PopupMenu;
class QPainter;
@@ -151,5 +154,5 @@ public:
* @param iconset The iconset to use
*/
- virtual void setIconSet( const QIconSet &iconset );
+ virtual void setIconSet( const QIcon &iconset );
#ifndef KDE_NO_COMPAT
@@ -210,5 +213,5 @@ public:
* Return a pointer to this button's popup menu (if it exists)
*/
- QPopupMenu *popup();
+ QMenu *popup();
/**
@@ -225,5 +228,5 @@ public:
* @param p The new popup menu
*/
- void setPopup (QPopupMenu *p, bool unused = false);
+ void setPopup (Q3PopupMenu *p, bool unused = false);
/**
@@ -236,5 +239,5 @@ public:
* @param p the new popup menu
*/
- void setDelayedPopup(QPopupMenu *p, bool unused = false);
+ void setDelayedPopup(Q3PopupMenu *p, bool unused = false);
/**
@@ -304,5 +307,5 @@ private:
* @version $Id$
*/
-class KToolBarButtonList : public QIntDict<KToolBarButton>
+class KToolBarButtonList : public Q3IntDict<KToolBarButton>
{
public:
diff --git a/microkde/kdeui/ktoolbarhandler.cpp b/microkde/kdeui/ktoolbarhandler.cpp
index 7b97233..4d3ace7 100644
--- a/microkde/kdeui/ktoolbarhandler.cpp
+++ b/microkde/kdeui/ktoolbarhandler.cpp
@@ -19,5 +19,7 @@
#include "ktoolbarhandler.h"
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
+//Added by qt3to4:
+#include <Q3PtrList>
#include <kapplication.h>
#include <ktoolbar.h>
@@ -45,5 +47,5 @@ namespace
{
public:
- BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, QPtrList<KToolBar> &oldToolBarList )
+ BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, Q3PtrList<KToolBar> &oldToolBarList )
: m_actionCollection( actionCollection ), m_mainWindow( mainWindow ), m_needsRebuild( false )
{
@@ -71,14 +73,14 @@ namespace
bool needsRebuild() const { return m_needsRebuild; }
- QPtrList<KAction> create()
+ Q3PtrList<KAction> create()
{
if ( !m_needsRebuild )
- return QPtrList<KAction>();
+ return Q3PtrList<KAction>();
- QPtrListIterator<KToolBar> toolBarIt( m_toolBars );
+ Q3PtrListIterator<KToolBar> toolBarIt( m_toolBars );
for ( ; toolBarIt.current(); ++toolBarIt )
handleToolBar( toolBarIt.current() );
- QPtrList<KAction> actions;
+ Q3PtrList<KAction> actions;
if ( m_toolBarActions.count() == 0 )
@@ -92,5 +94,5 @@ namespace
KActionMenu *menuAction = new KActionMenu( i18n( "Toolbars" ), m_actionCollection, "toolbars_submenu_action" );
- QPtrListIterator<KAction> actionIt( m_toolBarActions );
+ Q3PtrListIterator<KAction> actionIt( m_toolBarActions );
for ( ; actionIt.current(); ++actionIt )
menuAction->insert( actionIt.current() );
@@ -100,5 +102,5 @@ namespace
}
- const QPtrList<KToolBar> &toolBars() const { return m_toolBars; }
+ const Q3PtrList<KToolBar> &toolBars() const { return m_toolBars; }
private:
@@ -116,6 +118,6 @@ namespace
KMainWindow *m_mainWindow;
- QPtrList<KToolBar> m_toolBars;
- QPtrList<KAction> m_toolBarActions;
+ Q3PtrList<KToolBar> m_toolBars;
+ Q3PtrList<KAction> m_toolBarActions;
bool m_needsRebuild : 1;
@@ -225,5 +227,5 @@ void ToolBarHandler::init( KMainWindow *mainWindow )
void ToolBarHandler::connectToActionContainers()
{
- QPtrListIterator<KAction> actionIt( m_actions );
+ Q3PtrListIterator<KAction> actionIt( m_actions );
for ( ; actionIt.current(); ++actionIt )
connectToActionContainer( actionIt.current() );
@@ -240,5 +242,5 @@ void ToolBarHandler::connectToActionContainer( QWidget *container )
{
//US QPopupMenu *popupMenu = dynamic_cast<QPopupMenu *>( container );
- QPopupMenu *popupMenu = (QPopupMenu *)( container );
+ Q3PopupMenu *popupMenu = (Q3PopupMenu *)( container );
if ( !popupMenu )
return;
diff --git a/microkde/kdeui/ktoolbarhandler.h b/microkde/kdeui/ktoolbarhandler.h
index a1340ae..35f0d18 100644
--- a/microkde/kdeui/ktoolbarhandler.h
+++ b/microkde/kdeui/ktoolbarhandler.h
@@ -21,6 +21,6 @@
#include <qobject.h>
-#include <qguardedptr.h>
-#include <qptrlist.h>
+#include <qpointer.h>
+#include <q3ptrlist.h>
#include <kxmlguiclient.h>
#include <kaction.h>
@@ -58,7 +58,7 @@ private:
Data *d;
- QGuardedPtr<KMainWindow> m_mainWindow;
- QPtrList<KAction> m_actions;
- QPtrList<KToolBar> m_toolBars;
+ QPointer<KMainWindow> m_mainWindow;
+ Q3PtrList<KAction> m_actions;
+ Q3PtrList<KToolBar> m_toolBars;
};
diff --git a/microkde/kdeui/kxmlguiclient.cpp b/microkde/kdeui/kxmlguiclient.cpp
index 073e30b..8740bde 100644
--- a/microkde/kdeui/kxmlguiclient.cpp
+++ b/microkde/kdeui/kxmlguiclient.cpp
@@ -40,4 +40,6 @@
#include <assert.h>
+//Added by qt3to4:
+#include <Q3PtrList>
class KXMLGUIClientPrivate
@@ -64,5 +66,5 @@ public:
KXMLGUIClient *m_parent;
//QPtrList<KXMLGUIClient> m_supers;
- QPtrList<KXMLGUIClient> m_children;
+ Q3PtrList<KXMLGUIClient> m_children;
//US KXMLGUIBuilder *m_builder;
//US QString m_xmlFile;
@@ -86,5 +88,5 @@ KXMLGUIClient::~KXMLGUIClient()
d->m_parent->removeChildClient( this );
- QPtrListIterator<KXMLGUIClient> it( d->m_children );
+ Q3PtrListIterator<KXMLGUIClient> it( d->m_children );
for ( ; it.current(); ++it ) {
assert( it.current()->d->m_parent == this );
@@ -100,5 +102,5 @@ KAction *KXMLGUIClient::action( const char *name ) const
KAction* act = actionCollection()->action( name );
if ( !act ) {
- QPtrListIterator<KXMLGUIClient> childIt( d->m_children );
+ Q3PtrListIterator<KXMLGUIClient> childIt( d->m_children );
for (; childIt.current(); ++childIt ) {
act = childIt.current()->actionCollection()->action( name );
@@ -589,5 +591,5 @@ void KXMLGUIClient::removeChildClient( KXMLGUIClient *child )
}*/
-const QPtrList<KXMLGUIClient> *KXMLGUIClient::childClients()
+const Q3PtrList<KXMLGUIClient> *KXMLGUIClient::childClients()
{
return &d->m_children;
@@ -607,5 +609,5 @@ KXMLGUIBuilder *KXMLGUIClient::clientBuilder() const
*/
-void KXMLGUIClient::plugActionList( const QString &name, const QPtrList<KAction> &actionList )
+void KXMLGUIClient::plugActionList( const QString &name, const Q3PtrList<KAction> &actionList )
{
/*US
diff --git a/microkde/kdeui/kxmlguiclient.h b/microkde/kdeui/kxmlguiclient.h
index cd74c8e..b9d7b09 100644
--- a/microkde/kdeui/kxmlguiclient.h
+++ b/microkde/kdeui/kxmlguiclient.h
@@ -22,5 +22,5 @@
//US #include <qdom.h>
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <qmap.h>
#include <qstringlist.h>
@@ -162,5 +162,5 @@ public:
* Retrieves a list of all child clients.
*/
- const QPtrList<KXMLGUIClient> *childClients();
+ const Q3PtrList<KXMLGUIClient> *childClients();
/**
@@ -229,5 +229,5 @@ public:
* menu too..
*/
- void plugActionList( const QString &name, const QPtrList<KAction> &actionList );
+ void plugActionList( const QString &name, const Q3PtrList<KAction> &actionList );
/**
diff --git a/microkde/kdialog.cpp b/microkde/kdialog.cpp
index 8398956..57e7ea6 100644
--- a/microkde/kdialog.cpp
+++ b/microkde/kdialog.cpp
@@ -1,9 +1,11 @@
#include <kdialog.h>
-#include <qapp.h>
+#include <qapplication.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qlayout.h>
-#include <qprogressbar.h>
+#include <q3progressbar.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#include <klocale.h>
@@ -31,7 +33,7 @@ KProgressDialog::KProgressDialog( QWidget *parent, const char *name, bool modal
QDialog( parent, name, modal )
{
- QVBoxLayout* lay= new QVBoxLayout ( this );
+ Q3VBoxLayout* lay= new Q3VBoxLayout ( this );
mLabel = new QLabel ( "abc",this );
- mBar = new QProgressBar ( this );
+ mBar = new Q3ProgressBar ( this );
mButton = new QPushButton ( i18n("Cancel"),this );
lay->addWidget ( mLabel );
diff --git a/microkde/kdialog.h b/microkde/kdialog.h
index bc80689..5f9bf0e 100644
--- a/microkde/kdialog.h
+++ b/microkde/kdialog.h
@@ -3,6 +3,8 @@
#include <qdialog.h>
+//Added by qt3to4:
+#include <QLabel>
class QLabel;
-class QProgressBar;
+class Q3ProgressBar;
class QPushButton ;
@@ -30,5 +32,5 @@ class KProgressDialog : public QDialog
private:
QLabel * mLabel;
- QProgressBar *mBar;
+ Q3ProgressBar *mBar;
QPushButton *mButton;
signals:
diff --git a/microkde/kdialogbase.cpp b/microkde/kdialogbase.cpp
index d5c7e61..a40bad6 100644
--- a/microkde/kdialogbase.cpp
+++ b/microkde/kdialogbase.cpp
@@ -2,5 +2,9 @@
#include <qpushbutton.h>
#include <qlayout.h>
-#include <qframe.h>
+#include <q3frame.h>
+//Added by qt3to4:
+#include <QPixmap>
+#include <Q3HBoxLayout>
+#include <Q3VBoxLayout>
@@ -136,5 +140,5 @@ void KDialogBase::initLayout()
delete mTopLayout;
- mTopLayout = new QVBoxLayout( this );
+ mTopLayout = new Q3VBoxLayout( this );
mTopLayout->setMargin( marginHintSmall() );
mTopLayout->setSpacing( spacingHintSmall() );
@@ -142,5 +146,5 @@ void KDialogBase::initLayout()
mTopLayout->addWidget( mMainWidget );
- QBoxLayout *buttonLayout = new QHBoxLayout;
+ Q3BoxLayout *buttonLayout = new Q3HBoxLayout;
mTopLayout->addLayout( buttonLayout );
@@ -156,13 +160,13 @@ void KDialogBase::initLayout()
}
-QFrame *KDialogBase::addPage( const QString &name )
+Q3Frame *KDialogBase::addPage( const QString &name )
{
// kdDebug() << "KDialogBase::addPage(): " << name << endl;
- QFrame *frame = new QFrame( tabWidget() );
+ Q3Frame *frame = new Q3Frame( tabWidget() );
tabWidget()->addTab( frame, name );
return frame;
}
-QFrame *KDialogBase::addPage( const QString &name, int, const QPixmap & )
+Q3Frame *KDialogBase::addPage( const QString &name, int, const QPixmap & )
{
return addPage( name );
@@ -255,8 +259,8 @@ bool KDialogBase::showPage( int index )
}
-QFrame *KDialogBase::plainPage()
+Q3Frame *KDialogBase::plainPage()
{
if ( !mPlainPage ) {
- mPlainPage = new QFrame( this );
+ mPlainPage = new Q3Frame( this );
setMainWidget( mPlainPage );
}
diff --git a/microkde/kdialogbase.h b/microkde/kdialogbase.h
index 17c186b..64cbd17 100644
--- a/microkde/kdialogbase.h
+++ b/microkde/kdialogbase.h
@@ -2,5 +2,7 @@
#define MINIKDE_KDIALOGBASE_H
-#include <qframe.h>
+#include <q3frame.h>
+//Added by qt3to4:
+#include <QPixmap>
#include "kdialog.h"
@@ -9,5 +11,5 @@ class QPushButton;
class QLayout;
class QTabWidget;
-class QBoxLayout;
+class Q3BoxLayout;
class KDialogBase : public KDialog
@@ -60,6 +62,6 @@ class KDialogBase : public KDialog
virtual ~KDialogBase();
- QFrame *addPage( const QString & );
- QFrame *addPage( const QString &, int, const QPixmap & );
+ Q3Frame *addPage( const QString & );
+ Q3Frame *addPage( const QString &, int, const QPixmap & );
void setMainWidget( QWidget *widget );
@@ -78,5 +80,5 @@ class KDialogBase : public KDialog
void hideButtons();
- QFrame *plainPage();
+ Q3Frame *plainPage();
signals:
@@ -129,6 +131,6 @@ class KDialogBase : public KDialog
QWidget *mMainWidget;
QTabWidget *mTabWidget;
- QFrame *mPlainPage;
- QBoxLayout *mTopLayout;
+ Q3Frame *mPlainPage;
+ Q3BoxLayout *mTopLayout;
QPushButton *mUser1Button;
diff --git a/microkde/keditlistbox.cpp b/microkde/keditlistbox.cpp
index 55b7784..257a44a 100644
--- a/microkde/keditlistbox.cpp
+++ b/microkde/keditlistbox.cpp
@@ -22,8 +22,11 @@
#include <qpushbutton.h>
#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlistbox.h>
-#include <qwhatsthis.h>
+#include <q3groupbox.h>
+#include <q3listbox.h>
+#include <q3whatsthis.h>
#include <qlabel.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3StrList>
#include <kcombobox.h>
@@ -48,5 +51,5 @@ public:
KEditListBox::KEditListBox(QWidget *parent, const char *name,
bool checkAtEntering, int buttons )
- :QGroupBox(parent, name )
+ :Q3GroupBox(parent, name )
{
init( checkAtEntering, buttons );
@@ -55,5 +58,5 @@ KEditListBox::KEditListBox(QWidget *parent, const char *name,
KEditListBox::KEditListBox(const QString& title, QWidget *parent,
const char *name, bool checkAtEntering, int buttons)
- :QGroupBox(title, parent, name )
+ :Q3GroupBox(title, parent, name )
{
init( checkAtEntering, buttons );
@@ -63,5 +66,5 @@ KEditListBox::KEditListBox(const QString& title, const CustomEditor& custom,
QWidget *parent, const char *name,
bool checkAtEntering, int buttons)
- :QGroupBox(title, parent, name )
+ :Q3GroupBox(title, parent, name )
{
m_lineEdit = custom.lineEdit();
@@ -96,5 +99,5 @@ void KEditListBox::init( bool checkAtEntering, int buttons,
QWidget * gb = this;
- QGridLayout * grid = new QGridLayout(gb, 7 - lostButtons, 2,
+ Q3GridLayout * grid = new Q3GridLayout(gb, 7 - lostButtons, 2,
KDialog::marginHint(),
KDialog::spacingHint());
@@ -110,5 +113,5 @@ void KEditListBox::init( bool checkAtEntering, int buttons,
m_lineEdit=new KLineEdit(gb);
- m_listBox = new QListBox(gb);
+ m_listBox = new Q3ListBox(gb);
QWidget *editingWidget = representationWidget ?
@@ -205,5 +208,5 @@ void KEditListBox::moveItemUp()
}
- QListBoxItem *selItem = m_listBox->item(selIndex);
+ Q3ListBoxItem *selItem = m_listBox->item(selIndex);
m_listBox->takeItem(selItem);
m_listBox->insertItem(selItem, selIndex-1);
@@ -228,5 +231,5 @@ void KEditListBox::moveItemDown()
}
- QListBoxItem *selItem = m_listBox->item(selIndex);
+ Q3ListBoxItem *selItem = m_listBox->item(selIndex);
m_listBox->takeItem(selItem);
m_listBox->insertItem(selItem, selIndex+1);
@@ -350,12 +353,14 @@ void KEditListBox::insertStringList(const QStringList& list, int index)
}
-void KEditListBox::insertStrList(const QStrList* list, int index)
+void KEditListBox::insertStrList(const Q3StrList* list, int index)
{
- m_listBox->insertStrList(list,index);
+ for(Q3StrList::const_iterator i=list->begin();i!=list->end();++i)
+ m_listBox->insertItem(*i,index++);
}
-void KEditListBox::insertStrList(const QStrList& list, int index)
+void KEditListBox::insertStrList(const Q3StrList& list, int index)
{
- m_listBox->insertStrList(list,index);
+ for(Q3StrList::const_iterator i=list.begin();i!=list.end();++i)
+ m_listBox->insertItem(*i,index++);
}
diff --git a/microkde/keditlistbox.h b/microkde/keditlistbox.h
index 130d933..e43d958 100644
--- a/microkde/keditlistbox.h
+++ b/microkde/keditlistbox.h
@@ -21,6 +21,8 @@
#define KEDITLISTBOX_H
-#include <qgroupbox.h>
-#include <qlistbox.h>
+#include <q3groupbox.h>
+#include <q3listbox.h>
+//Added by qt3to4:
+#include <Q3StrList>
class KLineEdit;
@@ -37,5 +39,5 @@ class KEditListBoxPrivate;
* items from the listbox and two buttons to move items up and down.
*/
-class KEditListBox : public QGroupBox
+class KEditListBox : public Q3GroupBox
{
Q_OBJECT
@@ -127,5 +129,5 @@ public:
* Return a pointer to the embedded QListBox.
*/
- QListBox* listBox() const { return m_listBox; }
+ Q3ListBox* listBox() const { return m_listBox; }
/**
* Return a pointer to the embedded QLineEdit.
@@ -160,9 +162,9 @@ public:
* See @ref QListBox::insertStringList()
*/
- void insertStrList(const QStrList* list, int index=-1);
+ void insertStrList(const Q3StrList* list, int index=-1);
/**
* See @ref QListBox::insertStrList()
*/
- void insertStrList(const QStrList& list, int index=-1);
+ void insertStrList(const Q3StrList& list, int index=-1);
/**
* See @ref QListBox::insertStrList()
@@ -208,5 +210,5 @@ public:
private:
- QListBox *m_listBox;
+ Q3ListBox *m_listBox;
QPushButton *servUpButton, *servDownButton;
QPushButton *servNewButton, *servRemoveButton;
diff --git a/microkde/kfiledialog.cpp b/microkde/kfiledialog.cpp
index 383e711..c1bfdef 100644
--- a/microkde/kfiledialog.cpp
+++ b/microkde/kfiledialog.cpp
@@ -5,4 +5,6 @@
#include <qfileinfo.h>
#include <qapplication.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#ifndef DESKTOP_VERSION
@@ -14,5 +16,5 @@ QString KFileDialog::getSaveFileName( const QString & fn,
QString retfile = "";
QDialog dia ( par, "input-dialog", true );
- QVBoxLayout lay( &dia );
+ Q3VBoxLayout lay( &dia );
lay.setMargin(7);
lay.setSpacing(7);
@@ -43,5 +45,5 @@ QString KFileDialog::getOpenFileName( const QString & fn,
QDialog dia ( par, "input-dialog", true );
// QLineEdit lab ( &dia );
- QVBoxLayout lay( &dia );
+ Q3VBoxLayout lay( &dia );
lay.setMargin(7);
lay.setSpacing(7);
@@ -67,10 +69,10 @@ QString KFileDialog::getExistingDirectory( const QString & fn,
#else
-#include <qfiledialog.h>
+#include <q3filedialog.h>
QString KFileDialog::getSaveFileName( const QString & fn,
const QString & cap , QWidget * par )
{
- return QFileDialog::getSaveFileName( fn, QString::null, par, "openfile", cap );
+ return Q3FileDialog::getSaveFileName( fn, QString::null, par, "openfile", cap );
}
QString KFileDialog::getOpenFileName( const QString & fn,
@@ -78,10 +80,10 @@ QString KFileDialog::getOpenFileName( const QString & fn,
{
- return QFileDialog::getOpenFileName( fn, QString::null, par, "openfile", cap );
+ return Q3FileDialog::getOpenFileName( fn, QString::null, par, "openfile", cap );
}
QString KFileDialog::getExistingDirectory( const QString & fn,
const QString & cap, QWidget * par )
{
- return QFileDialog::getExistingDirectory( fn, par, "exidtingdir", cap );
+ return Q3FileDialog::getExistingDirectory( fn, par, "exidtingdir", cap );
}
#endif
diff --git a/microkde/kfontdialog.cpp b/microkde/kfontdialog.cpp
index 174123c..f83c2a8 100644
--- a/microkde/kfontdialog.cpp
+++ b/microkde/kfontdialog.cpp
@@ -8,4 +8,6 @@
#include <qlayout.h>
#include <qpushbutton.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
QFont KFontDialog::getFont( const QFont & f, bool & ok )
{
@@ -13,5 +15,5 @@ QFont KFontDialog::getFont( const QFont & f, bool & ok )
QDialog d( 0, "fd", true );;
OFontSelector s ( true, &d, "fontsel");
- QVBoxLayout l ( &d );
+ Q3VBoxLayout l ( &d );
l.addWidget( &s );
s.setSelectedFont ( f );
diff --git a/microkde/kglobal.cpp b/microkde/kglobal.cpp
index 53edd08..9cc5835 100644
--- a/microkde/kglobal.cpp
+++ b/microkde/kglobal.cpp
@@ -1,6 +1,7 @@
#include "kglobal.h"
#include "kstandarddirs.h"
-#include <qkeycode.h>
+#include <qnamespace.h>
#include <qapplication.h>
+#include <QDesktopWidget>
KLocale *KGlobal::mLocale = 0;
@@ -14,5 +15,5 @@ KLocale *KGlobal::locale()
{
if ( !mLocale ) {
- ASSERT(mAppName);
+ Q_ASSERT(!mAppName.isEmpty());
mLocale = new KLocale();//mAppName);
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp
index 2e483e9..1f08255 100644
--- a/microkde/kglobalsettings.cpp
+++ b/microkde/kglobalsettings.cpp
@@ -5,4 +5,5 @@
#include <qapplication.h>
+#include <QDesktopWidget>
#ifdef DESKTOP_VERSION
diff --git a/microkde/kiconloader.cpp b/microkde/kiconloader.cpp
index 4842d71..e7f657d 100644
--- a/microkde/kiconloader.cpp
+++ b/microkde/kiconloader.cpp
@@ -5,4 +5,6 @@
#ifndef DESKTOP_VERSION_OEGEL
#include <qdir.h>
+//Added by qt3to4:
+#include <QPixmap>
QPixmap KIconLoader::loadIcon( const QString& name, KIcon::Group, int,
int, QString *, bool ) const
@@ -15,5 +17,5 @@ QPixmap KIconLoader::loadIcon( const QString& name, KIcon::Group, int,
return pix;
}
-QIconSet KIconLoader::loadIconSet( const QString& name) const
+QIcon KIconLoader::loadIconSet( const QString& name) const
{
QPixmap pixmapLoader;
@@ -22,5 +24,5 @@ QIconSet KIconLoader::loadIconSet( const QString& name) const
pixmapLoader.load( file );
//qDebug("KIconLoader::loadIconSet: %s ************", file.latin1() );
- QIconSet is ( pixmapLoader );
+ QIcon is ( pixmapLoader );
return is;
}
@@ -78,10 +80,10 @@ QPixmap KIconLoader::loadIcon( const QString& name, KIcon::Group, int,
}
-QIconSet KIconLoader::loadIconSet( const QString& name) const
+QIcon KIconLoader::loadIconSet( const QString& name) const
{
QString px = this->iconPath() + "/" + name;
- QIconSet is ;//= Resource::loadIconSet( px );
- QIconSet* isPtr = 0;//LR&is;
+ QIcon is ;//= Resource::loadIconSet( px );
+ QIcon* isPtr = 0;//LR&is;
if (isPtr == 0)
qDebug("KIconLoader::loadIconSet: %s not foun", px.latin1());
diff --git a/microkde/kiconloader.h b/microkde/kiconloader.h
index 68fec4e..2abb667 100644
--- a/microkde/kiconloader.h
+++ b/microkde/kiconloader.h
@@ -5,5 +5,5 @@
#include <qstring.h>
//US
-#include <qiconset.h>
+#include <qicon.h>
class KIcon
@@ -35,5 +35,5 @@ class KIconLoader
QString iconPath( /*US const QString &, int */) const;
QString iconPath( const QString &, int ) const;
- QIconSet loadIconSet( const QString &name) const;
+ QIcon loadIconSet( const QString &name) const;
//US to make this class usable for different applications, we have to add a iconpathvariable
diff --git a/microkde/kio/kfile/kurlrequester.cpp b/microkde/kio/kfile/kurlrequester.cpp
index ca94570..ce62da7 100644
--- a/microkde/kio/kfile/kurlrequester.cpp
+++ b/microkde/kio/kfile/kurlrequester.cpp
@@ -28,4 +28,6 @@
#include <qpushbutton.h>
+//Added by qt3to4:
+#include <QPixmap>
//US #include <kaccel.h>
@@ -183,5 +185,5 @@ KURLRequester::KURLRequester( QWidget *editWidget, QWidget *parent,
KURLRequester::KURLRequester( QWidget *parent, const char *name )
- : QHBox( parent, name )
+ : Q3HBox( parent, name )
{
d = new KURLRequesterPrivate;
@@ -192,5 +194,5 @@ KURLRequester::KURLRequester( QWidget *parent, const char *name )
KURLRequester::KURLRequester( const QString& url, QWidget *parent,
const char *name )
- : QHBox( parent, name )
+ : Q3HBox( parent, name )
{
d = new KURLRequesterPrivate;
@@ -217,6 +219,6 @@ void KURLRequester::init()
myButton = new KURLDragPushButton( this, "kfile button");
- QIconSet iconSet = SmallIconSet("fileopen");
- QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+ QIcon iconSet = SmallIconSet("fileopen");
+ QPixmap pixMap = iconSet.pixmap( QIcon::Small, QIcon::Normal );
myButton->setIconSet( iconSet );
myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
diff --git a/microkde/kio/kfile/kurlrequester.h b/microkde/kio/kfile/kurlrequester.h
index faa3326..5d4fa11 100644
--- a/microkde/kio/kfile/kurlrequester.h
+++ b/microkde/kio/kfile/kurlrequester.h
@@ -21,5 +21,5 @@
#define KURLREQUESTER_H
-#include <qhbox.h>
+#include <q3hbox.h>
#include <keditlistbox.h>
@@ -54,5 +54,5 @@ class QTimer;
* @author Carsten Pfeiffer <pfeiffer@kde.org>
*/
-class KURLRequester : public QHBox
+class KURLRequester : public Q3HBox
{
Q_OBJECT
diff --git a/microkde/kio/kio/kdirwatch.cpp b/microkde/kio/kio/kdirwatch.cpp
index 1596d1f..5f07c54 100644
--- a/microkde/kio/kio/kdirwatch.cpp
+++ b/microkde/kio/kio/kdirwatch.cpp
@@ -53,9 +53,11 @@ $Id$
#include <qdir.h>
#include <qfile.h>
-#include <qintdict.h>
-#include <qptrlist.h>
+#include <q3intdict.h>
+#include <q3ptrlist.h>
#include <qsocketnotifier.h>
#include <qstringlist.h>
#include <qtimer.h>
+//Added by qt3to4:
+#include <Q3CString>
#include <kapplication.h>
@@ -185,5 +187,5 @@ KDirWatchPrivate::KDirWatchPrivate()
//US m_PollInterval = config.readNumEntry("PollInterval", 500);
KConfig *config = KGlobal::config();
- KConfigGroupSaver saver( config, QCString("DirWatch") );
+ KConfigGroupSaver saver( config, Q3CString("DirWatch") );
m_nfsPollInterval = config->readNumEntry("NFSPollInterval", 5000);
@@ -732,5 +734,5 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance,
void KDirWatchPrivate::removeEntries( KDirWatch* instance )
{
- QPtrList<Entry> list;
+ Q3PtrList<Entry> list;
int minfreq = 3600000;
@@ -1008,5 +1010,5 @@ void KDirWatchPrivate::slotRescan()
#ifdef HAVE_DNOTIFY
- QPtrList<Entry> dList, cList;
+ Q3PtrList<Entry> dList, cList;
// for DNotify method,
diff --git a/microkde/kio/kio/kdirwatch_p.h b/microkde/kio/kio/kdirwatch_p.h
index 0ab482f..be74f2a 100644
--- a/microkde/kio/kio/kdirwatch_p.h
+++ b/microkde/kio/kio/kdirwatch_p.h
@@ -19,5 +19,5 @@ $Id$
#endif
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <kdirwatch.h>
@@ -59,7 +59,7 @@ public:
bool isDir;
// instances interested in events
- QPtrList<Client> m_clients;
+ Q3PtrList<Client> m_clients;
// nonexistent entries of this directory
- QPtrList<Entry> m_entries;
+ Q3PtrList<Entry> m_entries;
QString path;
@@ -125,5 +125,5 @@ private:
bool delayRemove;
- QPtrList<Entry> removeList;
+ Q3PtrList<Entry> removeList;
#ifdef HAVE_FAM
@@ -142,5 +142,5 @@ private:
QTimer mTimer;
QSocketNotifier *mSn;
- QIntDict<Entry> fd_Entry;
+ Q3IntDict<Entry> fd_Entry;
static void dnotify_handler(int, siginfo_t *si, void *);
diff --git a/microkde/klineedit.h b/microkde/klineedit.h
index 70c72d1..9eb749d 100644
--- a/microkde/klineedit.h
+++ b/microkde/klineedit.h
@@ -3,4 +3,6 @@
#include <qlineedit.h>
+//Added by qt3to4:
+#include <QKeyEvent>
#ifndef DESKTOP_VERSION
diff --git a/microkde/klineeditdlg.h b/microkde/klineeditdlg.h
index 68e9252..d0004cd 100644
--- a/microkde/klineeditdlg.h
+++ b/microkde/klineeditdlg.h
@@ -8,4 +8,6 @@
#include <qdialog.h>
#include <qpushbutton.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
class KLineEditDlg : public QDialog
@@ -16,5 +18,5 @@ class KLineEditDlg : public QDialog
QLabel* lab = new QLabel( text, this );
mEdit = new KLineEdit( this );
- QVBoxLayout* vl = new QVBoxLayout( this );
+ Q3VBoxLayout* vl = new Q3VBoxLayout( this );
vl->setSpacing(5);
vl->setMargin(7);
diff --git a/microkde/kresources/configdialog.cpp b/microkde/kresources/configdialog.cpp
index 55253c0..4820faf 100644
--- a/microkde/kresources/configdialog.cpp
+++ b/microkde/kresources/configdialog.cpp
@@ -26,12 +26,15 @@
#include <kmessagebox.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qpushbutton.h>
-#include <qvbox.h>
+#include <q3vbox.h>
#include <qcheckbox.h>
-#include <qscrollview.h>
+#include <q3scrollview.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3Frame>
#include <kbuttonbox.h>
@@ -56,12 +59,12 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily,
resize( KMIN(KGlobal::getDesktopWidth(), 250), KMIN(KGlobal::getDesktopHeight(), 240));
- QFrame *main;
+ Q3Frame *main;
main = plainPage();
- QVBoxLayout *mainLayout = new QVBoxLayout( main, 0, spacingHint() );
+ Q3VBoxLayout *mainLayout = new Q3VBoxLayout( main, 0, spacingHint() );
- QGroupBox *generalGroupBox = new QGroupBox( 2, Qt::Horizontal, main );
+ Q3GroupBox *generalGroupBox = new Q3GroupBox( 2, Qt::Horizontal, main );
generalGroupBox->layout()->setSpacing( spacingHint() );
generalGroupBox->setTitle( i18n( "General Settings" ) );
@@ -83,5 +86,5 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily,
mainLayout->addWidget( generalGroupBox );
- QGroupBox *resourceGroupBox = new QGroupBox( 2, Qt::Horizontal, main );
+ Q3GroupBox *resourceGroupBox = new Q3GroupBox( 2, Qt::Horizontal, main );
resourceGroupBox->layout()->setSpacing( spacingHint());
resourceGroupBox->setTitle( i18n( "%1 Resource Settings" )
diff --git a/microkde/kresources/configpage.cpp b/microkde/kresources/configpage.cpp
index fc7a42e..1a9d063 100644
--- a/microkde/kresources/configpage.cpp
+++ b/microkde/kresources/configpage.cpp
@@ -29,5 +29,5 @@ $Id$
*/
-#include <qgroupbox.h>
+#include <q3groupbox.h>
#ifdef DESKTOP_VERSION
@@ -38,4 +38,8 @@ $Id$
#include <qlabel.h>
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3ValueList>
+#include <Q3VBoxLayout>
#include <kapplication.h>
#include <kcombobox.h>
@@ -62,9 +66,9 @@ $Id$
using namespace KRES;
-class ConfigViewItem : public QCheckListItem
+class ConfigViewItem : public Q3CheckListItem
{
public:
- ConfigViewItem( QListView *parent, Resource* resource ) :
- QCheckListItem( parent, resource->resourceName(), CheckBox ),
+ ConfigViewItem( Q3ListView *parent, Resource* resource ) :
+ Q3CheckListItem( parent, resource->resourceName(), CheckBox ),
mResource( resource ),
mIsStandard( false )
@@ -98,11 +102,11 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name )
setCaption( i18n( "Resource Configuration" ) );
- QVBoxLayout *mainLayout = new QVBoxLayout( this );
+ Q3VBoxLayout *mainLayout = new Q3VBoxLayout( this );
- QGroupBox *groupBox = new QGroupBox( i18n( "Resources" ), this );
+ Q3GroupBox *groupBox = new Q3GroupBox( i18n( "Resources" ), this );
groupBox->setColumnLayout(0, Qt::Vertical );
groupBox->layout()->setSpacing( 3 );
groupBox->layout()->setMargin( 5 );
- QGridLayout *groupBoxLayout = new QGridLayout( groupBox->layout(), 4, 2 );
+ Q3GridLayout *groupBoxLayout = new Q3GridLayout( groupBox->layout(), 4, 2 );
//US mFamilyCombo = new KComboBox( false, groupBox );
@@ -146,6 +150,6 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name )
connect( mListView, SIGNAL( selectionChanged() ),
SLOT( slotSelectionChanged() ) );
- connect( mListView, SIGNAL( clicked( QListViewItem * ) ),
- SLOT( slotItemClicked( QListViewItem * ) ) );
+ connect( mListView, SIGNAL( clicked( Q3ListViewItem * ) ),
+ SLOT( slotItemClicked( Q3ListViewItem * ) ) );
mLastItem = 0;
@@ -160,5 +164,5 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name )
ConfigPage::~ConfigPage()
{
- QValueList<ResourcePageInfo>::Iterator it;
+ Q3ValueList<ResourcePageInfo>::Iterator it;
for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it ) {
(*it).mManager->removeListener( this );
@@ -231,5 +235,5 @@ void ConfigPage::save()
saveResourceSettings();
- QValueList<ResourcePageInfo>::Iterator it;
+ Q3ValueList<ResourcePageInfo>::Iterator it;
for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it )
(*it).mManager->writeConfig( (*it).mConfig );
@@ -342,5 +346,5 @@ void ConfigPage::slotAdd()
if ( !resource->readOnly() ) {
bool onlyReadOnly = true;
- QListViewItem *it = mListView->firstChild();
+ Q3ListViewItem *it = mListView->firstChild();
while ( it != 0 ) {
ConfigViewItem *confIt = static_cast<ConfigViewItem*>( it );
@@ -367,5 +371,5 @@ void ConfigPage::slotRemove()
return;
- QListViewItem *item = mListView->currentItem();
+ Q3ListViewItem *item = mListView->currentItem();
ConfigViewItem *confItem = static_cast<ConfigViewItem*>( item );
@@ -394,5 +398,5 @@ void ConfigPage::slotEdit()
return;
- QListViewItem *item = mListView->currentItem();
+ Q3ListViewItem *item = mListView->currentItem();
ConfigViewItem *configItem = static_cast<ConfigViewItem*>( item );
if ( !configItem )
@@ -436,5 +440,5 @@ void ConfigPage::slotStandard()
}
- QListViewItem *it = mListView->firstChild();
+ Q3ListViewItem *it = mListView->firstChild();
while ( it != 0 ) {
ConfigViewItem *configItem = static_cast<ConfigViewItem*>( it );
@@ -483,5 +487,5 @@ void ConfigPage::resourceDeleted( Resource* resource )
}
-void ConfigPage::slotItemClicked( QListViewItem *item )
+void ConfigPage::slotItemClicked( Q3ListViewItem *item )
{
ConfigViewItem *configItem = static_cast<ConfigViewItem *>( item );
@@ -505,5 +509,5 @@ void ConfigPage::saveResourceSettings()
if ( mCurrentManager ) {
- QListViewItem *item = mListView->firstChild();
+ Q3ListViewItem *item = mListView->firstChild();
while ( item ) {
ConfigViewItem *configItem = static_cast<ConfigViewItem*>( item );
diff --git a/microkde/kresources/configpage.h b/microkde/kresources/configpage.h
index be9239e..dc1aa50 100644
--- a/microkde/kresources/configpage.h
+++ b/microkde/kresources/configpage.h
@@ -26,4 +26,6 @@
#include <qstringlist.h>
#include <qwidget.h>
+//Added by qt3to4:
+#include <Q3ValueList>
#include "manager.h"
@@ -32,5 +34,5 @@ class KComboBox;
class KListView;
-class QListViewItem;
+class Q3ListViewItem;
class QPushButton;
@@ -74,5 +76,5 @@ class ConfigPage : public QWidget, public ManagerListener<Resource>
protected slots:
- void slotItemClicked( QListViewItem * );
+ void slotItemClicked( Q3ListViewItem * );
signals:
@@ -87,5 +89,5 @@ class ConfigPage : public QWidget, public ManagerListener<Resource>
QString mFamily;
QStringList mFamilyMap;
- QValueList<ResourcePageInfo> mInfoMap;
+ Q3ValueList<ResourcePageInfo> mInfoMap;
KComboBox* mFamilyCombo;
@@ -96,5 +98,5 @@ class ConfigPage : public QWidget, public ManagerListener<Resource>
QPushButton* mStandardButton;
- QListViewItem* mLastItem;
+ Q3ListViewItem* mLastItem;
static const QString syncfamily;
};
diff --git a/microkde/kresources/factory.cpp b/microkde/kresources/factory.cpp
index 86b22b2..4f286d1 100644
--- a/microkde/kresources/factory.cpp
+++ b/microkde/kresources/factory.cpp
@@ -42,6 +42,6 @@
using namespace KRES;
-QDict<Factory> *Factory::mSelves = 0;
-static KStaticDeleter< QDict<Factory> > staticDeleter;
+Q3Dict<Factory> *Factory::mSelves = 0;
+static KStaticDeleter< Q3Dict<Factory> > staticDeleter;
Factory *Factory::self( const QString& resourceFamily)
@@ -52,5 +52,5 @@ Factory *Factory::self( const QString& resourceFamily)
if ( !mSelves )
{
- mSelves = staticDeleter.setObject( new QDict<Factory> );
+ mSelves = staticDeleter.setObject( new Q3Dict<Factory> );
}
diff --git a/microkde/kresources/factory.h b/microkde/kresources/factory.h
index ea01b23..709fde0 100644
--- a/microkde/kresources/factory.h
+++ b/microkde/kresources/factory.h
@@ -25,5 +25,5 @@
#define KRESOURCES_FACTORY_H
-#include <qdict.h>
+#include <q3dict.h>
#include <qstring.h>
@@ -115,5 +115,5 @@ class Factory
private:
- static QDict<Factory> *mSelves;
+ static Q3Dict<Factory> *mSelves;
QString mResourceFamily;
diff --git a/microkde/kresources/kcmkresources.cpp b/microkde/kresources/kcmkresources.cpp
index d600a31..f5eb826 100644
--- a/microkde/kresources/kcmkresources.cpp
+++ b/microkde/kresources/kcmkresources.cpp
@@ -21,4 +21,7 @@
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3Frame>
//US #include <kaboutdata.h>
@@ -41,7 +44,7 @@ KCMKResources::KCMKResources( QWidget *parent, const char *name, const QStringLi
Ok|Cancel, Ok, true )
{
- QFrame *main = plainPage();
+ Q3Frame *main = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( main );
+ Q3VBoxLayout *layout = new Q3VBoxLayout( main );
mConfigPage = new KRES::ConfigPage( main );
layout->addWidget( mConfigPage );
diff --git a/microkde/kresources/manager.h b/microkde/kresources/manager.h
index 69062da..88705d4 100644
--- a/microkde/kresources/manager.h
+++ b/microkde/kresources/manager.h
@@ -33,6 +33,8 @@ $Id$
#define KRESOURCES_MANAGER_H
-#include <qdict.h>
+#include <q3dict.h>
#include <qstringlist.h>
+//Added by qt3to4:
+#include <Q3PtrList>
#include "factory.h"
@@ -176,5 +178,5 @@ class Manager : private ManagerImplListener
mImpl->setListener( this );
- mListeners = new QPtrList<ManagerListener<T> >;
+ mListeners = new Q3PtrList<ManagerListener<T> >;
}
@@ -331,5 +333,5 @@ class Manager : private ManagerImplListener
ManagerImpl *mImpl;
Factory *mFactory;
- QPtrList<ManagerListener<T> > *mListeners;
+ Q3PtrList<ManagerListener<T> > *mListeners;
};
diff --git a/microkde/kresources/managerimpl.cpp b/microkde/kresources/managerimpl.cpp
index a6d2007..4c0751c 100644
--- a/microkde/kresources/managerimpl.cpp
+++ b/microkde/kresources/managerimpl.cpp
@@ -36,4 +36,6 @@ $Id$
#include <kstandarddirs.h>
#include <qfile.h>
+//Added by qt3to4:
+#include <Q3PtrList>
#include "resource.h"
@@ -233,7 +235,7 @@ Resource::List *ManagerImpl::resourceList()
}
-QPtrList<Resource> ManagerImpl::resources()
+Q3PtrList<Resource> ManagerImpl::resources()
{
- QPtrList<Resource> result;
+ Q3PtrList<Resource> result;
Resource::List::ConstIterator it;
@@ -244,7 +246,7 @@ QPtrList<Resource> ManagerImpl::resources()
}
-QPtrList<Resource> ManagerImpl::resources( bool active )
+Q3PtrList<Resource> ManagerImpl::resources( bool active )
{
- QPtrList<Resource> result;
+ Q3PtrList<Resource> result;
Resource::List::ConstIterator it;
diff --git a/microkde/kresources/managerimpl.h b/microkde/kresources/managerimpl.h
index 56a2db6..1f728e5 100644
--- a/microkde/kresources/managerimpl.h
+++ b/microkde/kresources/managerimpl.h
@@ -33,6 +33,6 @@ $Id$
#include <qstring.h>
-#include <qptrlist.h>
-#include <qdict.h>
+#include <q3ptrlist.h>
+#include <q3dict.h>
//US
#include <qobject.h>
@@ -82,8 +82,8 @@ class ManagerImpl : public QObject
Resource::List *resourceList();
- QPtrList<Resource> resources();
+ Q3PtrList<Resource> resources();
// Get only active or passive resources
- QPtrList<Resource> resources( bool active );
+ Q3PtrList<Resource> resources( bool active );
QStringList resourceNames();
diff --git a/microkde/kresources/resource.h b/microkde/kresources/resource.h
index ed5af96..1f9527c 100644
--- a/microkde/kresources/resource.h
+++ b/microkde/kresources/resource.h
@@ -29,5 +29,5 @@
#endif //QT_THREAD_SUPPORT
-#include <qvaluelist.h>
+#include <q3valuelist.h>
#include <qwidget.h>
@@ -240,5 +240,5 @@ class Resource : public QObject
public:
- typedef QValueList<Resource *> List;
+ typedef Q3ValueList<Resource *> List;
/**
diff --git a/microkde/kresources/selectdialog.cpp b/microkde/kresources/selectdialog.cpp
index fba8648..d5b83e9 100644
--- a/microkde/kresources/selectdialog.cpp
+++ b/microkde/kresources/selectdialog.cpp
@@ -35,7 +35,11 @@
#include <kglobal.h>
-#include <qlistbox.h>
+#include <q3listbox.h>
#include <qlayout.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3Frame>
+#include <Q3PtrList>
#include "resource.h"
@@ -47,5 +51,5 @@ using namespace KRES;
//US I am using KBaseDialog instead of KDialog
//US : KDialog( parent, name, true )
-SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent,
+SelectDialog::SelectDialog( Q3PtrList<Resource> list, QWidget *parent,
const char *name )
: KDialogBase( parent, name, true, i18n( "Resource Selection" ), Help | Ok | Cancel,
@@ -58,5 +62,5 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent,
//US
- QFrame *main = plainPage();
+ Q3Frame *main = plainPage();
/*US
QVBoxLayout *layout = new QVBoxLayout( main );
@@ -66,13 +70,13 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent,
//US QVBoxLayout *mainLayout = new QVBoxLayout( this );
- QVBoxLayout *mainLayout = new QVBoxLayout( main );
+ Q3VBoxLayout *mainLayout = new Q3VBoxLayout( main );
mainLayout->setMargin( marginHint() );
//US QGroupBox *groupBox = new QGroupBox( 2, Qt::Horizontal, this );
- QGroupBox *groupBox = new QGroupBox( 2, Qt::Horizontal, main );
+ Q3GroupBox *groupBox = new Q3GroupBox( 2, Qt::Horizontal, main );
groupBox->setTitle( i18n( "Resources" ) );
//US mResourceId = new KListBox( groupBox );
- mResourceId = new QListBox( groupBox );
+ mResourceId = new Q3ListBox( groupBox );
mainLayout->addWidget( groupBox );
@@ -102,5 +106,5 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent,
mResourceId->setCurrentItem( 0 );
- connect( mResourceId, SIGNAL(returnPressed(QListBoxItem*)),
+ connect( mResourceId, SIGNAL(returnPressed(Q3ListBoxItem*)),
SLOT(accept()) );
}
@@ -114,5 +118,5 @@ Resource *SelectDialog::resource()
}
-Resource *SelectDialog::getResource( QPtrList<Resource> list, QWidget *parent )
+Resource *SelectDialog::getResource( Q3PtrList<Resource> list, QWidget *parent )
{
if ( list.count() == 0 ) {
diff --git a/microkde/kresources/selectdialog.h b/microkde/kresources/selectdialog.h
index 7026212..be5152b 100644
--- a/microkde/kresources/selectdialog.h
+++ b/microkde/kresources/selectdialog.h
@@ -26,5 +26,5 @@
#include <qobject.h>
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <qmap.h>
@@ -32,5 +32,5 @@
//US class KListBox;
-class QListBox;
+class Q3ListBox;
namespace KRES {
@@ -63,5 +63,5 @@ class SelectDialog : KDialogBase
* @param name The name of the dialog
*/
- SelectDialog( QPtrList<Resource> list, QWidget *parent = 0,
+ SelectDialog( Q3PtrList<Resource> list, QWidget *parent = 0,
const char *name = 0);
@@ -77,9 +77,9 @@ class SelectDialog : KDialogBase
* user has selected. Returns 0, if the dialog was canceled.
*/
- static Resource *getResource( QPtrList<Resource> list, QWidget *parent = 0 );
+ static Resource *getResource( Q3PtrList<Resource> list, QWidget *parent = 0 );
private:
//US KListBox *mResourceId;
- QListBox *mResourceId;
+ Q3ListBox *mResourceId;
QMap<int, Resource*> mResourceMap;
diff --git a/microkde/ksystemtray.cpp b/microkde/ksystemtray.cpp
index 4f81d02..0d0045f 100644
--- a/microkde/ksystemtray.cpp
+++ b/microkde/ksystemtray.cpp
@@ -1,3 +1,6 @@
#include "ksystemtray.h"
+//Added by qt3to4:
+#include <QMouseEvent>
+#include <QLabel>
void KSystemTray::mousePressEvent( QMouseEvent *)
diff --git a/microkde/ksystemtray.h b/microkde/ksystemtray.h
index f3e4f6a..6708c86 100644
--- a/microkde/ksystemtray.h
+++ b/microkde/ksystemtray.h
@@ -3,4 +3,6 @@
#include <qlabel.h>
+//Added by qt3to4:
+#include <QMouseEvent>
class KSystemTray : public QLabel
diff --git a/microkde/ktempfile.cpp b/microkde/ktempfile.cpp
index b9166bd..d61d22e 100644
--- a/microkde/ktempfile.cpp
+++ b/microkde/ktempfile.cpp
@@ -1,3 +1,3 @@
-#include <qtextstream.h>
+#include <q3textstream.h>
#include "ktempfile.h"
@@ -20,5 +20,5 @@ QString KTempFile::name()
}
-QTextStream *KTempFile::textStream()
+Q3TextStream *KTempFile::textStream()
{
return 0;
diff --git a/microkde/ktempfile.h b/microkde/ktempfile.h
index 20dfa82..1ac7258 100644
--- a/microkde/ktempfile.h
+++ b/microkde/ktempfile.h
@@ -4,5 +4,5 @@
#include <qstring.h>
-class QTextStream;
+class Q3TextStream;
class KTempFile
@@ -15,5 +15,5 @@ class KTempFile
QString name();
- QTextStream *textStream();
+ Q3TextStream *textStream();
};
diff --git a/microkde/ktextedit.cpp b/microkde/ktextedit.cpp
index 4dd6875..d74706b 100644
--- a/microkde/ktextedit.cpp
+++ b/microkde/ktextedit.cpp
@@ -3,8 +3,10 @@
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
+//Added by qt3to4:
+#include <QMouseEvent>
#endif
-KTextEdit::KTextEdit ( QWidget *parent ) : QMultiLineEdit( parent )
+KTextEdit::KTextEdit ( QWidget *parent ) : Q3MultiLineEdit( parent )
{
mAllowPopupMenu = false;
@@ -18,12 +20,12 @@ KTextEdit::KTextEdit ( QWidget *parent ) : QMultiLineEdit( parent )
void KTextEdit::mousePressEvent(QMouseEvent *e)
{
- if ( e->button() == LeftButton ) {
+ if ( e->button() == Qt::LeftButton ) {
mAllowPopupMenu = true;
mYMousePos = mapToGlobal( (e->pos())).y();
mXMousePos = mapToGlobal( (e->pos())).x();
}
- if ( e->button() == RightButton && !mAllowPopupMenu )
+ if ( e->button() == Qt::RightButton && !mAllowPopupMenu )
return;
- if ( e->button() == LeftButton ) {
+ if ( e->button() == Qt::LeftButton ) {
if ( hasMarkedText () )
mIgnoreMark = !mIgnoreMark;
@@ -33,10 +35,10 @@ void KTextEdit::mousePressEvent(QMouseEvent *e)
}
}
- QMultiLineEdit::mousePressEvent( e );
+ Q3MultiLineEdit::mousePressEvent( e );
}
void KTextEdit::mouseReleaseEvent(QMouseEvent *e)
{
- QMultiLineEdit::mouseReleaseEvent(e);
+ Q3MultiLineEdit::mouseReleaseEvent(e);
}
@@ -49,5 +51,5 @@ void KTextEdit::mouseMoveEvent(QMouseEvent *e)
if ( diff+ diff2 > 20 )
mAllowPopupMenu = false;
- QMultiLineEdit::mouseMoveEvent(e);
+ Q3MultiLineEdit::mouseMoveEvent(e);
}
diff --git a/microkde/ktextedit.h b/microkde/ktextedit.h
index 87c0602..b7c8924 100644
--- a/microkde/ktextedit.h
+++ b/microkde/ktextedit.h
@@ -2,7 +2,9 @@
#define MICROKDE_KTEXTEDIT_H
-#include <qmultilineedit.h>
+#include <q3multilineedit.h>
+//Added by qt3to4:
+#include <QMouseEvent>
-class KTextEdit : public QMultiLineEdit
+class KTextEdit : public Q3MultiLineEdit
{
public:
diff --git a/microkde/kurl.cpp b/microkde/kurl.cpp
index 2574e25..122ad71 100644
--- a/microkde/kurl.cpp
+++ b/microkde/kurl.cpp
@@ -35,5 +35,5 @@
#include <unistd.h>
#endif
-#include <qurl.h>
+#include <q3url.h>
#include <qdir.h>
#include <qstringlist.h>
@@ -42,4 +42,6 @@
#include <qmap.h>
#include <qtextcodec.h>
+//Added by qt3to4:
+#include <Q3CString>
static const QString fileProt = "file";
@@ -58,5 +60,5 @@ static QString encode( const QString& segment, bool encode_slash, int encoding_h
encode_string = "<>#@\"&%?={}|^~[]\'`\\:+";
- QCString local;
+ Q3CString local;
if (encoding_hint==0)
local = segment.local8Bit();
@@ -101,5 +103,5 @@ static QString encode( const QString& segment, bool encode_slash, int encoding_h
}
else
- new_segment[ new_length++ ] = local[i];
+ new_segment[ new_length++ ] = character;
}
@@ -206,5 +208,5 @@ static void decode( const QString& segment, QString &decoded, QString &encoded,
textCodec = QTextCodec::codecForLocale();
- QCString csegment = textCodec->fromUnicode(segment);
+ Q3CString csegment = textCodec->fromUnicode(segment);
// Check if everything went ok
if (textCodec->toUnicode(csegment) != segment)
@@ -279,5 +281,5 @@ static void decode( const QString& segment, QString &decoded, QString &encoded,
decoded = textCodec->toUnicode( array, new_length );
array.resetRawData(new_segment, new_length);
- QCString validate = textCodec->fromUnicode(decoded);
+ Q3CString validate = textCodec->fromUnicode(decoded);
if (strcmp(validate.data(), new_segment) != 0)
@@ -420,5 +422,5 @@ KURL::KURL( const char * url, int encoding_hint )
}
-KURL::KURL( const QCString& url, int encoding_hint )
+KURL::KURL( const Q3CString& url, int encoding_hint )
{
reset();
@@ -461,5 +463,5 @@ QDataStream & operator>> (QDataStream & s, KURL & a)
#ifndef QT_NO_NETWORKPROTOCOL
-KURL::KURL( const QUrl &u )
+KURL::KURL( const Q3Url &u )
{
*this = u;
@@ -590,5 +592,5 @@ void KURL::parse( const QString& _url, int encoding_hint )
if ( x == '/' )
goto Node9;
- if ( !isalpha( (int)x ) )
+ if ( !x.isLetter() )
goto NodeErr;
@@ -596,5 +598,5 @@ void KURL::parse( const QString& _url, int encoding_hint )
// '.' is not currently accepted, because current KURL may be confused.
// Proceed with :// :/ or :
- while( pos < len && (isalpha((int)buf[pos]) || isdigit((int)buf[pos]) ||
+ while( pos < len && ( buf[pos].isLetter() || buf[pos].isDigit() ||
buf[pos] == '+' || buf[pos] == '-')) pos++;
@@ -770,9 +772,9 @@ void KURL::parse( const QString& _url, int encoding_hint )
goto NodeErr;
start = pos;
- if ( !isdigit( buf[pos++] ) )
+ if ( !buf[pos++].isDigit() )
goto NodeErr;
// Node 8b: Accept any amount of digits
- while( pos < len && isdigit( buf[pos] ) ) pos++;
+ while( pos < len && buf[pos].isDigit() ) pos++;
port = QString( buf + start, pos - start );
m_iPort = port.toUShort();
@@ -849,5 +851,5 @@ KURL& KURL::operator=( const char * _url )
#ifndef QT_NO_NETWORKPROTOCOL
-KURL& KURL::operator=( const QUrl & u )
+KURL& KURL::operator=( const Q3Url & u )
{
m_strProtocol = u.protocol();
@@ -1375,5 +1377,5 @@ KURL KURL::join( const KURL::List & lst )
if (it != first)
{
- if (!u.m_strRef_encoded) u.m_strRef_encoded = tmp.url();
+ if (u.m_strRef_encoded.isEmpty()) u.m_strRef_encoded = tmp.url();
else u.m_strRef_encoded += "#" + tmp.url(); // Support more than one suburl thingy
}
@@ -1419,5 +1421,5 @@ QString KURL::fileName( bool _strip_trailing_slash ) const
int i = m_strPath_encoded.findRev( '/', len - 1 );
QString fileName_encoded = m_strPath_encoded.mid(i+1);
- n += fileName_encoded.contains("%2f", false);
+ n += fileName_encoded.count("%2f", Qt::CaseInsensitive);
}
int i = len;
diff --git a/microkde/kurl.h b/microkde/kurl.h
index cd65a1c..016eb24 100644
--- a/microkde/kurl.h
+++ b/microkde/kurl.h
@@ -22,7 +22,9 @@
#include <qstring.h>
-#include <qvaluelist.h>
+#include <q3valuelist.h>
+//Added by qt3to4:
+#include <Q3CString>
-class QUrl;
+class Q3Url;
class QStringList;
template <typename K, typename V> class QMap;
@@ -65,5 +67,5 @@ public:
* @see QValueList
*/
- class List : public QValueList<KURL>
+ class List : public Q3ValueList<KURL>
{
public:
@@ -136,5 +138,5 @@ public:
* @see QTextCodec::mibEnum()
*/
- KURL( const QCString& url, int encoding_hint = 0 );
+ KURL( const Q3CString& url, int encoding_hint = 0 );
/**
* Copy constructor.
@@ -146,5 +148,5 @@ public:
* @param u the QUrl
*/
- KURL( const QUrl &u );
+ KURL( const Q3Url &u );
/**
* Constructor allowing relative URLs.
@@ -659,5 +661,5 @@ public:
KURL& operator=( const QString& _url );
KURL& operator=( const char * _url );
- KURL& operator=( const QUrl & u );
+ KURL& operator=( const Q3Url & u );
bool operator==( const KURL& _u ) const;
diff --git a/microkde/kutils/kcmultidialog.cpp b/microkde/kutils/kcmultidialog.cpp
index 9c87682..88f17e5 100644
--- a/microkde/kutils/kcmultidialog.cpp
+++ b/microkde/kutils/kcmultidialog.cpp
@@ -20,8 +20,10 @@
*/
-#include <qhbox.h>
-#include <qvbox.h>
+#include <q3hbox.h>
+#include <q3vbox.h>
#include <qcursor.h>
#include <qlayout.h>
+//Added by qt3to4:
+#include <QPixmap>
#include <klocale.h>
@@ -74,5 +76,5 @@ void KCMultiDialog::slotDefault()
int curPageIndex = activePageIndex();
- QPtrListIterator<KCModule> it(modules);
+ Q3PtrListIterator<KCModule> it(modules);
for (; it.current(); ++it)
{
@@ -92,5 +94,5 @@ void KCMultiDialog::accept()
void KCMultiDialog::slotApply()
{
- QPtrListIterator<KCModule> it(modules);
+ Q3PtrListIterator<KCModule> it(modules);
for (; it.current(); ++it)
(*it)->save();
@@ -106,5 +108,5 @@ void KCMultiDialog::slotOk()
qDebug("KCMultiDialog::slotOk clicked");
- QPtrListIterator<KCModule> it(modules);
+ Q3PtrListIterator<KCModule> it(modules);
for (; it.current(); ++it)
(*it)->save();
@@ -154,7 +156,7 @@ void KCMultiDialog::addModule(const QString& path, bool withfallback)
}
*/
-QVBox * KCMultiDialog::getNewVBoxPage( const QString & modulename )
+Q3VBox * KCMultiDialog::getNewVBoxPage( const QString & modulename )
{
- QVBox *page = mMainWidget->addVBoxPage(modulename , QString::null,QPixmap() );
+ Q3VBox *page = mMainWidget->addVBoxPage(modulename , QString::null,QPixmap() );
return page;
diff --git a/microkde/kutils/kcmultidialog.h b/microkde/kutils/kcmultidialog.h
index 66412ac..78f8a00 100644
--- a/microkde/kutils/kcmultidialog.h
+++ b/microkde/kutils/kcmultidialog.h
@@ -23,6 +23,6 @@
#define KCMULTIDIALOG_H
-#include <qptrlist.h>
-#include <qptrdict.h>
+#include <q3ptrlist.h>
+#include <q3ptrdict.h>
#include <kdialogbase.h>
@@ -76,5 +76,5 @@ public:
//US special method for microkde. We do not want to load everything dynamically.
void addModule(KCModule* module );//, const QString& modulename, const QString& iconname);
- QVBox* getNewVBoxPage(const QString & modulename) ;
+ Q3VBox* getNewVBoxPage(const QString & modulename) ;
@@ -134,5 +134,5 @@ private:
};
*/
- QPtrList<KCModule> modules;
+ Q3PtrList<KCModule> modules;
/*
QPtrDict<LoadInfo> moduleDict;
diff --git a/microkde/microkde.pro b/microkde/microkde.pro
index 7120bdd..4ff06a3 100644
--- a/microkde/microkde.pro
+++ b/microkde/microkde.pro
@@ -7,5 +7,5 @@ INCLUDEPATH += . ../ ../kabc ./kdecore ./kdeui ./kio/kfile ./kio/kio
#LIBS += -lqtcompat
-TARGET = microkde
+TARGET = xmicrokde
DESTDIR= ../bin
DEFINES += DESKTOP_VERSION KDE_QT_ONLY
@@ -179,2 +179,4 @@ KDGanttMinimizeSplitter.cpp \
kdecore/klibloader.cpp \
kidmanager.cpp
+#The following line was inserted by qt3to4
+QT += xml qt3support
diff --git a/microkde/microkdeE.pro b/microkde/microkdeE.pro
index 8fe2bd5..514e7b3 100644
--- a/microkde/microkdeE.pro
+++ b/microkde/microkdeE.pro
@@ -8,5 +8,5 @@ LIBS += -lmicroqtcompat -L$(QPEDIR)/lib
DEFINES += KDE_QT_ONLY
-TARGET = microkde
+TARGET = xmicrokde
OBJECTS_DIR = obj/$(PLATFORM)
MOC_DIR = moc/$(PLATFORM)
diff --git a/microkde/ofileselector_p.cpp b/microkde/ofileselector_p.cpp
index f4f112e..0f95c84 100644
--- a/microkde/ofileselector_p.cpp
+++ b/microkde/ofileselector_p.cpp
@@ -266,5 +266,5 @@ OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& st
/* let's fill device parts */
- QPopupMenu* pop = new QPopupMenu(this);
+ Q3PopupMenu* pop = new Q3PopupMenu(this);
connect(pop, SIGNAL( activated(int) ),
this, SLOT(slotFSActivated(int) ) );
diff --git a/microkde/ofileselector_p.h b/microkde/ofileselector_p.h
index 834fd70..a7d97fe 100644
--- a/microkde/ofileselector_p.h
+++ b/microkde/ofileselector_p.h
@@ -138,5 +138,5 @@ private:
bool m_all : 1;
OFileSelector* m_sel;
- QPopupMenu* m_fsPop;
+ Q3PopupMenu* m_fsPop;
bool compliesMime( const QString& );
QStringList m_mimes; // used in compy mime
diff --git a/microkde/qlayoutengine_p.h b/microkde/qlayoutengine_p.h
index 2d6a556..e782703 100644
--- a/microkde/qlayoutengine_p.h
+++ b/microkde/qlayoutengine_p.h
@@ -1,2 +1,4 @@
+//Added by qt3to4:
+#include <Q3MemArray>
// THIS IS A COPY OF THE FILE FOUND IN $QTDIR/src/kernel. Needed to modify qsplitter
@@ -56,8 +58,4 @@
-#ifndef QT_H
-#include "qabstractlayout.h"
-#endif // QT_H
-
#ifndef QT_NO_LAYOUT
struct QLayoutStruct
@@ -82,5 +80,5 @@ struct QLayoutStruct
-void qGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos,
+void qGeomCalc( Q3MemArray<QLayoutStruct> &chain, int start, int count, int pos,
int space, int spacer );