summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_editors.h
diff options
context:
space:
mode:
Diffstat (limited to 'kspread/kspread_editors.h')
-rw-r--r--kspread/kspread_editors.h95
1 files changed, 50 insertions, 45 deletions
diff --git a/kspread/kspread_editors.h b/kspread/kspread_editors.h
index b5c73da3..63651717 100644
--- a/kspread/kspread_editors.h
+++ b/kspread/kspread_editors.h
@@ -24,17 +24,17 @@
#include <vector>
-#include <qsyntaxhighlighter.h>
-#include <qwidget.h>
+#include <tqsyntaxhighlighter.h>
+#include <tqwidget.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <ksharedptr.h>
class KTextEdit;
-class QFont;
-class QButton;
-class QTextCursor;
+class TQFont;
+class TQButton;
+class TQTextCursor;
namespace KSpread
{
@@ -52,23 +52,23 @@ class View;
* Colours cell references in formulas. Installed by CellEditor instances in
* the constructor.
*/
-class FormulaEditorHighlighter : public QSyntaxHighlighter
+class FormulaEditorHighlighter : public TQSyntaxHighlighter
{
public:
/**
- * Constructs a FormulaHighlighter to colour-code cell references in a QTextEdit.
+ * Constructs a FormulaHighlighter to colour-code cell references in a TQTextEdit.
*
- * @param textEdit The QTextEdit widget which the highlighter should operate on
+ * @param textEdit The TQTextEdit widget which the highlighter should operate on
* @param canvas The Canvas object
*/
- FormulaEditorHighlighter(QTextEdit* textEdit, Canvas* canvas);
+ FormulaEditorHighlighter(TQTextEdit* textEdit, Canvas* canvas);
virtual ~FormulaEditorHighlighter();
/**
* Called automatically by KTextEditor to highlight text when modified.
*/
- virtual int highlightParagraph(const QString& text, int endStateOfLastPara);
+ virtual int highlightParagraph(const TQString& text, int endStateOfLastPara);
/**
*
*/
@@ -117,9 +117,10 @@ private:
* can select from. If the user selects a function name from the list,
* the @ref FunctionCompletion::selectedCompletion() signal is emitted
*/
-class FunctionCompletion : public QObject
+class FunctionCompletion : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -129,7 +130,7 @@ public:
/**
* Handles various keyboard and mouse actions which may occur on the autocompletion popup list
*/
- bool eventFilter( QObject *o, QEvent *e );
+ bool eventFilter( TQObject *o, TQEvent *e );
/**
* Hides the autocompletion list box if it is visible and emits the @ref selectedCompletion signal.
@@ -140,16 +141,16 @@ public:
* Populates the autocompletion list box with the specified choices and shows it so that the user can view and select a function name.
* @param choices A list of possible function names which match the characters that the user has already entered.
*/
- void showCompletion( const QStringList &choices );
+ void showCompletion( const TQStringList &choices );
private slots:
- void itemSelected( const QString& item );
+ void itemSelected( const TQString& item );
signals:
/**
* Emitted, if the user selects a function name from the list.
*/
- void selectedCompletion( const QString& item );
+ void selectedCompletion( const TQString& item );
private:
class Private;
@@ -163,17 +164,18 @@ private:
/**
* class CellEditor
*/
-class CellEditor : public QWidget
+class CellEditor : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Creates a new CellEditor.
* @param cell The spreadsheet cell to associate the cell text editor with
* @param _parent The @ref Canvas object to associate this cell text editor with
- * @param captureAllKeyEvents Controls whether or not the text editor swallows arrow key events or sends them to the parent canvas instead. If this is set to true, pressing the arrow keys will navigate backwards and forwards through the text in the editor. If it is false, the key events will be sent to the parent canvas which will change the cell being edited (depending on the direction of the arrow pressed). Generally this should be set to true if the user double clicks on the cell to edit it, and false if the user initiates editing by typing whilst the cell is selected.
- * @param _name This parameter is sent to the QObject constructor
+ * @param captureAllKeyEvents Controls whether or not the text editor swallows arrow key events or sends them to the tqparent canvas instead. If this is set to true, pressing the arrow keys will navigate backwards and forwards through the text in the editor. If it is false, the key events will be sent to the tqparent canvas which will change the cell being edited (depending on the direction of the arrow pressed). Generally this should be set to true if the user double clicks on the cell to edit it, and false if the user initiates editing by typing whilst the cell is selected.
+ * @param _name This parameter is sent to the TQObject constructor
*/
CellEditor( Cell* cell, Canvas* _parent = 0, bool captureAllKeyEvents = false, const char* _name = 0 );
~CellEditor();
@@ -181,17 +183,17 @@ public:
Cell* cell() const;
Canvas* canvas() const;
- void handleKeyPressEvent( QKeyEvent* _ev );
- void handleIMEvent( QIMEvent * _ev );
- void setEditorFont(QFont const & font, bool updateSize);
+ void handleKeyPressEvent( TQKeyEvent* _ev );
+ void handleIMEvent( TQIMEvent * _ev );
+ void setEditorFont(TQFont const & font, bool updateSize);
int cursorPosition() const;
void setCursorPosition(int pos);
- void setText(QString text);
+ void setText(TQString text);
/** wrapper to KTextEdit::text() */
- QString text() const;
+ TQString text() const;
/** wrapper to KTextEdit::cut() */
void cut();
@@ -200,7 +202,7 @@ public:
/** wrapper to KTextEdit::copy() */
void copy();
- QPoint globalCursorPosition() const;
+ TQPoint globalCursorPosition() const;
bool checkChoice();
void setCheckChoice(bool b);
@@ -214,20 +216,20 @@ private slots:
void slotTextChanged();
void slotCompletionModeChanged(KGlobalSettings::Completion _completion);
void slotCursorPositionChanged(int para,int pos);
- void slotTextCursorChanged(QTextCursor*);
+ void slotTextCursorChanged(TQTextCursor*);
protected:
- void resizeEvent( QResizeEvent* );
+ void resizeEvent( TQResizeEvent* );
/**
- * Steals some key events from the QLineEdit and sends
- * it to the @ref Canvas ( its parent ) instead.
+ * Steals some key events from the TQLineEdit and sends
+ * it to the @ref Canvas ( its tqparent ) instead.
*/
- bool eventFilter( QObject* o, QEvent* e );
+ bool eventFilter( TQObject* o, TQEvent* e );
protected slots:
void checkFunctionAutoComplete();
void triggerFunctionAutoComplete();
- void functionAutoComplete( const QString& item );
+ void functionAutoComplete( const TQString& item );
private:
class Private;
@@ -242,12 +244,13 @@ private:
class ComboboxLocationEditWidget : public KComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- ComboboxLocationEditWidget( QWidget *_parent, View * _canvas );
+ ComboboxLocationEditWidget( TQWidget *_parent, View * _canvas );
public slots:
- void slotAddAreaName( const QString & );
- void slotRemoveAreaName( const QString & );
+ void slotAddAreaName( const TQString & );
+ void slotRemoveAreaName( const TQString & );
private:
LocationEditWidget *m_locationWidget;
};
@@ -261,18 +264,19 @@ private:
class LocationEditWidget : public KLineEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- LocationEditWidget( QWidget *_parent, View * _canvas );
+ LocationEditWidget( TQWidget *_parent, View * _canvas );
View * view() const { return m_pView;}
- void addCompletionItem( const QString &_item );
- void removeCompletionItem( const QString &_item );
+ void addCompletionItem( const TQString &_item );
+ void removeCompletionItem( const TQString &_item );
private slots:
void slotActivateItem();
protected:
- virtual void keyPressEvent( QKeyEvent * _ev );
+ virtual void keyPressEvent( TQKeyEvent * _ev );
private:
View * m_pView;
KCompletion completionList;
@@ -285,14 +289,15 @@ private:
* The widget that appears above the sheet and allows to
* edit the cells content.
*/
-class EditWidget : public QLineEdit
+class EditWidget : public TQLineEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- EditWidget( QWidget *parent, Canvas *canvas,
- QButton *cancelButton, QButton *okButton);
+ EditWidget( TQWidget *tqparent, Canvas *canvas,
+ TQButton *cancelButton, TQButton *okButton);
- virtual void setText( const QString& t );
+ virtual void setText( const TQString& t );
// Go into edit mode (enable the buttons)
void setEditMode( bool mode );
@@ -303,12 +308,12 @@ public slots:
void slotDoneEdit();
protected:
- virtual void keyPressEvent ( QKeyEvent* _ev );
- virtual void focusOutEvent( QFocusEvent* ev );
+ virtual void keyPressEvent ( TQKeyEvent* _ev );
+ virtual void focusOutEvent( TQFocusEvent* ev );
private:
- QButton* m_pCancelButton;
- QButton* m_pOkButton;
+ TQButton* m_pCancelButton;
+ TQButton* m_pOkButton;
Canvas* m_pCanvas;
bool isArray;
};