From 459c7c37896cc463ee70a3f7a28899dd7b26e386 Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 28 Sep 2007 05:35:58 +0000 Subject: [PATCH] Changing of files from BR_QT4_dev. --- src/SUIT/SUIT_PreferenceMgr.cxx | 20 +++++++++++++------- src/SUIT/SUIT_PreferenceMgr.h | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/SUIT/SUIT_PreferenceMgr.cxx b/src/SUIT/SUIT_PreferenceMgr.cxx index ada123161..0424de3ca 100644 --- a/src/SUIT/SUIT_PreferenceMgr.cxx +++ b/src/SUIT/SUIT_PreferenceMgr.cxx @@ -69,22 +69,22 @@ int SUIT_PreferenceMgr::addItem( const QString& title, const int pId, const SUIT_PreferenceMgr::PrefItemType type, const QString& sect, const QString& param ) { - QtxPreferenceItem* item = findItem( title, true ); + QtxPreferenceItem* parent = pId == -1 ? this : findItem( pId, true ); + + if ( !parent ) + return -1; + + QtxPreferenceItem* item = parent->findItem( title, true ); + if ( item ) return item->id(); - QtxPreferenceItem* parent = 0; if ( pId == -1 ) { if ( !myRoot ) myRoot = new QtxPagePrefListItem( QString( "root" ), this ); parent = myRoot; } - else - parent = findItem( pId, true ); - - if ( !parent ) - return -1; switch( type ) { @@ -132,6 +132,12 @@ int SUIT_PreferenceMgr::addItem( const QString& title, const int pId, case GroupBox: item = new QtxPagePrefGroupItem( title, parent, sect, param ); break; + case Tab: + item = new QtxPagePrefTabsItem( title, parent, sect, param ); + break; + case Frame: + item = new QtxPagePrefFrameItem( title, parent, sect, param ); + break; case Font: item = new QtxPagePrefFontItem( title, parent, sect, param ); break; diff --git a/src/SUIT/SUIT_PreferenceMgr.h b/src/SUIT/SUIT_PreferenceMgr.h index 787604000..2c85f6018 100644 --- a/src/SUIT/SUIT_PreferenceMgr.h +++ b/src/SUIT/SUIT_PreferenceMgr.h @@ -36,7 +36,7 @@ class SUIT_EXPORT SUIT_PreferenceMgr : public QtxPagePrefMgr public: typedef enum { Auto, Space, Bool, Color, String, Selector, DblSpin, IntSpin, Double, Integer, - GroupBox, Font, DirList, File } PrefItemType; + GroupBox, Tab, Frame, Font, DirList, File } PrefItemType; public: SUIT_PreferenceMgr( QtxResourceMgr*, QWidget* = 0 ); -- 2.39.2