[rkward-cvs] SF.net SVN: rkward: [1204] trunk/rkward/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Jan 24 15:08:02 UTC 2007


Revision: 1204
          http://svn.sourceforge.net/rkward/?rev=1204&view=rev
Author:   tfry
Date:     2007-01-24 07:08:01 -0800 (Wed, 24 Jan 2007)

Log Message:
-----------
Clean up some old interfaces and prepare addition of preview windows

Modified Paths:
--------------
    trunk/rkward/rkward/plugin/rkstandardcomponent.cpp
    trunk/rkward/rkward/scriptbackends/common.php
    trunk/rkward/rkward/scriptbackends/phpbackend.cpp
    trunk/rkward/rkward/scriptbackends/phpbackend.h
    trunk/rkward/rkward/scriptbackends/scriptbackend.h

Modified: trunk/rkward/rkward/plugin/rkstandardcomponent.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkstandardcomponent.cpp	2007-01-24 14:35:56 UTC (rev 1203)
+++ trunk/rkward/rkward/plugin/rkstandardcomponent.cpp	2007-01-24 15:08:01 UTC (rev 1204)
@@ -80,8 +80,6 @@
 	backend = new PHPBackend ();
 	connect (backend, SIGNAL (idle ()), this, SLOT (backendIdle ()));
 	connect (backend, SIGNAL (requestValue (const QString&)), this, SLOT (getValue (const QString&)));
-//	connect (backend, SIGNAL (requestRCall (const QString&)), this, SLOT (doRCall (const QString&)));
-//	connect (backend, SIGNAL (requestRVector (const QString&)), this, SLOT (getRVector (const QString&)));
 	connect (backend, SIGNAL (haveError ()), this, SLOT (hide ()));
 	connect (backend, SIGNAL (haveError ()), this, SLOT (removeFromParent ()));
 	connect (backend, SIGNAL (haveError ()), this, SLOT (deleteLater ()));

Modified: trunk/rkward/rkward/scriptbackends/common.php
===================================================================
--- trunk/rkward/rkward/scriptbackends/common.php	2007-01-24 14:35:56 UTC (rev 1203)
+++ trunk/rkward/rkward/scriptbackends/common.php	2007-01-24 15:08:01 UTC (rev 1204)
@@ -1,14 +1,4 @@
 <?
-// rename to getR
-function callR_val ($call) {
-	return (getInput ("requesting rcall:" . $call));
-}
-
-// rename to printR
-function callR ($call) {
-	echo (callR_val ($call));
-}
-
 // rename to getRK
 function getRK_val ($id) {
 	return (getInput ("requesting data:" . $id));
@@ -19,8 +9,10 @@
 	echo (getRK_val ($id));
 }
 
-function getRVector ($call) {
-	return (explode ("\t", getInput ("requesting rvector:" . $call)));
+function getPreview () {
+	if (function_exists ("preview")) {
+		preview ();
+	}
 }
 
 function getInput ($prompt) {

Modified: trunk/rkward/rkward/scriptbackends/phpbackend.cpp
===================================================================
--- trunk/rkward/rkward/scriptbackends/phpbackend.cpp	2007-01-24 14:35:56 UTC (rev 1203)
+++ trunk/rkward/rkward/scriptbackends/phpbackend.cpp	2007-01-24 15:08:01 UTC (rev 1204)
@@ -2,7 +2,7 @@
                           phpbackend  -  description
                              -------------------
     begin                : Mon Jul 26 2004
-    copyright            : (C) 2004 by Thomas Friedrichsmeier
+    copyright            : (C) 2004, 2007 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -273,18 +273,6 @@
 			emit (requestValue (requested_object));
 			busy = true;
 //			writeData (res + eot_string);
-		} else if (request.startsWith ("requesting rcall:")) {
-			QString requested_call = request.remove ("requesting rcall:");
-			RK_DO (qDebug ("requested rcall: \"%s\"", requested_call.latin1 ()), PHP, DL_DEBUG);
-			emit (requestRCall (requested_call));
-			busy = true;
-//			_responsible->doRCall (requested_call);
-		} else if (request.startsWith ("requesting rvector:")) {
-			QString requested_call = request.remove ("requesting rvector:");
-			RK_DO (qDebug ("requested rvector: \"%s\"", requested_call.latin1 ()), PHP, DL_DEBUG);
-			emit (requestRVector (requested_call));
-			busy = true;
-//			_responsible->getRVector (requested_call);
 		} else if (request.startsWith ("PHP-Error")) {
 				QString error = request.remove ("PHP-Error");
 				php_process->detach ();

Modified: trunk/rkward/rkward/scriptbackends/phpbackend.h
===================================================================
--- trunk/rkward/rkward/scriptbackends/phpbackend.h	2007-01-24 14:35:56 UTC (rev 1203)
+++ trunk/rkward/rkward/scriptbackends/phpbackend.h	2007-01-24 15:08:01 UTC (rev 1204)
@@ -2,7 +2,7 @@
                           phpbackend  -  description
                              -------------------
     begin                : Mon Jul 26 2004
-    copyright            : (C) 2004 by Thomas Friedrichsmeier
+    copyright            : (C) 2004, 2007 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -47,6 +47,7 @@
 	void calculate (int flags) { callFunction ("calculate ();", flags, Calculate); };
 	void printout (int flags) { callFunction ("printout ();", flags, Printout); };
 	void cleanup (int flags) { callFunction ("cleanup ();", flags, Cleanup); };
+	void preview (int flags) { callFunction ("doPreview ();", flags, Preview); };
 	void writeData (const QString &data);
 public slots:
 	void gotOutput (KProcess *proc, char* buf, int len);

Modified: trunk/rkward/rkward/scriptbackends/scriptbackend.h
===================================================================
--- trunk/rkward/rkward/scriptbackends/scriptbackend.h	2007-01-24 14:35:56 UTC (rev 1203)
+++ trunk/rkward/rkward/scriptbackends/scriptbackend.h	2007-01-24 15:08:01 UTC (rev 1204)
@@ -2,7 +2,7 @@
                           scriptbackend  -  description
                              -------------------
     begin                : Sun Aug 15 2004
-    copyright            : (C) 2004 by Thomas Friedrichsmeier
+    copyright            : (C) 2004, 2007 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -40,8 +40,9 @@
 		Calculate = 1,
 		Printout = 2,
 		Cleanup = 3,
-		Ignore = 4,
-		User = 5
+		Preview = 4,
+		Ignore = 5,
+		User = 6
 	};
 
 /** initialize backend
@@ -56,6 +57,7 @@
 	virtual void calculate (int flags) = 0;
 	virtual void printout (int flags) = 0;
 	virtual void cleanup (int flags) = 0;
+	virtual void preview (int flags) = 0;
 	
 	virtual bool isBusy () { return busy; };
 	
@@ -67,8 +69,6 @@
 	void commandDone (int);
 	void idle ();
 	void requestValue (const QString &);
-	void requestRCall (const QString &);
-	void requestRVector (const QString &);
 	void haveError ();
 protected:
 	RKComponentPropertyCode *code_property;


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