]> git.sven.stormbind.net Git - sven/vym.git/blobdiff - src/vymtext.h
New upstream version 2.9.22
[sven/vym.git] / src / vymtext.h
diff --git a/src/vymtext.h b/src/vymtext.h
new file mode 100644 (file)
index 0000000..afe507b
--- /dev/null
@@ -0,0 +1,49 @@
+#ifndef VYMTEXT_H
+#define VYMTEXT_H
+
+#include <qcolor.h>
+#include <qstring.h>
+
+//  class VymText;
+
+#include "xmlobj.h"
+
+/*! \brief base class for headings of branches and vymnotes */
+
+class VymText : public XMLObj {
+  public:
+    enum TextMode { AutoText, PlainText, RichText };
+    VymText();
+    VymText(const VymText &vt);
+    VymText(const QString &s);
+    bool operator==(const VymText &other);
+    void operator=(const VymText &);
+    virtual void copy(const VymText &);
+    virtual void clear();
+    void setText(const QString &);
+    void setRichText(const QString &);
+    void setPlainText(const QString &);
+    void setAutoText(const QString &);
+    QString getText() const;
+    QString getTextASCII() const;
+    QString getTextASCII(QString igdent, const int &width = 0) const;
+    void setRichText(bool b);
+    bool isRichText() const;
+    void setFontHint(const QString &);
+    QString getFontHint() const;
+    void setFilenameHint(const QString &);
+    QString getFilenameHint() const;
+    bool isEmpty() const;
+    void setColor(QColor color);
+    QColor getColor();
+    QStringList getAttributes() const;
+    QString saveToDir(); // Needs to be overloaded!
+
+  protected:
+    QString text;
+    QString fonthint;
+    QString filenamehint;
+    TextMode textmode;
+    QColor color; // used for plaintext
+};
+#endif