summaryrefslogtreecommitdiffstats
path: root/src/modules/editor/scripteditor.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
commit0a80cfd57d271dd44221467efb426675fa470356 (patch)
tree6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/modules/editor/scripteditor.h
parent3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff)
downloadkvirc-0a80cfd57d271dd44221467efb426675fa470356.tar.gz
kvirc-0a80cfd57d271dd44221467efb426675fa470356.zip
TQt4 port kvirc
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/modules/editor/scripteditor.h')
-rw-r--r--src/modules/editor/scripteditor.h129
1 files changed, 67 insertions, 62 deletions
diff --git a/src/modules/editor/scripteditor.h b/src/modules/editor/scripteditor.h
index d7bc435f..f37c7ab2 100644
--- a/src/modules/editor/scripteditor.h
+++ b/src/modules/editor/scripteditor.h
@@ -27,13 +27,13 @@
#include "kvi_scripteditor.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kvi_tal_textedit.h>
-#include <qsyntaxhighlighter.h>
-#include <qdialog.h>
-#include <qcheckbox.h>
+#include <tqsyntaxhighlighter.h>
+#include <tqdialog.h>
+#include <tqcheckbox.h>
#include "kvi_tal_listbox.h"
-#include <qevent.h>
+#include <tqevent.h>
#include "kvi_qcstring.h"
#include "kvi_tal_popupmenu.h"
@@ -45,110 +45,114 @@ typedef KviPointerList<int> ColumnList;
class KviCompletionBox: public KviTalListBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KviCompletionBox(QWidget * parent);
+ KviCompletionBox(TQWidget * tqparent);
~KviCompletionBox(){};
- void updateContents(QString word);
+ void updateContents(TQString word);
protected:
- virtual void keyPressEvent(QKeyEvent * e);
+ virtual void keyPressEvent(TQKeyEvent * e);
};
class KviScriptEditorWidget : public KviTalTextEdit
{
Q_OBJECT
- Q_PROPERTY(bool contextSensitiveHelp READ contextSensitiveHelp)
+ TQ_OBJECT
+ TQ_PROPERTY(bool contextSensitiveHelp READ contextSensitiveHelp)
public:
- KviScriptEditorWidget(QWidget * pParent);
+ KviScriptEditorWidget(TQWidget * pParent);
virtual ~KviScriptEditorWidget();
public:
void updateOptions();
- void find1();
- QString m_szFind;
+ void tqfind1();
+ TQString m_szFind;
KviCompletionBox *completelistbox;
void completition(bool bCanComplete = 1);
- void getWordBeforeCursor(QString &buffer,int index,bool *);
- void getWordOnCursor(QString &buffer,int index) const;
+ void getWordBeforeCursor(TQString &buffer,int index,bool *);
+ void getWordOnCursor(TQString &buffer,int index) const;
bool contextSensitiveHelp() const;
public slots:
void slotFind();
void slotHelp();
void slotReplace();
- void slotComplete(const QString &str);
+ void slotComplete(const TQString &str);
signals:
void keyPressed();
protected:
- virtual void keyPressEvent(QKeyEvent * e);
- void contentsMousePressEvent(QMouseEvent *);
+ virtual void keyPressEvent(TQKeyEvent * e);
+ void contentsMousePressEvent(TQMouseEvent *);
#ifdef COMPILE_USE_QT4
- Q3PopupMenu *createPopupMenu( const QPoint& pos );
+ Q3PopupMenu *createPopupMenu( const TQPoint& pos );
#else
- QPopupMenu *createPopupMenu( const QPoint& pos );
+ TQPopupMenu *createPopupMenu( const TQPoint& pos );
#endif
- QWidget *m_pParent;
- QString m_szHelp;
+ TQWidget *m_pParent;
+ TQString m_szHelp;
};
#ifdef COMPILE_USE_QT4
- #include <q3syntaxhighlighter.h>
- #define QSyntaxHighlighter Q3SyntaxHighlighter
+ #include <tq3syntaxhighlighter.h>
+ #define TQSyntaxHighlighter Q3SyntaxHighlighter
#else
- #include <qobjectlist.h>
+ #include <tqobjectlist.h>
#endif
-class KviScriptSyntaxHighlighter : public QSyntaxHighlighter
+class KviScriptSyntaxHighlighter : public TQSyntaxHighlighter
{
public:
KviScriptSyntaxHighlighter(KviScriptEditorWidget * pWidget);
virtual ~KviScriptSyntaxHighlighter();
public:
- virtual int highlightParagraph(const QString & text,int endStateOfLastPara);
+ virtual int highlightParagraph(const TQString & text,int endStateOfLastPara);
};
-class KviScriptEditorWidgetColorOptions : public QDialog
+class KviScriptEditorWidgetColorOptions : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- KviScriptEditorWidgetColorOptions(QWidget * pParent);
+ KviScriptEditorWidgetColorOptions(TQWidget * pParent);
~KviScriptEditorWidgetColorOptions();
private:
KviPointerList<KviSelectorInterface> * m_pSelectorInterfaceList;
protected:
- KviColorSelector * addColorSelector(QWidget * pParent,const QString & txt,QColor * pOption,bool bEnabled);
+ KviColorSelector * addColorSelector(TQWidget * pParent,const TQString & txt,TQColor * pOption,bool bEnabled);
protected slots:
void okClicked();
};
-class QTimer;
+class TQTimer;
class KviScriptEditorImplementation : public KviScriptEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- KviScriptEditorImplementation(QWidget * par);
+ KviScriptEditorImplementation(TQWidget * par);
virtual ~KviScriptEditorImplementation();
protected:
KviScriptEditorWidget * m_pEditor;
- QLabel * m_pRowColLabel;
- QPoint m_lastCursorPos;
+ TQLabel * m_pRowColLabel;
+ TQPoint m_lastCursorPos;
public:
- virtual void setText(const QString &txt);
- virtual void getText(QString &txt);
- virtual void setText(const KviQCString &txt);
- virtual void getText(KviQCString &txt);
- virtual void setFindText(const QString & text);
+ virtual void setText(const TQString &txt);
+ virtual void getText(TQString &txt);
+ virtual void setText(const KviTQCString &txt);
+ virtual void getText(KviTQCString &txt);
+ virtual void setFindText(const TQString & text);
virtual void setEnabled(bool bEnabled);
virtual void setFocus();
virtual bool isModified();
void setFindLineeditReadOnly(bool b);
- void setCursorPosition(QPoint);
- QPoint getCursor();
- QLineEdit *m_pFindlineedit;
- QLineEdit * getFindlineedit();
+ void setCursorPosition(TQPoint);
+ TQPoint getCursor();
+ TQLineEdit *m_pFindlineedit;
+ TQLineEdit * getFindlineedit();
protected:
- virtual void focusInEvent(QFocusEvent *e);
+ virtual void focusInEvent(TQFocusEvent *e);
void loadOptions();
void saveOptions();
protected slots:
@@ -157,42 +161,43 @@ protected slots:
void configureColors();
void updateRowColLabel();
void slotFind();
- void slotReplaceAll(const QString &,const QString &);
+ void slotReplaceAll(const TQString &,const TQString &);
void slotInitFind();
- void slotNextFind(const QString &);
+ void slotNextFind(const TQString &);
signals:
- void find( const QString &);
- void replaceAll( const QString &, const QString &);
+ void tqfind( const TQString &);
+ void replaceAll( const TQString &, const TQString &);
void initFind();
- void nextFind(const QString &);
+ void nextFind(const TQString &);
};
-class KviScriptEditorReplaceDialog: public QDialog
+class KviScriptEditorReplaceDialog: public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- KviScriptEditorReplaceDialog( QWidget* parent = 0, const char* name = 0);
+ KviScriptEditorReplaceDialog( TQWidget* tqparent = 0, const char* name = 0);
~KviScriptEditorReplaceDialog();
- QLineEdit *m_pFindlineedit;
- QLineEdit *m_pReplacelineedit;
+ TQLineEdit *m_pFindlineedit;
+ TQLineEdit *m_pReplacelineedit;
protected:
- QLabel *findlabel;
- QLabel *replacelabel;
- QPushButton *replacebutton;
- QPushButton *replace;
- QPushButton *findNext;
+ TQLabel *findlabel;
+ TQLabel *replacelabel;
+ TQPushButton *replacebutton;
+ TQPushButton *tqreplace;
+ TQPushButton *findNext;
-// QPushButton *cancelbutton;
+// TQPushButton *cancelbutton;
KviStyledCheckBox *checkReplaceAll;
- QWidget *m_pParent;
+ TQWidget *m_pParent;
protected slots:
- void textChanged(const QString &);
+ void textChanged(const TQString &);
void slotReplace();
void slotNextFind();
signals:
- void replaceAll( const QString &,const QString &);
+ void replaceAll( const TQString &,const TQString &);
void initFind();
- void nextFind(const QString &);
+ void nextFind(const TQString &);
};