]> git.sven.stormbind.net Git - sven/vym.git/blob - src/vymtext.h
Replace Pierre as the maintainer
[sven/vym.git] / src / vymtext.h
1 #ifndef VYMTEXT_H
2 #define VYMTEXT_H
3
4 #include <qcolor.h>
5 #include <qstring.h>
6
7 //  class VymText;
8
9 #include "xmlobj.h"
10
11 /*! \brief base class for headings of branches and vymnotes */
12
13 class VymText : public XMLObj {
14   public:
15     enum TextMode { AutoText, PlainText, RichText };
16     VymText();
17     VymText(const VymText &vt);
18     VymText(const QString &s);
19     bool operator==(const VymText &other);
20     void operator=(const VymText &);
21     virtual void copy(const VymText &);
22     virtual void clear();
23     void setText(const QString &);
24     void setRichText(const QString &);
25     void setPlainText(const QString &);
26     void setAutoText(const QString &);
27     QString getText() const;
28     QString getTextASCII() const;
29     QString getTextASCII(QString igdent, const int &width = 0) const;
30     void setRichText(bool b);
31     bool isRichText() const;
32     void setFontHint(const QString &);
33     QString getFontHint() const;
34     void setFilenameHint(const QString &);
35     QString getFilenameHint() const;
36     bool isEmpty() const;
37     void setColor(QColor color);
38     QColor getColor();
39     QStringList getAttributes() const;
40     QString saveToDir(); // Needs to be overloaded!
41
42   protected:
43     QString text;
44     QString fonthint;
45     QString filenamehint;
46     TextMode textmode;
47     QColor color; // used for plaintext
48 };
49 #endif