summaryrefslogtreecommitdiffstats
path: root/bibletime/frontend/cswordsetupdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bibletime/frontend/cswordsetupdialog.cpp')
-rw-r--r--bibletime/frontend/cswordsetupdialog.cpp246
1 files changed, 123 insertions, 123 deletions
diff --git a/bibletime/frontend/cswordsetupdialog.cpp b/bibletime/frontend/cswordsetupdialog.cpp
index d2b6950..7bcde98 100644
--- a/bibletime/frontend/cswordsetupdialog.cpp
+++ b/bibletime/frontend/cswordsetupdialog.cpp
@@ -24,15 +24,15 @@
#include "util/scoped_resource.h"
//QT includes
-#include <qdir.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qwidgetstack.h>
-#include <qfileinfo.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qdict.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqwidgetstack.h>
+#include <tqfileinfo.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqdict.h>
//KDE includes
#include <kapplication.h>
@@ -55,8 +55,8 @@ using namespace sword;
namespace BookshelfManager {
- CSwordSetupDialog::CSwordSetupDialog(QWidget *parent, const char *name )
-: KDialogBase(IconList, i18n("Bookshelf Manager"), Ok, Ok, parent, name, true, true, QString::null, QString::null, QString::null),
+ CSwordSetupDialog::CSwordSetupDialog(TQWidget *parent, const char *name )
+: KDialogBase(IconList, i18n("Bookshelf Manager"), Ok, Ok, parent, name, true, true, TQString::null, TQString::null, TQString::null),
m_removeModuleListView(0),
m_installModuleListPage(0),
m_installModuleListView(0),
@@ -72,75 +72,75 @@ namespace BookshelfManager {
}
void CSwordSetupDialog::initSwordConfig() {
- QFrame* page = m_swordConfigPage = addPage(i18n("Bookshelf path(s)"), QString::null, SmallIcon("bt_swordconfig",32));
+ TQFrame* page = m_swordConfigPage = addPage(i18n("Bookshelf path(s)"), TQString::null, SmallIcon("bt_swordconfig",32));
page->setMinimumSize(500,400);
- QGridLayout* layout = new QGridLayout(page, 6, 4);
+ TQGridLayout* layout = new TQGridLayout(page, 6, 4);
layout->setMargin(5);
layout->setSpacing(10);
layout->setColStretch(0,1);
layout->setRowStretch(5,1);
- QLabel* mainLabel = CToolClass::explanationLabel(page,
+ TQLabel* mainLabel = CToolClass::explanationLabel(page,
i18n("Configure bookshelf path(s)"),
i18n("You can store your bookshelfs in one or more directories, which you can specify here.")
);
layout->addMultiCellWidget(mainLabel, 0, 0, 0, 3);
- QString swordConfPath = BTInstallMgr::Tool::LocalConfig::swordConfigFilename();
- QLabel* confPathLabel = new QLabel(i18n("Your bookshelf configuration file is <b>%1</b>").arg(swordConfPath), page);
+ TQString swordConfPath = BTInstallMgr::Tool::LocalConfig::swordConfigFilename();
+ TQLabel* confPathLabel = new TQLabel(i18n("Your bookshelf configuration file is <b>%1</b>").arg(swordConfPath), page);
layout->addMultiCellWidget(confPathLabel, 1,1,0,3);
- m_swordPathListBox = new QListView(page);
+ m_swordPathListBox = new TQListView(page);
// m_swordPathListBox->setFullWidth(true);
m_swordPathListBox->addColumn(i18n("Path to bookshelf"));
- connect(m_swordPathListBox, SIGNAL(selectionChanged()), this, SLOT(slot_swordPathSelected()));
+ connect(m_swordPathListBox, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slot_swordPathSelected()));
layout->addMultiCellWidget(m_swordPathListBox, 2,5,0,1);
- m_swordEditPathButton = new QPushButton(i18n("Edit Entry"), page);
+ m_swordEditPathButton = new TQPushButton(i18n("Edit Entry"), page);
m_swordEditPathButton->setIconSet(SmallIcon("edit", 16));
- connect(m_swordEditPathButton, SIGNAL(clicked()), this, SLOT(slot_swordEditClicked()));
+ connect(m_swordEditPathButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_swordEditClicked()));
layout->addWidget(m_swordEditPathButton, 2, 3);
- m_swordAddPathButton = new QPushButton(i18n("Add Entry"), page);
+ m_swordAddPathButton = new TQPushButton(i18n("Add Entry"), page);
m_swordAddPathButton->setIconSet(SmallIcon("edit_add", 16));
- connect(m_swordAddPathButton, SIGNAL(clicked()), this, SLOT(slot_swordAddClicked()));
+ connect(m_swordAddPathButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_swordAddClicked()));
layout->addWidget(m_swordAddPathButton, 3,3);
- m_swordRemovePathButton = new QPushButton(i18n("Remove Entry"), page);
+ m_swordRemovePathButton = new TQPushButton(i18n("Remove Entry"), page);
m_swordRemovePathButton->setIconSet(SmallIcon("editdelete", 16));
- connect(m_swordRemovePathButton, SIGNAL(clicked()), this, SLOT(slot_swordRemoveClicked()));
+ connect(m_swordRemovePathButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_swordRemoveClicked()));
layout->addWidget(m_swordRemovePathButton, 4,3);
setupSwordPathListBox();
}
void CSwordSetupDialog::initInstall() {
- m_installPage = addPage(i18n("Install/Update works"), QString::null, SmallIcon("bt_bible",32));
+ m_installPage = addPage(i18n("Install/Update works"), TQString::null, SmallIcon("bt_bible",32));
- QVBoxLayout* vboxlayout = new QVBoxLayout(m_installPage);
- QHBoxLayout* hboxlayout = new QHBoxLayout();
+ TQVBoxLayout* vboxlayout = new TQVBoxLayout(m_installPage);
+ TQHBoxLayout* hboxlayout = new TQHBoxLayout();
hboxlayout->setAutoAdd( true );
vboxlayout->addLayout(hboxlayout);
- m_installWidgetStack = new QWidgetStack(m_installPage);
+ m_installWidgetStack = new TQWidgetStack(m_installPage);
hboxlayout->addWidget(m_installWidgetStack);
- m_installSourcePage = new QWidget(0);
+ m_installSourcePage = new TQWidget(0);
m_installWidgetStack->addWidget(m_installSourcePage);
// m_installSourcePage->setMinimumSize(500,400);
- QGridLayout* layout = new QGridLayout(m_installSourcePage, 7, 3);
+ TQGridLayout* layout = new TQGridLayout(m_installSourcePage, 7, 3);
layout->setMargin(5);
layout->setSpacing(10);
layout->setRowStretch(6,5);
layout->setColStretch(0,5);
- QLabel* installLabel = CToolClass::explanationLabel(m_installSourcePage,
+ TQLabel* installLabel = CToolClass::explanationLabel(m_installSourcePage,
i18n("Install/update works - Step 1"),
i18n("Please choose a (local or remote) library and a bookshelf path to install the work(s) to. \
After that step click on the connect button.<br/>\
@@ -149,100 +149,100 @@ the module remote installation feature!</b>")
);
layout->addMultiCellWidget(installLabel, 0,0,0,2);
- QLabel* sourceHeadingLabel = new QLabel(QString("<b>%1</b>").arg(i18n("Select library")), m_installSourcePage);
+ TQLabel* sourceHeadingLabel = new TQLabel(TQString("<b>%1</b>").arg(i18n("Select library")), m_installSourcePage);
layout->addMultiCellWidget(sourceHeadingLabel, 1,1,0,1);
- m_sourceCombo = new QComboBox(m_installSourcePage);
+ m_sourceCombo = new TQComboBox(m_installSourcePage);
layout->addWidget(m_sourceCombo, 2, 0);
- QPushButton* deleteSourceButton = new QPushButton(i18n("Delete library"), m_installSourcePage);
+ TQPushButton* deleteSourceButton = new TQPushButton(i18n("Delete library"), m_installSourcePage);
deleteSourceButton->setIconSet(SmallIcon("remove", 16));
- connect(deleteSourceButton, SIGNAL(clicked()), SLOT(slot_installDeleteSource()));
+ connect(deleteSourceButton, TQT_SIGNAL(clicked()), TQT_SLOT(slot_installDeleteSource()));
layout->addWidget(deleteSourceButton, 2, 1, Qt::AlignLeft);
- QPushButton* addSourceButton = new QPushButton(i18n("Add library"), m_installSourcePage);
+ TQPushButton* addSourceButton = new TQPushButton(i18n("Add library"), m_installSourcePage);
addSourceButton->setIconSet(SmallIcon("folder_new", 16));
- connect(addSourceButton, SIGNAL(clicked()), SLOT(slot_installAddSource()));
+ connect(addSourceButton, TQT_SIGNAL(clicked()), TQT_SLOT(slot_installAddSource()));
layout->addWidget(addSourceButton, 2, 2, Qt::AlignLeft);
- m_sourceLabel = new QLabel(m_installSourcePage);
+ m_sourceLabel = new TQLabel(m_installSourcePage);
layout->addMultiCellWidget(m_sourceLabel, 3,3,0,1);
- QLabel* targetHeadingLabel = new QLabel(QString("<b>%1</b>").arg(i18n("Select bookshelf path")), m_installSourcePage);
+ TQLabel* targetHeadingLabel = new TQLabel(TQString("<b>%1</b>").arg(i18n("Select bookshelf path")), m_installSourcePage);
layout->addMultiCellWidget(targetHeadingLabel, 4,4,0,1);
- m_targetCombo = new QComboBox(m_installSourcePage);
+ m_targetCombo = new TQComboBox(m_installSourcePage);
layout->addWidget(m_targetCombo, 5, 0);
- m_targetLabel = new QLabel(m_installSourcePage);
+ m_targetLabel = new TQLabel(m_installSourcePage);
layout->addMultiCellWidget(m_targetLabel, 6,6,0,0,Qt::AlignTop);
//part beloew main layout with the back/next buttons
- QHBoxLayout* myHBox = new QHBoxLayout();
+ TQHBoxLayout* myHBox = new TQHBoxLayout();
vboxlayout->addLayout(myHBox);
- m_installBackButton = new QPushButton(i18n("Back"), m_installPage);
+ m_installBackButton = new TQPushButton(i18n("Back"), m_installPage);
m_installBackButton->setIconSet(SmallIcon("back",16));
myHBox->addWidget(m_installBackButton);
myHBox->addSpacing(10);
myHBox->addStretch(5);
- m_installContinueButton = new QPushButton(i18n("Connect to library"), m_installPage);
+ m_installContinueButton = new TQPushButton(i18n("Connect to library"), m_installPage);
m_installContinueButton->setIconSet(SmallIcon("forward",16));
- connect(m_installContinueButton, SIGNAL(clicked()), this, SLOT(slot_connectToSource()));
+ connect(m_installContinueButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_connectToSource()));
myHBox->addWidget(m_installContinueButton);
m_installBackButton->setEnabled(false);
- connect(m_sourceCombo, SIGNAL( highlighted(const QString&) ), SLOT( slot_sourceSelected( const QString&) ));
- connect(m_targetCombo, SIGNAL( highlighted(const QString&) ), SLOT( slot_targetSelected( const QString&) ));
+ connect(m_sourceCombo, TQT_SIGNAL( highlighted(const TQString&) ), TQT_SLOT( slot_sourceSelected( const TQString&) ));
+ connect(m_targetCombo, TQT_SIGNAL( highlighted(const TQString&) ), TQT_SLOT( slot_targetSelected( const TQString&) ));
populateInstallCombos();
slot_sourceSelected( m_sourceCombo->currentText() );
}
void CSwordSetupDialog::initRemove() {
- QFrame* page = m_removePage = addPage(i18n("Remove works"), QString::null, SmallIcon("edittrash",32));
+ TQFrame* page = m_removePage = addPage(i18n("Remove works"), TQString::null, SmallIcon("edittrash",32));
page->setMinimumSize(500,400);
- QGridLayout* layout = new QGridLayout(page, 4, 4);
+ TQGridLayout* layout = new TQGridLayout(page, 4, 4);
layout->setMargin(5);
layout->setSpacing(10);
layout->setColStretch(1,1);
layout->setRowStretch(2,1);
- QLabel* mainLabel= CToolClass::explanationLabel(page,
+ TQLabel* mainLabel= CToolClass::explanationLabel(page,
i18n("Remove installed work(s)"),
i18n("This dialog lets you remove installed works from your system. Choose the modules and then click on the remove button.")
);
layout->addMultiCellWidget(mainLabel, 0, 0, 0, 3);
- QLabel* headingLabel = new QLabel(QString("<b>%1</b>").arg(i18n("Select works to be uninstalled")), page);
+ TQLabel* headingLabel = new TQLabel(TQString("<b>%1</b>").arg(i18n("Select works to be uninstalled")), page);
layout->addMultiCellWidget(headingLabel, 1, 1, 0, 3);
m_removeModuleListView = new CSwordSetupModuleListView(page, false);
layout->addMultiCellWidget( m_removeModuleListView, 2,2,0,3);
- m_removeRemoveButton = new QPushButton(i18n("Remove selected work(s)"), page);
+ m_removeRemoveButton = new TQPushButton(i18n("Remove selected work(s)"), page);
m_removeRemoveButton->setIconSet( SmallIcon("edittrash", 16) );
layout->addWidget(m_removeRemoveButton, 3, 3, Qt::AlignRight);
- connect(m_removeRemoveButton, SIGNAL(clicked()),
- this, SLOT(slot_doRemoveModules()));
+ connect(m_removeRemoveButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_doRemoveModules()));
populateRemoveModuleListView();
}
void CSwordSetupDialog::initManageIndices()
{
- QFrame* page = m_manageIndiciesPage = addPage(i18n("Manage search indicies"),
- QString::null, SmallIcon("filefind",32));
+ TQFrame* page = m_manageIndiciesPage = addPage(i18n("Manage search indicies"),
+ TQString::null, SmallIcon("filefind",32));
page->setMinimumSize(500,400);
- QVBoxLayout* box = new QVBoxLayout(page, 4, 4);
+ TQVBoxLayout* box = new TQVBoxLayout(page, 4, 4);
CManageIndicesWidget* mi = new CManageIndicesWidget(page);
box->addWidget(mi);
}
@@ -255,10 +255,10 @@ the module remote installation feature!</b>")
void CSwordSetupDialog::writeSwordConfig() {
if (m_swordSetupChanged && m_swordPathListBox->childCount()) {
- QStringList targets;
- QListViewItemIterator it( m_swordPathListBox );
+ TQStringList targets;
+ TQListViewItemIterator it( m_swordPathListBox );
while ( it.current() ) {
- QListViewItem *item = it.current();
+ TQListViewItem *item = it.current();
if (!item->text(0).isEmpty()) {
targets << item->text(0);
}
@@ -293,7 +293,7 @@ the module remote installation feature!</b>")
BTInstallMgr::Tool::RemoteConfig::initConfig();
- QStringList list;
+ TQStringList list;
{
BTInstallMgr mgr;
list = BTInstallMgr::Tool::RemoteConfig::sourceList(&mgr);
@@ -312,14 +312,14 @@ the module remote installation feature!</b>")
}
BTInstallMgr mgr;
- for (QStringList::iterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::iterator it = list.begin(); it != list.end(); ++it) {
sword::InstallSource is = BTInstallMgr::Tool::RemoteConfig::source(&mgr, *it);
if (BTInstallMgr::Tool::RemoteConfig::isRemoteSource(&is)) {
m_sourceCombo->insertItem( i18n("[Remote]") + " " + *it ); //remote source
}
else { // local source
- QFileInfo fi( is.directory.c_str() );
+ TQFileInfo fi( is.directory.c_str() );
if (fi.isDir() && fi.isReadable()) {
m_sourceCombo->insertItem( i18n("[Local]") + " " + *it );
}
@@ -330,7 +330,7 @@ the module remote installation feature!</b>")
//list = (m_targetCombo->count()) ? m_swordPathListBox : BTInstallMgr::Tool::LocalConfig::targetList();
if (m_targetCombo->count()) { //we already read in the list once, we have to use the Sword paths list items now because this list is newer
list.clear();
- QListViewItemIterator it2( m_swordPathListBox );
+ TQListViewItemIterator it2( m_swordPathListBox );
while (it2.current()) {
list << it2.current()->text(0);
@@ -342,8 +342,8 @@ the module remote installation feature!</b>")
}
m_targetCombo->clear();
- for (QStringList::iterator it = list.begin(); it != list.end(); ++it) {
- QFileInfo fi(*it);
+ for (TQStringList::iterator it = list.begin(); it != list.end(); ++it) {
+ TQFileInfo fi(*it);
if (fi.isDir() && fi.isWritable()) {
m_targetCombo->insertItem( *it );
}
@@ -359,11 +359,11 @@ the module remote installation feature!</b>")
}
- void CSwordSetupDialog::slot_sourceSelected(const QString &sourceName) {
+ void CSwordSetupDialog::slot_sourceSelected(const TQString &sourceName) {
//remove status parta
- QString source = sourceName;
+ TQString source = sourceName;
- QString rep = i18n("[Local]") + " ";
+ TQString rep = i18n("[Local]") + " ";
int i = source.find(rep);
if (i>=0) {
source.remove(i, rep.length());
@@ -375,14 +375,14 @@ the module remote installation feature!</b>")
}
BTInstallMgr mgr;
- QString url;
+ TQString url;
sword::InstallSource is = BTInstallMgr::Tool::RemoteConfig::source(&mgr, source) ;
if (BTInstallMgr::Tool::RemoteConfig::isRemoteSource(&is)) {
- url = QString("ftp://%1%2").arg(is.source.c_str()).arg(is.directory.c_str());
+ url = TQString("ftp://%1%2").arg(is.source.c_str()).arg(is.directory.c_str());
}
else {
- url = QString("%1").arg(is.directory.c_str());
+ url = TQString("%1").arg(is.directory.c_str());
}
m_sourceLabel->setText( url );
@@ -390,7 +390,7 @@ the module remote installation feature!</b>")
}
- void CSwordSetupDialog::slot_targetSelected(const QString &targetName) {
+ void CSwordSetupDialog::slot_targetSelected(const TQString &targetName) {
m_targetLabel->setText( m_targetMap[targetName] );
target = m_targetMap[targetName];
}
@@ -398,23 +398,23 @@ the module remote installation feature!</b>")
void CSwordSetupDialog::slot_doRemoveModules() {
- QStringList moduleList = m_removeModuleListView->selectedModules();
+ TQStringList moduleList = m_removeModuleListView->selectedModules();
if ( moduleList.empty() ) {
return; //no message, just do nothing
}
- const QString message = i18n("You selected the following work(s): %1.\n\n"
+ const TQString message = i18n("You selected the following work(s): %1.\n\n"
"Do you really want to remove them from your system?").arg(moduleList.join(", "));
if ((KMessageBox::warningYesNo(0, message, i18n("Warning")) == KMessageBox::Yes)) { //Yes was pressed.
sword::InstallMgr installMgr;
- QDict<sword::SWMgr> mgrDict; //maps config paths to SWMgr objects
+ TQDict<sword::SWMgr> mgrDict; //maps config paths to SWMgr objects
- for ( QStringList::Iterator it = moduleList.begin(); it != moduleList.end(); ++it ) {
+ for ( TQStringList::Iterator it = moduleList.begin(); it != moduleList.end(); ++it ) {
if (CSwordModuleInfo* m = backend()->findModuleByName(*it)) { //module found?
- QString prefixPath = m->config(CSwordModuleInfo::AbsoluteDataPath) + "/";
- QString dataPath = m->config(CSwordModuleInfo::DataPath);
+ TQString prefixPath = m->config(CSwordModuleInfo::AbsoluteDataPath) + "/";
+ TQString dataPath = m->config(CSwordModuleInfo::DataPath);
if (dataPath.left(2) == "./") {
dataPath = dataPath.mid(2);
@@ -424,7 +424,7 @@ the module remote installation feature!</b>")
prefixPath = prefixPath.remove( prefixPath.find(dataPath), dataPath.length() );
}
else { //fall back to default Sword config path
- prefixPath = QString::fromLatin1(backend()->prefixPath);
+ prefixPath = TQString::fromLatin1(backend()->prefixPath);
}
sword::SWMgr* mgr = mgrDict[ prefixPath ];
@@ -471,7 +471,7 @@ the module remote installation feature!</b>")
m_removeModuleListView->finish();
}
- const bool CSwordSetupDialog::refreshRemoteModuleCache( const QString& sourceName ) {
+ const bool CSwordSetupDialog::refreshRemoteModuleCache( const TQString& sourceName ) {
if (m_refreshedRemoteSources) { //the module info is up-to-date
return true;
}
@@ -481,7 +481,7 @@ the module remote installation feature!</b>")
sword::InstallSource is = BTInstallMgr::Tool::RemoteConfig::source(&iMgr, sourceName);
bool success = false;
- m_progressDialog = new KProgressDialog(this, 0, i18n("Download"), QString::null, true);
+ m_progressDialog = new KProgressDialog(this, 0, i18n("Download"), TQString::null, true);
m_progressDialog->progressBar()->setTotalSteps(100);
m_progressDialog->setLabel( i18n("Downloading library information...") );
m_progressDialog->setMinimumDuration(0); //show immediately
@@ -490,12 +490,12 @@ the module remote installation feature!</b>")
KApplication::kApplication()->processEvents();
connect(
- m_progressDialog, SIGNAL(cancelClicked()),
- SLOT(slot_moduleRefreshProgressCancelClicked())
+ m_progressDialog, TQT_SIGNAL(cancelClicked()),
+ TQT_SLOT(slot_moduleRefreshProgressCancelClicked())
);
connect(
- &iMgr, SIGNAL(completed(const int, const int)),
- SLOT(slot_moduleRefreshCompleted(const int, const int))
+ &iMgr, TQT_SIGNAL(completed(const int, const int)),
+ TQT_SLOT(slot_moduleRefreshCompleted(const int, const int))
);
@@ -521,7 +521,7 @@ the module remote installation feature!</b>")
return success;
}
- bool CSwordSetupDialog::populateInstallModuleListView( const QString& sourceName ) {
+ bool CSwordSetupDialog::populateInstallModuleListView( const TQString& sourceName ) {
KApplication::kApplication()->processEvents();
Q_ASSERT(m_installModuleListView);
if (!m_installModuleListView) { // this may be an update after removing modules
@@ -596,7 +596,7 @@ the module remote installation feature!</b>")
(*it),
installedModule
? installedModule->config(CSwordModuleInfo::ModuleVersion)
- : QString::null
+ : TQString::null
);
}
m_installModuleListView->finish();
@@ -605,13 +605,13 @@ the module remote installation feature!</b>")
void CSwordSetupDialog::slot_connectToSource() {
if (!m_installModuleListPage) { //the widgets are not yet created
- m_installModuleListPage = new QWidget(0);
+ m_installModuleListPage = new TQWidget(0);
- QGridLayout* layout = new QGridLayout(m_installModuleListPage, 7, 2);
+ TQGridLayout* layout = new TQGridLayout(m_installModuleListPage, 7, 2);
layout->setMargin(5);
layout->setSpacing(10);
- QLabel* installLabel = CToolClass::explanationLabel(m_installModuleListPage,
+ TQLabel* installLabel = CToolClass::explanationLabel(m_installModuleListPage,
i18n("Install/update works - Step 2"),
i18n("Please choose the works which should be installed and/or updated and click the install button.")
);
@@ -630,21 +630,21 @@ the module remote installation feature!</b>")
layout->setColStretch(0,5);
layout->setRowStretch(1,5);
- connect(m_installModuleListView, SIGNAL(selectedModulesChanged()), SLOT(slot_installModulesChanged()));
+ connect(m_installModuleListView, TQT_SIGNAL(selectedModulesChanged()), TQT_SLOT(slot_installModulesChanged()));
}
if (populateInstallModuleListView( currentInstallSource() ) ){
//code valid for already existing and newly created widgets
- disconnect( m_installContinueButton, SIGNAL(clicked()), this, SLOT(slot_connectToSource()));
- connect( m_installContinueButton, SIGNAL(clicked()), this, SLOT(slot_installModules()));
+ disconnect( m_installContinueButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_connectToSource()));
+ connect( m_installContinueButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_installModules()));
m_installContinueButton->setText(i18n("Install works"));
m_installContinueButton->setEnabled(false);
m_installWidgetStack->raiseWidget(m_installModuleListPage);
- connect( m_installBackButton, SIGNAL(clicked()), this, SLOT(slot_showInstallSourcePage()));
+ connect( m_installBackButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_showInstallSourcePage()));
m_installBackButton->setEnabled(true);
}
}
@@ -653,7 +653,7 @@ the module remote installation feature!</b>")
sword::InstallSource newSource = CSwordSetupInstallSourcesDialog::getSource();
- if ( !((QString)newSource.type.c_str()).isEmpty() ) { // we have a valid source to add
+ if ( !((TQString)newSource.type.c_str()).isEmpty() ) { // we have a valid source to add
BTInstallMgr::Tool::RemoteConfig::addSource( &newSource );
}
@@ -684,13 +684,13 @@ the module remote installation feature!</b>")
// m_installBackButton->setEnabled(false);
//first get all chosen modules
- QStringList moduleList = m_installModuleListView->selectedModules();
+ TQStringList moduleList = m_installModuleListView->selectedModules();
Q_ASSERT(moduleList.count() != 0);
if (moduleList.count() == 0) { // no modules selected
return;
}
- const QString message = i18n("You selected the following works: %1.\n\n\
+ const TQString message = i18n("You selected the following works: %1.\n\n\
Do you really want to install them on your system?").arg(moduleList.join(", "));
if ((KMessageBox::warningYesNo(0, message, i18n("Warning")) == KMessageBox::Yes)) { //Yes was pressed.
@@ -699,10 +699,10 @@ the module remote installation feature!</b>")
sword::InstallSource is = BTInstallMgr::Tool::RemoteConfig::source(&iMgr, currentInstallSource());
qWarning("installing from %s/%s", is.source.c_str(), is.directory.c_str());
- QString target = m_targetCombo->currentText();
+ TQString target = m_targetCombo->currentText();
//make sure target/mods.d and target/modules exist
- QDir dir(target.latin1());
+ TQDir dir(target.latin1());
if (!dir.exists()) {
dir.mkdir(target, true);
}
@@ -717,7 +717,7 @@ the module remote installation feature!</b>")
//module are removed in this section of code
m_installedModuleCount = 0;
- m_progressDialog = new KProgressDialog(this, 0, i18n("Download of work(s)"), QString::null, true);
+ m_progressDialog = new KProgressDialog(this, 0, i18n("Download of work(s)"), TQString::null, true);
m_progressDialog->progressBar()->setTotalSteps(100 * moduleList.count());
m_progressDialog->setMinimumDuration(0); //show immediately
m_progressDialog->setAutoClose(false);
@@ -725,15 +725,15 @@ the module remote installation feature!</b>")
KApplication::kApplication()->processEvents();
connect(
- m_progressDialog, SIGNAL(cancelClicked()),
- SLOT(slot_installProgressCancelClicked())
+ m_progressDialog, TQT_SIGNAL(cancelClicked()),
+ TQT_SLOT(slot_installProgressCancelClicked())
);
connect(
- &iMgr, SIGNAL(completed(const int, const int)),
- SLOT(installCompleted(const int, const int))
+ &iMgr, TQT_SIGNAL(completed(const int, const int)),
+ TQT_SLOT(installCompleted(const int, const int))
);
- for ( QStringList::Iterator it = moduleList.begin(); (it != moduleList.end()) && !m_progressDialog->wasCancelled(); ++it, ++m_installedModuleCount ) {
+ for ( TQStringList::Iterator it = moduleList.begin(); (it != moduleList.end()) && !m_progressDialog->wasCancelled(); ++it, ++m_installedModuleCount ) {
qWarning("installing %s", (*it).latin1());
m_installingModule = *it;
@@ -742,8 +742,8 @@ the module remote installation feature!</b>")
CSwordModuleInfo* m = backend()->findModuleByName(*it);
Q_ASSERT(!m);
if (m) { //module found?
- QString prefixPath = m->config(CSwordModuleInfo::AbsoluteDataPath) + "/";
- QString dataPath = m->config(CSwordModuleInfo::DataPath);
+ TQString prefixPath = m->config(CSwordModuleInfo::AbsoluteDataPath) + "/";
+ TQString dataPath = m->config(CSwordModuleInfo::DataPath);
if (dataPath.left(2) == "./") {
dataPath = dataPath.mid(2);
}
@@ -753,7 +753,7 @@ the module remote installation feature!</b>")
//prefixPath = prefixPath.replace(dataPath, ""); //old code working with Qt 3.2
}
else {
- prefixPath = QString::fromLatin1(backend()->prefixPath);
+ prefixPath = TQString::fromLatin1(backend()->prefixPath);
}
sword::SWMgr mgr(prefixPath.latin1());
@@ -796,8 +796,8 @@ the module remote installation feature!</b>")
}
void CSwordSetupDialog::slot_showInstallSourcePage() {
- connect( m_installContinueButton, SIGNAL(clicked()), this, SLOT(slot_connectToSource()));
- disconnect( m_installContinueButton, SIGNAL(clicked()), this, SLOT(slot_installModules()));
+ connect( m_installContinueButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_connectToSource()));
+ disconnect( m_installContinueButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_installModules()));
m_installBackButton->setEnabled(false);
m_installContinueButton->setText(i18n("Connect to library"));
@@ -807,10 +807,10 @@ the module remote installation feature!</b>")
}
void CSwordSetupDialog::slot_swordEditClicked() {
- if (QListViewItem* i = m_swordPathListBox->currentItem()) {
+ if (TQListViewItem* i = m_swordPathListBox->currentItem()) {
KURL url = KDirSelectDialog::selectDirectory(i->text(0), true);
if (url.isValid()) {
- const QFileInfo fi( url.path() );
+ const TQFileInfo fi( url.path() );
if (!fi.exists() || !fi.isWritable()) {
const int result = KMessageBox::warningYesNo(this, i18n("This directory is not writable, so works \
can not be installed here using BibleTime. \
@@ -829,9 +829,9 @@ the module remote installation feature!</b>")
}
void CSwordSetupDialog::slot_swordAddClicked() {
- KURL url = KDirSelectDialog::selectDirectory(QString::null, true);
+ KURL url = KDirSelectDialog::selectDirectory(TQString::null, true);
if (url.isValid()) {
- const QFileInfo fi( url.path() );
+ const TQFileInfo fi( url.path() );
if (!fi.exists() || !fi.isWritable()) {
const int result = KMessageBox::warningYesNo(this, i18n("This directory is not writable, \
so works can not be installed here using BibleTime. \
@@ -840,7 +840,7 @@ the module remote installation feature!</b>")
return;
}
}
- (void)new QListViewItem(m_swordPathListBox, url.path());
+ (void)new TQListViewItem(m_swordPathListBox, url.path());
m_swordSetupChanged = true;
writeSwordConfig(); //to make sure other parts work with the new setting
populateInstallCombos(); //update target list bof on install page
@@ -849,7 +849,7 @@ the module remote installation feature!</b>")
}
void CSwordSetupDialog::slot_swordRemoveClicked() {
- QListViewItem* i = m_swordPathListBox->currentItem();
+ TQListViewItem* i = m_swordPathListBox->currentItem();
if (i) {
delete i;
@@ -861,14 +861,14 @@ the module remote installation feature!</b>")
}
void CSwordSetupDialog::setupSwordPathListBox() {
- QStringList targets = BTInstallMgr::Tool::LocalConfig::targetList();
+ TQStringList targets = BTInstallMgr::Tool::LocalConfig::targetList();
m_swordPathListBox->clear();
- for (QStringList::iterator it = targets.begin(); it != targets.end(); ++it) {
+ for (TQStringList::iterator it = targets.begin(); it != targets.end(); ++it) {
if ((*it).isEmpty()) {
continue;
}
- new QListViewItem(m_swordPathListBox, *it);
+ new TQListViewItem(m_swordPathListBox, *it);
}
m_swordPathListBox->setCurrentItem( m_swordPathListBox->firstChild() );
}
@@ -877,9 +877,9 @@ the module remote installation feature!</b>")
m_swordEditPathButton->setEnabled( m_swordPathListBox->currentItem() );
}
- const QString CSwordSetupDialog::currentInstallSource() {
- QString source = m_sourceCombo->currentText();
- QString rep = i18n("[Local]") + " ";
+ const TQString CSwordSetupDialog::currentInstallSource() {
+ TQString source = m_sourceCombo->currentText();
+ TQString rep = i18n("[Local]") + " ";
int i = source.find(rep);
if (i>=0) {
source.remove(i, rep.length());