[rkward-cvs] SF.net SVN: rkward:[2850] trunk/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Fri Apr 30 16:14:35 UTC 2010
Revision: 2850
http://rkward.svn.sourceforge.net/rkward/?rev=2850&view=rev
Author: tfry
Date: 2010-04-30 16:14:34 +0000 (Fri, 30 Apr 2010)
Log Message:
-----------
Add alternating row highlighting
Modified Paths:
--------------
trunk/rkward/ChangeLog
trunk/rkward/rkward/dataeditor/rkvareditmodel.cpp
Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog 2010-04-30 08:59:23 UTC (rev 2849)
+++ trunk/rkward/ChangeLog 2010-04-30 16:14:34 UTC (rev 2850)
@@ -1,3 +1,5 @@
+- Add alternating row backgrounds in data.frame-editor
+
--- Version 0.5.3 - Apr-30-2010
- Fixed: Windows->Activate->Window left / right actions were always disabled
- File browser window saves settings on exit
Modified: trunk/rkward/rkward/dataeditor/rkvareditmodel.cpp
===================================================================
--- trunk/rkward/rkward/dataeditor/rkvareditmodel.cpp 2010-04-30 08:59:23 UTC (rev 2849)
+++ trunk/rkward/rkward/dataeditor/rkvareditmodel.cpp 2010-04-30 16:14:34 UTC (rev 2850)
@@ -2,7 +2,7 @@
rkvareditmodel - description
-------------------
begin : Mon Nov 05 2007
- copyright : (C) 2007 by Thomas Friedrichsmeier
+ copyright : (C) 2007, 2010 by Thomas Friedrichsmeier
email : tfry at users.sourceforge.net
***************************************************************************/
@@ -19,6 +19,8 @@
#include <klocale.h>
+#include <QColor>
+
#include "../core/rcontainerobject.h"
#include "../core/rkmodificationtracker.h"
#include "../rbackend/rinterface.h"
@@ -225,7 +227,10 @@
if (role == Qt::EditRole) return var->getText (row, false);
RKVariable::Status status = var->cellStatus (row);
- if ((role == Qt::BackgroundRole) && (status == RKVariable::ValueInvalid)) return (Qt::red);
+ if ((role == Qt::BackgroundRole)) {
+ if (status == RKVariable::ValueInvalid) return (Qt::red);
+ if (row % 2) return (QColor (240, 255, 240)); // very light green
+ }
if ((role == Qt::ForegroundRole) && (status == RKVariable::ValueUnknown)) return (Qt::lightGray);
if (role == Qt::TextAlignmentRole) {
if (var->getAlignment () == RKVariable::AlignCellLeft) return ((int) Qt::AlignLeft | Qt::AlignVCenter);
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