diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-17 08:20:48 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-17 08:20:48 +0000 |
commit | aa0726b20f398264f0a2abc60215be044b106f9c (patch) | |
tree | 070fdbc19a1106cfdd7f651a8ce76bb1b89a513d /src/noteedit.h | |
parent | d3cf5b3e75aadc3b02d0b56f030d4c3f8c2c749d (diff) | |
download | basket-aa0726b20f398264f0a2abc60215be044b106f9c.tar.gz basket-aa0726b20f398264f0a2abc60215be044b106f9c.zip |
TQt4 port basket
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/basket@1232416 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/noteedit.h')
-rw-r--r-- | src/noteedit.h | 90 |
1 files changed, 52 insertions, 38 deletions
diff --git a/src/noteedit.h b/src/noteedit.h index 1866034..f8cc4ef 100644 --- a/src/noteedit.h +++ b/src/noteedit.h @@ -22,12 +22,12 @@ #define NOTEEDIT_H #include <kdialogbase.h> -#include <qtextedit.h> -#include <qlineedit.h> +#include <tqtextedit.h> +#include <tqlineedit.h> -class QWidget; -//class QLineEdit; -class QPushButton; +class TQWidget; +//class TQLineEdit; +class TQPushButton; class KIconButton; class KURLRequester; class KTextEdit; @@ -58,24 +58,25 @@ class FocusedColorCombo; * If the user cleared the content OR if the user canceled the dialog whereas he/she * JUST ADDED the note, then the note will be deleted by the Basket. */ -class NoteEditor : public QObject +class NoteEditor : public TQObject { Q_OBJECT + TQ_OBJECT public: NoteEditor(NoteContent *noteContent); bool isEmpty() { return m_isEmpty; } bool canceled() { return m_canceled; } bool isInline() { return m_widget != 0; } - QWidget* widget() { return m_widget; } + TQWidget* widget() { return m_widget; } KTextEdit* textEdit() { return m_textEdit; } - QLineEdit* lineEdit() { return m_lineEdit; } + TQLineEdit* lineEdit() { return m_lineEdit; } private: bool m_isEmpty; bool m_canceled; - QWidget *m_widget; + TQWidget *m_widget; KTextEdit *m_textEdit; - QLineEdit *m_lineEdit; + TQLineEdit *m_lineEdit; NoteContent *m_noteContent; public: @@ -84,7 +85,7 @@ class NoteEditor : public QObject protected: void setEmpty() { m_isEmpty = true; } void cancel() { m_canceled = true; } - void setInlineEditor(QWidget *inlineEditor); + void setInlineEditor(TQWidget *inlineEditor); public: virtual void validate() {} virtual void autoSave(bool /*toFileToo*/) {} // Same as validate(), but does not precede editor close and is triggered either while the editor widget changed size or after 3 seconds of inactivity. @@ -94,14 +95,15 @@ class NoteEditor : public QObject void mouseEnteredEditorWidget(); public: - static NoteEditor* editNoteContent(NoteContent *noteContent, QWidget *parent); + static NoteEditor* editNoteContent(NoteContent *noteContent, TQWidget *tqparent); }; class TextEditor : public NoteEditor { Q_OBJECT + TQ_OBJECT public: - TextEditor(TextContent *textContent, QWidget *parent); + TextEditor(TextContent *textContent, TQWidget *tqparent); ~TextEditor(); void validate(); void autoSave(bool toFileToo); @@ -112,8 +114,9 @@ class TextEditor : public NoteEditor class HtmlEditor : public NoteEditor { Q_OBJECT + TQ_OBJECT public: - HtmlEditor(HtmlContent *htmlContent, QWidget *parent); + HtmlEditor(HtmlContent *htmlContent, TQWidget *tqparent); ~HtmlEditor(); void validate(); void autoSave(bool toFileToo); @@ -122,9 +125,9 @@ class HtmlEditor : public NoteEditor public slots: void cursorPositionChanged(); void textChanged(); - void fontChanged(const QFont &font); + void fontChanged(const TQFont &font); protected slots: -// void slotVerticalAlignmentChanged(QTextEdit::VerticalAlignment align); +// void slotVerticalAlignmentChanged(TQTextEdit::VerticalAlignment align); // void setBold(); // void setItalic(); // void setUnderline(); @@ -137,22 +140,25 @@ class HtmlEditor : public NoteEditor class ImageEditor : public NoteEditor { Q_OBJECT + TQ_OBJECT public: - ImageEditor(ImageContent *imageContent, QWidget *parent); + ImageEditor(ImageContent *imageContent, TQWidget *tqparent); }; class AnimationEditor : public NoteEditor { Q_OBJECT + TQ_OBJECT public: - AnimationEditor(AnimationContent *animationContent, QWidget *parent); + AnimationEditor(AnimationContent *animationContent, TQWidget *tqparent); }; class FileEditor : public NoteEditor { Q_OBJECT + TQ_OBJECT public: - FileEditor(FileContent *fileContent, QWidget *parent); + FileEditor(FileContent *fileContent, TQWidget *tqparent); ~FileEditor(); void validate(); void autoSave(bool toFileToo); @@ -163,44 +169,49 @@ class FileEditor : public NoteEditor class LinkEditor : public NoteEditor { Q_OBJECT + TQ_OBJECT public: - LinkEditor(LinkContent *linkContent, QWidget *parent); + LinkEditor(LinkContent *linkContent, TQWidget *tqparent); }; class LauncherEditor : public NoteEditor { Q_OBJECT + TQ_OBJECT public: - LauncherEditor(LauncherContent *launcherContent, QWidget *parent); + LauncherEditor(LauncherContent *launcherContent, TQWidget *tqparent); }; class ColorEditor : public NoteEditor { Q_OBJECT + TQ_OBJECT public: - ColorEditor(ColorContent *colorContent, QWidget *parent); + ColorEditor(ColorContent *colorContent, TQWidget *tqparent); }; class UnknownEditor : public NoteEditor { Q_OBJECT + TQ_OBJECT public: - UnknownEditor(UnknownContent *unknownContent, QWidget *parent); + UnknownEditor(UnknownContent *unknownContent, TQWidget *tqparent); }; -/** QLineEdit behavior: - * Create a new QLineEdit with a text, then the user select a part of it and press ONE letter key. +/** TQLineEdit behavior: + * Create a new TQLineEdit with a text, then the user select a part of it and press ONE letter key. * The signal textChanged() is not emitted! * This class correct that! */ -class DebuggedLineEdit : public QLineEdit +class DebuggedLineEdit : public TQLineEdit { Q_OBJECT + TQ_OBJECT public: - DebuggedLineEdit(const QString &text, QWidget *parent = 0); + DebuggedLineEdit(const TQString &text, TQWidget *tqparent = 0); ~DebuggedLineEdit(); protected: - void keyPressEvent(QKeyEvent *event); + void keyPressEvent(TQKeyEvent *event); }; /** The dialog to edit Link Note content. @@ -209,25 +220,26 @@ class DebuggedLineEdit : public QLineEdit class LinkEditDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - LinkEditDialog(LinkContent *contentNote, QWidget *parent = 0); + LinkEditDialog(LinkContent *contentNote, TQWidget *tqparent = 0); ~LinkEditDialog(); void polish(); protected slots: void slotOk(); - void urlChanged(const QString&); - void doNotAutoTitle(const QString&); - void doNotAutoIcon(QString); + void urlChanged(const TQString&); + void doNotAutoTitle(const TQString&); + void doNotAutoIcon(TQString); void guessTitle(); void guessIcon(); private: LinkContent *m_noteContent; bool m_isAutoModified; KURLRequester *m_url; - QLineEdit *m_title; + TQLineEdit *m_title; KIconButton *m_icon; - QPushButton *m_autoTitle; - QPushButton *m_autoIcon; + TQPushButton *m_autoTitle; + TQPushButton *m_autoIcon; }; @@ -237,8 +249,9 @@ class LinkEditDialog : public KDialogBase class LauncherEditDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - LauncherEditDialog(LauncherContent *contentNote, QWidget *parent = 0); + LauncherEditDialog(LauncherContent *contentNote, TQWidget *tqparent = 0); ~LauncherEditDialog(); void polish(); protected slots: @@ -247,7 +260,7 @@ class LauncherEditDialog : public KDialogBase private: LauncherContent *m_noteContent; RunCommandRequester *m_command; - QLineEdit *m_name; + TQLineEdit *m_name; KIconButton *m_icon; }; @@ -256,9 +269,10 @@ class LauncherEditDialog : public KDialogBase * then KXMLGUI can manage them and save theire state and position... * @author S�astien Laot */ -class InlineEditors : public QObject +class InlineEditors : public TQObject { Q_OBJECT + TQ_OBJECT public: InlineEditors(); ~InlineEditors(); |