[rkward-cvs] rkward/rkward/misc rkobjectlistview.cpp,1.4,1.5

Pierre ecoch at users.sourceforge.net
Thu Mar 24 20:24:57 UTC 2005


Update of /cvsroot/rkward/rkward/rkward/misc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25430/misc

Modified Files:
	rkobjectlistview.cpp 
Log Message:
Adding icons to the object browser.

Index: rkobjectlistview.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/misc/rkobjectlistview.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** rkobjectlistview.cpp	17 Nov 2004 20:22:49 -0000	1.4
--- rkobjectlistview.cpp	24 Mar 2005 20:24:54 -0000	1.5
***************
*** 18,21 ****
--- 18,22 ----
  
  #include <klocale.h>
+ #include <kiconloader.h>
  
  #include "../debug.h"
***************
*** 141,144 ****
--- 142,167 ----
  		item->setText (2, static_cast<RKVariable*> (object)->getVarTypeString ());
  	}
+ 
+ 	if (object->isDataFrame ()) {
+ 		item->setPixmap (0, SmallIcon("spreadsheet"));
+ 	} else {
+ 		switch(static_cast<RKVariable*> (object)->getVarType ()) {
+ 			case RObject::Number:
+ 				item->setPixmap (0, SmallIcon("ledblue",8));
+ 				break;
+ 			case RObject::Factor:
+ 				item->setPixmap (0, SmallIcon("ledgreen",8));
+ 				break;
+ 			case RObject::String:
+ 				item->setPixmap (0, SmallIcon("ledyellow",8));
+ 				break;
+ 			case RObject::Invalid:
+ 				item->setPixmap (0, SmallIcon("cancel",8));
+ 				break;
+ 			case RObject::Unknown:
+ 				item->setPixmap (0, SmallIcon("ledred",8));
+ 				break;
+ 		}
+ 	}
  }
  
***************
*** 163,169 ****
--- 186,195 ----
  		}
  	}
+ 
+ 
  	
  // special treatment for the workspace object
  	if (!parent) {
+ 		item->setPixmap (0, SmallIcon("view_tree"));
  		item->setText (0, i18n ("[Objects]"));
  		item->setOpen (true);





More information about the rkward-tracker mailing list