diff options
Diffstat (limited to 'konversation/src/dccresumedialog.cpp')
-rw-r--r-- | konversation/src/dccresumedialog.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/konversation/src/dccresumedialog.cpp b/konversation/src/dccresumedialog.cpp index b8376b8..30b687b 100644 --- a/konversation/src/dccresumedialog.cpp +++ b/konversation/src/dccresumedialog.cpp @@ -13,10 +13,10 @@ #include "dccresumedialog.h" #include "dcctransferrecv.h" -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qvbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqvbox.h> #include <kdebug.h> #include <klocale.h> @@ -24,7 +24,7 @@ #include <kurlrequester.h> -DccResumeDialog::ReceiveAction DccResumeDialog::ask(DccTransferRecv* item, const QString& message, int enabledActions, ReceiveAction defaultAction) +DccResumeDialog::ReceiveAction DccResumeDialog::ask(DccTransferRecv* item, const TQString& message, int enabledActions, ReceiveAction defaultAction) { int enabledButtonCodes = 0; KDialogBase::ButtonCode defaultButtonCode = KDialogBase::Ok; @@ -54,7 +54,7 @@ DccResumeDialog::ReceiveAction DccResumeDialog::ask(DccTransferRecv* item, const return ra; } -DccResumeDialog::DccResumeDialog(DccTransferRecv* item, const QString& caption, const QString& message, int enabledActions, int enabledButtonCodes, +DccResumeDialog::DccResumeDialog(DccTransferRecv* item, const TQString& caption, const TQString& message, int enabledActions, int enabledButtonCodes, KDialogBase::ButtonCode defaultButtonCode) : KDialogBase(0, "dcc_resume_dialog", true, caption, enabledButtonCodes, defaultButtonCode, true) , m_item(item) @@ -64,40 +64,40 @@ DccResumeDialog::DccResumeDialog(DccTransferRecv* item, const QString& caption, if(enabledButtonCodes & KDialogBase::User1) setButtonText(KDialogBase::User1, i18n("&Resume")); - QFrame* page = new QFrame(this); - QVBoxLayout* pageLayout = new QVBoxLayout(page); + TQFrame* page = new TQFrame(this); + TQVBoxLayout* pageLayout = new TQVBoxLayout(page); pageLayout->setSpacing(spacingHint()); setMainWidget(page); - QLabel* labelMessage = new QLabel(page); + TQLabel* labelMessage = new TQLabel(page); labelMessage->setText(message); m_urlreqFileURL = new KURLRequester(m_item->getFileURL().prettyURL(), page); - connect(m_urlreqFileURL, SIGNAL(textChanged(const QString&)), this, SLOT(updateDialogButtons())); + connect(m_urlreqFileURL, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateDialogButtons())); pageLayout->addWidget(labelMessage); pageLayout->addWidget(m_urlreqFileURL); if(m_enabledActions & RA_Rename) { - QFrame* filePathToolsFrame = new QFrame(page); - QHBoxLayout* filePathToolsLayout = new QHBoxLayout(filePathToolsFrame); + TQFrame* filePathToolsFrame = new TQFrame(page); + TQHBoxLayout* filePathToolsLayout = new TQHBoxLayout(filePathToolsFrame); filePathToolsLayout->setSpacing(spacingHint()); - QPushButton* btnDefaultName = new QPushButton(i18n("O&riginal Filename"),filePathToolsFrame); - QPushButton* btnSuggestNewName = new QPushButton(i18n("Suggest &New Filename"),filePathToolsFrame); - filePathToolsLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding)); + TQPushButton* btnDefaultName = new TQPushButton(i18n("O&riginal Filename"),filePathToolsFrame); + TQPushButton* btnSuggestNewName = new TQPushButton(i18n("Suggest &New Filename"),filePathToolsFrame); + filePathToolsLayout->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding)); filePathToolsLayout->addWidget(btnDefaultName); filePathToolsLayout->addWidget(btnSuggestNewName); - connect(btnSuggestNewName, SIGNAL(clicked()), this, SLOT(suggestNewName())); - connect(btnDefaultName, SIGNAL(clicked()), this, SLOT(setDefaultName())); + connect(btnSuggestNewName, TQT_SIGNAL(clicked()), this, TQT_SLOT(suggestNewName())); + connect(btnDefaultName, TQT_SIGNAL(clicked()), this, TQT_SLOT(setDefaultName())); pageLayout->addWidget(filePathToolsFrame); } updateDialogButtons(); - setInitialSize(QSize(500, sizeHint().height())); + setInitialSize(TQSize(500, sizeHint().height())); } @@ -146,8 +146,8 @@ void DccResumeDialog::updateDialogButtons() // slot // taken and adapted from kio::renamedlg.cpp void DccResumeDialog::suggestNewName() // slot { - QString dotSuffix, suggestedName; - QString basename = m_urlreqFileURL->url().section("/", -1); + TQString dotSuffix, suggestedName; + TQString basename = m_urlreqFileURL->url().section("/", -1); KURL baseURL(m_urlreqFileURL->url().section("/", 0, -2)); int index = basename.find( '.' ); @@ -160,7 +160,7 @@ void DccResumeDialog::suggestNewName() // slot int pos = basename.findRev( '_' ); if(pos != -1 ) { - QString tmp = basename.mid( pos+1 ); + TQString tmp = basename.mid( pos+1 ); bool ok; int number = tmp.toInt( &ok ); if ( !ok ) // ok there is no number @@ -170,7 +170,7 @@ void DccResumeDialog::suggestNewName() // slot else { // yes there's already a number behind the _ so increment it by one - basename.replace( pos+1, tmp.length(), QString::number(number+1) ); + basename.replace( pos+1, tmp.length(), TQString::number(number+1) ); suggestedName = basename + dotSuffix; } } @@ -182,7 +182,7 @@ void DccResumeDialog::suggestNewName() // slot // TODO: network transparency. However, using NetAccess from a modal dialog // could be a problem, no? (given that it uses a modal widget itself....) if ( baseURL.isLocalFile() ) - exists = QFileInfo( baseURL.path(+1) + suggestedName ).exists(); + exists = TQFileInfo( baseURL.path(+1) + suggestedName ).exists(); m_urlreqFileURL->setURL( baseURL.path(+1) + suggestedName ); |