Quark  0.1
SyntaxHighlighterTheme.h++
Go to the documentation of this file.
1 #ifndef __libquark_syntax_SyntaxHighlighterTheme_hxx
2 #define __libquark_syntax_SyntaxHighlighterTheme_hxx
3 
4 #include <QMap>
5 #include <QString>
6 #include <QTextCharFormat>
7 
9 
10 namespace quark {
11 namespace syntax {
12 
21 {
22  public:
23 
28  SyntaxHighlighterTheme(const QString &name);
29 
31  virtual ~SyntaxHighlighterTheme();
32 
34  QString name() const
35  { return(_name); }
36 
38  void setName(const QString &name)
39  { _name = name; }
40 
47  void setFormatForElement(const QString &element,
48  const QTextCharFormat &format);
49 
53  QTextCharFormat formatForElement(const QString &element) const;
54 
56  QStringList elements() const;
57 
58  private:
59 
60  QString _name;
61  QMap<QString, QTextCharFormat> _formats;
62 };
63 
64 } // namespace syntax
65 } // namespace quark
66 
67 #endif // __libquark_syntax_SyntaxHighlighterTheme_hxx
A base class for objects that can emit a signal when their internal state changes in some way...
Definition: MutableObject.h++:17
Definition: BarChartView.h++:6
QString name() const
Returns the name of the theme.
Definition: SyntaxHighlighterTheme.h++:34
void setName(const QString &name)
Sets the name of the theme.
Definition: SyntaxHighlighterTheme.h++:38
#define LIBQUARK_API
Definition: Quark.h++:18
A representation of a highlighting theme for a SyntaxHighlighter.
Definition: SyntaxHighlighterTheme.h++:20