From aa0726b20f398264f0a2abc60215be044b106f9c Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 17 May 2011 08:20:48 +0000 Subject: 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 --- src/basket.h | 393 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 199 insertions(+), 194 deletions(-) (limited to 'src/basket.h') diff --git a/src/basket.h b/src/basket.h index 4e0331f..2c20224 100644 --- a/src/basket.h +++ b/src/basket.h @@ -21,13 +21,13 @@ #ifndef BASKET_H #define BASKET_H -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -38,9 +38,9 @@ #include "note.h" // For Note::Zone #include "config.h" -class QVBoxLayout; -class QDomDocument; -class QDomElement; +class TQVBoxLayout; +class TQDomDocument; +class TQDomElement; class Basket; class Note; @@ -57,12 +57,13 @@ class KGpgMe; class DiskErrorDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - DiskErrorDialog(const QString &titleMessage, const QString &message, QWidget *parent = 0); + DiskErrorDialog(const TQString &titleMessage, const TQString &message, TQWidget *tqparent = 0); ~DiskErrorDialog(); protected: - void closeEvent(QCloseEvent *event); - void keyPressEvent(QKeyEvent*); + void closeEvent(TQCloseEvent *event); + void keyPressEvent(TQKeyEvent*); }; @@ -86,21 +87,21 @@ namespace PlugOptions class NoteSelection { public: - NoteSelection() : note(0), parent(0), firstChild(0), next(0), fullPath() {} - NoteSelection(Note *n) : note(n), parent(0), firstChild(0), next(0), fullPath() {} + NoteSelection() : note(0), tqparent(0), firstChild(0), next(0), fullPath() {} + NoteSelection(Note *n) : note(n), tqparent(0), firstChild(0), next(0), fullPath() {} Note *note; - NoteSelection *parent; + NoteSelection *tqparent; NoteSelection *firstChild; NoteSelection *next; - QString fullPath; // Needeed for 'Cut' code to store temporary path of the cutted note. + TQString fullPath; // Needeed for 'Cut' code to store temporary path of the cutted note. NoteSelection* firstStacked(); NoteSelection* nextStacked(); void append(NoteSelection *node); int count(); - QValueList parentGroups(); + TQValueList tqparentGroups(); }; /** This store all needed information when exporting to HTML @@ -108,12 +109,12 @@ class NoteSelection class HtmlExportData { public: - QString iconsFolderPath; - QString iconsFolderName; - QString imagesFolderPath; - QString imagesFolderName; - QString dataFolderPath; - QString dataFolderName; + TQString iconsFolderPath; + TQString iconsFolderName; + TQString imagesFolderPath; + TQString imagesFolderName; + TQString dataFolderPath; + TQString dataFolderName; bool formatForImpression; bool embedLinkedFiles; bool embedLinkedFolders; @@ -122,11 +123,12 @@ class HtmlExportData /** This class handle Basket and add a FilterWidget on top of it. * @author S�astien Laot */ -class DecoratedBasket : public QWidget +class DecoratedBasket : public TQWidget { Q_OBJECT + TQ_OBJECT public: - DecoratedBasket(QWidget *parent, const QString &folderName, const char *name = 0, WFlags fl = 0); + DecoratedBasket(TQWidget *tqparent, const TQString &folderName, const char *name = 0, WFlags fl = 0); ~DecoratedBasket(); void setFilterBarPosition(bool onTop); void resetFilter(); @@ -136,22 +138,23 @@ class DecoratedBasket : public QWidget FilterBar* filterBar() { return m_filter; } Basket* basket() { return m_basket; } private: - QVBoxLayout *m_layout; + TQVBoxLayout *m_layout; FilterBar *m_filter; Basket *m_basket; }; -class TransparentWidget : public QWidget +class TransparentWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: TransparentWidget(Basket *basket); void setPosition(int x, int y); - //void reparent(QWidget *parent, WFlags f, const QPoint &p, bool showIt = FALSE); + //void reparent(TQWidget *tqparent, WFlags f, const TQPoint &p, bool showIt = FALSE); protected: - void paintEvent(QPaintEvent*); - void mouseMoveEvent(QMouseEvent *event); - bool eventFilter(QObject *object, QEvent *event); + void paintEvent(TQPaintEvent*); + void mouseMoveEvent(TQMouseEvent *event); + bool eventFilter(TQObject *object, TQEvent *event); private: Basket *m_basket; int m_x; @@ -161,10 +164,11 @@ class TransparentWidget : public QWidget /** * @author S�astien Laot */ -class Basket : public QScrollView, public QToolTip +class Basket : public TQScrollView, public TQToolTip { /// CONSTRUCTOR AND DESTRUCTOR: Q_OBJECT + TQ_OBJECT public: enum EncryptionTypes { NoEncryption = 0, @@ -173,27 +177,27 @@ class Basket : public QScrollView, public QToolTip }; public: - Basket(QWidget *parent, const QString &folderName); + Basket(TQWidget *tqparent, const TQString &folderName); ~Basket(); /// USER INTERACTION: private: bool m_noActionOnMouseRelease; bool m_ignoreCloseEditorOnNextMouseRelease; - QPoint m_pressPos; + TQPoint m_pressPos; bool m_canDrag; public: - void viewportResizeEvent(QResizeEvent *); - void drawContents(QPainter *painter, int clipX, int clipY, int clipWidth, int clipHeight); - void enterEvent(QEvent *); - void leaveEvent(QEvent *); - void contentsMouseMoveEvent(QMouseEvent *event); - void contentsMousePressEvent(QMouseEvent *event); - void contentsMouseReleaseEvent(QMouseEvent *event); - void contentsMouseDoubleClickEvent(QMouseEvent *event); - void contentsContextMenuEvent(QContextMenuEvent *event); + void viewportResizeEvent(TQResizeEvent *); + void drawContents(TQPainter *painter, int clipX, int clipY, int clipWidth, int clipHeight); + void enterEvent(TQEvent *); + void leaveEvent(TQEvent *); + void contentsMouseMoveEvent(TQMouseEvent *event); + void contentsMousePressEvent(TQMouseEvent *event); + void contentsMouseReleaseEvent(TQMouseEvent *event); + void contentsMouseDoubleClickEvent(TQMouseEvent *event); + void contentsContextMenuEvent(TQContextMenuEvent *event); void updateNote(Note *note); - void clickedToInsert(QMouseEvent *event, Note *clicked = 0, int zone = 0); + void clickedToInsert(TQMouseEvent *event, Note *clicked = 0, int zone = 0); private slots: void setFocusIfNotInPopupMenu(); @@ -205,13 +209,13 @@ class Basket : public QScrollView, public QToolTip Note *m_resizingNote; int m_pickedResizer; Note *m_movingNote; - QPoint m_pickedHandle; + TQPoint m_pickedHandle; public: int tmpWidth; int tmpHeight; public: void unsetNotesWidth(); - void relayoutNotes(bool animate); + void retqlayoutNotes(bool animate); Note* noteAt(int x, int y); inline Note* firstNote() { return m_firstNote; } inline int columnsCount() { return m_columnsCount; } @@ -226,7 +230,7 @@ class Basket : public QScrollView, public QToolTip /// NOTES INSERTION AND REMOVAL: public: - /// The following methods assume that the note(s) to insert already all have 'this' as the parent basket: + /// The following methods assume that the note(s) to insert already all have 'this' as the tqparent basket: void prependNoteIn( Note *note, Note *in); /// << Add @p note (and the next linked notes) as the first note(s) of the group @p in. void appendNoteIn( Note *note, Note *in); /// << Add @p note (and the next linked notes) as the last note(s) of the group @p in. void appendNoteAfter( Note *note, Note *after); /// << Add @p note (and the next linked notes) just after (just below) the note @p after. @@ -237,7 +241,7 @@ class Basket : public QScrollView, public QToolTip /// << After that, you should delete the notes yourself. Do not call prepend/append/group... functions two times: unplug and ok void ungroupNote( Note *group); /// << Unplug @p group but put child notes at its place. /// And this one do almost all the above methods depending on the context: - void insertNote(Note *note, Note *clicked, int zone, const QPoint &pos = QPoint(), bool animateNewPosition = false); + void insertNote(Note *note, Note *clicked, int zone, const TQPoint &pos = TQPoint(), bool animateNewPosition = false); void insertCreatedNote(Note *note); /// And working with selections: void unplugSelection(NoteSelection *selection); @@ -248,10 +252,10 @@ class Basket : public QScrollView, public QToolTip private: Note *m_clickedToInsert; int m_zoneToInsert; - QPoint m_posToInsert; + TQPoint m_posToInsert; Note *m_savedClickedToInsert; int m_savedZoneToInsert; - QPoint m_savedPosToInsert; + TQPoint m_savedPosToInsert; bool m_isInsertPopupMenu; public: void saveInsertionData(); @@ -260,9 +264,9 @@ class Basket : public QScrollView, public QToolTip public slots: void insertEmptyNote(int type); void insertWizard(int type); - void insertColor(const QColor &color); - void insertImage(const QPixmap &image); - void pasteNote(QClipboard::Mode mode = QClipboard::Clipboard); + void insertColor(const TQColor &color); + void insertImage(const TQPixmap &image); + void pasteNote(TQClipboard::Mode mode = TQClipboard::Clipboard); void delayedCancelInsertPopupMenu(); void setInsertPopupMenu() { m_isInsertPopupMenu = true; } void cancelInsertPopupMenu() { m_isInsertPopupMenu = false; } @@ -272,14 +276,14 @@ class Basket : public QScrollView, public QToolTip /// TOOL TIPS: protected: - void maybeTip(const QPoint &pos); + void maybeTip(const TQPoint &pos); /// ANIMATIONS: private: - QValueList m_animatedNotes; - QTimer m_animationTimer; + TQValueList m_animatedNotes; + TQTimer m_animationTimer; int m_deltaY; - QTime m_lastFrameTime; + TQTime m_lastFrameTime; static const int FRAME_DELAY; private slots: void animateObjects(); @@ -294,26 +298,26 @@ class Basket : public QScrollView, public QToolTip bool m_loadingLaunched; bool m_locked; bool m_shouldConvertPlainTextNotes; - QFrame* m_decryptBox; - QPushButton* m_button; + TQFrame* m_decryptBox; + TQPushButton* m_button; int m_encryptionType; - QString m_encryptionKey; + TQString m_encryptionKey; #ifdef HAVE_LIBGPGME KGpgMe* m_gpg; #endif - QTimer m_inactivityAutoLockTimer; + TQTimer m_inactivityAutoLockTimer; void enableActions(); private slots: - void loadNotes(const QDomElement ¬es, Note *parent); - void saveNotes(QDomDocument &document, QDomElement &element, Note *parent); + void loadNotes(const TQDomElement ¬es, Note *tqparent); + void saveNotes(TQDomDocument &document, TQDomElement &element, Note *tqparent); void unlock(); protected slots: void inactivityAutoLockTimeout(); public slots: void load(); - void loadProperties(const QDomElement &properties); - void saveProperties(QDomDocument &document, QDomElement &properties); + void loadProperties(const TQDomElement &properties); + void saveProperties(TQDomDocument &document, TQDomElement &properties); bool save(); public: bool isEncrypted(); @@ -322,39 +326,39 @@ public slots: void lock(); bool isLoaded() { return m_loaded; }; bool loadingLaunched() { return m_loadingLaunched; }; - bool loadFromFile(const QString &fullPath, QString* string, bool isLocalEncoding = false); - bool loadFromFile(const QString &fullPath, QByteArray* array); - bool saveToFile(const QString& fullPath, const QByteArray& array); - bool saveToFile(const QString& fullPath, const QByteArray& array, Q_ULONG length); - bool saveToFile(const QString& fullPath, const QString& string, bool isLocalEncoding = false); - static bool safelySaveToFile(const QString& fullPath, const QByteArray& array); - static bool safelySaveToFile(const QString& fullPath, const QByteArray& array, Q_ULONG length); - static bool safelySaveToFile(const QString& fullPath, const QString& string, bool isLocalEncoding = false); - bool setProtection(int type, QString key); + bool loadFromFile(const TQString &fullPath, TQString* string, bool isLocalEncoding = false); + bool loadFromFile(const TQString &fullPath, TQByteArray* array); + bool saveToFile(const TQString& fullPath, const TQByteArray& array); + bool saveToFile(const TQString& fullPath, const TQByteArray& array, TQ_ULONG length); + bool saveToFile(const TQString& fullPath, const TQString& string, bool isLocalEncoding = false); + static bool safelySaveToFile(const TQString& fullPath, const TQByteArray& array); + static bool safelySaveToFile(const TQString& fullPath, const TQByteArray& array, TQ_ULONG length); + static bool safelySaveToFile(const TQString& fullPath, const TQString& string, bool isLocalEncoding = false); + bool setProtection(int type, TQString key); int encryptionType() { return m_encryptionType; }; - QString encryptionKey(){ return m_encryptionKey; }; + TQString encryptionKey(){ return m_encryptionKey; }; bool saveAgain(); /// BACKGROUND: private: - QColor m_backgroundColorSetting; - QString m_backgroundImageName; - QPixmap *m_backgroundPixmap; - QPixmap *m_opaqueBackgroundPixmap; - QPixmap *m_selectedBackgroundPixmap; + TQColor m_backgroundColorSetting; + TQString m_backgroundImageName; + TQPixmap *m_backgroundPixmap; + TQPixmap *m_opaqueBackgroundPixmap; + TQPixmap *m_selectedBackgroundPixmap; bool m_backgroundTiled; - QColor m_textColorSetting; + TQColor m_textColorSetting; public: inline bool hasBackgroundImage() { return m_backgroundPixmap != 0; } - inline const QPixmap* backgroundPixmap() { return m_backgroundPixmap; } + inline const TQPixmap* backgroundPixmap() { return m_backgroundPixmap; } inline bool isTiledBackground() { return m_backgroundTiled; } - inline QString backgroundImageName() { return m_backgroundImageName; } - inline QColor backgroundColorSetting() { return m_backgroundColorSetting; } - inline QColor textColorSetting() { return m_textColorSetting; } - QColor backgroundColor(); - QColor textColor(); - void setAppearance(const QString &icon, const QString &name, const QString &backgroundImage, const QColor &backgroundColor, const QColor &textColor); - void blendBackground(QPainter &painter, const QRect &rect, int xPainter = -1, int yPainter = -1, bool opaque = false, QPixmap *bg = 0); + inline TQString backgroundImageName() { return m_backgroundImageName; } + inline TQColor backgroundColorSetting() { return m_backgroundColorSetting; } + inline TQColor textColorSetting() { return m_textColorSetting; } + TQColor backgroundColor(); + TQColor textColor(); + void setAppearance(const TQString &icon, const TQString &name, const TQString &backgroundImage, const TQColor &backgroundColor, const TQColor &textColor); + void blendBackground(TQPainter &painter, const TQRect &rect, int xPainter = -1, int yPainter = -1, bool opaque = false, TQPixmap *bg = 0); void unbufferizeAll(); void subscribeBackgroundImages(); void unsubscribeBackgroundImages(); @@ -377,7 +381,7 @@ public slots: int m_hoveredZone; bool m_lockedHovering; bool m_underMouse; - QRect m_inserterRect; + TQRect m_inserterRect; bool m_inserterShown; bool m_inserterSplit; bool m_inserterTop; @@ -389,8 +393,8 @@ public slots: bool inserterSplit() { return m_inserterSplit; } bool inserterGroup() { return m_inserterGroup; } public slots: - void doHoverEffects(Note *note, Note::Zone zone, const QPoint &pos = QPoint(0, 0)); /// << @p pos is optionnal and only used to show the link target in the statusbar - void doHoverEffects(const QPoint &pos); + void doHoverEffects(Note *note, Note::Zone zone, const TQPoint &pos = TQPoint(0, 0)); /// << @p pos is optionnal and only used to show the link target in the statusbar + void doHoverEffects(const TQPoint &pos); void doHoverEffects(); // The same, but using the current cursor position void mouseEnteredEditorWidget(); public: @@ -402,15 +406,15 @@ public slots: void addStateToSelectedNotes(State *state); void changeStateOfSelectedNotes(State *state); bool selectedNotesHaveTags(); - const QRect& inserterRect() { return m_inserterRect; } + const TQRect& inserterRect() { return m_inserterRect; } bool inserterShown() { return m_inserterShown; } - void drawInserter(QPainter &painter, int xPainter, int yPainter); + void drawInserter(TQPainter &painter, int xPainter, int yPainter); DecoratedBasket* decoration(); State *stateForTagFromSelectedNotes(Tag *tag); public slots: void activatedTagShortcut(Tag *tag); void recomputeAllStyles(); - void removedStates(const QValueList &deletedStates); + void removedStates(const TQValueList &deletedStates); private slots: void toggledTagInMenu(int id); void toggledStateInMenu(int id); @@ -421,44 +425,44 @@ public slots: Note *m_tagPopupNote; private: Tag *m_tagPopup; - QTime m_lastDisableClick; + TQTime m_lastDisableClick; /// SELECTION: private: bool m_isSelecting; bool m_selectionStarted; bool m_selectionInvert; - QPoint m_selectionBeginPoint; - QPoint m_selectionEndPoint; - QRect m_selectionRect; - QTimer m_autoScrollSelectionTimer; + TQPoint m_selectionBeginPoint; + TQPoint m_selectionEndPoint; + TQRect m_selectionRect; + TQTimer m_autoScrollSelectionTimer; void stopAutoScrollSelection(); private slots: void doAutoScrollSelection(); public: inline bool isSelecting() { return m_isSelecting; } - inline const QRect& selectionRect() { return m_selectionRect; } - void selectNotesIn(const QRect &rect, bool invertSelection, bool unselectOthers = true); + inline const TQRect& selectionRect() { return m_selectionRect; } + void selectNotesIn(const TQRect &rect, bool invertSelection, bool unselectOthers = true); void resetWasInLastSelectionRect(); void selectAll(); void unselectAll(); void invertSelection(); void unselectAllBut(Note *toSelect); void invertSelectionOf(Note *toSelect); - QColor selectionRectInsideColor(); + TQColor selectionRectInsideColor(); Note* theSelectedNote(); NoteSelection* selectedNotes(); /// BLANK SPACES DRAWING: private: - QValueList m_blankAreas; + TQValueList m_blankAreas; void recomputeBlankRects(); - QWidget *m_cornerWidget; + TQWidget *m_cornerWidget; /// COMMUNICATION WITH ITS CONTAINER: signals: - void postMessage(const QString &message); /// << Post a temporar message in the statusBar. - void setStatusBarText(const QString &message); /// << Set the permanent statusBar text or reset it if message isEmpty(). + void postMessage(const TQString &message); /// << Post a temporar message in the statusBar. + void setStatusBarText(const TQString &message); /// << Set the permanent statusBar text or reset it if message isEmpty(). void resetStatusBarText(); /// << Equivalent to setStatusBarText(""). void propertiesChanged(Basket *basket); void countsChanged(Basket *basket); @@ -466,7 +470,7 @@ public slots: void linkLookChanged(); void signalCountsChanged(); private: - QTimer m_timerCountsChanged; + TQTimer m_timerCountsChanged; private slots: void countsChangedTimeOut(); @@ -485,20 +489,20 @@ public slots: /// PROPERTIES: public: - QString basketName() { return m_basketName; } - QString icon() { return m_icon; } - QString folderName() { return m_folderName; } - QString fullPath(); - QString fullPathForFileName(const QString &fileName); // Full path of an [existing or not] note in this basket - static QString fullPathForFolderName(const QString &folderName); + TQString basketName() { return m_basketName; } + TQString icon() { return m_icon; } + TQString folderName() { return m_folderName; } + TQString fullPath(); + TQString fullPathForFileName(const TQString &fileName); // Full path of an [existing or not] note in this basket + static TQString fullPathForFolderName(const TQString &folderName); private: - QString m_basketName; - QString m_icon; - QString m_folderName; + TQString m_basketName; + TQString m_icon; + TQString m_folderName; /// ACTIONS ON SELECTED NOTES FROM THE INTERFACE: public slots: - void noteEdit(Note *note = 0L, bool justAdded = false, const QPoint &clickedPoint = QPoint()); + void noteEdit(Note *note = 0L, bool justAdded = false, const TQPoint &clickedPoint = TQPoint()); void showEditedNoteWhileFiltering(); void noteDelete(); void noteDeleteWithoutConfirmation(bool deleteFilesToo = true); @@ -525,13 +529,13 @@ public slots: /// NOTES EDITION: private: NoteEditor *m_editor; - //QWidget *m_rightEditorBorder; + //TQWidget *m_rightEditorBorder; TransparentWidget *m_leftEditorBorder; TransparentWidget *m_rightEditorBorder; bool m_redirectEditActions; int m_editorWidth; int m_editorHeight; - QTimer m_inactivityAutoSaveTimer; + TQTimer m_inactivityAutoSaveTimer; bool m_doNotCloseEditor; int m_editParagraph; int m_editIndex; @@ -573,29 +577,29 @@ public slots: /// DRAG AND DROP: private: bool m_isDuringDrag; - QValueList m_draggedNotes; + TQValueList m_draggedNotes; public: - static void acceptDropEvent(QDropEvent *event, bool preCond = true); - void contentsDropEvent(QDropEvent *event); - void blindDrop(QDropEvent* event); + static void acceptDropEvent(TQDropEvent *event, bool preCond = true); + void contentsDropEvent(TQDropEvent *event); + void blindDrop(TQDropEvent* event); bool isDuringDrag() { return m_isDuringDrag; } - QValueList draggedNotes() { return m_draggedNotes; } + TQValueList draggedNotes() { return m_draggedNotes; } protected: - void contentsDragEnterEvent(QDragEnterEvent*); - void contentsDragMoveEvent(QDragMoveEvent *event); - void contentsDragLeaveEvent(QDragLeaveEvent*); + void contentsDragEnterEvent(TQDragEnterEvent*); + void contentsDragMoveEvent(TQDragMoveEvent *event); + void contentsDragLeaveEvent(TQDragLeaveEvent*); public slots: void slotCopyingDone2(KIO::Job *job); public: - Note* noteForFullPath(const QString &path); + Note* noteForFullPath(const TQString &path); /// EXPORTATION: public: - QValueList usedStates(); - static QString saveGradientBackground(const QColor &color, const QFont &font, const QString &folder); + TQValueList usedStates(); + static TQString saveGradientBackground(const TQColor &color, const TQFont &font, const TQString &folder); public: - void listUsedTags(QValueList &list); + void listUsedTags(TQValueList &list); /// MANAGE FOCUS: private: @@ -614,10 +618,10 @@ public slots: Note* lastNoteShownInStack(); void selectRange(Note *start, Note *end, bool unselectOthers = true); /// FIXME: Not really a focus related method! void ensureNoteVisible(Note *note); - virtual void keyPressEvent(QKeyEvent *event); - virtual void focusInEvent(QFocusEvent*); - virtual void focusOutEvent(QFocusEvent*); - QRect noteVisibleRect(Note *note); // clipped global (desktop as origin) rectangle + virtual void keyPressEvent(TQKeyEvent *event); + virtual void focusInEvent(TQFocusEvent*); + virtual void focusOutEvent(TQFocusEvent*); + TQRect noteVisibleRect(Note *note); // clipped global (desktop as origin) rectangle Note* firstNoteInGroup(); Note *noteOnHome(); Note *noteOnEnd(); @@ -632,7 +636,7 @@ public slots: public: - void wheelEvent(QWheelEvent *event); + void wheelEvent(TQWheelEvent *event); @@ -643,14 +647,14 @@ public slots: /// THE NEW FILE WATCHER: private: KDirWatch *m_watcher; - QTimer m_watcherTimer; - QValueList m_modifiedFiles; + TQTimer m_watcherTimer; + TQValueList m_modifiedFiles; public: - void addWatchedFile(const QString &fullPath); - void removeWatchedFile(const QString &fullPath); + void addWatchedFile(const TQString &fullPath); + void removeWatchedFile(const TQString &fullPath); private slots: - void watchedFileModified(const QString &fullPath); - void watchedFileDeleted(const QString &fullPath); + void watchedFileModified(const TQString &fullPath); + void watchedFileDeleted(const TQString &fullPath); void updateModifiedNotes(); @@ -661,7 +665,7 @@ public slots: void showFrameInsertTo() {} void resetInsertTo() {} - void computeInsertPlace(const QPoint &/*cursorPosition*/) { } + void computeInsertPlace(const TQPoint &/*cursorPosition*/) { } public: friend class SystemTray; @@ -669,7 +673,7 @@ public slots: /// SPEED OPTIMIZATION private: bool m_finishLoadOnFirstShow; - bool m_relayoutOnNextShow; + bool m_retqlayoutOnNextShow; public: void aboutToBeActivated(); }; @@ -684,27 +688,27 @@ public slots: #if 0 -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -#include +#include #include "filter.h" -class QFrame; -class QVBoxLayout; -class QCheckBox; -class QString; -class QColor; -class QPixmap; -class QAction; -class QStringList; -class QRect; +class TQFrame; +class TQVBoxLayout; +class TQCheckBox; +class TQString; +class TQColor; +class TQPixmap; +class TQAction; +class TQStringList; +class TQRect; -class QDomElement; +class TQDomElement; class KDirWatch; @@ -722,45 +726,46 @@ class FileEvent { public: enum Event { Modified = 1, Created, Deleted, Renamed }; - FileEvent(Event evt, const QString &path) + FileEvent(Event evt, const TQString &path) : event(evt), filePath(path) { } public: // Because it must be fast and theire is no need to be private Event event; - QString filePath; + TQString filePath; }; /** Basket that contain some Notes. * @author S�astien Laot */ -clas s Bas ket : public QScrollView +clas s Bas ket : public TQScrollView { Q_OBJECT + TQ_OBJECT public: /** Construtor and destructor */ - Bask et(QWidget *parent, const QString &folderName, const char *name = "", WFlags fl = 0); + Bask et(TQWidget *tqparent, const TQString &folderName, const char *name = "", WFlags fl = 0); public: protected: - virtual void contentsContextMenuEvent(QContextMenuEvent *event); - virtual void contentsMousePressEvent(QMouseEvent *event); // For redirected event !! - virtual void showEvent(QShowEvent *); + virtual void contentsContextMenuEvent(TQContextMenuEvent *event); + virtual void contentsMousePressEvent(TQMouseEvent *event); // For redirected event !! + virtual void showEvent(TQShowEvent *); /** Drag and drop functions */ - virtual void dragEnterEvent(QDragEnterEvent*); - virtual void dragMoveEvent(QDragMoveEvent* event); - virtual void dragLeaveEvent(QDragLeaveEvent*); + virtual void dragEnterEvent(TQDragEnterEvent*); + virtual void dragMoveEvent(TQDragMoveEvent* event); + virtual void dragLeaveEvent(TQDragLeaveEvent*); public: - virtual void dropEvent(QDropEvent *event); - static void acceptDropEvent(QDropEvent *event, bool preCond = true); + virtual void dropEvent(TQDropEvent *event); + static void acceptDropEvent(TQDropEvent *event, bool preCond = true); bool canDragNote() { return !isEmpty(); } - void computeInsertPlace(const QPoint &cursorPosition); - Note* noteAtPosition(const QPoint &pos); + void computeInsertPlace(const TQPoint &cursorPosition); + Note* noteAtPosition(const TQPoint &pos); Note* duplicatedOf(Note *note); void checkClipboard(); - void processActionAsYouType(QKeyEvent *event); + void processActionAsYouType(TQKeyEvent *event); void exportToHTML(); signals: - void nameChanged(Basket *basket, const QString &name); - void iconChanged(Basket *basket, const QString &icon); + void nameChanged(Basket *basket, const TQString &name); + void iconChanged(Basket *basket, const TQString &icon); void notesNumberChanged(Basket *basket); public slots: void linkLookChanged(); @@ -769,7 +774,7 @@ clas s Bas ket : public QScrollView void insertNote(Note *note); void delNote(Note *note, bool askForMirroredFile = true); void changeNotePlace(Note *note); - void pasteNote(QClipboard::Mode mode = QClipboard::Clipboard); + void pasteNote(TQClipboard::Mode mode = TQClipboard::Clipboard); void recolorizeNotes(); void reloadMirroredFolder(); void showMirrorOnlyOnceInfo(); @@ -783,7 +788,7 @@ clas s Bas ket : public QScrollView void setFocusedNote(Note *note); void focusANote(); void ensureVisibleNote(Note *note); - QRect noteRect(Note *note); // clipped global (desktop as origin) rectangle + TQRect noteRect(Note *note); // clipped global (desktop as origin) rectangle /** Travel the list to find the next shown note, or the previous if step == -1, or the next after 10 if step == 10... */ Note* nextShownNoteFrom(Note *note, int step); /** Actions on (selected) notes */ @@ -800,34 +805,34 @@ clas s Bas ket : public QScrollView void moveNoteUp(); void moveNoteDown(); public: - void dontCareOfCreation(const QString &path); - QString copyIcon(const QString &iconName, int size, const QString &destFolder); - QString copyFile(const QString &srcPath, const QString &destFolder, bool createIt = false); + void dontCareOfCreation(const TQString &path); + TQString copyIcon(const TQString &iconName, int size, const TQString &destFolder); + TQString copyFile(const TQString &srcPath, const TQString &destFolder, bool createIt = false); protected slots: - void slotModifiedFile(const QString &path); - void slotCreatedFile(const QString &path); - void slotDeletedFile(const QString &path); + void slotModifiedFile(const TQString &path); + void slotCreatedFile(const TQString &path); + void slotDeletedFile(const TQString &path); void slotUpdateNotes(); void placeEditor(); void closeEditor(bool save = true); void clipboardChanged(bool selectionMode = false); void selectionChanged(); private: - QTimer m_updateTimer; - QPtrList m_updateQueue; - QStringList m_dontCare; + TQTimer m_updateTimer; + TQPtrList m_updateQueue; + TQStringList m_dontCare; static const int c_updateTime; private: void load(); // Load is performed only once, during contructor - void loadNotes(const QDomElement ¬es); - bool importLauncher(const QString &type, const QDomElement &content, const QString &runCommand, - const QString &annotations/*, bool checked*/); + void loadNotes(const TQDomElement ¬es); + bool importLauncher(const TQString &type, const TQDomElement &content, const TQString &runCommand, + const TQString &annotations/*, bool checked*/); void computeShownNotes(); private: KDirWatch *m_watcher; NoteEditorBase *m_editor; - QKeyEvent *m_stackedKeyEvent; + TQKeyEvent *m_stackedKeyEvent; }; #endif // #if 0 -- cgit v1.2.1