diff options
Diffstat (limited to 'quanta/src/quantadoc.cpp')
-rw-r--r-- | quanta/src/quantadoc.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/quanta/src/quantadoc.cpp b/quanta/src/quantadoc.cpp index 9100432e..eb5c538f 100644 --- a/quanta/src/quantadoc.cpp +++ b/quanta/src/quantadoc.cpp @@ -16,14 +16,14 @@ ***************************************************************************/ // include files for Qt -#include <qdir.h> -#include <qfileinfo.h> -#include <qwidget.h> -#include <qtabwidget.h> -#include <qtabbar.h> -#include <qlayout.h> -#include <qdragobject.h> -#include <qobject.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqwidget.h> +#include <tqtabwidget.h> +#include <tqtabbar.h> +#include <tqlayout.h> +#include <tqdragobject.h> +#include <tqobject.h> // include files for KDE @@ -76,13 +76,13 @@ #include "tagactionmanager.h" #include "tagactionset.h" -QuantaDoc::QuantaDoc(QWidget *parent, const char *name) : QObject(parent, name) +QuantaDoc::QuantaDoc(TQWidget *parent, const char *name) : TQObject(parent, name) { fileWatcher = new KDirWatch(this); attribMenu = new KPopupMenu(); attribMenu->insertTitle(i18n("Tag")); - connect( attribMenu, SIGNAL(activated(int)), this, SLOT(slotInsertAttrib(int))); + connect( attribMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotInsertAttrib(int))); } QuantaDoc::~QuantaDoc() @@ -144,18 +144,18 @@ bool QuantaDoc::newDocument( const KURL& url, bool switchToExisting ) return true; } -void QuantaDoc::openDocument(const KURL& urlToOpen, const QString &a_encoding, +void QuantaDoc::openDocument(const KURL& urlToOpen, const TQString &a_encoding, bool switchToExisting, bool readOnly) { bool idleTimerStatus = quantaApp->slotEnableIdleTimer(false); KURL url = urlToOpen; if (url.isLocalFile()) { - QString path = QDir(url.path()).canonicalPath(); + TQString path = TQDir(url.path()).canonicalPath(); if (!path.isEmpty()) url.setPath(path); } - QString encoding = a_encoding; + TQString encoding = a_encoding; if (!newDocument(url, switchToExisting)) { quantaApp->slotEnableIdleTimer(idleTimerStatus); @@ -175,10 +175,10 @@ void QuantaDoc::openDocument(const KURL& urlToOpen, const QString &a_encoding, { if (encoding.isEmpty()) encoding = quantaApp->defaultEncoding(); - w->disconnect(SIGNAL(openingFailed(const KURL&))); - connect(w, SIGNAL(openingFailed(const KURL&)), this, SLOT(slotOpeningFailed(const KURL&))); - w->disconnect(SIGNAL(openingCompleted(const KURL&))); - connect(w, SIGNAL(openingCompleted(const KURL&)), this, SLOT(slotOpeningCompleted(const KURL&))); + w->disconnect(TQT_SIGNAL(openingFailed(const KURL&))); + connect(w, TQT_SIGNAL(openingFailed(const KURL&)), this, TQT_SLOT(slotOpeningFailed(const KURL&))); + w->disconnect(TQT_SIGNAL(openingCompleted(const KURL&))); + connect(w, TQT_SIGNAL(openingCompleted(const KURL&)), this, TQT_SLOT(slotOpeningCompleted(const KURL&))); w->open(url, encoding); quantaApp->setTitle(url.prettyURL(0, KURL::StripFileProtocol)); } @@ -192,7 +192,7 @@ void QuantaDoc::openDocument(const KURL& urlToOpen, const QString &a_encoding, KTextEditor::HighlightingInterface* highlightIf = dynamic_cast<KTextEditor::HighlightingInterface*>(w->doc()); if (highlightIf) { - QString hlName; + TQString hlName; int htmlIdx = -1, xmlIdx = -1; for (uint i = 0; i < highlightIf->hlModeCount(); i++) { @@ -243,7 +243,7 @@ void QuantaDoc::slotOpeningCompleted(const KURL &url) quantaApp->slotNewStatus(); quantaApp->setTitle(url.prettyURL(0, KURL::StripFileProtocol)); Project::ref()->loadCursorPosition(w->url(), dynamic_cast<KTextEditor::ViewCursorInterface*>(w->view())); - emit eventHappened("after_open", url.url(), QString::null); + emit eventHappened("after_open", url.url(), TQString::null); bool flag = TagActionManager::canIndentDTD(w->defaultDTD()->name); quantaApp->actionCollection()->action("apply_source_indentation")->setEnabled(flag); @@ -263,16 +263,16 @@ void QuantaDoc::slotAttribPopup() if (node && node->tag) { Tag *tag = node->tag; - QString tagName = tag->name; - QStrIList attrList = QStrIList(); - QString name; + TQString tagName = tag->name; + TQStrIList attrList = TQStrIList(); + TQString name; for (int i=0; i < tag->attrCount(); i++ ) attrList.append( tag->attribute(i) ); if ( QuantaCommon::isKnownTag(w->getDTDIdentifier(),tagName) ) { - QString caption = i18n("Attributes of <%1>").arg(tagName); + TQString caption = i18n("Attributes of <%1>").arg(tagName); attribMenu->insertTitle( caption ); AttributeList *list = QuantaCommon::tagAttributes(w->getDTDIdentifier(),tagName ); @@ -289,9 +289,9 @@ void QuantaDoc::slotAttribPopup() } QTag* qtag = QuantaCommon::tagFromDTD(w->getDTDIdentifier(), tagName); - for (QStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it) + for (TQStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it) { - QPopupMenu* popUpMenu = new QPopupMenu(attribMenu, (*it).latin1()); + TQPopupMenu* popUpMenu = new TQPopupMenu(attribMenu, (*it).latin1()); AttributeList *attrs = qtag->parentDTD->commonAttrs->find(*it); for (uint j = 0; j < attrs->count(); j++) { @@ -302,7 +302,7 @@ void QuantaDoc::slotAttribPopup() popUpMenu->setItemEnabled( menuId , false ); } } - connect( popUpMenu, SIGNAL(activated(int)), this, SLOT(slotInsertAttrib(int))); + connect( popUpMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotInsertAttrib(int))); attribMenu->insertItem(*it, popUpMenu); } @@ -310,14 +310,14 @@ void QuantaDoc::slotAttribPopup() { attribMenu->setActiveItem( 0); - QPoint globalPos = w->view()->mapToGlobal(w->viewCursorIf->cursorCoordinates()); - QFont font = w->view()->font(); - globalPos.setY(globalPos.y() + QFontMetrics(font).height()); + TQPoint globalPos = w->view()->mapToGlobal(w->viewCursorIf->cursorCoordinates()); + TQFont font = w->view()->font(); + globalPos.setY(globalPos.y() + TQFontMetrics(font).height()); attribMenu->exec(globalPos); } } else { - QString message = i18n("Unknown tag: %1").arg(tagName); + TQString message = i18n("Unknown tag: %1").arg(tagName); quantaApp->slotStatusMsg( message ); } } @@ -333,20 +333,20 @@ void QuantaDoc::slotInsertAttrib( int id ) if (node && node->tag) { Tag *tag = node->tag; - QString tagName = tag->name; + TQString tagName = tag->name; if ( QuantaCommon::isKnownTag(w->getDTDIdentifier(), tagName) ) { int menuId; AttributeList *list = QuantaCommon::tagAttributes(w->getDTDIdentifier(), tagName); menuId = list->count(); - QString attrStr; + TQString attrStr; if (id <= menuId) { attrStr = list->at(id)->name; } else { QTag* qtag = QuantaCommon::tagFromDTD(w->getDTDIdentifier(), tagName); - for (QStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it) + for (TQStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it) { AttributeList *attrs = qtag->parentDTD->commonAttrs->find(*it); menuId += attrs->count(); @@ -367,7 +367,7 @@ void QuantaDoc::slotInsertAttrib( int id ) delete attribMenu; attribMenu = new KPopupMenu(); attribMenu->insertTitle(i18n("Tag")); - connect( attribMenu, SIGNAL(activated(int)), this, SLOT(slotInsertAttrib(int))); + connect( attribMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotInsertAttrib(int))); } } |