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.cpp122
1 files changed, 61 insertions, 61 deletions
diff --git a/bibletime/frontend/cswordsetupdialog.cpp b/bibletime/frontend/cswordsetupdialog.cpp
index 11e838f..c527325 100644
--- a/bibletime/frontend/cswordsetupdialog.cpp
+++ b/bibletime/frontend/cswordsetupdialog.cpp
@@ -25,7 +25,7 @@
//QT includes
#include <tqdir.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqlabel.h>
#include <tqcombobox.h>
#include <tqwidgetstack.h>
@@ -75,44 +75,44 @@ namespace BookshelfManager {
TQFrame* page = m_swordConfigPage = addPage(i18n("Bookshelf path(s)"), TQString(), SmallIcon("bt_swordconfig",32));
page->setMinimumSize(500,400);
- TQGridLayout* layout = new TQGridLayout(page, 6, 4);
- layout->setMargin(5);
+ TQGridLayout* tqlayout = new TQGridLayout(page, 6, 4);
+ tqlayout->setMargin(5);
- layout->setSpacing(10);
- layout->setColStretch(0,1);
- layout->setRowStretch(5,1);
+ tqlayout->setSpacing(10);
+ tqlayout->setColStretch(0,1);
+ tqlayout->setRowStretch(5,1);
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);
+ tqlayout->addMultiCellWidget(mainLabel, 0, 0, 0, 3);
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);
+ TQLabel* confPathLabel = new TQLabel(i18n("Your bookshelf configuration file is <b>%1</b>").tqarg(swordConfPath), page);
+ tqlayout->addMultiCellWidget(confPathLabel, 1,1,0,3);
m_swordPathListBox = new TQListView(page);
// m_swordPathListBox->setFullWidth(true);
m_swordPathListBox->addColumn(i18n("Path to bookshelf"));
connect(m_swordPathListBox, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slot_swordPathSelected()));
- layout->addMultiCellWidget(m_swordPathListBox, 2,5,0,1);
+ tqlayout->addMultiCellWidget(m_swordPathListBox, 2,5,0,1);
m_swordEditPathButton = new TQPushButton(i18n("Edit Entry"), page);
m_swordEditPathButton->setIconSet(SmallIcon("edit", 16));
connect(m_swordEditPathButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_swordEditClicked()));
- layout->addWidget(m_swordEditPathButton, 2, 3);
+ tqlayout->addWidget(m_swordEditPathButton, 2, 3);
m_swordAddPathButton = new TQPushButton(i18n("Add Entry"), page);
m_swordAddPathButton->setIconSet(SmallIcon("edit_add", 16));
connect(m_swordAddPathButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_swordAddClicked()));
- layout->addWidget(m_swordAddPathButton, 3,3);
+ tqlayout->addWidget(m_swordAddPathButton, 3,3);
m_swordRemovePathButton = new TQPushButton(i18n("Remove Entry"), page);
m_swordRemovePathButton->setIconSet(SmallIcon("editdelete", 16));
connect(m_swordRemovePathButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_swordRemoveClicked()));
- layout->addWidget(m_swordRemovePathButton, 4,3);
+ tqlayout->addWidget(m_swordRemovePathButton, 4,3);
setupSwordPathListBox();
}
@@ -120,25 +120,25 @@ namespace BookshelfManager {
void CSwordSetupDialog::initInstall() {
m_installPage = addPage(i18n("Install/Update works"), TQString(), SmallIcon("bt_bible",32));
- TQVBoxLayout* vboxlayout = new TQVBoxLayout(m_installPage);
- TQHBoxLayout* hboxlayout = new TQHBoxLayout();
- hboxlayout->setAutoAdd( true );
+ TQVBoxLayout* vboxtqlayout = new TQVBoxLayout(m_installPage);
+ TQHBoxLayout* hboxtqlayout = new TQHBoxLayout();
+ hboxtqlayout->setAutoAdd( true );
- vboxlayout->addLayout(hboxlayout);
+ vboxtqlayout->addLayout(hboxtqlayout);
m_installWidgetStack = new TQWidgetStack(m_installPage);
- hboxlayout->addWidget(m_installWidgetStack);
+ hboxtqlayout->addWidget(m_installWidgetStack);
m_installSourcePage = new TQWidget(0);
m_installWidgetStack->addWidget(m_installSourcePage);
// m_installSourcePage->setMinimumSize(500,400);
- TQGridLayout* layout = new TQGridLayout(m_installSourcePage, 7, 3);
- layout->setMargin(5);
- layout->setSpacing(10);
- layout->setRowStretch(6,5);
- layout->setColStretch(0,5);
+ TQGridLayout* tqlayout = new TQGridLayout(m_installSourcePage, 7, 3);
+ tqlayout->setMargin(5);
+ tqlayout->setSpacing(10);
+ tqlayout->setRowStretch(6,5);
+ tqlayout->setColStretch(0,5);
TQLabel* installLabel = CToolClass::explanationLabel(m_installSourcePage,
i18n("Install/update works - Step 1"),
@@ -147,39 +147,39 @@ After that step click on the connect button.<br/>\
<b>WARNING: If you live in a persecuted country and do not wish to risk detection you should NOT use \
the module remote installation feature!</b>")
);
- layout->addMultiCellWidget(installLabel, 0,0,0,2);
+ tqlayout->addMultiCellWidget(installLabel, 0,0,0,2);
- TQLabel* sourceHeadingLabel = new TQLabel(TQString("<b>%1</b>").arg(i18n("Select library")), m_installSourcePage);
- layout->addMultiCellWidget(sourceHeadingLabel, 1,1,0,1);
+ TQLabel* sourceHeadingLabel = new TQLabel(TQString("<b>%1</b>").tqarg(i18n("Select library")), m_installSourcePage);
+ tqlayout->addMultiCellWidget(sourceHeadingLabel, 1,1,0,1);
m_sourceCombo = new TQComboBox(m_installSourcePage);
- layout->addWidget(m_sourceCombo, 2, 0);
+ tqlayout->addWidget(m_sourceCombo, 2, 0);
TQPushButton* deleteSourceButton = new TQPushButton(i18n("Delete library"), m_installSourcePage);
deleteSourceButton->setIconSet(SmallIcon("remove", 16));
connect(deleteSourceButton, TQT_SIGNAL(clicked()), TQT_SLOT(slot_installDeleteSource()));
- layout->addWidget(deleteSourceButton, 2, 1, TQt::AlignLeft);
+ tqlayout->addWidget(deleteSourceButton, 2, 1, TQt::AlignLeft);
TQPushButton* addSourceButton = new TQPushButton(i18n("Add library"), m_installSourcePage);
addSourceButton->setIconSet(SmallIcon("folder_new", 16));
connect(addSourceButton, TQT_SIGNAL(clicked()), TQT_SLOT(slot_installAddSource()));
- layout->addWidget(addSourceButton, 2, 2, TQt::AlignLeft);
+ tqlayout->addWidget(addSourceButton, 2, 2, TQt::AlignLeft);
m_sourceLabel = new TQLabel(m_installSourcePage);
- layout->addMultiCellWidget(m_sourceLabel, 3,3,0,1);
+ tqlayout->addMultiCellWidget(m_sourceLabel, 3,3,0,1);
- TQLabel* targetHeadingLabel = new TQLabel(TQString("<b>%1</b>").arg(i18n("Select bookshelf path")), m_installSourcePage);
- layout->addMultiCellWidget(targetHeadingLabel, 4,4,0,1);
+ TQLabel* targetHeadingLabel = new TQLabel(TQString("<b>%1</b>").tqarg(i18n("Select bookshelf path")), m_installSourcePage);
+ tqlayout->addMultiCellWidget(targetHeadingLabel, 4,4,0,1);
m_targetCombo = new TQComboBox(m_installSourcePage);
- layout->addWidget(m_targetCombo, 5, 0);
+ tqlayout->addWidget(m_targetCombo, 5, 0);
m_targetLabel = new TQLabel(m_installSourcePage);
- layout->addMultiCellWidget(m_targetLabel, 6,6,0,0,TQt::AlignTop);
+ tqlayout->addMultiCellWidget(m_targetLabel, 6,6,0,0,TQt::AlignTop);
- //part beloew main layout with the back/next buttons
+ //part beloew main tqlayout with the back/next buttons
TQHBoxLayout* myHBox = new TQHBoxLayout();
- vboxlayout->addLayout(myHBox);
+ vboxtqlayout->addLayout(myHBox);
m_installBackButton = new TQPushButton(i18n("Back"), m_installPage);
m_installBackButton->setIconSet(SmallIcon("back",16));
@@ -207,28 +207,28 @@ the module remote installation feature!</b>")
page->setMinimumSize(500,400);
- TQGridLayout* layout = new TQGridLayout(page, 4, 4);
- layout->setMargin(5);
+ TQGridLayout* tqlayout = new TQGridLayout(page, 4, 4);
+ tqlayout->setMargin(5);
- layout->setSpacing(10);
- layout->setColStretch(1,1);
- layout->setRowStretch(2,1);
+ tqlayout->setSpacing(10);
+ tqlayout->setColStretch(1,1);
+ tqlayout->setRowStretch(2,1);
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);
+ tqlayout->addMultiCellWidget(mainLabel, 0, 0, 0, 3);
- TQLabel* headingLabel = new TQLabel(TQString("<b>%1</b>").arg(i18n("Select works to be uninstalled")), page);
- layout->addMultiCellWidget(headingLabel, 1, 1, 0, 3);
+ TQLabel* headingLabel = new TQLabel(TQString("<b>%1</b>").tqarg(i18n("Select works to be uninstalled")), page);
+ tqlayout->addMultiCellWidget(headingLabel, 1, 1, 0, 3);
m_removeModuleListView = new CSwordSetupModuleListView(page, false);
- layout->addMultiCellWidget( m_removeModuleListView, 2,2,0,3);
+ tqlayout->addMultiCellWidget( m_removeModuleListView, 2,2,0,3);
m_removeRemoveButton = new TQPushButton(i18n("Remove selected work(s)"), page);
m_removeRemoveButton->setIconSet( SmallIcon("edittrash", 16) );
- layout->addWidget(m_removeRemoveButton, 3, 3, TQt::AlignRight);
+ tqlayout->addWidget(m_removeRemoveButton, 3, 3, TQt::AlignRight);
connect(m_removeRemoveButton, TQT_SIGNAL(clicked()),
this, TQT_SLOT(slot_doRemoveModules()));
@@ -379,10 +379,10 @@ the module remote installation feature!</b>")
sword::InstallSource is = BTInstallMgr::Tool::RemoteConfig::source(&mgr, source) ;
if (BTInstallMgr::Tool::RemoteConfig::isRemoteSource(&is)) {
- url = TQString("ftp://%1%2").arg(is.source.c_str()).arg(is.directory.c_str());
+ url = TQString("ftp://%1%2").tqarg(is.source.c_str()).tqarg(is.directory.c_str());
}
else {
- url = TQString("%1").arg(is.directory.c_str());
+ url = TQString("%1").tqarg(is.directory.c_str());
}
m_sourceLabel->setText( url );
@@ -405,7 +405,7 @@ the module remote installation feature!</b>")
}
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(", "));
+ "Do you really want to remove them from your system?").tqarg(moduleList.join(", "));
if ((KMessageBox::warningYesNo(0, message, i18n("Warning")) == KMessageBox::Yes)) { //Yes was pressed.
sword::InstallMgr installMgr;
@@ -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 = TQString::fromLatin1(backend()->prefixPath);
+ prefixPath = TQString::tqfromLatin1(backend()->prefixPath);
}
sword::SWMgr* mgr = mgrDict[ prefixPath ];
@@ -612,16 +612,16 @@ the module remote installation feature!</b>")
if (!m_installModuleListPage) { //the widgets are not yet created
m_installModuleListPage = new TQWidget(0);
- TQGridLayout* layout = new TQGridLayout(m_installModuleListPage, 7, 2);
- layout->setMargin(5);
- layout->setSpacing(10);
+ TQGridLayout* tqlayout = new TQGridLayout(m_installModuleListPage, 7, 2);
+ tqlayout->setMargin(5);
+ tqlayout->setSpacing(10);
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.")
);
- layout->addMultiCellWidget(installLabel, 0,0,0,1);
- layout->setRowStretch(0,0);
+ tqlayout->addMultiCellWidget(installLabel, 0,0,0,1);
+ tqlayout->setRowStretch(0,0);
m_installWidgetStack->addWidget(m_installModuleListPage);
m_installModuleListPage->setMinimumSize(500,400);
@@ -631,9 +631,9 @@ the module remote installation feature!</b>")
sword::InstallSource is = BTInstallMgr::Tool::RemoteConfig::source(&iMgr, currentInstallSource());
m_installModuleListView = new CSwordSetupModuleListView(m_installModuleListPage, true, &is);
- layout->addMultiCellWidget( m_installModuleListView, 1,6,0,1);
- layout->setColStretch(0,5);
- layout->setRowStretch(1,5);
+ tqlayout->addMultiCellWidget( m_installModuleListView, 1,6,0,1);
+ tqlayout->setColStretch(0,5);
+ tqlayout->setRowStretch(1,5);
connect(m_installModuleListView, TQT_SIGNAL(selectedModulesChanged()), TQT_SLOT(slot_installModulesChanged()));
}
@@ -696,7 +696,7 @@ the module remote installation feature!</b>")
}
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(", "));
+ Do you really want to install them on your system?").tqarg(moduleList.join(", "));
if ((KMessageBox::warningYesNo(0, message, i18n("Warning")) == KMessageBox::Yes)) { //Yes was pressed.
BTInstallMgr iMgr;
@@ -758,7 +758,7 @@ the module remote installation feature!</b>")
//prefixPath = prefixPath.replace(dataPath, ""); //old code working with TQt 3.2
}
else {
- prefixPath = TQString::fromLatin1(backend()->prefixPath);
+ prefixPath = TQString::tqfromLatin1(backend()->prefixPath);
}
sword::SWMgr mgr(prefixPath.latin1());
@@ -795,7 +795,7 @@ the module remote installation feature!</b>")
void CSwordSetupDialog::installCompleted( const int total, const int /* file */) {
if (m_progressDialog) {
m_progressDialog->progressBar()->setProgress(total+100*m_installedModuleCount);
- m_progressDialog->setLabel( i18n("[%1]: %2% complete").arg(m_installingModule).arg(total) );
+ m_progressDialog->setLabel( i18n("[%1]: %2% complete").tqarg(m_installingModule).tqarg(total) );
}
KApplication::kApplication()->processEvents();
}