diff options
Diffstat (limited to 'src/cite/openoffice.cpp')
-rw-r--r-- | src/cite/openoffice.cpp | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/src/cite/openoffice.cpp b/src/cite/openoffice.cpp index ced8b13..3955677 100644 --- a/src/cite/openoffice.cpp +++ b/src/cite/openoffice.cpp @@ -30,12 +30,12 @@ #include <kiconloader.h> #include <klocale.h> -#include <qiconset.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> -#include <qfile.h> -#include <qvgroupbox.h> +#include <tqiconset.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> +#include <tqfile.h> +#include <tqvgroupbox.h> using Tellico::Cite::OpenOffice; @@ -43,7 +43,7 @@ class OpenOffice::Private { friend class OpenOffice; Private() : handler(0), port(-1) { - KLibrary* library = Tellico::openLibrary(QString::fromLatin1("tellico_ooo")); + KLibrary* library = Tellico::openLibrary(TQString::tqfromLatin1("tellico_ooo")); if(library) { void* func = library->symbol("handler"); if(func) { @@ -54,9 +54,9 @@ class OpenOffice::Private { Handler* handler; // empty pipe string indicates tcp should be used - QString host; + TQString host; int port; - QString pipe; + TQString pipe; }; OpenOffice::OpenOffice() : Action(), d(new Private()) { @@ -79,18 +79,18 @@ bool OpenOffice::connect() { return false; } - StatusBar::self()->setStatus(i18n("Connecting to OpenOffice.org...")); + StatusBar::self()->settqStatus(i18n("Connecting to OpenOffice.org...")); if(d->port == -1) { KConfigGroup config(kapp->config(), "OpenOffice.org"); - d->host = config.readEntry("Host", QString::fromLatin1("localhost")); + d->host = config.readEntry("Host", TQString::tqfromLatin1("localhost")); d->port = config.readNumEntry("Port", 2083); d->pipe = config.readPathEntry("Pipe"); // the ooohandler will depend on pipe.isEmpty() to indicate the port should be used d->handler->setHost(d->host); d->handler->setPort(d->port); if(!d->pipe.isEmpty()) { - d->handler->setPipe(QFile::encodeName(d->pipe)); + d->handler->setPipe(TQFile::encodeName(d->pipe)); } } @@ -116,7 +116,7 @@ bool OpenOffice::connect() { break; } } - StatusBar::self()->clearStatus(); + StatusBar::self()->cleartqStatus(); return success; } @@ -136,22 +136,22 @@ bool OpenOffice::cite(Data::EntryVec entries_) { return false; } - const QString bibtex = QString::fromLatin1("bibtex"); + const TQString bibtex = TQString::tqfromLatin1("bibtex"); Data::FieldVec vec = coll->fields(); for(Data::EntryVecIt entry = entries_.begin(); entry != entries_.end(); ++entry) { Cite::Map values; for(Data::FieldVec::Iterator it = vec.begin(); it != vec.end(); ++it) { - QString bibtexField = it->property(bibtex); + TQString bibtexField = it->property(bibtex); if(!bibtexField.isEmpty()) { - QString s = entry->field(it->name()); + TQString s = entry->field(it->name()); if(!s.isEmpty()) { - values[bibtexField] = s.utf8(); // always utf8 + values[bibtexField.ascii()] = s.utf8().data(); // always utf8 } } else if(it->name() == Latin1Literal("isbn")) { // OOO includes ISBN - QString s = entry->field(it->name()); + TQString s = entry->field(it->name()); if(!s.isEmpty()) { - values[it->name()] = s.utf8(); + values[it->name().ascii()] = s.utf8().data(); } } } @@ -165,34 +165,34 @@ bool OpenOffice::connectionDialog() { true, i18n("OpenOffice.org Connection"), KDialogBase::Ok|KDialogBase::Cancel|KDialogBase::Help); - dlg.setHelp(QString::fromLatin1("openoffice-org")); + dlg.setHelp(TQString::tqfromLatin1("openoffice-org")); - QWidget* widget = new QWidget(&dlg); - QBoxLayout* topLayout = new QVBoxLayout(widget, KDialog::spacingHint()); + TQWidget* widget = new TQWidget(&dlg); + TQBoxLayout* topLayout = new TQVBoxLayout(widget, KDialog::spacingHint()); dlg.setMainWidget(widget); // is there a better way to do a multi-line label than to insert newlines in the text? - QBoxLayout* blay = new QHBoxLayout(topLayout); - QLabel* l = new QLabel(widget); - l->setPixmap(DesktopIcon(QString::fromLatin1("ooo_writer"), 64)); + TQBoxLayout* blay = new TQHBoxLayout(topLayout); + TQLabel* l = new TQLabel(widget); + l->setPixmap(DesktopIcon(TQString::tqfromLatin1("ooo_writer"), 64)); blay->addWidget(l); - l = new QLabel(widget); + l = new TQLabel(widget); l->setText(i18n("Tellico was unable to connect to OpenOffice.org. " "Please verify the connection settings below, and " "that OpenOffice.org Writer is currently running.")); - l->setTextFormat(Qt::RichText); + l->setTextFormat(TQt::RichText); blay->addWidget(l); blay->setStretchFactor(l, 10); - QVGroupBox* gbox = new QVGroupBox(i18n("OpenOffice.org Connection"), widget); + TQVGroupBox* gbox = new TQVGroupBox(i18n("OpenOffice.org Connection"), widget); topLayout->addWidget(gbox); - QWidget* w2 = new QWidget(gbox); - QGridLayout* gl = new QGridLayout(w2, 2, 3, 0 /*margin*/, KDialog::spacingHint()); - QRadioButton* radioPipe = new QRadioButton(i18n("Pipe"), w2); + TQWidget* w2 = new TQWidget(gbox); + TQGridLayout* gl = new TQGridLayout(w2, 2, 3, 0 /*margin*/, KDialog::spacingHint()); + TQRadioButton* radioPipe = new TQRadioButton(i18n("Pipe"), w2); gl->addWidget(radioPipe, 0, 0); - QRadioButton* radioTCP = new QRadioButton(i18n("TCP/IP"), w2); + TQRadioButton* radioTCP = new TQRadioButton(i18n("TCP/IP"), w2); gl->addWidget(radioTCP, 1, 0); - QButtonGroup* btnGroup = new QButtonGroup(); + TQButtonGroup* btnGroup = new TQButtonGroup(); btnGroup->setRadioButtonExclusive(true); btnGroup->insert(radioPipe, 0); btnGroup->insert(radioTCP, 1); @@ -200,17 +200,17 @@ bool OpenOffice::connectionDialog() { KLineEdit* pipeEdit = new KLineEdit(w2); pipeEdit->setText(d->pipe); gl->addMultiCellWidget(pipeEdit, 0, 0, 1, 2); - pipeEdit->connect(radioPipe, SIGNAL(toggled(bool)), SLOT(setEnabled(bool))); + pipeEdit->connect(radioPipe, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setEnabled(bool))); KLineEdit* hostEdit = new KLineEdit(w2); hostEdit->setText(d->host); gl->addWidget(hostEdit, 1, 1); - hostEdit->connect(radioTCP, SIGNAL(toggled(bool)), SLOT(setEnabled(bool))); + hostEdit->connect(radioTCP, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setEnabled(bool))); KIntSpinBox* portSpin = new KIntSpinBox(w2); portSpin->setMaxValue(99999); portSpin->setValue(d->port); gl->addWidget(portSpin, 1, 2); - portSpin->connect(radioTCP, SIGNAL(toggled(bool)), SLOT(setEnabled(bool))); + portSpin->connect(radioTCP, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setEnabled(bool))); if(d->pipe.isEmpty()) { radioTCP->setChecked(true); @@ -225,17 +225,17 @@ bool OpenOffice::connectionDialog() { } topLayout->addStretch(10); - if(dlg.exec() != QDialog::Accepted) { + if(dlg.exec() != TQDialog::Accepted) { return false; } int p = d->port; - QString h = d->host; - QString s; + TQString h = d->host; + TQString s; if(radioTCP->isChecked()) { h = hostEdit->text(); if(h.isEmpty()) { - h = QString::fromLatin1("localhost"); + h = TQString::tqfromLatin1("localhost"); } p = portSpin->value(); } else { @@ -250,7 +250,7 @@ bool OpenOffice::connectionDialog() { } d->handler->setPort(d->port); if(!d->pipe.isEmpty()) { - d->handler->setPipe(QFile::encodeName(d->pipe)); + d->handler->setPipe(TQFile::encodeName(d->pipe)); } KConfigGroup config(kapp->config(), "OpenOffice.org"); @@ -261,7 +261,7 @@ bool OpenOffice::connectionDialog() { } bool OpenOffice::hasLibrary() { - QString path = KLibLoader::findLibrary("tellico_ooo"); + TQString path = KLibLoader::findLibrary("tellico_ooo"); if(!path.isEmpty()) myDebug() << "OpenOffice::hasLibrary() - Found OOo plugin: " << path << endl; return !path.isEmpty(); } |