[rkward-cvs] rkward/rkward/misc rkobjectlistview.cpp,1.9,1.10 rkobjectlistview.h,1.1,1.2
Thomas Friedrichsmeier
tfry at users.sourceforge.net
Fri Apr 22 13:56:18 UTC 2005
- Previous message: [rkward-cvs] rkward/rkward debug.h,1.9,1.10 rkward.cpp,1.80,1.81 rkward.h,1.34,1.35 robjectbrowser.cpp,1.13,1.14 robjectbrowser.h,1.7,1.8
- Next message: [rkward-cvs] rkward/rkward/scriptbackends phpbackend.cpp,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/rkward/rkward/rkward/misc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18942/rkward/misc
Modified Files:
rkobjectlistview.cpp rkobjectlistview.h
Log Message:
Added global config options for RKObjectListView. Still TODO: context menus
Index: rkobjectlistview.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/misc/rkobjectlistview.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** rkobjectlistview.h 2 Sep 2004 10:50:25 -0000 1.1
--- rkobjectlistview.h 22 Apr 2005 13:56:16 -0000 1.2
***************
*** 47,50 ****
--- 47,52 ----
void objectRemoved (RObject *object);
void objectPropertiesChanged (RObject *object);
+
+ void objectBrowserSettingsChanged ();
private:
// TODO: keep an additional map from RObject to QListViewItem, in order to make this (often called) more efficient
Index: rkobjectlistview.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/misc/rkobjectlistview.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** rkobjectlistview.cpp 20 Apr 2005 12:14:56 -0000 1.9
--- rkobjectlistview.cpp 22 Apr 2005 13:56:16 -0000 1.10
***************
*** 20,28 ****
#include <kiconloader.h>
- #include "../debug.h"
#include "../rkglobals.h"
#include "../core/robjectlist.h"
#include "../core/rkvariable.h"
#include "../core/rkmodificationtracker.h"
RKObjectListView::RKObjectListView (QWidget *parent) : QListView (parent) {
--- 20,30 ----
#include <kiconloader.h>
#include "../rkglobals.h"
#include "../core/robjectlist.h"
#include "../core/rkvariable.h"
#include "../core/rkmodificationtracker.h"
+ #include "../settings/rksettings.h"
+ #include "../settings/rksettingsmoduleobjectbrowser.h"
+ #include "../debug.h"
RKObjectListView::RKObjectListView (QWidget *parent) : QListView (parent) {
***************
*** 33,36 ****
--- 35,41 ----
addColumn (i18n("Type"));
addColumn (i18n("Class"));
+
+ objectBrowserSettingsChanged ();
+ connect (RKSettings::tracker (), SIGNAL (objectBrowserSettingsChanged ()), this, SLOT (objectBrowserSettingsChanged ()));
}
***************
*** 39,42 ****
--- 44,77 ----
}
+ void RKObjectListView::objectBrowserSettingsChanged () {
+ if (RKSettingsModuleObjectBrowser::showLabelField ()) {
+ setColumnWidthMode (1, QListView::Maximum);
+ } else {
+ setColumnWidthMode (1, QListView::Manual);
+ hideColumn (1);
+ }
+
+ if (RKSettingsModuleObjectBrowser::showTypeField ()) {
+ setColumnWidthMode (2, QListView::Maximum);
+ } else {
+ setColumnWidthMode (2, QListView::Manual);
+ hideColumn (1);
+ }
+
+ if (RKSettingsModuleObjectBrowser::showClassField ()) {
+ setColumnWidthMode (3, QListView::Maximum);
+ } else {
+ setColumnWidthMode (3, QListView::Manual);
+ hideColumn (1);
+ }
+
+ for (QListViewItemIterator it (this); it.current (); ++it) {
+ RObject *object = findItemObject (it.current ());
+ RK_ASSERT (object);
+
+ if (object->getFullName ().startsWith (".")) it.current ()->setVisible (RKSettingsModuleObjectBrowser::showHiddenVars ());
+ }
+ }
+
void RKObjectListView::initialize (bool fetch_list) {
RK_TRACE (APP);
***************
*** 166,171 ****
}
! // if the object is hidden, it shouldn't appear
! if (object->getFullName ().startsWith (".")) item->setVisible (false);
}
--- 201,208 ----
}
! if (!RKSettingsModuleObjectBrowser::showHiddenVars ()) {
! // if the object is hidden, it shouldn't appear
! if (object->getFullName ().startsWith (".")) item->setVisible (false);
! }
}
***************
*** 200,205 ****
}
! // if the object is hidden, it shouldn't appear
! if (object->getFullName ().startsWith (".")) item->setVisible (false);
// code below won't work, as objects get added before editor is opened. Need to call from RKEditor(Manager)
--- 237,244 ----
}
! if (!RKSettingsModuleObjectBrowser::showHiddenVars ()) {
! // if the object is hidden, it shouldn't appear
! if (object->getFullName ().startsWith (".")) item->setVisible (false);
! }
// code below won't work, as objects get added before editor is opened. Need to call from RKEditor(Manager)
***************
*** 212,214 ****
} */
}
-
--- 251,252 ----
- Previous message: [rkward-cvs] rkward/rkward debug.h,1.9,1.10 rkward.cpp,1.80,1.81 rkward.h,1.34,1.35 robjectbrowser.cpp,1.13,1.14 robjectbrowser.h,1.7,1.8
- Next message: [rkward-cvs] rkward/rkward/scriptbackends phpbackend.cpp,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the rkward-tracker
mailing list