[rkward-cvs] SF.net SVN: rkward: [2229] branches/KDE4_port/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Fri Nov 16 00:41:58 UTC 2007


Revision: 2229
          http://rkward.svn.sourceforge.net/rkward/?rev=2229&view=rev
Author:   tfry
Date:     2007-11-15 16:41:58 -0800 (Thu, 15 Nov 2007)

Log Message:
-----------
More Qt3 support code removed (almost done, now)

Modified Paths:
--------------
    branches/KDE4_port/rkward/core/rfunctionobject.h
    branches/KDE4_port/rkward/core/robject.h
    branches/KDE4_port/rkward/dialogs/rkimportdialog.cpp
    branches/KDE4_port/rkward/misc/rkcanceldialog.h
    branches/KDE4_port/rkward/plugin/rkcomponent.cpp
    branches/KDE4_port/rkward/plugin/rkcomponent.h
    branches/KDE4_port/rkward/plugin/rkcomponentcontext.cpp
    branches/KDE4_port/rkward/plugin/rkformula.cpp
    branches/KDE4_port/rkward/plugin/rkpluginspinbox.cpp
    branches/KDE4_port/rkward/plugin/rkpreviewbox.cpp
    branches/KDE4_port/rkward/plugin/rkpreviewbox.h
    branches/KDE4_port/rkward/plugin/rkstandardcomponent.cpp
    branches/KDE4_port/rkward/plugin/rkstandardcomponent.h
    branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.cpp
    branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.h
    branches/KDE4_port/rkward/plugin/rktext.h
    branches/KDE4_port/rkward/rbackend/rinterface.cpp
    branches/KDE4_port/rkward/rkward.h
    branches/KDE4_port/rkward/windows/detachedwindowcontainer.h

Modified: branches/KDE4_port/rkward/core/rfunctionobject.h
===================================================================
--- branches/KDE4_port/rkward/core/rfunctionobject.h	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/core/rfunctionobject.h	2007-11-16 00:41:58 UTC (rev 2229)
@@ -19,9 +19,6 @@
 
 #include "robject.h"
 
-#include <qpair.h>
-#include <q3valuelist.h>
-
 class RCommand;
 
 /**

Modified: branches/KDE4_port/rkward/core/robject.h
===================================================================
--- branches/KDE4_port/rkward/core/robject.h	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/core/robject.h	2007-11-16 00:41:58 UTC (rev 2229)
@@ -240,6 +240,4 @@
 	void rCommandDone (RCommand *command);
 };
 
-typedef RObject* RObjectPtr;
-
 #endif

Modified: branches/KDE4_port/rkward/dialogs/rkimportdialog.cpp
===================================================================
--- branches/KDE4_port/rkward/dialogs/rkimportdialog.cpp	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/dialogs/rkimportdialog.cpp	2007-11-16 00:41:58 UTC (rev 2229)
@@ -21,7 +21,6 @@
 #include <kfilefiltercombo.h>
 #include <klocale.h>
 
-#include <q3hbox.h>
 #include <qcombobox.h>
 #include <qlabel.h>
 

Modified: branches/KDE4_port/rkward/misc/rkcanceldialog.h
===================================================================
--- branches/KDE4_port/rkward/misc/rkcanceldialog.h	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/misc/rkcanceldialog.h	2007-11-16 00:41:58 UTC (rev 2229)
@@ -18,9 +18,8 @@
 #define RKCANCELDIALOG_H
 
 #include <qdialog.h>
-//Added by qt3to4:
-#include <QCloseEvent>
 
+class QCloseEvent;
 class RCommand;
 
 /**

Modified: branches/KDE4_port/rkward/plugin/rkcomponent.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkcomponent.cpp	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/plugin/rkcomponent.cpp	2007-11-16 00:41:58 UTC (rev 2229)
@@ -28,7 +28,7 @@
 	if (identifier.isEmpty ()) return this;
 	RK_DO (qDebug ("looking up '%s'", identifier.toLatin1 ().data ()), PLUGIN, DL_DEBUG);
 
-	RKComponentBase *child = child_map.find (identifier.section (".", 0, 0));
+	RKComponentBase *child = child_map.value (identifier.section (".", 0, 0));
 	if (!child) {	// if we do not have such a child, return this (and set remainder)
 		*remainder = identifier;
 		return this;
@@ -40,20 +40,20 @@
 void RKComponentBase::addChild (const QString &id, RKComponentBase *child) {
 	RK_TRACE (PLUGIN);
 
-	child_map.insert (id, child);		// no overwriting even on duplicate ("#noid#") ids, als this is really a QDict, not a QMap
+	child_map.insertMulti (id, child);		// no overwriting even on duplicate ("#noid#") ids
 }
 
 void RKComponentBase::fetchPropertyValuesRecursive (QMap<QString, QString> *list, bool include_top_level, const QString &prefix) {
 	RK_TRACE (PLUGIN);
 
-	for (Q3DictIterator<RKComponentBase> it (child_map); it.current (); ++it) {
-		if (it.currentKey () != "#noid#") {
-			if (it.current ()->isProperty ()) {
+	for (QHash<QString, RKComponentBase*>::const_iterator it = child_map.constBegin (); it != child_map.constEnd (); ++it) {
+		if (it.key () != "#noid#") {
+			if (it.value ()->isProperty ()) {
 				if (include_top_level) {
-					list->insert (prefix + it.currentKey (), it.current ()->value ());
+					list->insert (prefix + it.key (), it.value ()->value ());
 				}
 			} else {
-				it.current ()->fetchPropertyValuesRecursive (list, true, prefix + it.currentKey () + '.');
+				it.value ()->fetchPropertyValuesRecursive (list, true, prefix + it.key () + '.');
 			}
 		}
 	}
@@ -157,9 +157,9 @@
 
 	setEnabled (enabled);	/* We do this, even if the state *seems* to be unchanged. This is needed, as isEnabled () also returns false, if the parent QWidget is not enabled. However, the parent QWidget may not always be the parent component. */
 	if (enabled != isEnabled ()) {
-		for (Q3DictIterator<RKComponentBase> it (child_map); it.current (); ++it) {
-			if (it.current ()->isComponent()) {
-				static_cast<RKComponent*> (it.current ())->updateEnablednessRecursive ();
+		for (QHash<QString, RKComponentBase*>::const_iterator it = child_map.constBegin (); it != child_map.constEnd (); ++it) {
+			if (it.value ()->isComponent()) {
+				static_cast<RKComponent*> (it.value ())->updateEnablednessRecursive ();
 			}
 		}
 	}
@@ -168,8 +168,8 @@
 bool RKComponent::isValid () {
 	RK_TRACE (PLUGIN);
 
-	for (Q3DictIterator<RKComponentBase> it (child_map); it.current (); ++it) {
-		if (!(it.current ()->isSatisfied ())) return false;
+	for (QHash<QString, RKComponentBase*>::const_iterator it = child_map.constBegin (); it != child_map.constEnd (); ++it) {
+		if (!(it.value ()->isSatisfied ())) return false;
 	}
 	return true;
 }
@@ -222,9 +222,10 @@
 	RK_TRACE (PLUGIN);
 
 	if (!parentComponent ()) return;
-	for (Q3DictIterator<RKComponentBase> it (parentComponent ()->child_map); it.current (); ++it) {
-		if (it.current () == this) {
-			QString key = it.currentKey ();
+
+	for (QHash<QString, RKComponentBase*>::const_iterator it = parentComponent ()->child_map.constBegin (); it != parentComponent ()->child_map.constEnd (); ++it) {
+		if (it.value () == this) {
+			QString key = it.key ();
 	// unfortunately, several items might hvae the same key, and there seems to be no way to selectively remove the current item only.
 	// however, this function should only ever be called in cases of emergency and to prevent crashes. So we make extra sure to remove the child,
 	// even if we remove a little more than necessary along the way.

Modified: branches/KDE4_port/rkward/plugin/rkcomponent.h
===================================================================
--- branches/KDE4_port/rkward/plugin/rkcomponent.h	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/plugin/rkcomponent.h	2007-11-16 00:41:58 UTC (rev 2229)
@@ -18,7 +18,7 @@
 #ifndef RKCOMPONENT_H
 #define RKCOMPONENT_H
 
-#include <q3dict.h>
+#include <QHash>
 #include <qmap.h>
 #include <qwidget.h>
 
@@ -84,7 +84,7 @@
 /** simple convenience function to add a child to the map of children */
 	void addChild (const QString &id, RKComponentBase *child);
 protected:
-	Q3Dict<RKComponentBase> child_map;
+	QHash<QString, RKComponentBase*> child_map;
 	bool required;
 /** recursively fetch the current values of all properties present as direct or indirect children of this component. Used to transfer values e.g. when switching interfaces (or to store settings per plugin in the future). Values are placed in the dictionary provided (be sure to create one first!).
 @param list the list to store the object values in

Modified: branches/KDE4_port/rkward/plugin/rkcomponentcontext.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkcomponentcontext.cpp	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/plugin/rkcomponentcontext.cpp	2007-11-16 00:41:58 UTC (rev 2229)
@@ -111,19 +111,19 @@
 	RKComponent *component = handle->invoke (0, 0);
 
 	// set context values
-	for (Q3DictIterator<RKComponentBase> it (child_map); it.current (); ++it) {
-		if (it.currentKey () != "#noid#") {
-			QString id = it.currentKey ();
+	for (QHash<QString, RKComponentBase*>::const_iterator it = child_map.constBegin (); it != child_map.constEnd (); ++it) {
+		if (it.key () != "#noid#") {
+			QString id = it.key ();
 			QString remainder;
 			RKComponentBase *client = component->lookupComponent (id, &remainder);
 
-			RK_ASSERT (it.current ()->isProperty ());
-			if (!(client && remainder.isEmpty () && client->isProperty () && it.current ()->isProperty ())) {
+			RK_ASSERT (it.value ()->isProperty ());
+			if (!(client && remainder.isEmpty () && client->isProperty () && it.value ()->isProperty ())) {
 				RK_DO (qDebug ("Could not set context property %s", id.toLatin1 ().data ()), PLUGIN, DL_INFO);
 				continue;
 			}
 
-			static_cast<RKComponentPropertyBase *> (client)->connectToGovernor (static_cast<RKComponentPropertyBase *> (it.current ()), QString::null, false);
+			static_cast<RKComponentPropertyBase *> (client)->connectToGovernor (static_cast<RKComponentPropertyBase *> (it.value ()), QString::null, false);
 		}
 	}
 }

Modified: branches/KDE4_port/rkward/plugin/rkformula.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkformula.cpp	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/plugin/rkformula.cpp	2007-11-16 00:41:58 UTC (rev 2229)
@@ -16,7 +16,6 @@
  ***************************************************************************/
 #include "rkformula.h"
 
-#include <q3listview.h>
 #include <qpushbutton.h>
 #include <qradiobutton.h>
 #include <QButtonGroup>
@@ -26,9 +25,6 @@
 #include <qlayout.h>
 #include <qdom.h>
 #include <QTreeWidget>
-//Added by qt3to4:
-#include <Q3HBoxLayout>
-#include <Q3VBoxLayout>
 
 #include <klocale.h>
 #include <kiconloader.h>
@@ -343,7 +339,7 @@
 		// now cross each with the current var
 		for (int sub = 0; sub < sub_interactions.count (); ++sub) {
 			Interaction inter;
-			inter.level = level;
+			inter.level = level;	// well, actually level should always be count of vars - 1, so redundant...
 			inter.vars = sub_interactions[sub].vars;
 			inter.vars.insert (0, source_vars[i]);
 			ret.append (inter);

Modified: branches/KDE4_port/rkward/plugin/rkpluginspinbox.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkpluginspinbox.cpp	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/plugin/rkpluginspinbox.cpp	2007-11-16 00:41:58 UTC (rev 2229)
@@ -18,8 +18,6 @@
 
 #include <qlayout.h>
 #include <qlabel.h>
-//Added by qt3to4:
-#include <Q3VBoxLayout>
 
 #include <klocale.h>
 
@@ -41,7 +39,8 @@
 	addChild ("real", realvalue = new RKComponentPropertyDouble (this, !intmode, 0));
 
 	// layout and label
-	Q3VBoxLayout *vbox = new Q3VBoxLayout (this, RKGlobals::spacingHint ());
+	QVBoxLayout *vbox = new QVBoxLayout (this);
+	vbox->setContentsMargins (0, 0, 0, 0);
 	QLabel *label = new QLabel (xml->getStringAttribute (element, "label", i18n ("Enter value:"), DL_WARNING), this);
 	vbox->addWidget (label);
 

Modified: branches/KDE4_port/rkward/plugin/rkpreviewbox.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkpreviewbox.cpp	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/plugin/rkpreviewbox.cpp	2007-11-16 00:41:58 UTC (rev 2229)
@@ -20,8 +20,6 @@
 #include <qlabel.h>
 #include <qcheckbox.h>
 #include <qtimer.h>
-//Added by qt3to4:
-#include <Q3VBoxLayout>
 
 #include <klocale.h>
 
@@ -45,7 +43,8 @@
 	connect (state, SIGNAL (valueChanged (RKComponentPropertyBase *)), this, SLOT (changedState (RKComponentPropertyBase *)));
 
 	// create checkbox
-	Q3VBoxLayout *vbox = new Q3VBoxLayout (this, RKGlobals::spacingHint ());
+	QVBoxLayout *vbox = new QVBoxLayout (this);
+	vbox->setContentsMargins (0, 0, 0, 0);
 	toggle_preview_box = new QCheckBox (xml->getStringAttribute (element, "label", i18n ("Preview"), DL_INFO), this);
 	vbox->addWidget (toggle_preview_box);
 	toggle_preview_box->setChecked (preview_active);

Modified: branches/KDE4_port/rkward/plugin/rkpreviewbox.h
===================================================================
--- branches/KDE4_port/rkward/plugin/rkpreviewbox.h	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/plugin/rkpreviewbox.h	2007-11-16 00:41:58 UTC (rev 2229)
@@ -23,8 +23,6 @@
 #include "rkcomponentproperties.h"
 
 #include "../rbackend/rcommandreceiver.h"
-//Added by qt3to4:
-#include <QLabel>
 
 class QCheckBox;
 class QDomElement;

Modified: branches/KDE4_port/rkward/plugin/rkstandardcomponent.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkstandardcomponent.cpp	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/plugin/rkstandardcomponent.cpp	2007-11-16 00:41:58 UTC (rev 2229)
@@ -18,12 +18,12 @@
 #include "rkstandardcomponent.h"
 
 #include <qfileinfo.h>
-#include <q3groupbox.h>
 #include <qtabwidget.h>
 #include <qlabel.h>
 #include <qapplication.h>
 #include <qtimer.h>
 #include <QVBoxLayout>
+#include <QGroupBox>
 
 #include <klocale.h>
 #include <kmessagebox.h>
@@ -264,12 +264,12 @@
 	wizard = 0;
 
 	// clear all properties. Not the code property, as the script backend relies on it
-	for (Q3DictIterator<RKComponentBase> it (child_map); it.current (); ++it) {
-		if (it.current () != code) {
-			if (it.current ()->isProperty ()) {
-				static_cast<RKComponentPropertyBase *> (it.current ())->deleteLater ();
+	for (QHash<QString, RKComponentBase*>::const_iterator it = child_map.constBegin (); it != child_map.constEnd (); ++it) {
+		if (it.value () != code) {
+			if (it.value ()->isProperty ()) {
+				static_cast<RKComponentPropertyBase *> (it.value ())->deleteLater ();
 			} else {
-				static_cast<RKComponent *> (it.current ())->deleteLater ();
+				static_cast<RKComponent *> (it.value ())->deleteLater ();
 			}
 		}
 	}
@@ -673,7 +673,7 @@
 
 	XMLHelper *xml = XMLHelper::getStaticHelper ();
 
-	for (ConnectionList::const_iterator it = connection_list.begin (); it != connection_list.end (); ++it) {
+	for (ConnectionList::const_iterator it = connection_list.constBegin (); it != connection_list.constEnd (); ++it) {
 		RK_DO (qDebug ("Connecting '%s' to '%s'", (*it).client_property.toLatin1 ().data (), (*it).governor_property.toLatin1 ().data ()), PLUGIN, DL_DEBUG);
 
 		QString dummy;

Modified: branches/KDE4_port/rkward/plugin/rkstandardcomponent.h
===================================================================
--- branches/KDE4_port/rkward/plugin/rkstandardcomponent.h	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/plugin/rkstandardcomponent.h	2007-11-16 00:41:58 UTC (rev 2229)
@@ -21,8 +21,7 @@
 #include "rkcomponent.h"
 
 #include <qdom.h>
-//Added by qt3to4:
-#include <Q3ValueList>
+#include <QList>
 
 class RKStandardComponentGUI;
 class RKComponentHandle;
@@ -140,7 +139,7 @@
 		bool reconcile;
 		QDomElement origin;
 	};
-	typedef Q3ValueList <RKComponentPropertyConnection> ConnectionList;
+	typedef QList <RKComponentPropertyConnection> ConnectionList;
 	ConnectionList connection_list;
 	QMap<QString, QString> initial_values;
 };

Modified: branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.cpp
===================================================================
--- branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.cpp	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.cpp	2007-11-16 00:41:58 UTC (rev 2229)
@@ -21,19 +21,14 @@
 #include <kaction.h>
 #include <kactioncollection.h>
 #include <kurl.h>
+#include <kvbox.h>
+#include <khbox.h>
 
 #include <qtimer.h>
 #include <qlayout.h>
-#include <q3vbox.h>
-#include <q3hbox.h>
 #include <qpushbutton.h>
 #include <qlabel.h>
-//Added by qt3to4:
-#include <Q3HBoxLayout>
 #include <QCloseEvent>
-#include <Q3GridLayout>
-#include <Q3Frame>
-#include <Q3VBoxLayout>
 
 #include "rkcomponentmap.h"
 #include "../windows/rkworkplace.h"
@@ -82,7 +77,7 @@
 	QHBoxLayout *hbox = new QHBoxLayout (upper_widget);
 
 	// build standard elements
-	main_widget = new Q3VBox (upper_widget);
+	main_widget = new KVBox (upper_widget);
 	hbox->addWidget (main_widget);
 
 	// lines
@@ -269,7 +264,7 @@
 
 	is_switchable = switchable;
 	// create main layout and stack
-	Q3GridLayout *main_grid = new Q3GridLayout (this, 3, 4, RKGlobals::marginHint (), RKGlobals::spacingHint ());
+	QGridLayout *main_grid = new QGridLayout (this);
 	main_widget = stack = new RKStandardComponentStack (this);
 	main_grid->addMultiCellWidget (stack, 0, 0, 0, 3);
 
@@ -303,7 +298,8 @@
 	if (!enslaved) {
 		// build the last page
 		RKComponent *last_page = stack->addPage (component);
-		Q3VBoxLayout *vbox = new Q3VBoxLayout (last_page, RKGlobals::spacingHint ());
+		QVBoxLayout *vbox = new QVBoxLayout (last_page);
+		vbox->setContentsMargins (0, 0, 0, 0);
 		QLabel *label = new QLabel (i18n ("Below you can see the command(s) corresponding to the settings you made. Click 'Submit' to run the command(s)."), last_page);
 		label->setWordWrap (true);
 		code_display = new RKCommandEditorWindow (last_page, true);
@@ -402,18 +398,15 @@
 
 //////////////////////////////// RKStandardComponentStack ////////////////////////////////////
 
-RKStandardComponentStack::RKStandardComponentStack (QWidget *parent) : Q3WidgetStack (parent) {
+RKStandardComponentStack::RKStandardComponentStack (QWidget *parent) : QStackedWidget (parent) {
 	RK_TRACE (PLUGIN);
-
-	num_pages = current_page = 0;
-	current_def = 0;
 }
 
 RKStandardComponentStack::~RKStandardComponentStack () {
 	RK_TRACE (PLUGIN);
 
-	for (Pages::const_iterator it = pages.constBegin (); it != pages.constEnd (); ++it) {
-		delete (*it);
+	for (int i = 0; i < pages.count (); ++i) {
+		delete (pages[i]);
 	}
 }
 
@@ -421,7 +414,7 @@
 	RK_TRACE (PLUGIN);
 
 	if (next) {
-		return (nextVisiblePage () <= (num_pages-1));
+		return (nextVisiblePage () <= (count () - 1));
 	} else {
 		return (previousVisiblePage () >= 0);
 	}
@@ -442,20 +435,20 @@
 		return;
 	}
 
-	current_page = id;
-	current_def = pages[id];
-	raiseWidget (current_def->page);
+	setCurrentIndex (id);
 }
 
 bool RKStandardComponentStack::currentPageSatisfied () {
 	RK_TRACE (PLUGIN);
-	if (!current_def) {
+
+	PageDef* current_page = pages.value (currentIndex ());
+	if (!current_page) {
 		RK_ASSERT (false);
 		return false;
 	}
 
-	for (int i = 0; i < current_def->page_components.size (); ++i) {
-		if (!((current_def->page_components[i])->isSatisfied ())) {
+	for (int i = 0; i < current_page->page_components.size (); ++i) {
+		if (!((current_page->page_components[i])->isSatisfied ())) {
 			return false;
 		}
 	}
@@ -466,9 +459,7 @@
 void RKStandardComponentStack::goToFirstPage () {
 	RK_TRACE (PLUGIN);
 
-	current_page = 0;
-	current_def = pages.first ();
-	raiseWidget (current_def->page);
+	setCurrentIndex (0);
 }
 
 RKComponent *RKStandardComponentStack::addPage (RKComponent *parent) {
@@ -476,30 +467,28 @@
 
 	PageDef *def = new PageDef;
 	def->page = new RKComponent (parent, this);
-	addWidget (def->page);
+	setCurrentIndex (addWidget (def->page));
 	pages.append (def);
 
-	current_def = def;
-	num_pages++;
-	current_page++;
-
 	return def->page;
 }
 
 void RKStandardComponentStack::addComponentToCurrentPage (RKComponent *component) {
 	RK_TRACE (PLUGIN);
-	if (!current_def) {
+
+	PageDef* current_page = pages.value (currentIndex ());
+	if (!current_page) {
 		RK_ASSERT (false);
 		return;
 	}
 
-	current_def->page_components.append (component);
+	current_page->page_components.append (component);
 }
 
 int RKStandardComponentStack::previousVisiblePage () {
 	RK_TRACE (PLUGIN);
 
-	int prev_page = current_page - 1;
+	int prev_page = currentIndex () - 1;
 	while (prev_page >= 0) {
 		if (pages[prev_page]->page->visibilityProperty ()->boolValue ()) return prev_page;
 		--prev_page;
@@ -511,8 +500,8 @@
 int RKStandardComponentStack::nextVisiblePage () {
 	RK_TRACE (PLUGIN);
 
-	int next_page = current_page + 1;
-	while (next_page <= (num_pages-1)) {
+	int next_page = currentIndex () + 1;
+	while (next_page <= (count ()-1)) {
 		if (pages[next_page]->page->visibilityProperty ()->boolValue ()) return next_page;
 		++next_page;
 	}

Modified: branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.h
===================================================================
--- branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.h	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/plugin/rkstandardcomponentgui.h	2007-11-16 00:41:58 UTC (rev 2229)
@@ -18,7 +18,7 @@
 #ifndef RKSTANDARDCOMPONENTGUI_H
 #define RKSTANDARDCOMPONENTGUI_H
 
-#include <q3widgetstack.h>
+#include <QStackedWidget>
 #include <QList>
 
 #include "rkstandardcomponent.h"
@@ -26,7 +26,7 @@
 /** For use in RKStandardComponents that are in wizard mode. Keeps a list of all pages, which page we're currently on, which children need to be satisfied in order to be able to move to the next page, etc.
 
 @author Thomas Friedrichsmeier */
-class RKStandardComponentStack: public Q3WidgetStack {
+class RKStandardComponentStack: public QStackedWidget {
 public:
 /** constructor. */
 	explicit RKStandardComponentStack (QWidget *parent);
@@ -52,13 +52,8 @@
 		PageComponents page_components;
 		RKComponent *page;
 	};
-	typedef Q3ValueList<PageDef *> Pages;
-	Pages pages;
+	QList<PageDef*> pages;
 
-	int num_pages;			// KDE4: TODO remove
-	int current_page;
-	PageDef *current_def;		// to save a few lookups	// KDE4: TODO remove
-
 	int previousVisiblePage ();
 	int nextVisiblePage ();
 };

Modified: branches/KDE4_port/rkward/plugin/rktext.h
===================================================================
--- branches/KDE4_port/rkward/plugin/rktext.h	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/plugin/rktext.h	2007-11-16 00:41:58 UTC (rev 2229)
@@ -21,8 +21,6 @@
 #include "rkcomponent.h"
 
 #include "rkcomponentproperties.h"
-//Added by qt3to4:
-#include <QLabel>
 
 class QLabel;
 class QDomElement;

Modified: branches/KDE4_port/rkward/rbackend/rinterface.cpp
===================================================================
--- branches/KDE4_port/rkward/rbackend/rinterface.cpp	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/rbackend/rinterface.cpp	2007-11-16 00:41:58 UTC (rev 2229)
@@ -34,8 +34,7 @@
 #include "../windows/rkcommandlog.h"
 
 #include "../windows/rkwindowcatcher.h"
-//Added by qt3to4:
-#include <QCustomEvent>
+
 #ifndef DISABLE_RKWINDOWCATCHER
 // putting this here instead of the class-header so I'm able to mess with it often without long recompiles. Fix when it works!
 RKWindowCatcher *window_catcher;

Modified: branches/KDE4_port/rkward/rkward.h
===================================================================
--- branches/KDE4_port/rkward/rkward.h	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/rkward.h	2007-11-16 00:41:58 UTC (rev 2229)
@@ -24,10 +24,9 @@
 #endif
 
 #include<QDBusAbstractAdaptor>
-//Added by qt3to4:
-#include <QLabel>
-#include <QCloseEvent>
 
+class QApplication;
+
 /** This base provides the DBUS-Interface for RKWardMainWindow */
 class RKWardDBUSInterface : virtual public QDBusAbstractAdaptor {
 	Q_OBJECT
@@ -50,6 +49,7 @@
 #include <kparts/mainwindow.h>
 
 class QLabel;
+class QCloseEvent;
 // forward declaration of the RKward classes
 class RSettings;
 class RKMenu;

Modified: branches/KDE4_port/rkward/windows/detachedwindowcontainer.h
===================================================================
--- branches/KDE4_port/rkward/windows/detachedwindowcontainer.h	2007-11-15 23:49:32 UTC (rev 2228)
+++ branches/KDE4_port/rkward/windows/detachedwindowcontainer.h	2007-11-16 00:41:58 UTC (rev 2229)
@@ -20,8 +20,6 @@
 
 #include <kparts/part.h>
 #include <kparts/mainwindow.h>
-//Added by qt3to4:
-#include <QCloseEvent>
 
 class RKMDIWindow;
 class QCloseEvent;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list