summaryrefslogtreecommitdiffstats
path: root/khelpcenter/htmlsearch/kcmhtmlsearch.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /khelpcenter/htmlsearch/kcmhtmlsearch.cpp
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khelpcenter/htmlsearch/kcmhtmlsearch.cpp')
-rw-r--r--khelpcenter/htmlsearch/kcmhtmlsearch.cpp146
1 files changed, 73 insertions, 73 deletions
diff --git a/khelpcenter/htmlsearch/kcmhtmlsearch.cpp b/khelpcenter/htmlsearch/kcmhtmlsearch.cpp
index 20ab149b4..9dfc5e350 100644
--- a/khelpcenter/htmlsearch/kcmhtmlsearch.cpp
+++ b/khelpcenter/htmlsearch/kcmhtmlsearch.cpp
@@ -18,13 +18,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kstandarddirs.h>
#include <klocale.h>
#include <kurllabel.h>
#include <kapplication.h>
-#include <qcheckbox.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqwhatsthis.h>
#include <kfiledialog.h>
#include <kprocess.h>
#include "klangcombo.h"
@@ -34,119 +34,119 @@
#include "kcmhtmlsearch.moc"
-KHTMLSearchConfig::KHTMLSearchConfig(QWidget *parent, const char *name)
+KHTMLSearchConfig::KHTMLSearchConfig(TQWidget *parent, const char *name)
: KCModule(parent, name), indexProc(0)
{
- QVBoxLayout *vbox = new QVBoxLayout(this, 5);
+ TQVBoxLayout *vbox = new TQVBoxLayout(this, 5);
- QGroupBox *gb = new QGroupBox(i18n("ht://dig"), this);
+ TQGroupBox *gb = new TQGroupBox(i18n("ht://dig"), this);
vbox->addWidget(gb);
- QGridLayout *grid = new QGridLayout(gb, 3,2, 6,6);
+ TQGridLayout *grid = new TQGridLayout(gb, 3,2, 6,6);
grid->addRowSpacing(0, gb->fontMetrics().lineSpacing());
- QLabel *l = new QLabel(i18n("The fulltext search feature makes use of the "
+ TQLabel *l = new TQLabel(i18n("The fulltext search feature makes use of the "
"ht://dig HTML search engine. "
"You can get ht://dig at the"), gb);
- l->setAlignment(QLabel::WordBreak);
+ l->setAlignment(TQLabel::WordBreak);
l->setMinimumSize(l->sizeHint());
grid->addMultiCellWidget(l, 1, 1, 0, 1);
- QWhatsThis::add( gb, i18n( "Information about where to get the ht://dig package." ) );
+ TQWhatsThis::add( gb, i18n( "Information about where to get the ht://dig package." ) );
KURLLabel *url = new KURLLabel(gb);
url->setURL("http://www.htdig.org");
url->setText(i18n("ht://dig home page"));
- url->setAlignment(QLabel::AlignHCenter);
+ url->setAlignment(TQLabel::AlignHCenter);
grid->addMultiCellWidget(url, 2,2, 0, 1);
- connect(url, SIGNAL(leftClickedURL(const QString&)),
- this, SLOT(urlClicked(const QString&)));
+ connect(url, TQT_SIGNAL(leftClickedURL(const TQString&)),
+ this, TQT_SLOT(urlClicked(const TQString&)));
- gb = new QGroupBox(i18n("Program Locations"), this);
+ gb = new TQGroupBox(i18n("Program Locations"), this);
vbox->addWidget(gb);
- grid = new QGridLayout(gb, 4,2, 6,6);
+ grid = new TQGridLayout(gb, 4,2, 6,6);
grid->addRowSpacing(0, gb->fontMetrics().lineSpacing());
htdigBin = new KURLRequester(gb);
- l = new QLabel(htdigBin, i18n("ht&dig"), gb);
+ l = new TQLabel(htdigBin, i18n("ht&dig"), gb);
l->setBuddy( htdigBin );
grid->addWidget(l, 1,0);
grid->addWidget(htdigBin, 1,1);
- connect(htdigBin->lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(configChanged()));
- QString wtstr = i18n( "Enter the path to your htdig program here, e.g. /usr/local/bin/htdig" );
- QWhatsThis::add( htdigBin, wtstr );
- QWhatsThis::add( l, wtstr );
+ connect(htdigBin->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(configChanged()));
+ TQString wtstr = i18n( "Enter the path to your htdig program here, e.g. /usr/local/bin/htdig" );
+ TQWhatsThis::add( htdigBin, wtstr );
+ TQWhatsThis::add( l, wtstr );
htsearchBin = new KURLRequester(gb);
- l = new QLabel(htsearchBin, i18n("ht&search"), gb);
+ l = new TQLabel(htsearchBin, i18n("ht&search"), gb);
l->setBuddy( htsearchBin );
grid->addWidget(l, 2,0);
grid->addWidget(htsearchBin, 2,1);
- connect(htsearchBin->lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(configChanged()));
+ connect(htsearchBin->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(configChanged()));
wtstr = i18n( "Enter the path to your htsearch program here, e.g. /usr/local/bin/htsearch" );
- QWhatsThis::add( htsearchBin, wtstr );
- QWhatsThis::add( l, wtstr );
+ TQWhatsThis::add( htsearchBin, wtstr );
+ TQWhatsThis::add( l, wtstr );
htmergeBin = new KURLRequester(gb);
- l = new QLabel(htmergeBin, i18n("ht&merge"), gb);
+ l = new TQLabel(htmergeBin, i18n("ht&merge"), gb);
l->setBuddy( htmergeBin );
grid->addWidget(l, 3,0);
grid->addWidget(htmergeBin, 3,1);
- connect(htmergeBin->lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(configChanged()));
+ connect(htmergeBin->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(configChanged()));
wtstr = i18n( "Enter the path to your htmerge program here, e.g. /usr/local/bin/htmerge" );
- QWhatsThis::add( htmergeBin, wtstr );
- QWhatsThis::add( l, wtstr );
+ TQWhatsThis::add( htmergeBin, wtstr );
+ TQWhatsThis::add( l, wtstr );
- QHBoxLayout *hbox = new QHBoxLayout(vbox);
+ TQHBoxLayout *hbox = new TQHBoxLayout(vbox);
- gb = new QGroupBox(i18n("Scope"), this);
+ gb = new TQGroupBox(i18n("Scope"), this);
hbox->addWidget(gb);
- QWhatsThis::add( gb, i18n( "Here you can select which parts of the documentation should be included in the fulltext search index. Available options are the KDE Help pages, the installed man pages, and the installed info pages. You can select any number of these." ) );
+ TQWhatsThis::add( gb, i18n( "Here you can select which parts of the documentation should be included in the fulltext search index. Available options are the KDE Help pages, the installed man pages, and the installed info pages. You can select any number of these." ) );
- QVBoxLayout *vvbox = new QVBoxLayout(gb, 6,2);
+ TQVBoxLayout *vvbox = new TQVBoxLayout(gb, 6,2);
vvbox->addSpacing(gb->fontMetrics().lineSpacing());
- indexKDE = new QCheckBox(i18n("&KDE help"), gb);
+ indexKDE = new TQCheckBox(i18n("&KDE help"), gb);
vvbox->addWidget(indexKDE);
- connect(indexKDE, SIGNAL(clicked()), this, SLOT(configChanged()));
+ connect(indexKDE, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()));
- indexMan = new QCheckBox(i18n("&Man pages"), gb);
+ indexMan = new TQCheckBox(i18n("&Man pages"), gb);
vvbox->addWidget(indexMan);
indexMan->setEnabled(false),
- connect(indexMan, SIGNAL(clicked()), this, SLOT(configChanged()));
+ connect(indexMan, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()));
- indexInfo = new QCheckBox(i18n("&Info pages"), gb);
+ indexInfo = new TQCheckBox(i18n("&Info pages"), gb);
vvbox->addWidget(indexInfo);
indexInfo->setEnabled(false);
- connect(indexInfo, SIGNAL(clicked()), this, SLOT(configChanged()));
+ connect(indexInfo, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()));
- gb = new QGroupBox(i18n("Additional Search Paths"), this);
+ gb = new TQGroupBox(i18n("Additional Search Paths"), this);
hbox->addWidget(gb);
- QWhatsThis::add( gb, i18n( "Here you can add additional paths to search for documentation. To add a path, click on the <em>Add...</em> button and select the folder from where additional documentation should be searched. You can remove folders by clicking on the <em>Delete</em> button." ) );
+ TQWhatsThis::add( gb, i18n( "Here you can add additional paths to search for documentation. To add a path, click on the <em>Add...</em> button and select the folder from where additional documentation should be searched. You can remove folders by clicking on the <em>Delete</em> button." ) );
- grid = new QGridLayout(gb, 4,3, 6,2);
+ grid = new TQGridLayout(gb, 4,3, 6,2);
grid->addRowSpacing(0, gb->fontMetrics().lineSpacing());
- addButton = new QPushButton(i18n("Add..."), gb);
+ addButton = new TQPushButton(i18n("Add..."), gb);
grid->addWidget(addButton, 1,0);
- delButton = new QPushButton(i18n("Delete"), gb);
+ delButton = new TQPushButton(i18n("Delete"), gb);
grid->addWidget(delButton, 2,0);
searchPaths = new KListBox(gb);
grid->addMultiCellWidget(searchPaths, 1,3, 1,1);
grid->setRowStretch(2,2);
- gb = new QGroupBox(i18n("Language Settings"), this);
+ gb = new TQGroupBox(i18n("Language Settings"), this);
vbox->addWidget(gb);
- QWhatsThis::add(gb, i18n("Here you can select the language you want to create the index for."));
+ TQWhatsThis::add(gb, i18n("Here you can select the language you want to create the index for."));
language = new KLanguageCombo(gb);
- l = new QLabel(language, i18n("&Language"), gb);
- vvbox = new QVBoxLayout(gb, 6,2);
+ l = new TQLabel(language, i18n("&Language"), gb);
+ vvbox = new TQVBoxLayout(gb, 6,2);
vvbox->addSpacing(gb->fontMetrics().lineSpacing());
- hbox = new QHBoxLayout(vvbox, 6);
+ hbox = new TQHBoxLayout(vvbox, 6);
hbox->addWidget(l);
hbox->addWidget(language,1);
hbox->addStretch(1);
@@ -155,16 +155,16 @@ KHTMLSearchConfig::KHTMLSearchConfig(QWidget *parent, const char *name)
vbox->addStretch(1);
- runButton = new QPushButton(i18n("Generate Index..."), this);
- QWhatsThis::add( runButton, i18n( "Click this button to generate the index for the fulltext search." ) );
+ runButton = new TQPushButton(i18n("Generate Index..."), this);
+ TQWhatsThis::add( runButton, i18n( "Click this button to generate the index for the fulltext search." ) );
runButton->setFixedSize(runButton->sizeHint());
vbox->addWidget(runButton, AlignRight);
- connect(runButton, SIGNAL(clicked()), this, SLOT(generateIndex()));
+ connect(runButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(generateIndex()));
- connect(addButton, SIGNAL(clicked()), this, SLOT(addClicked()));
- connect(delButton, SIGNAL(clicked()), this, SLOT(delClicked()));
- connect(searchPaths, SIGNAL(highlighted(const QString &)),
- this, SLOT(pathSelected(const QString &)));
+ connect(addButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(addClicked()));
+ connect(delButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(delClicked()));
+ connect(searchPaths, TQT_SIGNAL(highlighted(const TQString &)),
+ this, TQT_SLOT(pathSelected(const TQString &)));
checkButtons();
@@ -178,17 +178,17 @@ void KHTMLSearchConfig::loadLanguages()
language->clear();
// add all languages to the list
- QStringList langs = KGlobal::dirs()->findAllResources("locale",
- QString::fromLatin1("*/entry.desktop"));
+ TQStringList langs = KGlobal::dirs()->findAllResources("locale",
+ TQString::fromLatin1("*/entry.desktop"));
langs.sort();
- for (QStringList::ConstIterator it = langs.begin(); it != langs.end(); ++it)
+ for (TQStringList::ConstIterator it = langs.begin(); it != langs.end(); ++it)
{
KSimpleConfig entry(*it);
- entry.setGroup(QString::fromLatin1("KCM Locale"));
- QString name = entry.readEntry(QString::fromLatin1("Name"), KGlobal::locale()->translate("without name"));
+ entry.setGroup(TQString::fromLatin1("KCM Locale"));
+ TQString name = entry.readEntry(TQString::fromLatin1("Name"), KGlobal::locale()->translate("without name"));
- QString path = *it;
+ TQString path = *it;
int index = path.findRev('/');
path = path.left(index);
index = path.findRev('/');
@@ -198,13 +198,13 @@ void KHTMLSearchConfig::loadLanguages()
}
-QString KHTMLSearchConfig::quickHelp() const
+TQString KHTMLSearchConfig::quickHelp() const
{
return i18n( "<h1>Help Index</h1> This configuration module lets you configure the ht://dig engine which can be used for fulltext search in the KDE documentation as well as other system documentation like man and info pages." );
}
-void KHTMLSearchConfig::pathSelected(const QString &)
+void KHTMLSearchConfig::pathSelected(const TQString &)
{
checkButtons();
}
@@ -219,7 +219,7 @@ void KHTMLSearchConfig::checkButtons()
void KHTMLSearchConfig::addClicked()
{
- QString dir = KFileDialog::getExistingDirectory();
+ TQString dir = KFileDialog::getExistingDirectory();
if (!dir.isEmpty())
{
@@ -265,14 +265,14 @@ void KHTMLSearchConfig::load()
indexMan->setChecked(config->readBoolEntry("Man", false));
indexInfo->setChecked(config->readBoolEntry("Info", false));
- QStringList l = config->readPathListEntry("Paths");
+ TQStringList l = config->readPathListEntry("Paths");
searchPaths->clear();
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for (it=l.begin(); it != l.end(); ++it)
searchPaths->insertItem(*it);
config->setGroup("Locale");
- QString lang = config->readEntry("Search Language", KGlobal::locale()->language());
+ TQString lang = config->readEntry("Search Language", KGlobal::locale()->language());
language->setCurrentItem(lang);
emit changed(false);
@@ -293,7 +293,7 @@ void KHTMLSearchConfig::save()
config->writeEntry("Man", indexMan->isChecked());
config->writeEntry("Info", indexInfo->isChecked());
- QStringList l;
+ TQStringList l;
for (uint i=0; i<searchPaths->count(); ++i)
l.append(searchPaths->text(i));
config->writePathEntry("Paths", l);
@@ -326,7 +326,7 @@ void KHTMLSearchConfig::defaults()
}
-void KHTMLSearchConfig::urlClicked(const QString &url)
+void KHTMLSearchConfig::urlClicked(const TQString &url)
{
kapp->invokeBrowser(url);
}
@@ -336,7 +336,7 @@ void KHTMLSearchConfig::generateIndex()
{
save();
- QString exe = kapp->dirs()->findExe("khtmlindex");
+ TQString exe = kapp->dirs()->findExe("khtmlindex");
if (exe.isEmpty())
return;
@@ -345,8 +345,8 @@ void KHTMLSearchConfig::generateIndex()
indexProc = new KProcess;
*indexProc << exe << "--lang" << language->currentTag();
- connect(indexProc, SIGNAL(processExited(KProcess *)),
- this, SLOT(indexTerminated(KProcess *)));
+ connect(indexProc, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(indexTerminated(KProcess *)));
runButton->setEnabled(false);
@@ -362,7 +362,7 @@ void KHTMLSearchConfig::indexTerminated(KProcess *)
extern "C"
{
- KDE_EXPORT KCModule *create_htmlsearch(QWidget *parent, const char *name)
+ KDE_EXPORT KCModule *create_htmlsearch(TQWidget *parent, const char *name)
{
KGlobal::locale()->insertCatalogue("kcmhtmlsearch");
return new KHTMLSearchConfig(parent, name);