[rkward-cvs] rkward/rkward/plugin rkstandardcomponent.cpp,1.26,1.27 rkstandardcomponent.h,1.14,1.15 rkstandardcomponentgui.cpp,1.5,1.6 rkstandardcomponentgui.h,1.2,1.3
Thomas Friedrichsmeier
tfry at users.sourceforge.net
Wed Apr 5 10:09:21 UTC 2006
Update of /cvsroot/rkward/rkward/rkward/plugin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1544
Modified Files:
rkstandardcomponent.cpp rkstandardcomponent.h
rkstandardcomponentgui.cpp rkstandardcomponentgui.h
Log Message:
Show R errors generated by plugins. New stretch-element for layouting plugins
Index: rkstandardcomponentgui.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkstandardcomponentgui.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rkstandardcomponentgui.h 20 Mar 2006 20:30:58 -0000 1.2
--- rkstandardcomponentgui.h 5 Apr 2006 10:09:18 -0000 1.3
***************
*** 69,72 ****
--- 69,73 ----
class QTimer;
class QSplitter;
+ class RKRErrorDialog;
/** contains the standard GUI elements for a top-level RKStandardComponent. The base class creates a dialog interface. For a wizard interface use RKStandardComponentWizard. You *must* call createDialog () after construction, since I can't virualize this for reasons I don't understand!
***************
*** 103,106 ****
--- 104,108 ----
RKStandardComponent *component;
QTimer *code_update_timer;
+ RKRErrorDialog *error_dialog;
// common widgets
Index: rkstandardcomponentgui.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkstandardcomponentgui.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** rkstandardcomponentgui.cpp 21 Mar 2006 15:41:24 -0000 1.5
--- rkstandardcomponentgui.cpp 5 Apr 2006 10:09:18 -0000 1.6
***************
*** 30,33 ****
--- 30,34 ----
#include "../rkcommandeditor.h"
#include "../rbackend/rinterface.h"
+ #include "../misc/rkerrordialog.h"
#include "../rkglobals.h"
#include "../debug.h"
***************
*** 39,42 ****
--- 40,46 ----
RK_TRACE (PLUGIN);
+ // create an error-dialog
+ error_dialog = new RKRErrorDialog (i18n ("The R-backend has reported one or more error(s) while processing the plugin '%1'.\nThis may lead to an incorrect ouput and is likely due to a bug in the plugin.\nA transcript of the error message(s) is shown below.").arg (component->getFilename ()), i18n ("R-Error"), false);
+
RKStandardComponentGUI::component = component;
RKStandardComponentGUI::code_property = code_property;
***************
*** 52,55 ****
--- 56,61 ----
RKStandardComponentGUI::~RKStandardComponentGUI () {
RK_TRACE (PLUGIN);
+
+ error_dialog->deleteThis ();
}
***************
*** 117,124 ****
RCommandChain *chain = RKGlobals::rInterface ()->startChain ();
! RKGlobals::rInterface ()->issueCommand (new RCommand (code_property->preprocess (), RCommand::Plugin | RCommand::DirectToOutput), chain);
! RKGlobals::rInterface ()->issueCommand (new RCommand (code_property->calculate (), RCommand::Plugin | RCommand::DirectToOutput), chain);
! RKGlobals::rInterface ()->issueCommand (new RCommand (code_property->printout (), RCommand::Plugin | RCommand::DirectToOutput), chain);
! RKGlobals::rInterface ()->issueCommand (new RCommand (code_property->cleanup (), RCommand::Plugin | RCommand::DirectToOutput), chain);
RKGlobals::rInterface ()->closeChain (chain);
}
--- 123,130 ----
RCommandChain *chain = RKGlobals::rInterface ()->startChain ();
! RKGlobals::rInterface ()->issueCommand (new RCommand (code_property->preprocess (), RCommand::Plugin | RCommand::DirectToOutput, QString::null, error_dialog), chain);
! RKGlobals::rInterface ()->issueCommand (new RCommand (code_property->calculate (), RCommand::Plugin | RCommand::DirectToOutput, QString::null, error_dialog), chain);
! RKGlobals::rInterface ()->issueCommand (new RCommand (code_property->printout (), RCommand::Plugin | RCommand::DirectToOutput, QString::null, error_dialog), chain);
! RKGlobals::rInterface ()->issueCommand (new RCommand (code_property->cleanup (), RCommand::Plugin | RCommand::DirectToOutput, QString::null, error_dialog), chain);
RKGlobals::rInterface ()->closeChain (chain);
}
Index: rkstandardcomponent.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkstandardcomponent.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** rkstandardcomponent.h 21 Mar 2006 15:41:24 -0000 1.14
--- rkstandardcomponent.h 5 Apr 2006 10:09:18 -0000 1.15
***************
*** 23,27 ****
#include <qdom.h>
- class RKErrorDialog;
class RKStandardComponentGUI;
class RKStandardComponentStack;
--- 23,26 ----
***************
*** 63,66 ****
--- 62,67 ----
/** set the GUI caption (if this is a top-level gui) */
void setCaption (const QString &caption);
+ /** return the filename of the xml file */
+ QString getFilename () { return filename; };
public slots:
/** this gets called by the script-backend, when it's done. Might enable the
***************
*** 82,86 ****
QString filename;
ScriptBackend *backend;
- RKErrorDialog *error_dialog;
RKStandardComponentGUI *gui;
RKStandardComponentStack *wizard;
--- 83,86 ----
Index: rkstandardcomponent.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkstandardcomponent.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** rkstandardcomponent.cpp 29 Mar 2006 16:21:51 -0000 1.26
--- rkstandardcomponent.cpp 5 Apr 2006 10:09:18 -0000 1.27
***************
*** 33,37 ****
#include "rkstandardcomponentgui.h"
#include "../scriptbackends/phpbackend.h"
- #include "../misc/rkerrordialog.h"
#include "../misc/xmlhelper.h"
#include "../settings/rksettingsmoduleplugins.h"
--- 33,36 ----
***************
*** 73,79 ****
}
- // create an error-dialog
- error_dialog = new RKErrorDialog (i18n ("The R-backend has reported one or more error(s) while processing the plugin '%1'. This may lead to an incorrect ouput and is likely due to a bug in the plugin.\nA transcript of the error message(s) is shown below.").arg (filename), i18n ("R-Error"), false);
-
// initialize the PHP-backend with the code-template
QDomElement element = xml->getChildElement (doc_element, "code", DL_WARNING);
--- 72,75 ----
***************
*** 138,142 ****
RK_TRACE (PLUGIN);
- delete error_dialog;
delete backend;
}
--- 134,137 ----
***************
*** 236,240 ****
createTopLevel (doc_element, force_mode);
! setPropertyValues (&value_save); // set old GUI settings
}
--- 231,239 ----
createTopLevel (doc_element, force_mode);
! // set old GUI settings. For this purpose, we'll temporarily disable updates in the phpbackend
! created = false;
! setPropertyValues (&value_save);
! created = true;
! changed (); // now we can update
}
***************
*** 440,443 ****
--- 439,445 ----
layout->addWidget (box);
buildElement (e, box, false);
+ } else if (e.tagName () == "stretch") {
+ QWidget *stretch = new QWidget (parent_widget);
+ stretch->setSizePolicy (QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
} else if (e.tagName () == "column") {
RKComponent *widget = new RKComponent (component (), parent_widget);
More information about the rkward-tracker
mailing list