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/kshowmail_8cpp-source.html | 104 ++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 52 deletions(-) (limited to 'doc/html/kshowmail_8cpp-source.html') diff --git a/doc/html/kshowmail_8cpp-source.html b/doc/html/kshowmail_8cpp-source.html index 3e71b49..df1ea7f 100644 --- a/doc/html/kshowmail_8cpp-source.html +++ b/doc/html/kshowmail_8cpp-source.html @@ -36,9 +36,9 @@ 00019 00020 #include "kshowmail.h" 00021 -00022 using namespace KIO; +00022 using namespace TDEIO; 00023 -00024 KAboutData* KShowMailApp::m_pAbout; +00024 TDEAboutData* KShowMailApp::m_pAbout; 00025 00026 KShowMailApp::KShowMailApp() 00027 { @@ -63,7 +63,7 @@ 00046 //the setup dialog will be created in slotSetup() at first use 00047 SetupDialog = NULL; 00048 -00049 m_pTimer = new QTimer (this); +00049 m_pTimer = new TQTimer (this); 00050 m_pAlertDialog = NULL; 00051 m_pDockWindow = new KShowMailDock (this, m_actionRefresh); 00052 m_bForceClose = false; @@ -81,7 +81,7 @@ 00064 00065 connect (m_pDockWindow, SIGNAL (quitSelected ()), SLOT (slotForceClose ())); 00066 connect (m_pTimer, SIGNAL (timeout ()), SLOT (slotRefresh ())); -00067 connect (m_pView->m_pListAccounts, SIGNAL (currentChanged(QListViewItem*)), SLOT(slotAccountActivated(QListViewItem*))); +00067 connect (m_pView->m_pListAccounts, SIGNAL (currentChanged(TQListViewItem*)), SLOT(slotAccountActivated(TQListViewItem*))); 00068 connect (m_pView, SIGNAL (signalActiveChanged()), SLOT (slotRefreshView())); 00069 00070 connect( &m_ConfigList, SIGNAL( sigDeleteReady() ), this, SLOT( slotDeletionReady() ) ); @@ -91,7 +91,7 @@ 00074 connect( &m_ConfigList, SIGNAL( sigRefreshReady() ), this, SLOT( slotRefreshReady() ) ); 00075 00076 // this starts the one-second-interval timer -00077 // this is a QObject method +00077 // this is a TQObject method 00078 startTimer (1000); 00079 00080 @@ -107,13 +107,13 @@ 00090 kdDebug() << "cleanup finished" << endl; 00091 } 00092 -00096 void KShowMailApp::timerEvent (QTimerEvent *) +00096 void KShowMailApp::timerEvent (TQTimerEvent *) 00097 { 00098 if (m_nSecondsToGo) 00099 { -00100 QTime time; +00100 TQTime time; 00101 time = time.addSecs (m_nSecondsToGo--); -00102 QCString msg (i18n("Autorefresh: %1").arg (time.toString())); +00102 TQCString msg (i18n("Autorefresh: %1").arg (time.toString())); 00103 statusBar()->changeItem(msg, 3); 00104 } 00105 else @@ -130,7 +130,7 @@ 00116 m_pDockWindow->clear (); 00117 break; 00118 default: -00119 m_pDockWindow->drawText ("?", Qt::red); +00119 m_pDockWindow->drawText ("?", TQt::red); 00120 } 00121 } 00122 } @@ -144,15 +144,15 @@ 00130 KStdAction::quit( this, SLOT( slotFileQuit() ), actionCollection() ); 00131 00132 // action menu -00133 m_actionRefresh = new KAction( i18n( "&Refresh messages" ), "reload", Key_F5, this, SLOT( slotRefresh() ), actionCollection(), "refresh" ); -00134 new KAction( i18n( "Show &header of highlighted messages" ), "letter-closed", Key_F2, this, SLOT( slotShowHeader() ), actionCollection(), "show_header" ); -00135 new KAction( i18n( "Show &complete highlighted messages" ), "letter-open", Key_F3, this, SLOT( slotShowMessage() ), actionCollection(), "show_complete" ); -00136 new KAction( i18n( "&Delete highlighted messages" ), "eraser", Key_Delete, this, SLOT( slotDelete() ), actionCollection(), "delete" ); -00137 new KAction( i18n( "S&top current transfer" ), "stop", 0, this, SLOT( slotStop() ), actionCollection(), "stop" ); +00133 m_actionRefresh = new TDEAction( i18n( "&Refresh messages" ), "reload", Key_F5, this, SLOT( slotRefresh() ), actionCollection(), "refresh" ); +00134 new TDEAction( i18n( "Show &header of highlighted messages" ), "letter-closed", Key_F2, this, SLOT( slotShowHeader() ), actionCollection(), "show_header" ); +00135 new TDEAction( i18n( "Show &complete highlighted messages" ), "letter-open", Key_F3, this, SLOT( slotShowMessage() ), actionCollection(), "show_complete" ); +00136 new TDEAction( i18n( "&Delete highlighted messages" ), "eraser", Key_Delete, this, SLOT( slotDelete() ), actionCollection(), "delete" ); +00137 new TDEAction( i18n( "S&top current transfer" ), "stop", 0, this, SLOT( slotStop() ), actionCollection(), "stop" ); 00138 00139 // setup menu 00140 KStdAction::preferences( this, SLOT( slotSetup() ), actionCollection() ); -00141 new KAction( i18n( "Setup &filters" ), "filter", 0, this, SLOT( slotSetupFilters() ), actionCollection(), "filters" ); +00141 new TDEAction( i18n( "Setup &filters" ), "filter", 0, this, SLOT( slotSetupFilters() ), actionCollection(), "filters" ); 00142 KStdAction::configureToolbars( this, SLOT( slotEditToolbars() ), actionCollection() ); 00143 00144 //create menu items for toggle tool and status bar @@ -160,18 +160,18 @@ 00146 createStandardStatusBarAction(); 00147 00148 //help menu -00149 new KAction( i18n( "Send &Feedback Mail" ), "email", 0, this, SLOT( slotSendFeedbackMail() ),actionCollection(), "sendFeedback" ); +00149 new TDEAction( i18n( "Send &Feedback Mail" ), "email", 0, this, SLOT( slotSendFeedbackMail() ),actionCollection(), "sendFeedback" ); 00150 00151 //for account context menu -00152 new KAction(i18n( "Setup &account" ), "tool", 0, this, SLOT( slotSetupAccount() ), actionCollection(), "setupAccount" ); +00152 new TDEAction(i18n( "Setup &account" ), "tool", 0, this, SLOT( slotSetupAccount() ), actionCollection(), "setupAccount" ); 00153 } 00154 00155 void KShowMailApp::initStatusBar() 00156 { 00158 // STATUSBAR -00159 QCString user = getenv( "LOGNAME" ); -00160 QCString server = getenv( "HOSTNAME" ); -00161 QCString mesg (QString ("%1@%2").arg(user).arg(server)); +00159 TQCString user = getenv( "LOGNAME" ); +00160 TQCString server = getenv( "HOSTNAME" ); +00161 TQCString mesg (TQString ("%1@%2").arg(user).arg(server)); 00162 00163 statusBar()->insertItem(i18n("Ready."), 1); 00164 statusBar()->insertItem(mesg, 2, 1); @@ -187,7 +187,7 @@ 00174 00175 void KShowMailApp::initView() 00176 { -00178 // create the main widget here that is managed by KMainWindow's view-region and +00178 // create the main widget here that is managed by TDEMainWindow's view-region and 00179 // connect the widget to your document to display document contents. 00180 00181 m_pView = new KshowmailView(this); @@ -197,7 +197,7 @@ 00185 00186 void KShowMailApp::slotSaveOptions() 00187 { -00188 KConfig* config = KGlobal::config(); +00188 TDEConfig* config = TDEGlobal::config(); 00189 00190 //order application parts to save their setup 00191 m_pView->saveOptions( config ); @@ -213,7 +213,7 @@ 00201 00202 void KShowMailApp::readOptions() 00203 { -00204 KConfig* config = KGlobal::config(); +00204 TDEConfig* config = TDEGlobal::config(); 00205 00206 Filter::readOptions (config); 00207 m_actionSave->setEnabled (false); @@ -232,7 +232,7 @@ 00220 // Don't close - close button must minimize the window 00221 result = false; 00222 kdDebug() << "ignoring close request and minimizing the window" << endl; -00223 KMainWindow* w = memberList->first(); +00223 TDEMainWindow* w = memberList->first(); 00224 w->hide(); 00225 } else { 00226 // Need to ask user first @@ -257,7 +257,7 @@ 00247 if(memberList && askCloseConfirmation()) 00248 { 00249 m_bForceClose = true; // Forcing the closing -00250 KMainWindow* w = memberList->first(); +00250 TDEMainWindow* w = memberList->first(); 00251 w->close(); 00252 } 00253 } @@ -287,7 +287,7 @@ 00277 //the dialog sets the new options directly in the account 00278 ServerDialog dlg( this, pConfig ); 00279 -00280 if( dlg.exec() == QDialog::Accepted ) +00280 if( dlg.exec() == TQDialog::Accepted ) 00281 { 00282 //if OK was clicked, refresh the account list view 00283 slotConfChanged(); @@ -299,9 +299,9 @@ 00289 initNextRefresh(); 00290 } 00291 -00292 void KShowMailApp::slotAccountActivated (QListViewItem* pItem) +00292 void KShowMailApp::slotAccountActivated (TQListViewItem* pItem) 00293 { -00294 QPtrListIterator<ConfigElem> it(m_ConfigList); +00294 TQPtrListIterator<ConfigElem> it(m_ConfigList); 00295 // this is = not == !!! 00296 while (ConfigElem* pConfig = it()) 00297 { @@ -345,7 +345,7 @@ 00335 slotStatusMsg( i18n( "Refreshing ..." ) ); 00336 00337 //set waiting cursor -00338 QApplication::setOverrideCursor( Qt::waitCursor ); +00338 TQApplication::setOverrideCursor( TQt::waitCursor ); 00339 00340 //order the account list to refresh its mail lists 00341 m_ConfigList.refreshMailLists(); @@ -375,8 +375,8 @@ 00365 00366 //set normal cursor 00367 //might be more than one override cursor ... -00368 while (QApplication::overrideCursor()) -00369 QApplication::restoreOverrideCursor (); +00368 while (TQApplication::overrideCursor()) +00369 TQApplication::restoreOverrideCursor (); 00370 00371 //print status message 00372 slotStatusMsg(i18n("Job was stopped")); @@ -401,10 +401,10 @@ 00391 //draw number of mails into dock 00392 if( hasNewMails ) 00393 //draw red number, because we have new mails -00394 m_pDockWindow->drawNumber( numberMails, Qt::red ); +00394 m_pDockWindow->drawNumber( numberMails, TQt::red ); 00395 else 00396 //we haven't new mails, draw black -00397 m_pDockWindow->drawNumber( numberMails, Qt::black ); +00397 m_pDockWindow->drawNumber( numberMails, TQt::black ); 00398 00399 //show message in status bar 00400 long totalSize = m_ConfigList.getTotalSize(); @@ -428,7 +428,7 @@ 00418 if( m_ConfigList.confirmDeletion() ) 00419 { 00420 //get subjects off all selected mails -00421 QStringList subjects = m_ConfigList.getSelectedSubjects(); +00421 TQStringList subjects = m_ConfigList.getSelectedSubjects(); 00422 00423 //show question 00424 int answer = KMessageBox::questionYesNoList( this, i18n( "Do you want to delete these mails?"), subjects, i18n( "Delete?" ) ); @@ -444,7 +444,7 @@ 00434 slotStatusMsg( i18n( "Deleting Mail(s) ..." ) ); 00435 00436 //set waiting cursor -00437 QApplication::setOverrideCursor( Qt::waitCursor ); +00437 TQApplication::setOverrideCursor( TQt::waitCursor ); 00438 00439 //order the account list to delete the selected mails 00440 //test! @@ -485,17 +485,17 @@ 00475 slotStatusMsg( i18n( "Downloading ..." ) ); 00476 00477 //set waiting cursor -00478 QApplication::setOverrideCursor( Qt::waitCursor ); +00478 TQApplication::setOverrideCursor( TQt::waitCursor ); 00479 00480 //order the account list to show the selected mails 00481 m_ConfigList.showSelectedMails(); 00482 } 00483 -00484 void KShowMailApp::slotStatusMsg(const QString& text) +00484 void KShowMailApp::slotStatusMsg(const TQString& text) 00485 { 00486 //get current time 00487 // added by Gustavo Zamorano to include time -00488 QString sTime = QTime::currentTime ().toString (); +00488 TQString sTime = TQTime::currentTime ().toString (); 00489 00490 //clear status bar 00491 statusBar()->clear(); @@ -507,7 +507,7 @@ 00497 statusBar()->changeItem(sTime, 4); 00498 } 00499 -00500 void KShowMailApp::slotStatusHelpMsg(const QString &text) +00500 void KShowMailApp::slotStatusHelpMsg(const TQString &text) 00501 { 00502 statusBar()->message(text, 2000); 00503 } @@ -515,14 +515,14 @@ 00505 00506 00507 -00508 bool KShowMailApp::event(QEvent *e) +00508 bool KShowMailApp::event(TQEvent *e) 00509 { 00510 // to hide the taskbar button; any better solution ?? -00511 if ((e->type() == QEvent::Hide) && m_ConfigList.minimizesToTray() ) { +00511 if ((e->type() == TQEvent::Hide) && m_ConfigList.minimizesToTray() ) { 00512 hide (); 00513 } 00514 -00515 return(KMainWindow::event(e)); +00515 return(TDEMainWindow::event(e)); 00516 } 00517 00518 void KShowMailApp::slotSetupFilters () @@ -534,7 +534,7 @@ 00524 } 00525 m_state = configure; 00526 FilterDialog dlg (this, "Filters"); -00527 if (dlg.exec () == QDialog::Accepted) +00527 if (dlg.exec () == TQDialog::Accepted) 00528 m_actionSave->setEnabled (true); 00529 m_state = idle; 00530 } @@ -566,8 +566,8 @@ 00556 m_state = idle; 00557 00558 //set normal cursor -00559 while( QApplication::overrideCursor() ) -00560 QApplication::restoreOverrideCursor(); +00559 while( TQApplication::overrideCursor() ) +00560 TQApplication::restoreOverrideCursor(); 00561 00562 //show status message 00563 slotStatusMsg( i18n( "Ready." ) ); @@ -582,8 +582,8 @@ 00572 m_state = idle; 00573 00574 //set normal cursor -00575 while( QApplication::overrideCursor() ) -00576 QApplication::restoreOverrideCursor(); +00575 while( TQApplication::overrideCursor() ) +00576 TQApplication::restoreOverrideCursor(); 00577 00578 //show status message 00579 slotStatusMsg( i18n( "Ready." ) ); @@ -594,15 +594,15 @@ 00584 void KShowMailApp::slotNormalCursor( ) 00585 { 00586 //set normal cursor -00587 while( QApplication::overrideCursor() ) -00588 QApplication::restoreOverrideCursor(); +00587 while( TQApplication::overrideCursor() ) +00588 TQApplication::restoreOverrideCursor(); 00589 00590 } 00591 00592 void KShowMailApp::slotWaitingCursor( ) 00593 { 00594 //set waiting cursor -00595 QApplication::setOverrideCursor( Qt::waitCursor ); +00595 TQApplication::setOverrideCursor( TQt::waitCursor ); 00596 } 00597 00598 void KShowMailApp::slotRefreshReady( ) @@ -611,8 +611,8 @@ 00601 m_state = idle; 00602 00603 //set normal cursor -00604 while( QApplication::overrideCursor() ) -00605 QApplication::restoreOverrideCursor(); +00604 while( TQApplication::overrideCursor() ) +00605 TQApplication::restoreOverrideCursor(); 00606 00607 //refresh mail list view 00608 slotRefreshView(); -- cgit v1.2.1