diff options
Diffstat (limited to 'bibletime/frontend/cswordsetupinstallsourcesdialog.cpp')
-rw-r--r-- | bibletime/frontend/cswordsetupinstallsourcesdialog.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/bibletime/frontend/cswordsetupinstallsourcesdialog.cpp b/bibletime/frontend/cswordsetupinstallsourcesdialog.cpp index 504ab7d..a5cedbd 100644 --- a/bibletime/frontend/cswordsetupinstallsourcesdialog.cpp +++ b/bibletime/frontend/cswordsetupinstallsourcesdialog.cpp @@ -14,13 +14,13 @@ #include "util/scoped_resource.h" //Qt includes -#include <qlayout.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qmessagebox.h> -#include <qfileinfo.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqmessagebox.h> +#include <tqfileinfo.h> #include <klocale.h> @@ -28,96 +28,96 @@ namespace BookshelfManager { - const QString PROTO_FILE( i18n("Local") ); //Local path - const QString PROTO_FTP( i18n("Remote") ); //Remote path + const TQString PROTO_FILE( i18n("Local") ); //Local path + const TQString PROTO_FTP( i18n("Remote") ); //Remote path - CSwordSetupInstallSourcesDialog::CSwordSetupInstallSourcesDialog(/*QWidget *parent*/) -: QDialog() { + CSwordSetupInstallSourcesDialog::CSwordSetupInstallSourcesDialog(/*TQWidget *parent*/) +: TQDialog() { - QVBoxLayout* mainLayout = new QVBoxLayout( this ); + TQVBoxLayout* mainLayout = new TQVBoxLayout( this ); mainLayout->setMargin( 10 ); mainLayout->setSpacing( 5 ); - QHBoxLayout *captionLayout = new QHBoxLayout( mainLayout ); - QLabel *label = new QLabel( i18n("Caption"), this ); + TQHBoxLayout *captionLayout = new TQHBoxLayout( mainLayout ); + TQLabel *label = new TQLabel( i18n("Caption"), this ); captionLayout->addWidget( label ); - m_captionEdit = new QLineEdit( this ); + m_captionEdit = new TQLineEdit( this ); m_captionEdit->setText("Crosswire Bible Society"); captionLayout->addWidget( m_captionEdit ); mainLayout->addSpacing( 10 ); - QGridLayout* layout = new QGridLayout( mainLayout, 3, 3 ); + TQGridLayout* layout = new TQGridLayout( mainLayout, 3, 3 ); layout->setSpacing( 5 ); - label = new QLabel(i18n("Type"), this); + label = new TQLabel(i18n("Type"), this); layout->addWidget( label, 0, 0); - m_serverLabel = new QLabel(i18n("Server"), this); + m_serverLabel = new TQLabel(i18n("Server"), this); layout->addWidget( m_serverLabel, 0, 1); - label = new QLabel(i18n("Path"), this); + label = new TQLabel(i18n("Path"), this); layout->addWidget( label, 0, 2 ); - m_protocolCombo = new QComboBox( this ); + m_protocolCombo = new TQComboBox( this ); layout->addWidget(m_protocolCombo, 1, 0); m_protocolCombo->insertItem( PROTO_FTP ); m_protocolCombo->insertItem( PROTO_FILE ); - m_serverEdit = new QLineEdit( this ); + m_serverEdit = new TQLineEdit( this ); layout->addWidget( m_serverEdit, 1, 1 ); m_serverEdit->setText("ftp.crosswire.org"); - m_pathEdit = new QLineEdit( this ); + m_pathEdit = new TQLineEdit( this ); layout->addWidget( m_pathEdit, 1, 2 ); m_pathEdit->setText("/pub/sword/raw"); mainLayout->addSpacing( 10 ); - QHBoxLayout* buttonLayout = new QHBoxLayout( mainLayout ); + TQHBoxLayout* buttonLayout = new TQHBoxLayout( mainLayout ); buttonLayout->addStretch(); - QPushButton* okButton = new QPushButton( i18n("Ok"), this); - QPushButton* discardButton = new QPushButton( i18n("Discard"), this); + TQPushButton* okButton = new TQPushButton( i18n("Ok"), this); + TQPushButton* discardButton = new TQPushButton( i18n("Discard"), this); buttonLayout->addWidget( discardButton); buttonLayout->addWidget( okButton); buttonLayout->addStretch(); - connect( okButton, SIGNAL( clicked() ), this, SLOT( slotOk() ) ); - connect( discardButton, SIGNAL( clicked() ), this, SLOT( reject() ) ); - connect( m_protocolCombo, SIGNAL( activated(int) ), this, SLOT( slotProtocolChanged() ) ); + connect( okButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOk() ) ); + connect( discardButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( reject() ) ); + connect( m_protocolCombo, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotProtocolChanged() ) ); } void CSwordSetupInstallSourcesDialog::slotOk() { //run a few tests to validate the input first if ( m_captionEdit->text().stripWhiteSpace().isEmpty() ) { //no caption - QMessageBox::information( this, i18n( "Error" ), i18n("Please provide a caption."), QMessageBox::Retry); + TQMessageBox::information( this, i18n( "Error" ), i18n("Please provide a caption."), TQMessageBox::Retry); return; } BTInstallMgr iMgr; sword::InstallSource is = BTInstallMgr::Tool::RemoteConfig::source( &iMgr, m_captionEdit->text() ); - if ( (QString)is.caption.c_str() == m_captionEdit->text() ) { //source already exists - QMessageBox::information( this, i18n( "Error" ), - i18n("A source with this caption already exists.<br>Please provide a different caption."), QMessageBox::Retry); + if ( (TQString)is.caption.c_str() == m_captionEdit->text() ) { //source already exists + TQMessageBox::information( this, i18n( "Error" ), + i18n("A source with this caption already exists.<br>Please provide a different caption."), TQMessageBox::Retry); return; } if ( m_protocolCombo->currentText() == PROTO_FTP && m_serverEdit->text().stripWhiteSpace().isEmpty() ) { //no server name - QMessageBox::information( this, i18n( "Error" ), i18n("Please provide a server name."), QMessageBox::Retry); + TQMessageBox::information( this, i18n( "Error" ), i18n("Please provide a server name."), TQMessageBox::Retry); return; } if ( m_protocolCombo->currentText() == PROTO_FILE) { - const QFileInfo fi( m_pathEdit->text() ); + const TQFileInfo fi( m_pathEdit->text() ); if (!fi.exists() || !fi.isReadable()) { //no valid and readable path - QMessageBox::information( this, i18n( "Error" ), i18n("Please provide a valid, readable path."), QMessageBox::Retry); + TQMessageBox::information( this, i18n( "Error" ), i18n("Please provide a valid, readable path."), TQMessageBox::Retry); return; } else if ( m_pathEdit->text().isEmpty() ) { - QMessageBox::information( this, i18n( "Error" ), i18n("Please provide a path."), QMessageBox::Retry); + TQMessageBox::information( this, i18n( "Error" ), i18n("Please provide a path."), TQMessageBox::Retry); } } @@ -134,7 +134,7 @@ namespace BookshelfManager { m_serverLabel->hide(); m_serverEdit->hide(); - KURL url = KDirSelectDialog::selectDirectory(QString::null, true); + KURL url = KDirSelectDialog::selectDirectory(TQString::null, true); if (url.isValid()) { m_pathEdit->setText( url.path() ); } @@ -147,7 +147,7 @@ namespace BookshelfManager { util::scoped_ptr<CSwordSetupInstallSourcesDialog> dlg( new CSwordSetupInstallSourcesDialog() ); sword::InstallSource newSource(""); //empty, invalid Source - if (dlg->exec() == QDialog::Accepted) { + if (dlg->exec() == TQDialog::Accepted) { if (dlg->m_protocolCombo->currentText() == PROTO_FTP) { newSource.type = "FTP"; newSource.source = dlg->m_serverEdit->text().utf8(); |