[rkward-cvs] SF.net SVN: rkward: [2085] branches/KDE4_port

tfry at users.sourceforge.net tfry at users.sourceforge.net
Tue Oct 16 15:18:34 UTC 2007


Revision: 2085
          http://rkward.svn.sourceforge.net/rkward/?rev=2085&view=rev
Author:   tfry
Date:     2007-10-16 08:18:34 -0700 (Tue, 16 Oct 2007)

Log Message:
-----------
layout / colors

Modified Paths:
--------------
    branches/KDE4_port/TODO_KDE4
    branches/KDE4_port/rkward/rbackend/rinterface.cpp
    branches/KDE4_port/rkward/rkward.cpp
    branches/KDE4_port/rkward/rkward.h
    branches/KDE4_port/rkward/windows/rkworkplace.cpp

Modified: branches/KDE4_port/TODO_KDE4
===================================================================
--- branches/KDE4_port/TODO_KDE4	2007-10-16 14:36:02 UTC (rev 2084)
+++ branches/KDE4_port/TODO_KDE4	2007-10-16 15:18:34 UTC (rev 2085)
@@ -32,9 +32,9 @@
 	- does highlighting work?
 
 rkward
-	- does DBUS work (i.e. opening help windows)?	
 	- does closing windows work
 	- does updating captions work (when switching windows / window url changes)?
+	- when selecting cancel while quitting, app still closes!
 
 output window
 	- does it reload all changed images?
@@ -84,10 +84,10 @@
 
 rkconsole:
 	- check whether all selection, editing, navigating really works as expected
-	- tab completion
 
 rkcommandlog:
 	- does the RMB-menu work?
+	- get rid of Q3TextEdit
 
 rkhtmlwindow:
 	- when this is open, we always seem to crash on close

Modified: branches/KDE4_port/rkward/rbackend/rinterface.cpp
===================================================================
--- branches/KDE4_port/rkward/rbackend/rinterface.cpp	2007-10-16 14:36:02 UTC (rev 2084)
+++ branches/KDE4_port/rkward/rbackend/rinterface.cpp	2007-10-16 15:18:34 UTC (rev 2085)
@@ -176,9 +176,9 @@
 		}
 		delete command;
 	} else if ((e->type () == RIDLE_EVENT)) {
-		RKWardMainWindow::getMain ()->setRStatus (false);	
+		RKWardMainWindow::getMain ()->setRStatus (RKWardMainWindow::Idle);	
 	} else if ((e->type () == RBUSY_EVENT)) {
-		RKWardMainWindow::getMain ()->setRStatus (true);
+		RKWardMainWindow::getMain ()->setRStatus (RKWardMainWindow::Busy);
 	} 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 *> (static_cast<QCustomEvent*> (e)->data ()));

Modified: branches/KDE4_port/rkward/rkward.cpp
===================================================================
--- branches/KDE4_port/rkward/rkward.cpp	2007-10-16 14:36:02 UTC (rev 2084)
+++ branches/KDE4_port/rkward/rkward.cpp	2007-10-16 15:18:34 UTC (rev 2085)
@@ -24,9 +24,8 @@
 #include <qtimer.h>
 #include <QDBusConnection>
 #include <QDesktopWidget>
+#include <QLabel>
 //Added by qt3to4:
-#include <QLabel>
-#include <Q3VBoxLayout>
 #include <QCloseEvent>
 
 // include files for KDE
@@ -438,10 +437,10 @@
 	updateCWD ();
 	statusBar ()->addWidget (statusbar_hbox, 1);
 
-	statusbar_r_status = new QLabel (i18n ("starting R engine"), statusBar ());
-	statusbar_r_status->setPaletteBackgroundColor (QColor (255, 255, 0));
+	statusbar_r_status = new QLabel (statusBar ());
 	statusbar_r_status->setFixedHeight (statusBar ()->fontMetrics ().height () + 2);
 	statusBar ()->addWidget (statusbar_r_status, 0, true);
+	setRStatus (Starting);
 
 	connect (actionCollection (), SIGNAL (actionStatusText (const QString &)), this, SLOT (slotSetStatusBarText (const QString &)));
 	connect (actionCollection (), SIGNAL (clearStatusText ()), this, SLOT (slotSetStatusReady ()));
@@ -651,15 +650,24 @@
 	RKWorkplace::mainWorkplace ()->detachWindow (RKWorkplace::mainWorkplace ()->activeWindow (RKMDIWindow::Attached));
 }
 
-void RKWardMainWindow::setRStatus (bool busy) {
+void RKWardMainWindow::setRStatus (RStatus status) {
 	RK_TRACE (APP);
-	if (busy) {
+
+	QColor status_color;
+	if (status == Busy) {
 		statusbar_r_status->setText (i18n ("R engine busy"));
-		statusbar_r_status->setPaletteBackgroundColor (QColor (255, 0, 0));
+		status_color = QColor (255, 0, 0);
+	} else if (status == Idle) {
+		statusbar_r_status->setText (i18n ("R engine idle"));
+		status_color = QColor (0, 255, 0);
 	} else {
-		statusbar_r_status->setText (i18n ("R engine idle"));
-		statusbar_r_status->setPaletteBackgroundColor (QColor (0, 255, 0));
+		statusbar_r_status->setText (i18n ("R engine starting"));
+		status_color = QColor (255, 255, 0);
 	}
+	QPalette palette = statusbar_r_status->palette ();
+	palette.setBrush (statusbar_r_status->backgroundRole(), QBrush (status_color));
+	statusbar_r_status->setAutoFillBackground (true);
+	statusbar_r_status->setPalette (palette);
 }
 
 void RKWardMainWindow::importData () {

Modified: branches/KDE4_port/rkward/rkward.h
===================================================================
--- branches/KDE4_port/rkward/rkward.h	2007-10-16 14:36:02 UTC (rev 2084)
+++ branches/KDE4_port/rkward/rkward.h	2007-10-16 15:18:34 UTC (rev 2085)
@@ -211,8 +211,13 @@
 	static RKWardMainWindow *rkward_mainwin;
 
 	friend class RInterface;
-/** set the R status message ("R engine idel/busy") to idle or busy */
-	void setRStatus (bool busy);
+	enum RStatus {
+		Busy,
+		Idle,
+		Starting
+	};
+/** set the R status message ("R engine idle/busy") to idle or busy */
+	void setRStatus (RStatus status);
 /** update the display for the current working directory */
 	void updateCWD ();
 

Modified: branches/KDE4_port/rkward/windows/rkworkplace.cpp
===================================================================
--- branches/KDE4_port/rkward/windows/rkworkplace.cpp	2007-10-16 14:36:02 UTC (rev 2084)
+++ branches/KDE4_port/rkward/windows/rkworkplace.cpp	2007-10-16 15:18:34 UTC (rev 2085)
@@ -89,6 +89,7 @@
 
 	// now add it all to this widget
 	QVBoxLayout *box = new QVBoxLayout (this);
+	box->setContentsMargins (0, 0, 0, 0);
 	box->addWidget (vbox);
 
 	history = new RKMDIWindowHistory (this);


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