diff options
Diffstat (limited to 'src/modules/editor')
-rw-r--r-- | src/modules/editor/scripteditor.cpp | 44 | ||||
-rw-r--r-- | src/modules/editor/scripteditor.h | 9 |
2 files changed, 0 insertions, 53 deletions
diff --git a/src/modules/editor/scripteditor.cpp b/src/modules/editor/scripteditor.cpp index f6875265..3dc017c6 100644 --- a/src/modules/editor/scripteditor.cpp +++ b/src/modules/editor/scripteditor.cpp @@ -32,11 +32,7 @@ #include "kvi_tal_scrollview.h" #include <tqmessagebox.h> #include <tqtimer.h> -#ifdef COMPILE_USE_QT4 - //#define TQSyntaxHighlighter Q3SyntaxHighlighter -#else #include <tqobjectlist.h> -#endif #include <tqcursor.h> #include <tqfont.h> #include <tqrect.h> @@ -79,11 +75,7 @@ KviCompletionBox::KviCompletionBox(TQWidget * parent) { setPaletteForegroundColor(TQColor(0,0,0)); setPaletteBackgroundColor(TQColor(255,255,255)); -#ifdef COMPILE_USE_QT4 - setHScrollBarMode(KviTalListBox::AlwaysOff); -#else setHScrollBarMode(TQScrollView::AlwaysOff); -#endif TQFont listfont=font(); listfont.setPointSize(8); setFont(listfont); @@ -241,17 +233,9 @@ KviScriptEditorWidget::~KviScriptEditorWidget() } -#ifdef COMPILE_USE_QT4 -Q3PopupMenu * KviScriptEditorWidget::createPopupMenu( const TQPoint& pos ) -#else TQPopupMenu * KviScriptEditorWidget::createPopupMenu( const TQPoint& pos ) -#endif { -#ifdef COMPILE_USE_QT4 - Q3PopupMenu *pop=KviTalTextEdit::createPopupMenu(pos); -#else TQPopupMenu *pop=KviTalTextEdit::createPopupMenu(pos); -#endif pop->insertItem(__tr2qs("Context sensitive help"),this,TQT_SLOT(slotHelp()),TQt::CTRL+TQt::Key_H); pop->insertItem(__tr2qs("&Replace"),this,TQT_SLOT(slotReplace()),TQt::CTRL+TQt::Key_R); return pop; @@ -288,11 +272,7 @@ void KviScriptEditorWidget::updateOptions() p.setColor(TQColorGroup::Text,g_clrNormalText); setPalette(p); -#ifdef COMPILE_USE_QT4 - setTextFormat(TQt::PlainText); -#else setTextFormat(KviTalTextEdit::PlainText); -#endif // this will rehighlight everything setText(text()); // an "hack" to ensure Update all in the editor @@ -847,9 +827,7 @@ KviScriptEditorImplementation::KviScriptEditorImplementation(TQWidget * par) TQGridLayout * g = new TQGridLayout(this,2,3,0,0); m_pFindLineedit = new TQLineEdit(" ",this); -#ifndef COMPILE_USE_QT4 m_pFindLineedit->setFrameStyle(TQFrame::Sunken | TQFrame::Panel); -#endif m_pFindLineedit->setText(""); m_pFindLineedit->setPaletteForegroundColor(g_clrFind); @@ -857,11 +835,7 @@ KviScriptEditorImplementation::KviScriptEditorImplementation(TQWidget * par) g->addMultiCellWidget(m_pEditor,0,0,0,3); g->setRowStretch(0,1); -#ifdef COMPILE_USE_QT4 - TQToolButton * b = new TQToolButton(TQt::DownArrow,this,"dsa2"); -#else TQToolButton * b = new TQToolButton(DownArrow,this); -#endif b->setMinimumWidth(24); g->addWidget(b,1,0); @@ -1006,11 +980,7 @@ void KviScriptEditorImplementation::saveToFile() void KviScriptEditorImplementation::setText(const KviTQCString &txt) { m_pEditor->setText(txt.data()); -#ifdef COMPILE_USE_QT4 - m_pEditor->setTextFormat(TQt::PlainText); -#else m_pEditor->setTextFormat(KviTalTextEdit::PlainText); -#endif m_pEditor->moveCursor(KviTalTextEdit::MoveEnd,false); m_pEditor->setModified(false); updateRowColLabel(); @@ -1027,11 +997,7 @@ TQLineEdit * KviScriptEditorImplementation::getFindlineedit() void KviScriptEditorImplementation::setText(const TQString &txt) { m_pEditor->setText(txt); -#ifdef COMPILE_USE_QT4 - m_pEditor->setTextFormat(TQt::PlainText); -#else m_pEditor->setTextFormat(KviTalTextEdit::PlainText); -#endif m_pEditor->moveCursor(KviTalTextEdit::MoveEnd,false); m_pEditor->setModified(false); updateRowColLabel(); @@ -1127,36 +1093,28 @@ KviScriptEditorReplaceDialog::KviScriptEditorReplaceDialog( TQWidget* parent, co TQGridLayout *layout = new TQGridLayout( this, 1, 1, 11, 6, "replace layout"); m_pFindlineedit = new TQLineEdit( this, "findlineedit" ); -#ifndef COMPILE_USE_QT4 m_pFindlineedit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_pFindlineedit->sizePolicy().hasHeightForWidth() ) ); m_pFindlineedit->setFrameShape( TQLineEdit::LineEditPanel ); m_pFindlineedit->setFrameShadow( TQLineEdit::Sunken ); -#endif layout->addMultiCellWidget( m_pFindlineedit, 2, 2, 1, 2 ); m_pReplacelineedit = new TQLineEdit( this, "replacelineedit" ); -#ifndef COMPILE_USE_QT4 m_pReplacelineedit->setFrameShape( TQLineEdit::LineEditPanel ); m_pReplacelineedit->setFrameShadow( TQLineEdit::Sunken ); -#endif layout->addMultiCellWidget( m_pReplacelineedit, 3, 3, 1, 2 ); m_pFindlineedit->setFocus(); TQLabel *findlabel = new TQLabel( this, "findlabel" ); findlabel->setText(tr("Word to Find")); -#ifndef COMPILE_USE_QT4 findlabel->setAutoResize(true); -#endif layout->addWidget( findlabel, 2, 0 ); TQLabel *replacelabel = new TQLabel( this, "replacelabel" ); replacelabel->setText(tr("Replace with")); -#ifndef COMPILE_USE_QT4 replacelabel->setAutoResize(true); -#endif layout->addWidget( replacelabel, 3, 0 ); TQPushButton *cancelbutton = new TQPushButton( this, "cancelButton" ); @@ -1182,10 +1140,8 @@ KviScriptEditorReplaceDialog::KviScriptEditorReplaceDialog( TQWidget* parent, co layout->addWidget( replace, 3, 3 ); replace->setEnabled(false); -#ifndef COMPILE_USE_QT4 clearWState( WState_Polished ); setTabOrder(m_pFindlineedit,m_pReplacelineedit); -#endif // signals and slots connections connect( replacebutton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotReplace() ) ); connect( findNext, TQT_SIGNAL( clicked() ),this,TQT_SLOT( slotNextFind())); diff --git a/src/modules/editor/scripteditor.h b/src/modules/editor/scripteditor.h index e7718e07..7949870f 100644 --- a/src/modules/editor/scripteditor.h +++ b/src/modules/editor/scripteditor.h @@ -83,22 +83,13 @@ signals: protected: virtual void keyPressEvent(TQKeyEvent * e); void contentsMousePressEvent(TQMouseEvent *); -#ifdef COMPILE_USE_QT4 - Q3PopupMenu *createPopupMenu( const TQPoint& pos ); -#else TQPopupMenu *createPopupMenu( const TQPoint& pos ); -#endif TQWidget *m_pParent; TQString m_szHelp; }; -#ifdef COMPILE_USE_QT4 - #include <tq3syntaxhighlighter.h> - #define TQSyntaxHighlighter Q3SyntaxHighlighter -#else #include <tqobjectlist.h> -#endif class KviScriptSyntaxHighlighter : public TQSyntaxHighlighter { public: |