diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
commit | 2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch) | |
tree | 18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/cite | |
parent | 1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff) | |
download | tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.tar.gz tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.zip |
TQt4 port tellico
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1239054 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/cite')
-rw-r--r-- | src/cite/clipboard.cpp | 12 | ||||
-rw-r--r-- | src/cite/lyxpipe.cpp | 20 | ||||
-rw-r--r-- | src/cite/ooo/interface.cpp | 74 | ||||
-rw-r--r-- | src/cite/ooo/ooohandler.cpp | 16 | ||||
-rw-r--r-- | src/cite/ooo/ooohandler.h | 4 | ||||
-rw-r--r-- | src/cite/openoffice.cpp | 84 |
6 files changed, 105 insertions, 105 deletions
diff --git a/src/cite/clipboard.cpp b/src/cite/clipboard.cpp index 9b98b89..f242a22 100644 --- a/src/cite/clipboard.cpp +++ b/src/cite/clipboard.cpp @@ -17,8 +17,8 @@ #include <klocale.h> -#include <qapplication.h> -#include <qclipboard.h> +#include <tqapplication.h> +#include <tqclipboard.h> using Tellico::Cite::Clipboard; @@ -35,17 +35,17 @@ bool Clipboard::cite(Data::EntryVec entries_) { return false; } - QString s = QString::fromLatin1("\\cite{"); + TQString s = TQString::tqfromLatin1("\\cite{"); for(Data::EntryVecIt it = entries_.begin(); it != entries_.end(); ++it) { s += BibtexHandler::bibtexKey(it.data()); if(!it.nextEnd()) { - s += QString::fromLatin1(", "); + s += TQString::tqfromLatin1(", "); } } s += '}'; - QClipboard *cb = QApplication::clipboard(); - cb->setText(s, QClipboard::Clipboard); + TQClipboard *cb = TQApplication::tqclipboard(); + cb->setText(s, TQClipboard::Clipboard); return true; } diff --git a/src/cite/lyxpipe.cpp b/src/cite/lyxpipe.cpp index 6075324..4943a8a 100644 --- a/src/cite/lyxpipe.cpp +++ b/src/cite/lyxpipe.cpp @@ -20,7 +20,7 @@ #include <klocale.h> -#include <qfile.h> +#include <tqfile.h> #include <sys/types.h> #include <sys/stat.h> @@ -43,36 +43,36 @@ bool Lyxpipe::cite(Data::EntryVec entries_) { return false; } - QString lyxpipe = Config::lyxpipe(); - lyxpipe += QString::fromLatin1(".in"); + TQString lyxpipe = Config::lyxpipe(); + lyxpipe += TQString::tqfromLatin1(".in"); // myDebug() << "Lyxpipe::cite() - " << lyxpipe << endl; - QString errorStr = i18n("<qt>Tellico is unable to write to the server pipe at <b>%1</b>.</qt>").arg(lyxpipe); + TQString errorStr = i18n("<qt>Tellico is unable to write to the server pipe at <b>%1</b>.</qt>").tqarg(lyxpipe); - QFile file(lyxpipe); + TQFile file(lyxpipe); if(!file.exists()) { Kernel::self()->sorry(errorStr); return false; } - int pipeFd = ::open(QFile::encodeName(lyxpipe), O_WRONLY); + int pipeFd = ::open(TQFile::encodeName(lyxpipe), O_WRONLY); if(!file.open(IO_WriteOnly, pipeFd)) { Kernel::self()->sorry(errorStr); ::close(pipeFd); return false; } - QString output; - QTextStream ts(&file); + TQString output; + TQTextStream ts(&file); for(Data::EntryVecIt it = entries_.begin(); it != entries_.end(); ++it) { - QString s = BibtexHandler::bibtexKey(it.data()); + TQString s = BibtexHandler::bibtexKey(it.data()); if(s.isEmpty()) { continue; } output += s; if(!it.nextEnd() && !output.isEmpty()) { // pybliographer uses comma-space, and pyblink expects the space there - output += QString::fromLatin1(", "); + output += TQString::tqfromLatin1(", "); } } if(output.isEmpty()) { diff --git a/src/cite/ooo/interface.cpp b/src/cite/ooo/interface.cpp index 383ed1e..3e88852 100644 --- a/src/cite/ooo/interface.cpp +++ b/src/cite/ooo/interface.cpp @@ -33,7 +33,7 @@ #include <com/sun/star/sdbc/XResultSetUpdate.hpp> #include <com/sun/star/sdbc/XRow.hpp> #include <com/sun/star/sdbc/XRowUpdate.hpp> -#include <com/sun/star/sdbc/SQLException.hpp> +#include <com/sun/star/sdbc/STQLException.hpp> #include <com/sun/star/sdb/CommandType.hpp> #include <com/sun/star/document/XEventListener.hpp> #include <com/sun/star/document/XEventBroadcaster.hpp> @@ -122,7 +122,7 @@ bool OOOHandler::Interface::connect(const std::string& host_, int port_, const s } // Query for the XUnoUrlResolver interface - Reference<bridge::XUnoUrlResolver> rResolver(rInstance, UNO_QUERY); + Reference<bridge::XUnoUrlResolver> rResolver(rInstance, UNO_TQUERY); if(!rResolver.is()) { DEBUG("Error: Couldn't instantiate com.sun.star.bridge.UnoUrlResolver service"); return false; @@ -145,7 +145,7 @@ bool OOOHandler::Interface::connect(const std::string& host_, int port_, const s return false; } - m_gsmgr = Reference<lang::XMultiServiceFactory>(rInstance, UNO_QUERY); + m_gsmgr = Reference<lang::XMultiServiceFactory>(rInstance, UNO_TQUERY); if(m_gsmgr.is()) { DEBUG("Connected successfully to office"); } else { @@ -180,16 +180,16 @@ bool OOOHandler::Interface::createDocument() { // get the desktop service using createInstance, returns an XInterface type Reference<uno::XInterface> xInstance = m_gsmgr->createInstance(OUString::createFromAscii("com.sun.star.frame.Desktop")); - Reference<frame::XDesktop> desktop(xInstance, UNO_QUERY); + Reference<frame::XDesktop> desktop(xInstance, UNO_TQUERY); Reference<lang::XComponent> writer = desktop->getCurrentComponent(); - Reference<lang::XServiceInfo> info(writer, UNO_QUERY); + Reference<lang::XServiceInfo> info(writer, UNO_TQUERY); if(info.is() && info->getImplementationName() == OUString::createFromAscii("SwXTextDocument")) { DEBUG("Document already open"); } else { DEBUG("Opening a new document"); //query for the XComponentLoader interface - Reference<frame::XComponentLoader> rComponentLoader(desktop, UNO_QUERY); + Reference<frame::XComponentLoader> rComponentLoader(desktop, UNO_TQUERY); if(!rComponentLoader.is()){ DEBUG("XComponentloader failed to instantiate"); return 0; @@ -203,16 +203,16 @@ bool OOOHandler::Interface::createDocument() { } //Manage many events with EventListener - Reference<document::XEventBroadcaster> eventBroadcast(writer, UNO_QUERY); + Reference<document::XEventBroadcaster> eventBroadcast(writer, UNO_TQUERY); m_listener = new EventListener(this); Reference<document::XEventListener> xEventListener = static_cast<document::XEventListener*>(m_listener); eventBroadcast->addEventListener(xEventListener); - Reference<frame::XController> controller = Reference<frame::XModel>(writer, UNO_QUERY)->getCurrentController(); - m_cursor = Reference<text::XTextViewCursorSupplier>(controller, UNO_QUERY)->getViewCursor(); - m_doc = Reference<text::XTextDocument>(writer, UNO_QUERY); + Reference<frame::XController> controller = Reference<frame::XModel>(writer, UNO_TQUERY)->getCurrentController(); + m_cursor = Reference<text::XTextViewCursorSupplier>(controller, UNO_TQUERY)->getViewCursor(); + m_doc = Reference<text::XTextDocument>(writer, UNO_TQUERY); if(m_doc.is()) { - m_dsmgr = Reference<lang::XMultiServiceFactory>(m_doc, UNO_QUERY); + m_dsmgr = Reference<lang::XMultiServiceFactory>(m_doc, UNO_TQUERY); } return m_doc.is(); } @@ -231,12 +231,12 @@ bool OOOHandler::Interface::updateBibliography() { } void OOOHandler::Interface::createBibliography() { - Reference<container::XIndexAccess> indexes(Reference<text::XDocumentIndexesSupplier>(m_doc, UNO_QUERY)->getDocumentIndexes(), UNO_QUERY); + Reference<container::XIndexAccess> indexes(Reference<text::XDocumentIndexesSupplier>(m_doc, UNO_TQUERY)->getDocumentIndexes(), UNO_TQUERY); for(int i = 0; i < indexes->getCount(); ++i) { - Reference<lang::XServiceInfo> info(indexes->getByIndex(i), UNO_QUERY); + Reference<lang::XServiceInfo> info(indexes->getByIndex(i), UNO_TQUERY); if(info->supportsService(OUSTR("com.sun.star.text.Bibliography"))) { DEBUG("Found existing bibliography..."); - m_bib = Reference<text::XDocumentIndex>(indexes->getByIndex(i), UNO_QUERY); + m_bib = Reference<text::XDocumentIndex>(indexes->getByIndex(i), UNO_TQUERY); break; } } @@ -244,18 +244,18 @@ void OOOHandler::Interface::createBibliography() { if(!m_bib.is()) { DEBUG("Creating new bibliography..."); Reference<text::XText> text = m_doc->getText(); - Reference<text::XTextRange> textRange(text->createTextCursor(), UNO_QUERY); - Reference<text::XTextCursor> cursor(textRange, UNO_QUERY); + Reference<text::XTextRange> textRange(text->createTextCursor(), UNO_TQUERY); + Reference<text::XTextCursor> cursor(textRange, UNO_TQUERY); cursor->gotoEnd(false); text->insertControlCharacter(textRange, text::ControlCharacter::PARAGRAPH_BREAK, false); - m_bib = Reference<text::XDocumentIndex>(m_dsmgr->createInstance(OUSTR("com.sun.star.text.Bibliography")), UNO_QUERY); - Reference<text::XTextContent> textContent(m_bib, UNO_QUERY); + m_bib = Reference<text::XDocumentIndex>(m_dsmgr->createInstance(OUSTR("com.sun.star.text.Bibliography")), UNO_TQUERY); + Reference<text::XTextContent> textContent(m_bib, UNO_TQUERY); text->insertTextContent(textRange, textContent, false); } } bool OOOHandler::Interface::insertCitations(Cite::Map& fields) { - Reference<text::XTextField> entry(m_dsmgr->createInstance(OUString::createFromAscii("com.sun.star.text.TextField.Bibliography")), UNO_QUERY); + Reference<text::XTextField> entry(m_dsmgr->createInstance(OUString::createFromAscii("com.sun.star.text.TextField.Bibliography")), UNO_TQUERY); if(!entry.is()) { DEBUG("Interface::insertCitation - can't create TextField"); return false; @@ -266,12 +266,12 @@ bool OOOHandler::Interface::insertCitations(Cite::Map& fields) { values[i] = propValue(it->first, it->second); std::cout << "Setting " << OU2O(values[i].Name) << " = " << it->second << std::endl; } - Reference<beans::XPropertySet>(entry, UNO_QUERY)->setPropertyValue(OUSTR("Fields"), Any(values)); + Reference<beans::XPropertySet>(entry, UNO_TQUERY)->setPropertyValue(OUSTR("Fields"), Any(values)); Reference<text::XText> text = m_doc->getText(); - Reference<text::XTextCursor> cursor = text->createTextCursorByRange(Reference<text::XTextRange>(m_cursor, UNO_QUERY)); - Reference<text::XTextRange> textRange(cursor, UNO_QUERY); - Reference<text::XTextContent> textContent(entry, UNO_QUERY); + Reference<text::XTextCursor> cursor = text->createTextCursorByRange(Reference<text::XTextRange>(m_cursor, UNO_TQUERY)); + Reference<text::XTextRange> textRange(cursor, UNO_TQUERY); + Reference<text::XTextContent> textContent(entry, UNO_TQUERY); text->insertTextContent(textRange, textContent, false); return true; } @@ -336,13 +336,13 @@ bool OOOHandler::Interface::insertRecords(Cite::Map& fields) { return false; } - Reference<sdbc::XRowSet> rowSet(interface, UNO_QUERY); + Reference<sdbc::XRowSet> rowSet(interface, UNO_TQUERY); if(!rowSet.is()) { DEBUG("Could not create rowset interface"); return false; } - Reference<beans::XPropertySet> props(rowSet, UNO_QUERY); + Reference<beans::XPropertySet> props(rowSet, UNO_TQUERY); props->setPropertyValue(OUSTR("DataSourceName"), Any(OUSTR("Bibliography"))); props->setPropertyValue(OUSTR("CommandType"), Any(sdb::CommandType::COMMAND)); OUString s = OUSTR("SELECT COUNT(*) FROM \"biblio\" WHERE identifier='") + O2OU(fields["Identifier"]) + OUSTR("'"); @@ -350,9 +350,9 @@ bool OOOHandler::Interface::insertRecords(Cite::Map& fields) { try { rowSet->execute(); - } catch(sdbc::SQLException& e) { + } catch(sdbc::STQLException& e) { DEBUG(OU2O(s)); - DEBUG(OUSTR("SQL error - ") + e.SQLState); + DEBUG(OUSTR("SQL error - ") + e.STQLState); return false; } catch(Exception& e) { DEBUG(OU2O(s)); @@ -360,7 +360,7 @@ bool OOOHandler::Interface::insertRecords(Cite::Map& fields) { return false; } - Reference<sdbc::XRow> row(rowSet, UNO_QUERY); + Reference<sdbc::XRow> row(rowSet, UNO_TQUERY); int count = 0; if(rowSet->next()) { count = row->getString(1).toInt32(); @@ -380,9 +380,9 @@ bool OOOHandler::Interface::insertRecords(Cite::Map& fields) { try { rowSet->execute(); - } catch(sdbc::SQLException& e) { + } catch(sdbc::STQLException& e) { DEBUG(OU2O(s)); - DEBUG(OUSTR("SQL error(2) - ") + e.SQLState); + DEBUG(OUSTR("SQL error(2) - ") + e.STQLState); return false; } catch(Exception& e) { DEBUG(OU2O(s)); @@ -390,12 +390,12 @@ bool OOOHandler::Interface::insertRecords(Cite::Map& fields) { return false; } - Reference<sdbc::XResultSet> resultSet(rowSet, UNO_QUERY); - Reference<sdbc::XResultSetMetaDataSupplier> mdSupplier(resultSet, UNO_QUERY); + Reference<sdbc::XResultSet> resultSet(rowSet, UNO_TQUERY); + Reference<sdbc::XResultSetMetaDataSupplier> mdSupplier(resultSet, UNO_TQUERY); Reference<sdbc::XResultSetMetaData> metaData = mdSupplier->getMetaData(); - Reference<sdbc::XRowUpdate> rowUpdate(rowSet, UNO_QUERY); - Reference<sdbc::XResultSetUpdate> update(rowSet, UNO_QUERY); + Reference<sdbc::XRowUpdate> rowUpdate(rowSet, UNO_TQUERY); + Reference<sdbc::XResultSetUpdate> update(rowSet, UNO_TQUERY); if(count > 0) { resultSet->last(); } else { @@ -412,8 +412,8 @@ bool OOOHandler::Interface::insertRecords(Cite::Map& fields) { std::cout << s << " = " << value << std::endl; try { rowUpdate->updateString(i, O2OU(value)); - } catch(sdbc::SQLException& e) { - DEBUG(OUSTR("SQL error(3) - ") + e.SQLState); + } catch(sdbc::STQLException& e) { + DEBUG(OUSTR("SQL error(3) - ") + e.STQLState); } catch(Exception& e) { DEBUG(OUSTR("General error(3) - ") + e.Message); } @@ -425,6 +425,6 @@ bool OOOHandler::Interface::insertRecords(Cite::Map& fields) { update->insertRow(); } - Reference<lang::XComponent>(rowSet, UNO_QUERY)->dispose(); + Reference<lang::XComponent>(rowSet, UNO_TQUERY)->dispose(); return true; } diff --git a/src/cite/ooo/ooohandler.cpp b/src/cite/ooo/ooohandler.cpp index 1741896..d36b3e4 100644 --- a/src/cite/ooo/ooohandler.cpp +++ b/src/cite/ooo/ooohandler.cpp @@ -26,13 +26,13 @@ using Tellico::Cite::OOOHandler; Tellico::Cite::Map OOOHandler::s_fieldsMap; /* -QString OOOHandler::OUString2Q(const rtl::OUString& str) { +TQString OOOHandler::OUString2Q(const rtl::OUString& str) { const uint len = str.getLength(); - QChar* uni = new QChar[len + 1]; + TQChar* uni = new TQChar[len + 1]; const sal_Unicode* ouPtr = str.getStr(); const sal_Unicode* ouEnd = ouPtr + len; - QChar* qPtr = uni; + TQChar* qPtr = uni; while (ouPtr != ouEnd) { *(qPtr++) = *(ouPtr++); @@ -40,22 +40,22 @@ QString OOOHandler::OUString2Q(const rtl::OUString& str) { *qPtr = 0; - QString ret(uni, len); + TQString ret(uni, len); delete[] uni; return ret; } -rtl::OUString OOOHandler::QString2OU(const QString& str) { +rtl::OUString OOOHandler::TQString2OU(const TQString& str) { const uint len = str.length(); sal_Unicode* uni = new sal_Unicode[len + 1]; - const QChar* qPtr = str.unicode(); - const QChar* qEnd = qPtr + len; + const TQChar* qPtr = str.tqunicode(); + const TQChar* qEnd = qPtr + len; sal_Unicode* uPtr = uni; while (qPtr != qEnd) { - *(uPtr++) = (*(qPtr++)).unicode(); + *(uPtr++) = (*(qPtr++)).tqunicode(); } *uPtr = 0; diff --git a/src/cite/ooo/ooohandler.h b/src/cite/ooo/ooohandler.h index fd7f308..695794d 100644 --- a/src/cite/ooo/ooohandler.h +++ b/src/cite/ooo/ooohandler.h @@ -35,8 +35,8 @@ public: virtual bool cite(Cite::Map& fields); private: -// static QString OUString2Q(const rtl::OUString& str); -// static rtl::OUString QString2OU(const QString& str); +// static TQString OUString2Q(const rtl::OUString& str); +// static rtl::OUString TQString2OU(const TQString& str); static Cite::Map s_fieldsMap; static void buildFieldsMap(); 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(); } |