diff options
Diffstat (limited to 'kexi/widget/kexieditor.cpp')
-rw-r--r-- | kexi/widget/kexieditor.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/kexi/widget/kexieditor.cpp b/kexi/widget/kexieditor.cpp index f482584e..82af06a3 100644 --- a/kexi/widget/kexieditor.cpp +++ b/kexi/widget/kexieditor.cpp @@ -23,8 +23,8 @@ #include <keximainwindow.h> -#include <qlayout.h> -#include <qframe.h> +#include <tqlayout.h> +#include <tqframe.h> #include <klocale.h> #include <kdebug.h> @@ -50,19 +50,19 @@ copy and paste to the editor. */ class KexiEditorSharedActionConnector : public KexiSharedActionConnector { public: - KexiEditorSharedActionConnector( KexiActionProxy* proxy, QObject* obj ) + KexiEditorSharedActionConnector( KexiActionProxy* proxy, TQObject* obj ) : KexiSharedActionConnector( proxy, obj ) { #ifdef KTEXTEDIT_BASED_SQL_EDITOR - plugSharedAction("edit_cut", SLOT(cut())); - plugSharedAction("edit_copy", SLOT(copy())); - plugSharedAction("edit_paste", SLOT(paste())); - plugSharedAction("edit_clear", SLOT(clear())); - plugSharedAction("edit_undo", SLOT(undo())); - plugSharedAction("edit_redo", SLOT(redo())); - plugSharedAction("edit_select_all", SLOT(selectAll())); + plugSharedAction("edit_cut", TQT_SLOT(cut())); + plugSharedAction("edit_copy", TQT_SLOT(copy())); + plugSharedAction("edit_paste", TQT_SLOT(paste())); + plugSharedAction("edit_clear", TQT_SLOT(clear())); + plugSharedAction("edit_undo", TQT_SLOT(undo())); + plugSharedAction("edit_redo", TQT_SLOT(redo())); + plugSharedAction("edit_select_all", TQT_SLOT(selectAll())); #else - QValueList<QCString> actions; + TQValueList<TQCString> actions; actions << "edit_cut" << "edit_copy" << "edit_paste" << "edit_clear" << "edit_undo" << "edit_redo" << "edit_select_all"; plugSharedActionsToExternalGUI(actions, dynamic_cast<KXMLGUIClient*>(obj)); @@ -81,47 +81,47 @@ class KexiEditorPrivate { #endif }; -KexiEditor::KexiEditor(KexiMainWindow *mainWin, QWidget *parent, const char *name) - : KexiViewBase(mainWin, parent, name) +KexiEditor::KexiEditor(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name) + : KexiViewBase(mainWin, tqparent, name) , d(new KexiEditorPrivate()) { - QVBoxLayout *layout = new QVBoxLayout(this); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this); #ifdef KTEXTEDIT_BASED_SQL_EDITOR - d->view = new KTextEdit( "", QString::null, this, "kexi_editor" ); + d->view = new KTextEdit( "", TQString(), this, "kexi_editor" ); //adjust font - connect(d->view, SIGNAL(textChanged()), this, SIGNAL(textChanged())); - QFont f("Courier"); - f.setStyleStrategy(QFont::PreferAntialias); + connect(d->view, TQT_SIGNAL(textChanged()), this, TQT_SIGNAL(textChanged())); + TQFont f("Courier"); + f.setStyleStrategy(TQFont::PreferAntialias); f.setPointSize(d->view->font().pointSize()); d->view->setFont( f ); d->view->setCheckSpellingEnabled(false); #else - QFrame *fr = new QFrame(this); - fr->setFrameStyle(QFrame::Sunken|QFrame::WinPanel); - layout->addWidget(fr); - layout = new QVBoxLayout(fr); - layout->setMargin( 2 ); + TQFrame *fr = new TQFrame(this); + fr->setFrameStyle(TQFrame::Sunken|TQFrame::WinPanel); + tqlayout->addWidget(fr); + tqlayout = new TQVBoxLayout(fr); + tqlayout->setMargin( 2 ); - d->doc = KTextEditor::EditorChooser::createDocument(fr); + d->doc = KTextEditor::EditorChooser::createDocument(TQT_TQOBJECT(fr)); if (!d->doc) return; d->view = d->doc->createView(fr, 0L); KTextEditor::PopupMenuInterface *popupInt = dynamic_cast<KTextEditor::PopupMenuInterface*>( d->view ); if(popupInt) { - QPopupMenu *pop = (QPopupMenu*) mainWin->factory()->container("edit", mainWin); + TQPopupMenu *pop = (TQPopupMenu*) mainWin->factory()->container("edit", mainWin); if(pop) { //plugSharedAction("edit_undo", pop); popupInt->installPopup(pop); } } - connect(d->doc, SIGNAL(textChanged()), this, SIGNAL(textChanged())); + connect(d->doc, TQT_SIGNAL(textChanged()), this, TQT_SIGNAL(textChanged())); #endif - KexiEditorSharedActionConnector c(this, d->view); + KexiEditorSharedActionConnector c(this, TQT_TQOBJECT(d->view)); d->view->installEventFilter(this); - layout->addWidget(d->view); + tqlayout->addWidget(d->view); setViewWidget(d->view, true/*focus*/); d->view->show(); } @@ -145,19 +145,19 @@ bool KexiEditor::isAdvancedEditor() #endif } -QString KexiEditor::text() +TQString KexiEditor::text() { #ifdef KTEXTEDIT_BASED_SQL_EDITOR return d->view->text(); #else if (!d->doc) - return QString::null; + return TQString(); KTextEditor::EditInterface *eIface = KTextEditor::editInterface(d->doc); return eIface->text(); #endif } -void KexiEditor::setText(const QString &text) +void KexiEditor::setText(const TQString &text) { #ifdef KTEXTEDIT_BASED_SQL_EDITOR const bool was_dirty = m_parentView ? m_parentView->dirty() : dirty(); @@ -176,14 +176,14 @@ void KexiEditor::setText(const QString &text) #endif } -void KexiEditor::setHighlightMode(const QString& highlightmodename) +void KexiEditor::setHighlightMode(const TQString& highlightmodename) { #ifdef KTEXTEDIT_BASED_SQL_EDITOR #else KTextEditor::HighlightingInterface *hl = KTextEditor::highlightingInterface( d->doc ); for(uint i = 0; i < hl->hlModeCount(); i++) { //kdDebug() << "hlmode("<<i<<"): " << hl->hlModeName(i) << endl; - if (hl->hlModeName(i).contains(highlightmodename, false)) { + if (hl->hlModeName(i).tqcontains(highlightmodename, false)) { hl->setHlMode(i); return; } |