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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Sun Nov 26 13:38:55 UTC 2006


Revision: 936
          http://svn.sourceforge.net/rkward/?rev=936&view=rev
Author:   tfry
Date:     2006-11-26 05:38:54 -0800 (Sun, 26 Nov 2006)

Log Message:
-----------
Rename RKwardApp to RKMainWindow because
a) it is a main window, not an application
b) we will soon need a real RKWardApplication class to filter certain X11 events
c) the official capitalization of RKWard is not RKward

Modified Paths:
--------------
    trunk/rkward/rkward/agents/rkloadagent.cpp
    trunk/rkward/rkward/agents/rksaveagent.cpp
    trunk/rkward/rkward/agents/showedittextfileagent.cpp
    trunk/rkward/rkward/dataeditor/rkeditordataframepart.cpp
    trunk/rkward/rkward/khelpdlg.cpp
    trunk/rkward/rkward/main.cpp
    trunk/rkward/rkward/plugin/rkcomponentmap.cpp
    trunk/rkward/rkward/rbackend/rinterface.cpp
    trunk/rkward/rkward/rbackend/rinterface.h
    trunk/rkward/rkward/rbackend/rkwindowcatcher.cpp
    trunk/rkward/rkward/rbackend/rkwindowcatcher.h
    trunk/rkward/rkward/rbackend/rthread.cpp
    trunk/rkward/rkward/rkglobals.h
    trunk/rkward/rkward/rkward.cpp
    trunk/rkward/rkward/rkward.h
    trunk/rkward/rkward/robjectbrowser.h
    trunk/rkward/rkward/settings/rksettings.h
    trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp
    trunk/rkward/rkward/windows/detachedwindowcontainer.cpp
    trunk/rkward/rkward/windows/rkworkplace.cpp

Modified: trunk/rkward/rkward/agents/rkloadagent.cpp
===================================================================
--- trunk/rkward/rkward/agents/rkloadagent.cpp	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/agents/rkloadagent.cpp	2006-11-26 13:38:54 UTC (rev 936)
@@ -35,18 +35,18 @@
 
 RKLoadAgent::RKLoadAgent (const KURL &url, bool merge) {
 	RK_TRACE (APP);
-	RKwardApp::getApp ()->slotSetStatusBarText (i18n ("Loading Workspace ..."));
+	RKWardMainWindow::getMain ()->slotSetStatusBarText (i18n ("Loading Workspace ..."));
 
 #if !KDE_IS_VERSION (3, 2, 0)
 	KIO::NetAccess::download (url, tmpfile);
 #else
-	KIO::NetAccess::download (url, tmpfile, RKwardApp::getApp ());
+	KIO::NetAccess::download (url, tmpfile, RKWardMainWindow::getMain ());
 #endif
 
 	RCommand *command;
 	
 	if (!merge) {
-		RKwardApp::getApp ()->slotCloseAllEditors ();
+		RKWardMainWindow::getMain ()->slotCloseAllEditors ();
 		command = new RCommand ("remove (list=ls (all.names=TRUE))", RCommand::App | RCommand::ObjectListUpdate);
 		RKGlobals::rInterface ()->issueCommand (command);
 	}
@@ -73,8 +73,8 @@
 			RKWorkplace::mainWorkplace ()->restoreWorkplace ();
 			RKWorkplace::mainWorkplace ()->clearWorkplaceDescription ();
 		}
-		RKwardApp::getApp ()->slotSetStatusReady ();
-		RKwardApp::getApp ()->setCaption (QString::null);	// trigger update of caption
+		RKWardMainWindow::getMain ()->slotSetStatusReady ();
+		RKWardMainWindow::getMain ()->setCaption (QString::null);	// trigger update of caption
 
 		delete this;
 		return;

Modified: trunk/rkward/rkward/agents/rksaveagent.cpp
===================================================================
--- trunk/rkward/rkward/agents/rksaveagent.cpp	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/agents/rksaveagent.cpp	2006-11-26 13:38:54 UTC (rev 936)
@@ -93,7 +93,7 @@
 		}
 	} else {
 		RObjectList::getObjectList ()->setWorkspaceURL (save_url);
-		RKwardApp::getApp ()->setCaption (QString::null);	// trigger update of caption
+		RKWardMainWindow::getMain ()->setCaption (QString::null);	// trigger update of caption
 		done ();
 		return;
 	}
@@ -105,10 +105,10 @@
 		RKGlobals::rInterface ()->closeChain (save_chain);
 	}
 	if (when_done == Quit) {
-		delete RKwardApp::getApp ();
+		delete RKWardMainWindow::getMain ();
 		qApp->quit ();
 	} else if (when_done == Load) {
-		RKwardApp::getApp ()->fileOpenNoSave (load_url);
+		RKWardMainWindow::getMain ()->fileOpenNoSave (load_url);
 		delete this;
 	} else {
 		delete this;

Modified: trunk/rkward/rkward/agents/showedittextfileagent.cpp
===================================================================
--- trunk/rkward/rkward/agents/showedittextfileagent.cpp	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/agents/showedittextfileagent.cpp	2006-11-26 13:38:54 UTC (rev 936)
@@ -33,7 +33,7 @@
 
 #include "../debug.h"
 
-ShowEditTextFileAgent::ShowEditTextFileAgent (RCallbackArgs *args, const QString &text, const QString &caption) : QObject (RKwardApp::getApp ()) {
+ShowEditTextFileAgent::ShowEditTextFileAgent (RCallbackArgs *args, const QString &text, const QString &caption) : QObject (RKWardMainWindow::getMain ()) {
 	RK_TRACE (APP);
 
 	ShowEditTextFileAgent::args = args;

Modified: trunk/rkward/rkward/dataeditor/rkeditordataframepart.cpp
===================================================================
--- trunk/rkward/rkward/dataeditor/rkeditordataframepart.cpp	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/dataeditor/rkeditordataframepart.cpp	2006-11-26 13:38:54 UTC (rev 936)
@@ -64,18 +64,18 @@
 void RKEditorDataFramePart::slotEditCut () {
 	RK_TRACE (EDITOR);
 	
-	RKwardApp::getApp ()->slotSetStatusBarText (i18n ("Cutting selection..."));
+	RKWardMainWindow::getMain ()->slotSetStatusBarText (i18n ("Cutting selection..."));
 	slotEditCopy ();
 	editor->clearSelected ();
-	RKwardApp::getApp ()->slotSetStatusReady ();
+	RKWardMainWindow::getMain ()->slotSetStatusReady ();
 }
 
 void RKEditorDataFramePart::slotEditCopy() {
 	RK_TRACE (EDITOR);
 	
-	RKwardApp::getApp ()->slotSetStatusBarText (i18n ("Copying selection to clipboard..."));
+	RKWardMainWindow::getMain ()->slotSetStatusBarText (i18n ("Copying selection to clipboard..."));
 	QApplication::clipboard()->setData(editor->makeDrag ());
-	RKwardApp::getApp ()->slotSetStatusReady ();
+	RKWardMainWindow::getMain ()->slotSetStatusReady ();
 }
 
 
@@ -103,7 +103,7 @@
 void RKEditorDataFramePart::doPaste () {
 	RK_TRACE (EDITOR);
 
-	RKwardApp::getApp ()->slotSetStatusBarText(i18n("Inserting clipboard contents..."));
+	RKWardMainWindow::getMain ()->slotSetStatusBarText(i18n("Inserting clipboard contents..."));
 
 	// actually, we don't care, whether tsv or plain gets pasted - it's both
 	// treated the same. We should however encourage external senders to
@@ -118,7 +118,7 @@
 		editor->paste (data);
 	}
 
-	RKwardApp::getApp ()->slotSetStatusReady ();
+	RKWardMainWindow::getMain ()->slotSetStatusReady ();
 }
 
 #include "rkeditordataframepart.moc"

Modified: trunk/rkward/rkward/khelpdlg.cpp
===================================================================
--- trunk/rkward/rkward/khelpdlg.cpp	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/khelpdlg.cpp	2006-11-26 13:38:54 UTC (rev 936)
@@ -187,7 +187,7 @@
 		RK_ASSERT (command->getDataLength ());
 		url.setPath(command->getStringVector ()[0]);
 		if (QFile::exists (url.path ())) {
-			RKwardApp::getApp ()->openHTML (url);
+			RKWardMainWindow::getMain ()->openHTML (url);
 			return;
 		} else {
 			KMessageBox::sorry (this, i18n ("No help found on '%1'. Maybe the corresponding package is not installed/loaded, or maybe you mistyped the command. Try using Help->Search R Help for more options.").arg (command->command ().section ("\"", 1, 1)), i18n ("No help found"));

Modified: trunk/rkward/rkward/main.cpp
===================================================================
--- trunk/rkward/rkward/main.cpp	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/main.cpp	2006-11-26 13:38:54 UTC (rev 936)
@@ -105,7 +105,7 @@
 	
 	KApplication app;
 	if (app.isRestored ()) {
-		RESTORE(RKwardApp);	// well, whatever this is supposed to do -> TODO
+		RESTORE(RKWardMainWindow);	// well, whatever this is supposed to do -> TODO
 	} else {
 		KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
 		RK_Debug_Level = 5 - QString (args->getOption ("debug-level")).toInt ();
@@ -118,7 +118,7 @@
 		}
 		args->clear();
 		
-		new RKwardApp(open_url);
+		new RKWardMainWindow(open_url);
 	}
 
 	// do it!

Modified: trunk/rkward/rkward/plugin/rkcomponentmap.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkcomponentmap.cpp	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/plugin/rkcomponentmap.cpp	2006-11-26 13:38:54 UTC (rev 936)
@@ -225,7 +225,7 @@
 
 #include "rkstandardcomponent.h"
 
-RKStandardComponentHandle::RKStandardComponentHandle (const QString &filename, RKComponentType type) : QObject (RKwardApp::getApp ()), RKComponentHandle (filename, type) {
+RKStandardComponentHandle::RKStandardComponentHandle (const QString &filename, RKComponentType type) : QObject (RKWardMainWindow::getMain ()), RKComponentHandle (filename, type) {
 	RK_TRACE (PLUGIN);
 }
 

Modified: trunk/rkward/rkward/rbackend/rinterface.cpp
===================================================================
--- trunk/rkward/rkward/rbackend/rinterface.cpp	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/rbackend/rinterface.cpp	2006-11-26 13:38:54 UTC (rev 936)
@@ -159,9 +159,9 @@
 		}
 		delete command;
 	} else if ((e->type () == RIDLE_EVENT)) {
-		RKwardApp::getApp ()->setRStatus (false);	
+		RKWardMainWindow::getMain ()->setRStatus (false);	
 	} else if ((e->type () == RBUSY_EVENT)) {
-		RKwardApp::getApp ()->setRStatus (true);
+		RKWardMainWindow::getMain ()->setRStatus (true);
 	} else if ((e->type () == R_EVAL_REQUEST_EVENT)) {
 		r_thread->pauseOutput (false); // we may be recursing downwards into event loops here. Hence we need to make sure, we don't create a deadlock
 		processREvalRequest (static_cast<REvalRequest *> (e->data ()));
@@ -328,7 +328,7 @@
 			issueCommand (".rk.rkreply <- \"Too few arguments in call to require.\"", RCommand::App | RCommand::Sync, QString::null, 0, 0, request->in_chain);
 		}
 	} else if (call == "quit") {
-		RKwardApp::getApp ()->close ();
+		RKWardMainWindow::getMain ()->close ();
 		// if we're still alive, quitting was cancelled
 		issueCommand (".rk.rkreply <- \"Quitting was cancelled\"", RCommand::App | RCommand::Sync, QString::null, 0, 0, request->in_chain);
 #ifndef DISABLE_RKWINDOWCATCHER
@@ -370,7 +370,7 @@
 			// not to worry, just some help file to display
 			// TODO: maybe move this to ShowEditTextFileAgent instead
 			for (int n=0; n < args->int_a; ++n) {
-				RKwardApp::getApp ()->openHTML (args->chars_a[n]);
+				RKWardMainWindow::getMain ()->openHTML (args->chars_a[n]);
 			}
 		} else {
 			ShowEditTextFileAgent::showEditFiles (args);

Modified: trunk/rkward/rkward/rbackend/rinterface.h
===================================================================
--- trunk/rkward/rkward/rbackend/rinterface.h	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/rbackend/rinterface.h	2006-11-26 13:38:54 UTC (rev 936)
@@ -34,7 +34,7 @@
 
 class RKwatch;
 class RCommand;
-class RKwardApp;
+class RKWardMainWindow;
 struct RCallbackArgs;
 class QTimer;
 class RThread;
@@ -102,7 +102,7 @@
 //	void processRGetValueRequest (RGetValueRequest);
 /** See \ref RThread::doStandardCallback (). Does the actual job. */
 	void processRCallbackRequest (RCallbackArgs *args);
-friend class RKwardApp;
+friend class RKWardMainWindow;
 friend class RCommand;
 /** pointer to the RKwatch. TODO: (re-)move this pointer */
 	RKwatch *watch;
@@ -332,7 +332,7 @@
 This one tells the backend, that the command does not really need to be executed, and does not contain anything. You'll rarely need this flag, but sometimes it is useful to submit an empty command simply to find out when it is finished.
 
 - RCommand::DirectToOutput
-This is typically used in plugins: When you specify this modifier, the plain text result of this command (i.e. whatever R prints out when evaluating the command) will be added to the HTML output file. Remember to call RKwardApp::newOutput in order to refresh the output-window once the command has finished.
+This is typically used in plugins: When you specify this modifier, the plain text result of this command (i.e. whatever R prints out when evaluating the command) will be added to the HTML output file. Remember to call RKWardMainWindow::newOutput in order to refresh the output-window once the command has finished.
 
 - RCommand::GetIntVector, RCommand::GetStringVector, RCommand::GetRealVector
 These are special modifiers helpful when transferring data from R to RKWard (used primarily in the editor classes and in conjunction with RCommand::Sync): They tell the backend to try to fetch the result as an array of int, char*, or double, respectively. For instance, if you know object "myobject" is an integer vector, you may get the data using

Modified: trunk/rkward/rkward/rbackend/rkwindowcatcher.cpp
===================================================================
--- trunk/rkward/rkward/rbackend/rkwindowcatcher.cpp	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/rbackend/rkwindowcatcher.cpp	2006-11-26 13:38:54 UTC (rev 936)
@@ -105,16 +105,16 @@
 	}
 }
 
-/*
 void RKWindowCatcher::start (int prev_cur_device) {
 	RK_DO (qDebug ("Window Catcher activated"), RBACKEND, DL_DEBUG);
 
 	last_cur_device = prev_cur_device;
+	new_windows.clear ();
 }
 
 void RKWindowCatcher::stop (int new_cur_device) {
 	RK_DO (qDebug ("Window Catcher deactivated"), RBACKEND, DL_DEBUG);
-
+/*
 	if (new_cur_device != last_cur_device) {
 		QString dummy = "R Graphics: Device ";
 		//dummy.append (QString::number (new_cur_device));
@@ -128,8 +128,8 @@
 			capture->show ();
 		}
 	}
-	last_cur_device = new_cur_device;
-} */
+	last_cur_device = new_cur_device; */
+}
 
 #include "rkwindowcatcher.moc"
 

Modified: trunk/rkward/rkward/rbackend/rkwindowcatcher.h
===================================================================
--- trunk/rkward/rkward/rbackend/rkwindowcatcher.h	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/rbackend/rkwindowcatcher.h	2006-11-26 13:38:54 UTC (rev 936)
@@ -21,6 +21,7 @@
 //#define DISABLE_RKWINDOWCATCHER
 #ifndef DISABLE_RKWINDOWCATCHER
 
+#include <qvaluelist.h>
 #include <qwidget.h>
 
 /** This class will be used to find out, when R opens a new X11-device, find out the id of that device and embed it into a QWidget.
@@ -52,7 +53,9 @@
 		- but definitely most. This is dispatched via CurrentDevice ()->options("device"), and then evalued in R_GlobalEnv
 - remaining problem: how to get the window id given the device id?
 	- http://tronche.com/gui/x/xlib/events/window-state-change/create.html#XCreateWindowEvent
-	- we may catch this using KApplication::installlX11EventFilter
+	- for active / inactive: XPropertyEvent WM_NAME
+	- we may catch this using KApplication::installX11EventFilter
+		- XSelectInput -> QWidget::x11Event()?
 	- event filter should only be active during the wrapper (Plan A-C)
 	- event filter should probably do some sanity checking
 	- this should give us the window id corresponding to the x11-call
@@ -66,13 +69,14 @@
 
 	~RKWindowCatcher ();
 	
-/*	void start (int prev_cur_device);
-	void stop (int new_cur_device); */
+	void start (int prev_cur_device);
+	void stop (int new_cur_device);
 	void catchWindow (const QString &title_start, int corresponding_device_number);
 public slots:
 	void windowLost ();
 private:
-//	int last_cur_device;
+	int last_cur_device;
+	QValueList<WId> new_windows;
 };
 
 #endif //DISABLE_RKWINDOWCATCHER

Modified: trunk/rkward/rkward/rbackend/rthread.cpp
===================================================================
--- trunk/rkward/rkward/rbackend/rthread.cpp	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/rbackend/rthread.cpp	2006-11-26 13:38:54 UTC (rev 936)
@@ -324,7 +324,7 @@
 		}
 	}
 	if (call[0] == "catchWindow") {
-		qDebug ("here");
+		// maybe this is not needed after all, put requires some testing. For now, we disable all R X11 updates while capturing the window.
 		x11events_disabled = true;
 	}
 

Modified: trunk/rkward/rkward/rkglobals.h
===================================================================
--- trunk/rkward/rkward/rkglobals.h	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/rkglobals.h	2006-11-26 13:38:54 UTC (rev 936)
@@ -17,7 +17,7 @@
 #ifndef RKGLOBALS_H
 #define RKGLOBALS_H
 
-class RKwardApp;
+class RKWardMainWindow;
 class RInterface;
 class RObjectList;
 class RKModificationTracker;
@@ -62,7 +62,7 @@
 	static void deleteStrings (QString **strings, int count);
 
 private:
-	friend class RKwardApp;
+	friend class RKWardMainWindow;
 	static RInterface *rinter;
 	static RKModificationTracker *mtracker;
 	static RKComponentMap *cmap;

Modified: trunk/rkward/rkward/rkward.cpp
===================================================================
--- trunk/rkward/rkward/rkward.cpp	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/rkward.cpp	2006-11-26 13:38:54 UTC (rev 936)
@@ -92,13 +92,13 @@
 }
 
 //static
-RKwardApp *RKwardApp::rkward_app = 0;
+RKWardMainWindow *RKWardMainWindow::rkward_mainwin = 0;
 
-RKwardApp::RKwardApp (KURL *load_url) : DCOPObject ("rkwardapp"), KMdiMainFrm (0, 0, KMdi::IDEAlMode) {
+RKWardMainWindow::RKWardMainWindow (KURL *load_url) : DCOPObject ("rkwardapp"), KMdiMainFrm (0, 0, KMdi::IDEAlMode) {
 	RK_TRACE (APP);
-	RK_ASSERT (rkward_app == 0);
+	RK_ASSERT (rkward_mainwin == 0);
 
-	rkward_app = this;
+	rkward_mainwin = this;
 	RKGlobals::rinter = 0;
 	RKSettings::settings_tracker = new RKSettingsTracker (this);
 
@@ -150,7 +150,7 @@
 	}
 }
 
-RKwardApp::~RKwardApp() {
+RKWardMainWindow::~RKWardMainWindow() {
 	RK_TRACE (APP);
 	closeAllViews ();
 	delete RKGlobals::rInterface ();
@@ -159,7 +159,7 @@
 	delete RKGlobals::tracker ();
 }
 
-void RKwardApp::doPostInit () {
+void RKWardMainWindow::doPostInit () {
 	RK_TRACE (APP);
 
 	readOptions();
@@ -221,7 +221,7 @@
 	setCaption (QString::null);	// our version of setCaption takes care of creating a correct caption, so we do not need to provide it here
 }
 
-void RKwardApp::initPlugins () {
+void RKWardMainWindow::initPlugins () {
 	RK_TRACE (APP);
 	slotSetStatusBarText(i18n("Setting up plugins..."));
 	
@@ -243,7 +243,7 @@
 	slotSetStatusReady ();
 }
 
-void RKwardApp::startR () {
+void RKWardMainWindow::startR () {
 	RK_TRACE (APP);
 	RK_ASSERT (!RKGlobals::rInterface ());
 	
@@ -266,11 +266,11 @@
 	object_browser->initialize ();
 }
 
-void RKwardApp::slotConfigure () {
+void RKWardMainWindow::slotConfigure () {
 	RKSettings::configureSettings (RKSettings::NoPage, this);
 }
 
-void RKwardApp::initActions()
+void RKWardMainWindow::initActions()
 {  
 	RK_TRACE (APP);
 	// TODO: is there a way to insert actions between standard actions without having to give all standard actions custom ids?
@@ -325,7 +325,7 @@
 	actionCollection ()->setHighlightingEnabled (true);
 }
 
-void RKwardApp::partAdded (KParts::Part *part) {
+void RKWardMainWindow::partAdded (KParts::Part *part) {
 	RK_TRACE (APP);
 
 	if (!part->actionCollection ()) {
@@ -338,7 +338,7 @@
 	connect (part->actionCollection (), SIGNAL (clearStatusText ()), this, SLOT (slotSetStatusReady ()));
 }
 
-void RKwardApp::partRemoved (KParts::Part *part) {
+void RKWardMainWindow::partRemoved (KParts::Part *part) {
 	RK_TRACE (APP);
 
 	if (!part->actionCollection ()) {
@@ -350,7 +350,7 @@
 	disconnect (part->actionCollection (), SIGNAL (clearStatusText ()), this, SLOT (slotSetStatusReady ()));
 }
 
-void RKwardApp::initStatusBar () {
+void RKWardMainWindow::initStatusBar () {
 	RK_TRACE (APP);
 
 	r_status_label = new QLabel (i18n ("starting R engine"), statusBar ());
@@ -361,7 +361,7 @@
 	connect (actionCollection (), SIGNAL (clearStatusText ()), this, SLOT (slotSetStatusReady ()));
 }
 
-void RKwardApp::openWorkspace (const KURL &url) {
+void RKWardMainWindow::openWorkspace (const KURL &url) {
 	RK_TRACE (APP);
 	if (url.isEmpty ()) return;
 
@@ -369,7 +369,7 @@
 	fileOpenRecentWorkspace->addURL (url);
 }
 
-void RKwardApp::saveOptions () {
+void RKWardMainWindow::saveOptions () {
 	RK_TRACE (APP);
 	KConfig *config = kapp->config ();
 
@@ -387,7 +387,7 @@
 }
 
 
-void RKwardApp::readOptions () {
+void RKWardMainWindow::readOptions () {
 	RK_TRACE (APP);
 	KConfig *config = kapp->config ();
 
@@ -417,7 +417,7 @@
 	if (mditask) mditask->hide ();
 }
 
-void RKwardApp::saveProperties(KConfig *_cfg)
+void RKWardMainWindow::saveProperties(KConfig *_cfg)
 {
 	RK_TRACE (APP);
 /*  if(doc->URL().fileName()!=i18n("Untitled") && !doc->isModified())
@@ -438,7 +438,7 @@
 }
 
 
-void RKwardApp::readProperties(KConfig* _cfg)
+void RKWardMainWindow::readProperties(KConfig* _cfg)
 {
 	RK_TRACE (APP);
 /*  QString filename = _cfg->readEntry("filename", "");
@@ -466,7 +466,7 @@
   } */
 }
 
-bool RKwardApp::queryClose () {
+bool RKWardMainWindow::queryClose () {
 	RK_TRACE (APP);
 
 	slotSetStatusBarText (i18n ("Exiting..."));
@@ -495,7 +495,7 @@
 	return true;
 }
 
-void RKwardApp::raiseWatch () {
+void RKWardMainWindow::raiseWatch () {
 	RK_TRACE (APP);
 	watch_view->show ();
 	KMdiChildView *window = activeWindow ();
@@ -504,20 +504,20 @@
 	}
 }
 
-void RKwardApp::invokeRHelp () {
+void RKWardMainWindow::invokeRHelp () {
 	RK_TRACE (APP);
 
 	RKGlobals::rInterface ()->issueCommand ("help.start ()", RCommand::App);
 }
 
-void RKwardApp::reportRKWardBug () {
+void RKWardMainWindow::reportRKWardBug () {
 	RK_TRACE (APP);
 
 // TOOD: something pretty
 	KMessageBox::information (this, i18n ("Please submit your bug reports or wishes at http://sourceforge.net/tracker/?group_id=50231&atid=459007 or send email to rkward-devel at lists.sourceforge.net"));
 }
 
-void RKwardApp::showAboutApplication () {
+void RKWardMainWindow::showAboutApplication () {
 	RK_TRACE (APP);
 
 	KAboutApplication *about = new KAboutApplication ();
@@ -525,13 +525,13 @@
 	delete about;
 }
 
-void RKwardApp::showHelpSearch () {
+void RKWardMainWindow::showHelpSearch () {
 	RK_TRACE (APP);
 
 	search_help_view->show ();
 }
 
-void RKwardApp::slotNewDataFrame () {
+void RKWardMainWindow::slotNewDataFrame () {
 	RK_TRACE (APP);
 	bool ok;
 
@@ -546,7 +546,7 @@
 	
 }
 
-void RKwardApp::fileOpenNoSave (const KURL &url) {
+void RKWardMainWindow::fileOpenNoSave (const KURL &url) {
 	RK_TRACE (APP);
 
 	slotCloseAllEditors ();
@@ -562,7 +562,7 @@
 	slotSetStatusReady ();
 }
 
-void RKwardApp::fileOpenAskSave (const KURL &url) {
+void RKWardMainWindow::fileOpenAskSave (const KURL &url) {
 	RK_TRACE (APP);
 	if (RObjectList::getObjectList ()->isEmpty ()) {
 		fileOpenNoSave (url);
@@ -579,34 +579,34 @@
 	// else: cancel. Don't do anything
 }
 
-void RKwardApp::slotFileOpenWorkspace () {
+void RKWardMainWindow::slotFileOpenWorkspace () {
 	RK_TRACE (APP);
 	fileOpenAskSave (QString::null);
 }
 
-void RKwardApp::slotFileOpenRecentWorkspace(const KURL& url)
+void RKWardMainWindow::slotFileOpenRecentWorkspace(const KURL& url)
 {
 	RK_TRACE (APP);
 	fileOpenAskSave (url);
 }
 
-void RKwardApp::slotFileLoadLibs () {
+void RKWardMainWindow::slotFileLoadLibs () {
 	RK_TRACE (APP);
 	RKLoadLibsDialog *dial = new RKLoadLibsDialog (this, 0);
 	dial->show ();
 }
 
-void RKwardApp::slotFileSaveWorkspace () {
+void RKWardMainWindow::slotFileSaveWorkspace () {
 	RK_TRACE (APP);
 	new RKSaveAgent (RObjectList::getObjectList ()->getWorkspaceURL ());
 }
 
-void RKwardApp::slotFileSaveWorkspaceAs () {
+void RKWardMainWindow::slotFileSaveWorkspaceAs () {
 	RK_TRACE (APP);
 	new RKSaveAgent (RObjectList::getObjectList ()->getWorkspaceURL (), true);
 }
 
-void RKwardApp::slotSetStatusBarText (const QString &text) {
+void RKWardMainWindow::slotSetStatusBarText (const QString &text) {
 	RK_TRACE (APP);
 
 	QString ntext = text.stripWhiteSpace ();
@@ -618,31 +618,31 @@
 	}
 }
 
-void RKwardApp::slotCloseWindow () {
+void RKWardMainWindow::slotCloseWindow () {
 	RK_TRACE (APP);
 
 	RKWorkplace::mainWorkplace ()->closeActiveWindow ();
 }
 
-void RKwardApp::slotCloseAllWindows () {
+void RKWardMainWindow::slotCloseAllWindows () {
 	RK_TRACE (APP);
 
 	RKWorkplace::mainWorkplace ()->closeAll ();
 }
 
-void RKwardApp::slotCloseAllEditors () {
+void RKWardMainWindow::slotCloseAllEditors () {
 	RK_TRACE (APP);
 
 	RKWorkplace::mainWorkplace ()->closeAll (RKMDIWindow::DataEditorWindow);
 }
 
-void RKwardApp::slotDetachWindow () {
+void RKWardMainWindow::slotDetachWindow () {
 	RK_TRACE (APP);
 
 	RKWorkplace::mainWorkplace ()->detachWindow (RKWorkplace::mainWorkplace ()->activeAttachedWindow ());
 }
 
-void RKwardApp::setRStatus (bool busy) {
+void RKWardMainWindow::setRStatus (bool busy) {
 	RK_TRACE (APP);
 	if (busy) {
 		r_status_label->setText (i18n ("R engine busy"));
@@ -654,13 +654,13 @@
 }
 
 
-void RKwardApp::slotNewCommandEditor () {
+void RKWardMainWindow::slotNewCommandEditor () {
 	RK_TRACE (APP);
 
 	slotOpenCommandEditor (KURL ());
 }
 
-void RKwardApp::slotOpenCommandEditor (const KURL &url) {
+void RKWardMainWindow::slotOpenCommandEditor (const KURL &url) {
 	RK_TRACE (APP);
 
 	if (RKWorkplace::mainWorkplace ()->openScriptEditor (url)) {
@@ -668,7 +668,7 @@
 	}
 };
 
-void RKwardApp::slotOpenCommandEditor () {
+void RKWardMainWindow::slotOpenCommandEditor () {
 	RK_TRACE (APP);
 	KURL::List urls;
 	KURL::List::const_iterator it;
@@ -680,30 +680,30 @@
 	}
 };
 
-void RKwardApp::slotChildWindowCloseRequest (KMdiChildView * window) {
+void RKWardMainWindow::slotChildWindowCloseRequest (KMdiChildView * window) {
 	RK_TRACE (APP);
 
 	closeWindow (window);
 }
 
-void RKwardApp::openHTML (const KURL &url) {
+void RKWardMainWindow::openHTML (const KURL &url) {
 	RK_TRACE (APP);
 
 	RKWorkplace::mainWorkplace ()->openHelpWindow (url);
 }
 
-void RKwardApp::openHTMLHelp (const QString & url) {
+void RKWardMainWindow::openHTMLHelp (const QString & url) {
 	RK_TRACE (APP);
 	openHTML (url);
 }
 
-void RKwardApp::slotOutputShow () {
+void RKWardMainWindow::slotOutputShow () {
 	RK_TRACE (APP);
 
 	RKWorkplace::mainWorkplace ()->openOutputWindow (KURL ());
 }
 
-void RKwardApp::setCaption (const QString &) {
+void RKWardMainWindow::setCaption (const QString &) {
 	RK_TRACE (APP);
 
 	QString wcaption = RObjectList::getObjectList ()->getWorkspaceURL ().fileName ();

Modified: trunk/rkward/rkward/rkward.h
===================================================================
--- trunk/rkward/rkward/rkward.h	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/rkward.h	2006-11-26 13:38:54 UTC (rev 936)
@@ -25,7 +25,7 @@
 
 #include <dcopobject.h>
 
-/** This base provides the DCOP-Interface for RKWardApp */
+/** This base provides the DCOP-Interface for RKWardMainWindow */
 class RKWardDCOPInterface : virtual public DCOPObject {
 	K_DCOP
 	k_dcop:
@@ -62,14 +62,14 @@
 */
 
 
-class RKwardApp : public KMdiMainFrm, virtual public KParts::PartBase, virtual public RKWardDCOPInterface {
+class RKWardMainWindow : public KMdiMainFrm, virtual public KParts::PartBase, virtual public RKWardDCOPInterface {
 	Q_OBJECT
 public:
 /** construtor
 @param load_url The workspace file to load on startup. If 0, show a dialog asking what to do. */
-	RKwardApp (KURL *load_url=0);
+	RKWardMainWindow (KURL *load_url=0);
 /** destructor */
-	~RKwardApp ();
+	~RKWardMainWindow ();
 
 /** initialize the backend */
 	void startR ();
@@ -87,7 +87,7 @@
 	RKMenuList* getMenuList () { return menu_list; };
 	KParts::PartManager *partManager () { return part_manager; };
 
-	static RKwardApp *getApp () { return rkward_app; };
+	static RKWardMainWindow *getMain () { return rkward_mainwin; };
 protected:
 	void openWorkspace (const KURL &url);
 	/** save Options/Settings. Includes general Options like all bar positions and status as well as the geometry and the recent file list */
@@ -236,7 +236,7 @@
 	
 	RKMenuList *menu_list;
 
-	static RKwardApp *rkward_app;
+	static RKWardMainWindow *rkward_mainwin;
 
 	friend class RInterface;
 /** set the R status message ("R engine idel/busy") to idle or busy */

Modified: trunk/rkward/rkward/robjectbrowser.h
===================================================================
--- trunk/rkward/rkward/robjectbrowser.h	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/robjectbrowser.h	2006-11-26 13:38:54 UTC (rev 936)
@@ -61,7 +61,7 @@
 /** when an object in the list is double clicked, insert its name in the current RKCommandEditor window */
 	void slotListDoubleClicked (QListViewItem *item, const QPoint &pos, int);
 private:
-	friend class RKwardApp;
+	friend class RKWardMainWindow;
 	void initialize ();
 
 	QPushButton *update_button;

Modified: trunk/rkward/rkward/settings/rksettings.h
===================================================================
--- trunk/rkward/rkward/settings/rksettings.h	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/settings/rksettings.h	2006-11-26 13:38:54 UTC (rev 936)
@@ -25,7 +25,7 @@
 class QTabWidget;
 class QPushButton;
 class KConfig;
-class RKwardApp;
+class RKWardMainWindow;
 class RKSettingsTracker;
 class RCommandChain;
 
@@ -62,7 +62,7 @@
 	ModuleList modules;
 	
 	static RKSettings *settings_dialog;
-friend class RKwardApp;
+friend class RKWardMainWindow;
 	static RKSettingsTracker *settings_tracker;
 };
 

Modified: trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp	2006-11-26 13:38:54 UTC (rev 936)
@@ -98,7 +98,7 @@
 #else
 	interface_pref = static_cast<PluginPrefs> (button_group->selectedId ());
 #endif
-	RKwardApp::getApp ()->initPlugins();
+	RKWardMainWindow::getMain ()->initPlugins();
 }
 
 void RKSettingsModulePlugins::save (KConfig *config) {

Modified: trunk/rkward/rkward/windows/detachedwindowcontainer.cpp
===================================================================
--- trunk/rkward/rkward/windows/detachedwindowcontainer.cpp	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/windows/detachedwindowcontainer.cpp	2006-11-26 13:38:54 UTC (rev 936)
@@ -28,7 +28,7 @@
 #include "../rkglobals.h"
 #include "../debug.h"
 
-DetachedWindowContainer::DetachedWindowContainer (RKMDIWindow *widget_to_capture) : KParts::MainWindow  (RKwardApp::getApp ()) {
+DetachedWindowContainer::DetachedWindowContainer (RKMDIWindow *widget_to_capture) : KParts::MainWindow  (RKWardMainWindow::getMain ()) {
 	RK_TRACE (APP);
 
 // create own GUI

Modified: trunk/rkward/rkward/windows/rkworkplace.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkworkplace.cpp	2006-11-25 20:09:57 UTC (rev 935)
+++ trunk/rkward/rkward/windows/rkworkplace.cpp	2006-11-26 13:38:54 UTC (rev 936)
@@ -67,7 +67,7 @@
 	view ()->addPage (window);
 
 	RK_ASSERT (window->getPart ());
-	RKwardApp::getApp ()->partManager ()->addPart (window->getPart ());
+	RKWardMainWindow::getMain ()->partManager ()->addPart (window->getPart ());
 }
 
 void RKWorkplace::detachWindow (RKMDIWindow *window) {
@@ -77,7 +77,7 @@
 	window->state = RKMDIWindow::Detached;
 
 	RK_ASSERT (window->getPart ());
-	RKwardApp::getApp ()->partManager ()->removePart (window->getPart ());
+	RKWardMainWindow::getMain ()->partManager ()->removePart (window->getPart ());
 	view ()->removePage (window);
 
 	DetachedWindowContainer *detached = new DetachedWindowContainer (window);


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