• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

kmail

  • sources
  • kde-4.12
  • kdepim
  • kmail
  • searchdialog
  • debug
sparqlsyntaxhighlighter.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2010 Vishesh Handa <handa.vish@gmail.com>
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17 
18 
19 #ifndef SPARQLSYNTAXHIGHLIGHTER_H
20 #define SPARQLSYNTAXHIGHLIGHTER_H
21 
22 #include <QtCore/QStringList>
23 #include <QtCore/QRegExp>
24 #include <QtGui/QSyntaxHighlighter>
25 
26 namespace Nepomuk2 {
27 
28 class SparqlSyntaxHighlighter : public QSyntaxHighlighter
29 {
30  Q_OBJECT
31 public:
32  SparqlSyntaxHighlighter(QTextDocument* parent);
33 
34  void highlightBlock(const QString& text);
35 
36 private:
37  void init();
38 
39  struct Rule {
40  QRegExp pattern;
41  QTextCharFormat format;
42 
43  Rule( const QRegExp & r, const QTextCharFormat & f )
44  : pattern(r), format(f) {}
45  };
46  QList<Rule> m_rules;
47 };
48 }
49 #endif // SPARQLSYNTAXHIGHLIGHTER_H
text
virtual QByteArray text(quint32 serialNumber) const =0
Nepomuk2::SparqlSyntaxHighlighter::highlightBlock
void highlightBlock(const QString &text)
Definition: sparqlsyntaxhighlighter.cpp:83
QSyntaxHighlighter
Nepomuk2::SparqlSyntaxHighlighter
Definition: sparqlsyntaxhighlighter.h:28
QList< Rule >
Nepomuk2::SparqlSyntaxHighlighter::SparqlSyntaxHighlighter
SparqlSyntaxHighlighter(QTextDocument *parent)
Definition: sparqlsyntaxhighlighter.cpp:22
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kmail

Skip menu "kmail"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal