From 9c02dbb59ce57c68dc177d9294b980bf114a3e11 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 24 Jul 2013 15:59:03 -0500 Subject: Update to TDE R14 API --- doc/html/configlist_8cpp-source.html | 118 +++++++++++++++++------------------ 1 file changed, 59 insertions(+), 59 deletions(-) (limited to 'doc/html/configlist_8cpp-source.html') diff --git a/doc/html/configlist_8cpp-source.html b/doc/html/configlist_8cpp-source.html index 2564682..9f97aae 100644 --- a/doc/html/configlist_8cpp-source.html +++ b/doc/html/configlist_8cpp-source.html @@ -36,11 +36,11 @@ 00019 #include <stdio.h> 00020 #include <stdlib.h> 00021 -00022 #include <qfile.h> +00022 #include <ntqfile.h> 00023 -00024 #include <kconfig.h> +00024 #include <tdeconfig.h> 00025 #include <ksavefile.h> -00026 #include <kapplication.h> +00026 #include <tdeapplication.h> 00027 #include <kstandarddirs.h> 00028 #include <kaudioplayer.h> 00029 #include <kdebug.h> @@ -48,7 +48,7 @@ 00031 #include "configlist.h" 00032 #include "filter.h" 00033 -00034 ConfigList::ConfigList() : QObject() +00034 ConfigList::ConfigList() : TQObject() 00035 { 00036 setAutoDelete (true); 00037 @@ -76,7 +76,7 @@ 00059 m_nPop3Timer = DEFAULT_TIMEOUT_TIME; 00060 } 00061 -00062 int ConfigList::compareItems( QCollection::Item item1, QCollection::Item item2 ) +00062 int ConfigList::compareItems( TQCollection::Item item1, TQCollection::Item item2 ) 00063 { 00064 ConfigElem* p1 = (ConfigElem*)item1; 00065 ConfigElem* p2 = (ConfigElem*)item2; @@ -84,7 +84,7 @@ 00067 return strcmp( p1->getAccountName(), p2->getAccountName() ); 00068 } 00069 -00070 QCollection::Item ConfigList::newItem( QCollection::Item item ) +00070 TQCollection::Item ConfigList::newItem( TQCollection::Item item ) 00071 { 00072 return new ConfigElem( (ConfigElem*)item ); 00073 } @@ -94,17 +94,17 @@ 00077 kdDebug () << "ConfigList::saveOptions" << endl; 00078 00079 //create XML document -00080 QDomDocument doc( "KShowmail" ); +00080 TQDomDocument doc( "KShowmail" ); 00081 00082 //create root element -00083 QDomElement accounts = doc.createElement( ROOT_ELEMENT ); +00083 TQDomElement accounts = doc.createElement( ROOT_ELEMENT ); 00084 00085 //create for every account an element 00086 //the account saves its mails into this element 00087 //after that the element will be appended to the root element 00088 int i = 0; 00089 ConfigElem* account = NULL; //current processed account -00090 QPtrListIterator<ConfigElem> it( *this ); //iterator for the account list +00090 TQPtrListIterator<ConfigElem> it( *this ); //iterator for the account list 00091 00092 //iterate over all accounts 00093 while( ( account = it.current() ) != NULL ) @@ -113,7 +113,7 @@ 00096 ++it; 00097 00098 //save mails -00099 QDomElement accElem = doc.createElement( QString( ACCOUNT_ELEMENT ) + QString( "%1" ).arg( i++ ) ); +00099 TQDomElement accElem = doc.createElement( TQString( ACCOUNT_ELEMENT ) + TQString( "%1" ).arg( i++ ) ); 00100 account->saveOptions( doc, accElem ); //account saves the mails into given XML document and the setup into the application config file 00101 accounts.appendChild( accElem ); 00102 @@ -123,8 +123,8 @@ 00106 doc.appendChild( accounts ); 00107 00108 //save XML document -00109 QCString str = doc.toCString(); //convert XML document to a string -00110 QString cachefilename = locateLocal( "config", "kshowmail.xml" ); //get file path +00109 TQCString str = doc.toCString(); //convert XML document to a string +00110 TQString cachefilename = locateLocal( "config", "kshowmail.xml" ); //get file path 00111 KSaveFile file( cachefilename, 0600 ); //create file 00112 00113 if( file.status() != 0 ) @@ -145,15 +145,15 @@ 00128 } 00129 00130 -00131 void ConfigList::setList (QListView* list) +00131 void ConfigList::setList (TQListView* list) 00132 { -00133 QPixmap pix (::locate ("data", "kshowmail/pics/ok.png")); +00133 TQPixmap pix (::locate ("data", "kshowmail/pics/ok.png")); 00134 list->clear (); 00135 int nIndex = at (); -00136 QListViewItem* last = NULL; +00136 TQListViewItem* last = NULL; 00137 for (ConfigElem* pElem = first(); pElem; pElem = next()) 00138 { -00139 last = new QListViewItem (list, last, "", pElem->getAccountName(), pElem->getURL().host(), pElem->getURL().user(), "?"); +00139 last = new TQListViewItem (list, last, "", pElem->getAccountName(), pElem->getURL().host(), pElem->getURL().user(), "?"); 00140 pElem->setListViewItem( last ); 00141 if (pElem->isActive()) 00142 pElem->getListViewItem()->setPixmap (0, pix); @@ -310,7 +310,7 @@ 00293 00294 void ConfigList::deleteSelectedMails( ) 00295 { -00296 QPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts +00296 TQPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts 00297 ConfigElem* account; //account to process 00298 00299 //clear the map, which contains the names of the accounts, @@ -349,7 +349,7 @@ 00332 emit sigConfigChanged(); 00333 } 00334 -00335 void ConfigList::slotCheckDeletionState( QString account ) +00335 void ConfigList::slotCheckDeletionState( TQString account ) 00336 { 00337 bool accountDeleting = false; //set to TRUE if an account is still deleting 00338 AccountTaskMap_Type::Iterator it; //iterator over the account deletion map @@ -372,7 +372,7 @@ 00355 00356 void ConfigList::connectAccounts( ) 00357 { -00358 QPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts +00358 TQPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts 00359 ConfigElem* account; //account to connect 00360 00361 while( ( account = it.current() ) != NULL ) @@ -382,11 +382,11 @@ 00365 00366 //connect 00367 connect( account, SIGNAL( sigConfigChanged() ), this, SLOT( slotAccountConfigChanged() ) ); -00368 connect( account, SIGNAL( sigDeleteReady( QString ) ), this, SLOT( slotCheckDeletionState( QString ) ) ); -00369 connect( account, SIGNAL( sigShowBodiesReady( QString ) ), this, SLOT( slotCheckShowBodiesState( QString ) ) ); +00368 connect( account, SIGNAL( sigDeleteReady( TQString ) ), this, SLOT( slotCheckDeletionState( TQString ) ) ); +00369 connect( account, SIGNAL( sigShowBodiesReady( TQString ) ), this, SLOT( slotCheckShowBodiesState( TQString ) ) ); 00370 connect( account, SIGNAL( sigMessageWindowOpened() ), this, SLOT( slotMessageWindowOpened() ) ); 00371 connect( account, SIGNAL( sigMessageWindowClosed() ), this, SLOT( slotMessageWindowClosed() ) ); -00372 connect( account, SIGNAL( sigRefreshReady( QString ) ), this, SLOT( slotCheckRefreshState( QString ) ) ); +00372 connect( account, SIGNAL( sigRefreshReady( TQString ) ), this, SLOT( slotCheckRefreshState( TQString ) ) ); 00373 00374 //get next account 00375 ++it; @@ -403,10 +403,10 @@ 00386 return m_bConfirmDelete; 00387 } 00388 -00389 QStringList ConfigList::getSelectedSubjects( ) const +00389 TQStringList ConfigList::getSelectedSubjects( ) const 00390 { -00391 QStringList subjects; //contains all subjects -00392 QPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts +00391 TQStringList subjects; //contains all subjects +00392 TQPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts 00393 ConfigElem* account; //current account 00394 00395 while( ( account = it.current() ) != NULL ) @@ -424,7 +424,7 @@ 00407 bool ConfigList::hasSelectedMails( ) 00408 { 00409 bool foundSelected = false; //set to TRUE, when an account with selected mails was found -00410 QPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts +00410 TQPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts 00411 ConfigElem* account; //current account 00412 00413 while( ( account = it.current() ) != NULL && !foundSelected ) @@ -441,7 +441,7 @@ 00424 00425 void ConfigList::showSelectedMails( ) 00426 { -00427 QPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts +00427 TQPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts 00428 ConfigElem* account; //account to process 00429 00430 //clear the map, which contains the names of the accounts, @@ -476,7 +476,7 @@ 00459 00460 } 00461 -00462 void ConfigList::slotCheckShowBodiesState( QString account ) +00462 void ConfigList::slotCheckShowBodiesState( TQString account ) 00463 { 00464 bool accountDownloading = false; //set to TRUE if an account is downloading mail body yet 00465 AccountTaskMap_Type::Iterator it; //iterator over the account map @@ -538,7 +538,7 @@ 00521 00522 void ConfigList::refreshMailLists( ) 00523 { -00524 QPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts +00524 TQPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts 00525 ConfigElem* account; //account to process 00526 00527 //return, if no accounts available @@ -580,7 +580,7 @@ 00563 00564 } 00565 -00566 void ConfigList::slotCheckRefreshState( QString account ) +00566 void ConfigList::slotCheckRefreshState( TQString account ) 00567 { 00568 bool accountRefreshing = false; //set to TRUE if an account is still refreshing 00569 AccountTaskMap_Type::Iterator it; //iterator over the account map @@ -606,7 +606,7 @@ 00589 00590 int ConfigList::getNumberNewMails( ) 00591 { -00592 QPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts +00592 TQPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts 00593 ConfigElem* account; //account to process 00594 int number = 0; //number of new mails 00595 @@ -624,7 +624,7 @@ 00607 00608 int ConfigList::getNumberMails( ) 00609 { -00610 QPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts +00610 TQPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts 00611 ConfigElem* account; //account to process 00612 int number = 0; //number of mails 00613 @@ -642,7 +642,7 @@ 00625 00626 long ConfigList::getTotalSize( ) 00627 { -00628 QPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts +00628 TQPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts 00629 ConfigElem* account; //account to process 00630 long size = 0; //total size of all mails 00631 @@ -660,7 +660,7 @@ 00643 00644 void ConfigList::fillMailListView( KshowmailView * view ) 00645 { -00646 QPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts +00646 TQPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts 00647 ConfigElem* account; //account to process 00648 00649 //iterate over all accounts and order the active accounts to fill their mails @@ -716,7 +716,7 @@ 00699 00700 void ConfigList::refreshAccountList( ) 00701 { -00702 QPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts +00702 TQPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts 00703 ConfigElem* account; //account to process 00704 00705 //iterate over all accounts and order the account to refresh its @@ -733,7 +733,7 @@ 00716 00717 void ConfigList::killPOP3Jobs( ) 00718 { -00719 QPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts +00719 TQPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts 00720 ConfigElem* account; //account to process 00721 00722 //iterate over all accounts and order the account to kill @@ -749,7 +749,7 @@ 00732 00733 void ConfigList::showSelectedHeaders( ) 00734 { -00735 QPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts +00735 TQPtrListIterator<ConfigElem> it( *this ); //to iterate over all accounts 00736 ConfigElem* account; //account to process 00737 int showNextHeader = ConfigElem::continueShowHeaders; //return value of ConfigElem::showSelectedHeaders 00738 @@ -765,10 +765,10 @@ 00748 } 00749 } 00750 -00751 void ConfigList::refreshSetup( KListView* view ) +00751 void ConfigList::refreshSetup( TDEListView* view ) 00752 { 00753 //get application config object (kshowmailrc) -00754 config = KApplication::kApplication()->config(); +00754 config = TDEApplication::kApplication()->config(); 00755 00756 //read actions group 00757 config->setGroup( CONFIG_GROUP_ACTIONS ); @@ -806,12 +806,12 @@ 00789 00790 //get account names from the config file 00791 config->setGroup( CONFIG_GROUP_ACCOUNTS ); -00792 QStringList accounts = config->readListEntry( CONFIG_ENTRY_ACCOUNTS_LIST, QStringList() ); +00792 TQStringList accounts = config->readListEntry( CONFIG_ENTRY_ACCOUNTS_LIST, TQStringList() ); 00793 00794 //remove deleted accounts from the account list 00795 //accounts are deleted, if the are in ConfigList yet, but not in the list of the config file (accounts) 00796 ConfigElem* accountDel = NULL; //current processed account -00797 QPtrListIterator<ConfigElem> iter( *this ); //iterator for the account list (ConfigList) +00797 TQPtrListIterator<ConfigElem> iter( *this ); //iterator for the account list (ConfigList) 00798 00799 //iterate over all accounts (ConfigList) 00800 while( ( accountDel = iter.current() ) != NULL ) @@ -820,7 +820,7 @@ 00803 ++iter; 00804 00805 //search for the current account in the account list of the config file -00806 QStringList::Iterator foundAccount = accounts.find( accountDel->getAccountName() ); +00806 TQStringList::Iterator foundAccount = accounts.find( accountDel->getAccountName() ); 00807 00808 //remove account from ConfigList, if it is not in the list of the config file 00809 if( foundAccount == accounts.end() ) @@ -830,7 +830,7 @@ 00813 //add or edit accounts 00814 ConfigElem* acc; 00815 //iterate over all items of the account list of the config file -00816 for( QStringList::Iterator it = accounts.begin(); it != accounts.end(); ++it ) +00816 for( TQStringList::Iterator it = accounts.begin(); it != accounts.end(); ++it ) 00817 { 00818 //create a new account, if it is not in the list yet (ConfigList) 00819 //or get the account @@ -862,7 +862,7 @@ 00845 { 00846 case CONFIG_VALUE_ACCOUNT_PASSWORD_DONT_SAVE: 00847 acc->setPasswordStorage( CONFIG_VALUE_ACCOUNT_PASSWORD_DONT_SAVE ); -00848 acc->setPassword( QString::null ); +00848 acc->setPassword( TQString::null ); 00849 break; 00850 00851 case CONFIG_VALUE_ACCOUNT_PASSWORD_SAVE_FILE: @@ -877,7 +877,7 @@ 00860 00861 default: 00862 acc->setPasswordStorage( DEFAULT_ACCOUNT_PASSWORD_STORAGE ); -00863 acc->setPassword( QString::null ); +00863 acc->setPassword( TQString::null ); 00864 } 00865 00866 } @@ -893,7 +893,7 @@ 00876 { 00877 if( m_bCommand ) 00878 { -00879 if( m_strCommandPath != QString::null && m_strCommandPath != "" ) +00879 if( m_strCommandPath != TQString::null && m_strCommandPath != "" ) 00880 { 00881 KShellProcess proc; //process handler to execute the binary 00882 @@ -934,11 +934,11 @@ 00917 return m_bShowConnectionErrors; 00918 } 00919 -00920 bool ConfigList::hasAccount( const QString & name ) const +00920 bool ConfigList::hasAccount( const TQString & name ) const 00921 { 00922 bool found = false; //TRUE if we have found the given account 00923 ConfigElem* account; //account from which we want to get its name -00924 QPtrListIterator<ConfigElem> it( *this ); //iterator for the account list +00924 TQPtrListIterator<ConfigElem> it( *this ); //iterator for the account list 00925 00926 //iterate over all accounts 00927 while( ( account = it.current() ) != NULL && !found ) @@ -954,11 +954,11 @@ 00937 return found; 00938 } 00939 -00940 ConfigElem * ConfigList::getAccount( const QString & name ) const +00940 ConfigElem * ConfigList::getAccount( const TQString & name ) const 00941 { 00942 bool found = false; //TRUE if we have found the given account 00943 ConfigElem* account = NULL; //account from which we want to get its name -00944 QPtrListIterator<ConfigElem> it( *this ); //iterator for the account list +00944 TQPtrListIterator<ConfigElem> it( *this ); //iterator for the account list 00945 ConfigElem* returnValue = NULL; 00946 00947 //iterate over all accounts @@ -981,7 +981,7 @@ 00964 void ConfigList::printSetup( ) 00965 { 00966 ConfigElem* account = NULL; //account from which we want to print the setup -00967 QPtrListIterator<ConfigElem> it( *this ); //iterator for the account list +00967 TQPtrListIterator<ConfigElem> it( *this ); //iterator for the account list 00968 00969 //iterate over all accounts 00970 while( ( account = it.current() ) != NULL ) @@ -997,8 +997,8 @@ 00980 void ConfigList::readStoredMails( ) 00981 { 00982 //open file -00983 QString MailFileName = locateLocal( "config", MAIL_FILE ); -00984 QFile file( MailFileName ); +00983 TQString MailFileName = locateLocal( "config", MAIL_FILE ); +00984 TQFile file( MailFileName ); 00985 bool fileOpen = file.open( IO_ReadOnly ); 00986 00987 //return, if the file could not be opened @@ -1009,8 +1009,8 @@ 00992 } 00993 00994 //create DOM document with the content read from the file -00995 QDomDocument doc( MAIL_FILE_DOCTYPE ); -00996 QString* errorMsg = new QString(); +00995 TQDomDocument doc( MAIL_FILE_DOCTYPE ); +00996 TQString* errorMsg = new TQString(); 00997 00998 bool success = doc.setContent( &file ); 00999 if( !success ) @@ -1019,19 +1019,19 @@ 01002 } 01003 01004 //get the root element -01005 QDomElement accounts = doc.namedItem ( ROOT_ELEMENT ).toElement(); +01005 TQDomElement accounts = doc.namedItem ( ROOT_ELEMENT ).toElement(); 01006 01007 //get the first account element -01008 QDomNode accNode = accounts.firstChild(); +01008 TQDomNode accNode = accounts.firstChild(); 01009 01010 //get all account elements 01011 while( !accNode.isNull() ) 01012 { 01013 //convert account node to DOM element -01014 QDomElement accElem = accNode.toElement(); +01014 TQDomElement accElem = accNode.toElement(); 01015 01016 //get the account name -01017 QString accName = accElem.attribute( ATTRIBUTE_ACCOUNT_NAME ); +01017 TQString accName = accElem.attribute( ATTRIBUTE_ACCOUNT_NAME ); 01018 01019 //get the proper account object 01020 ConfigElem* account = getAccount( accName ); -- cgit v1.2.1