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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Apr 25 10:56:38 UTC 2007


Revision: 1846
          http://svn.sourceforge.net/rkward/?rev=1846&view=rev
Author:   tfry
Date:     2007-04-25 03:56:37 -0700 (Wed, 25 Apr 2007)

Log Message:
-----------
Some corrections.
Most importantly, don't bail out on embedded components just because the type does not work well.
Also some fixes to scatterplot plugin in wizard mode

Modified Paths:
--------------
    trunk/rkward/rkward/plugin/rkcomponent.cpp
    trunk/rkward/rkward/plugin/rkcomponent.h
    trunk/rkward/rkward/plugin/rkcomponentcontext.h
    trunk/rkward/rkward/plugin/rkstandardcomponent.cpp
    trunk/rkward/rkward/plugins/plots/scatterplot.xml

Modified: trunk/rkward/rkward/plugin/rkcomponent.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkcomponent.cpp	2007-04-24 15:44:18 UTC (rev 1845)
+++ trunk/rkward/rkward/plugin/rkcomponent.cpp	2007-04-25 10:56:37 UTC (rev 1846)
@@ -61,6 +61,7 @@
 
 void RKComponentBase::setPropertyValues (QMap<QString, QString> *list) {
 	RK_TRACE (PLUGIN);
+	// TODO: visibility enabledness and requiredness should be excluded, as those are not directly user settable. Perhaps even mark up all properties as user settable or not.
 
 	for (QMap<QString, QString>::const_iterator it = list->constBegin (); it != list->constEnd (); ++it) {
 		QString mod;

Modified: trunk/rkward/rkward/plugin/rkcomponent.h
===================================================================
--- trunk/rkward/rkward/plugin/rkcomponent.h	2007-04-24 15:44:18 UTC (rev 1845)
+++ trunk/rkward/rkward/plugin/rkcomponent.h	2007-04-25 10:56:37 UTC (rev 1846)
@@ -58,10 +58,11 @@
 		ComponentPreviewBox = 2014,
 		ComponentSaveObject = 2015,
 		ComponentStandard = 2100,
+		ComponentContextHandler = 2900,
 		ComponentUser = 3000	/**< for user expansion */
 	};
 /** for RTTI. see RKComponentBase::RKComponentTypes */
-	virtual int type () { return ComponentBase; };
+	virtual int type () = 0;
 /** tries to locate a component (or property) described by identifier as a child (of any generation) of this RKComponentBase. If found, a pointer to this is returned. Also, the modifier parameter is set to hold any remaining modifier contained in the identifier.
 @param identifier The identifier string to look for (including a potential modifier suffix).
 @param remainder If a non null pointer to QString is given, this will be set to the value of the remaining modifier

Modified: trunk/rkward/rkward/plugin/rkcomponentcontext.h
===================================================================
--- trunk/rkward/rkward/plugin/rkcomponentcontext.h	2007-04-24 15:44:18 UTC (rev 1845)
+++ trunk/rkward/rkward/plugin/rkcomponentcontext.h	2007-04-25 10:56:37 UTC (rev 1846)
@@ -66,6 +66,7 @@
 friend class RKContextMap;
 public:
 	void invokeComponent (RKComponentHandle *handle);
+	int type () { return ComponentContextHandler; };
 protected:
 /** constructor. Protected. Use RKContextMap::makeContextHandler() instead. */
 	RKContextHandler (QObject *parent, const QDomDocument &gui_xml, const QString &id);

Modified: trunk/rkward/rkward/plugin/rkstandardcomponent.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkstandardcomponent.cpp	2007-04-24 15:44:18 UTC (rev 1845)
+++ trunk/rkward/rkward/plugin/rkstandardcomponent.cpp	2007-04-25 10:56:37 UTC (rev 1846)
@@ -195,16 +195,14 @@
 	} else if (force_mode == 1) {
 		build_wizard = false;
 		if (dialog_element.isNull ()) {
+			build_wizard = true;
 			xml->displayError (&doc_element, "Dialog mode forced, but no dialog element given", DL_INFO);
-			deleteLater ();
-			return false;
 		}
 	} else if (force_mode == 2) {
 		build_wizard = true;
 		if (wizard_element.isNull ()) {
+			build_wizard = false;
 			xml->displayError (&doc_element, "Wizard mode forced, but no wizard element given", DL_INFO);
-			deleteLater ();
-			return false;
 		}
 	}
 

Modified: trunk/rkward/rkward/plugins/plots/scatterplot.xml
===================================================================
--- trunk/rkward/rkward/plugins/plots/scatterplot.xml	2007-04-24 15:44:18 UTC (rev 1845)
+++ trunk/rkward/rkward/plugins/plots/scatterplot.xml	2007-04-25 10:56:37 UTC (rev 1846)
@@ -102,9 +102,7 @@
 	<wizard label="Scatterplot">
 	<!-- This wizard is somewhat pointless, as all it's really just a copy of the dialog tabs, with one tab per page. But so what, maybe it still "looks" friendlier, while it does not really change anything -->
 		<copy id="variables_tab" copy_element_tag_name="page" />
-		<copy id="axes_tab" copy_element_tag_name="page" />
-		<copy id="type_tab" copy_element_tag_name="page" />
-		<copy id="names_tab" copy_element_tag_name="page" />
 		<copy id="options_tab" copy_element_tag_name="page" />
+		<copy id="further_options_tab" copy_element_tag_name="page" />
 	</wizard>
 </document>


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