diff options
Diffstat (limited to 'src/notes.h')
-rw-r--r-- | src/notes.h | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/src/notes.h b/src/notes.h index e91c7e1..d4ed9f8 100644 --- a/src/notes.h +++ b/src/notes.h @@ -17,13 +17,13 @@ #ifndef KNOWIT_NOTES_H #define KNOWIT_NOTES_H -#include <qstring.h> -#include <qpixmap.h> -#include <qvaluelist.h> -#include <qvaluevector.h> -#include <qptrdict.h> -class QTextStream; -class QListViewItem; +#include <tqstring.h> +#include <tqpixmap.h> +#include <tqvaluelist.h> +#include <tqvaluevector.h> +#include <tqptrdict.h> +class TQTextStream; +class TQListViewItem; class KURL; class TNote; @@ -32,74 +32,74 @@ class TNoteLink { public: enum {DescriptionLink, LinkDescription, LinkOnly, DescriptionOnly}; - QString link; - QString description; + TQString link; + TQString description; TNoteLink() {} - TNoteLink(const QString& s) {link = s;} - TNoteLink(const QString& s1, const QString& s2) {link = s1; description = s2;} + TNoteLink(const TQString& s) {link = s;} + TNoteLink(const TQString& s1, const TQString& s2) {link = s1; description = s2;} int operator==(const TNoteLink& N) const {return link == N.link && description == N.description;} int operator!=(const TNoteLink& N) const {return link != N.link || description != N.description;} - void save(QTextStream& ts) const; + void save(TQTextStream& ts) const; void open() const; void openWith() const; - QString text(int fmt = DescriptionLink) const; - QPixmap icon() const; + TQString text(int fmt = DescriptionLink) const; + TQPixmap icon() const; bool isLocalReference() const; }; -class TNotesCollection : public QPtrDict<TNote> { +class TNotesCollection : public TQPtrDict<TNote> { public: - QPixmap Pixmaps[4]; + TQPixmap Pixmaps[4]; TNotesCollection(); ~TNotesCollection(); - void addNote(QListViewItem* item); - void addNote(QListViewItem* item, const QString& s); - void removeNote(QListViewItem* item); - bool changeNote(QListViewItem* item, const QString& s); + void addNote(TQListViewItem* item); + void addNote(TQListViewItem* item, const TQString& s); + void removeNote(TQListViewItem* item); + bool changeNote(TQListViewItem* item, const TQString& s); void clearNotes(); void updateNotesView(); bool modified; bool autoUpdate; - const QString& text(QListViewItem* item); + const TQString& text(TQListViewItem* item); }; class TNote { private: - QValueList<TNoteLink> links; + TQValueList<TNoteLink> links; TNotesCollection* collection; - bool saveHTMLBuf(QTextStream& ts, QValueVector<int>& depths, + bool saveHTMLBuf(TQTextStream& ts, TQValueVector<int>& depths, int flags = SaveAll); - bool saveHTMLTocEntry(QTextStream& ts, QValueVector<int>& depths, int flags); + bool saveHTMLTocEntry(TQTextStream& ts, TQValueVector<int>& depths, int flags); public: typedef enum {Empty, Text, EmptyParent, TextParent} State; enum {SaveCurrent = 0, SaveSubnotes = 0x0001, SaveAll = 0x0002, UseUTF8 = 0x0040, Enumerate = 0x0080, AddRule = 0x0100, Style = 0x0200, TOC = 0x0400}; - QListViewItem* item; - QString text; + TQListViewItem* item; + TQString text; bool isEmpty(); - bool contains(const QString& sought, bool case_sensitive = false); - bool change(const QString& s); + bool tqcontains(const TQString& sought, bool case_sensitive = false); + bool change(const TQString& s); void destroy(); void updateView(); State state(); - void open(QTextStream& ts); - void save(QTextStream& ts, bool current = false); - bool saveHTML(const KURL& fname, const QString& origname, const QString& style, + void open(TQTextStream& ts); + void save(TQTextStream& ts, bool current = false); + bool saveHTML(const KURL& fname, const TQString& origname, const TQString& style, int flags = SaveAll); - void addLink(const QString& s); + void addLink(const TQString& s); void addLink(const TNoteLink& l); int linkCount() const; const TNoteLink& link(int i) const; void removeLink(int i); - void modifyLink(int i, const QString& s); + void modifyLink(int i, const TQString& s); void modifyLink(int i, TNoteLink& l); - void modifyLinkDescription(int i, const QString& s); - TNote(QListViewItem* i, TNotesCollection* coll); - TNote(QListViewItem* i, TNotesCollection* coll, const QString& s); + void modifyLinkDescription(int i, const TQString& s); + TNote(TQListViewItem* i, TNotesCollection* coll); + TNote(TQListViewItem* i, TNotesCollection* coll, const TQString& s); ~TNote(); }; #endif |