@ -57,8 +57,8 @@ CItemBase::CItemBase(CMainIndex* mainIndex, const Type type)
m_type ( type ) ,
m_sortingEnabled ( true ) { }
CItemBase : : CItemBase ( CItemBase * tq parentItem, const Type type )
: KListViewItem ( tq parentItem) ,
CItemBase : : CItemBase ( CItemBase * parentItem, const Type type )
: KListViewItem ( parentItem) ,
m_type ( type ) ,
m_sortingEnabled ( true ) { }
@ -140,7 +140,7 @@ void CItemBase::sort() {
/* ---------- new class: CModuleItem ------------ */
/* ---------------------------------------------- */
CModuleItem : : CModuleItem ( CTreeFolder * tq parentItem, CSwordModuleInfo * module ) : CItemBase ( tq parentItem) , m_module ( module ) { }
CModuleItem : : CModuleItem ( CTreeFolder * parentItem, CSwordModuleInfo * module ) : CItemBase ( parentItem) , m_module ( module ) { }
CModuleItem : : ~ CModuleItem ( ) { }
@ -252,8 +252,8 @@ const bool CModuleItem::enableAction( const MenuAction action ) {
/* ---------- new class: CBookmarkItem ------------*/
/* ----------------------------------------------*/
CBookmarkItem : : CBookmarkItem ( CFolderBase * tq parentItem, CSwordModuleInfo * module , const TQString & key , const TQString & description )
: CItemBase ( tq parentItem) ,
CBookmarkItem : : CBookmarkItem ( CFolderBase * parentItem, CSwordModuleInfo * module , const TQString & key , const TQString & description )
: CItemBase ( parentItem) ,
m_description ( description ) ,
m_moduleName ( module ? module - > name ( ) : TQString ( ) ) {
if ( ( module & & ( module - > type ( ) = = CSwordModuleInfo : : Bible ) | | ( module - > type ( ) = = CSwordModuleInfo : : Commentary ) ) ) {
@ -269,8 +269,8 @@ m_moduleName(module ? module->name() : TQString()) {
m_startupXML = TQDomElement ( ) ; //empty XML code
}
CBookmarkItem : : CBookmarkItem ( CFolderBase * tq parentItem, TQDomElement & xml )
: CItemBase ( tq parentItem) ,
CBookmarkItem : : CBookmarkItem ( CFolderBase * parentItem, TQDomElement & xml )
: CItemBase ( parentItem) ,
m_key ( TQString ( ) ) ,
m_description ( TQString ( ) ) ,
m_moduleName ( TQString ( ) ) {
@ -445,9 +445,9 @@ bool CBookmarkItem::acceptDrop(const TQMimeSource* /*src*/) const {
CFolderBase : : CFolderBase ( CMainIndex * mainIndex , const Type type ) : CItemBase ( mainIndex , type ) { }
CFolderBase : : CFolderBase ( CFolderBase * tq parentItem, const Type type ) : CItemBase ( tq parentItem, type ) { }
CFolderBase : : CFolderBase ( CFolderBase * parentItem, const Type type ) : CItemBase ( parentItem, type ) { }
CFolderBase : : CFolderBase ( CFolderBase * tq parentFolder, const TQString & caption ) : CItemBase ( tq parentFolder) {
CFolderBase : : CFolderBase ( CFolderBase * parentFolder, const TQString & caption ) : CItemBase ( parentFolder) {
setText ( 0 , caption ) ;
}
@ -715,54 +715,54 @@ namespace Bookmarks {
doc . appendChild ( content ) ;
//first create the bookmark groups in the XML document, then add the bookmarks to each tqparent
TQMap < int , TQDomElement > tq parentMap; //maps tqparent ids to dom elements
TQMap < int , TQDomElement > parentMap; //maps tqparent ids to dom elements
TQStringList groupList = config - > readListEntry ( " Groups " ) ;
TQValueList < int > tq parentList = config - > readIntListEntry ( " Group tq parents" ) ;
TQValueList < int > parentList = config - > readIntListEntry ( " Group parents" ) ;
TQStringList : : Iterator it_groups = groupList . begin ( ) ;
TQValueList < int > : : Iterator it_parents = tq parentList. begin ( ) ;
TQValueList < int > : : Iterator it_parents = parentList. begin ( ) ;
int tq parentIDCounter = 0 ;
while ( ( it_groups ! = groupList . end ( ) ) & & ( it_parents ! = tq parentList. end ( ) ) ) {
TQDomElement tq parentElement = ( * it_parents = = - 1 ) ? content : tq parentMap[ * it_parents ] ;
if ( tq parentElement. isNull ( ) ) {
int parentIDCounter = 0 ;
while ( ( it_groups ! = groupList . end ( ) ) & & ( it_parents ! = parentList. end ( ) ) ) {
TQDomElement parentElement = ( * it_parents = = - 1 ) ? content : parentMap[ * it_parents ] ;
if ( parentElement. isNull ( ) ) {
qWarning ( " EMPTY PARENT FOUND! " ) ;
tq parentElement = content ;
parentElement = content ;
} ;
TQDomElement elem = doc . createElement ( " Folder " ) ;
elem . setAttribute ( " caption " , ( * it_groups ) ) ;
tq parentMap. insert ( tq parentIDCounter, elem ) ;
parentMap. insert ( parentIDCounter, elem ) ;
tq parentElement. appendChild ( elem ) ;
parentElement. appendChild ( elem ) ;
+ + it_parents ;
+ + it_groups ;
+ + tq parentIDCounter;
+ + parentIDCounter;
}
//groups are now read in, create now the bookmarks
tq parentList = config - > readIntListEntry ( " Bookmark tq parents" ) ;
parentList = config - > readIntListEntry ( " Bookmark parents" ) ;
TQStringList bookmarkList = config - > readListEntry ( " Bookmarks " ) ;
TQStringList bookmarkModulesList = config - > readListEntry ( " Bookmark modules " ) ;
TQStringList bookmarkDescriptionsList = config - > readListEntry ( " Bookmark descriptions " ) ;
it_parents = tq parentList. begin ( ) ;
it_parents = parentList. begin ( ) ;
TQStringList : : Iterator it_bookmarks = bookmarkList . begin ( ) ;
TQStringList : : Iterator it_modules = bookmarkModulesList . begin ( ) ;
TQStringList : : Iterator it_descriptions = bookmarkDescriptionsList . begin ( ) ;
while ( it_bookmarks ! = bookmarkList . end ( )
& & it_parents ! = tq parentList. end ( )
& & it_parents ! = parentList. end ( )
& & it_modules ! = bookmarkModulesList . end ( )
) {
TQDomElement tq parentElement = ( ( * it_parents ) = = - 1 ) ? content : tq parentMap[ ( * it_parents ) ] ;
if ( tq parentElement. isNull ( ) ) {
TQDomElement parentElement = ( ( * it_parents ) = = - 1 ) ? content : parentMap[ ( * it_parents ) ] ;
if ( parentElement. isNull ( ) ) {
qWarning ( " EMPTY PARENT FOUND! " ) ;
tq parentElement = content ;
parentElement = content ;
} ;
TQDomElement elem = doc . createElement ( " Bookmark " ) ;
@ -773,7 +773,7 @@ namespace Bookmarks {
CSwordModuleInfo * m = CPointers : : backend ( ) - > findModuleByName ( * it_modules ) ;
elem . setAttribute ( " moduledescription " , m ? m - > config ( CSwordModuleInfo : : Description ) : TQString ( ) ) ;
tq parentElement. appendChild ( elem ) ;
parentElement. appendChild ( elem ) ;
+ + it_parents ;
@ -833,12 +833,12 @@ OldBookmarksFolder::OldBookmarksFolder(CTreeFolder* folder) : CBookmarkFolder(fo
// New class SubFolder
SubFolder : : SubFolder ( CFolderBase * tq parentItem, const TQString & caption ) : CBookmarkFolder ( tq parentItem, BookmarkFolder ) {
SubFolder : : SubFolder ( CFolderBase * parentItem, const TQString & caption ) : CBookmarkFolder ( parentItem, BookmarkFolder ) {
m_startupXML = TQDomElement ( ) ;
setText ( 0 , caption ) ;
}
SubFolder : : SubFolder ( CFolderBase * tq parentItem, TQDomElement & xml ) : CBookmarkFolder ( tq parentItem, BookmarkFolder ) {
SubFolder : : SubFolder ( CFolderBase * parentItem, TQDomElement & xml ) : CBookmarkFolder ( parentItem, BookmarkFolder ) {
m_startupXML = xml ;
}
@ -912,7 +912,7 @@ SubFolder::SubFolder(CFolderBase* tqparentItem, TQDomElement& xml ) : CBookmarkF
//restore all child items
TQDomElement child = elem . firstChild ( ) . toElement ( ) ;
CItemBase * oldItem = 0 ;
while ( ! child . isNull ( ) & & child . tq parentNode( ) = = elem ) {
while ( ! child . isNull ( ) & & child . parentNode( ) = = elem ) {
CItemBase * i = 0 ;
if ( child . tagName ( ) = = " Folder " ) {
i = new Bookmarks : : SubFolder ( this , child ) ;
@ -939,7 +939,7 @@ CBookmarkFolder::CBookmarkFolder(CMainIndex* mainIndex, const Type type) : CTree
setSortingEnabled ( false ) ;
}
CBookmarkFolder : : CBookmarkFolder ( CFolderBase * tq parentItem, const Type type ) : CTreeFolder ( tq parentItem, type , " * " ) {
CBookmarkFolder : : CBookmarkFolder ( CFolderBase * parentItem, const Type type ) : CTreeFolder ( parentItem, type , " * " ) {
setSortingEnabled ( false ) ;
}
@ -1059,7 +1059,7 @@ const bool CBookmarkFolder::loadBookmarksFromXML( const TQString& xml ) {
CItemBase * oldItem = 0 ;
//restore all child items
TQDomElement child = document . firstChild ( ) . toElement ( ) ;
while ( ! child . isNull ( ) & & child . tq parentNode( ) = = document ) {
while ( ! child . isNull ( ) & & child . parentNode( ) = = document ) {
CItemBase * i = 0 ;
if ( child . tagName ( ) = = " Folder " ) {
i = new Bookmarks : : SubFolder ( this , child ) ;