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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Sep 9 11:10:44 UTC 2009


Revision: 2646
          http://rkward.svn.sourceforge.net/rkward/?rev=2646&view=rev
Author:   tfry
Date:     2009-09-09 11:10:44 +0000 (Wed, 09 Sep 2009)

Log Message:
-----------
Slighly experimental: Add a checkbox (checked by default) to control auto-closing of plugin dialogs. Wizards always close after submit, now.

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/plugin/rkstandardcomponentgui.cpp
    trunk/rkward/rkward/plugin/rkstandardcomponentgui.h

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2009-09-09 10:52:33 UTC (rev 2645)
+++ trunk/rkward/ChangeLog	2009-09-09 11:10:44 UTC (rev 2646)
@@ -1,3 +1,4 @@
+- Plugin dialogs close automatically after submitting (by default)
 - Fetching object structure is much faster for very large data.frames
 - Fix crash when loading certain packages on Windows
 - Fix some potential path issues on Windows

Modified: trunk/rkward/rkward/plugin/rkstandardcomponentgui.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkstandardcomponentgui.cpp	2009-09-09 10:52:33 UTC (rev 2645)
+++ trunk/rkward/rkward/plugin/rkstandardcomponentgui.cpp	2009-09-09 11:10:44 UTC (rev 2646)
@@ -29,6 +29,7 @@
 #include <qpushbutton.h>
 #include <qlabel.h>
 #include <QCloseEvent>
+#include <QCheckBox>
 
 #include "rkcomponentmap.h"
 #include "../misc/rkcommonfunctions.h"
@@ -97,10 +98,14 @@
 	connect (ok_button, SIGNAL (clicked ()), this, SLOT (ok ()));
 	vbox->addWidget (ok_button);
 	if (enslaved) ok_button->hide ();
-	
+
 	cancel_button = new QPushButton (i18n ("Close"), upper_widget);
 	connect (cancel_button, SIGNAL (clicked ()), this, SLOT (cancel ()));
 	vbox->addWidget (cancel_button);
+	auto_close_box = new QCheckBox (i18n ("Auto close"), upper_widget);
+	auto_close_box->setChecked (true);
+	vbox->addWidget (auto_close_box);
+	if (enslaved) auto_close_box->hide ();
 	vbox->addStretch (1);
 	
 	help_button = new QPushButton (i18n ("Help"), upper_widget);
@@ -165,6 +170,8 @@
 	// separator line
 	command.append (".rk.make.hr()\n");
 	RKGlobals::rInterface ()->issueCommand (new RCommand (command, RCommand::Plugin | RCommand::DirectToOutput | RCommand::ObjectListUpdate), component->commandChain ());
+
+	if (auto_close_box->isChecked ()) cancel ();
 }
 
 void RKStandardComponentGUI::cancel () {
@@ -302,6 +309,11 @@
 	connect (prev_button, SIGNAL (clicked ()), this, SLOT (prev ()));
 	connect (cancel_button, SIGNAL (clicked ()), this, SLOT (cancel ()));
 	connect (help_button, SIGNAL (clicked ()), this, SLOT (help ()));
+
+	// dummy:
+	auto_close_box = new QCheckBox(this);
+	auto_close_box->setChecked (true);
+	auto_close_box->hide ();
 }
 
 void RKStandardComponentWizard::addLastPage () {

Modified: trunk/rkward/rkward/plugin/rkstandardcomponentgui.h
===================================================================
--- trunk/rkward/rkward/plugin/rkstandardcomponentgui.h	2009-09-09 10:52:33 UTC (rev 2645)
+++ trunk/rkward/rkward/plugin/rkstandardcomponentgui.h	2009-09-09 11:10:44 UTC (rev 2646)
@@ -65,6 +65,7 @@
 class QTimer;
 class QSplitter;
 class QCloseEvent;
+class QCheckBox;
 
 /** 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!
 
@@ -107,6 +108,7 @@
 	QPushButton *cancel_button;
 	QPushButton *help_button;
 	QPushButton *switch_button;
+	QCheckBox *auto_close_box;
 	RKCommandEditorWindow *code_display;
 
 	bool enslaved;


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