/usr/include/srchiliteqt/TextFormatter.h is in libsource-highlight-qt4-dev 0.2.2-0ubuntu7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | /*
* Copyright (C) 2008-2010 Lorenzo Bettini, http://www.lorenzobettini.it
* License: See COPYING file that comes with this distribution
*/
#ifndef TEXTFORMATTER_H_
#define TEXTFORMATTER_H_
#include <string>
#include <boost/shared_ptr.hpp>
#include <srchilite/formatter.h>
class FormatterParams;
class QSyntaxHighlighter;
namespace srchiliteqt {
/**
* A specialization of srchilite::Formatter in order to format parts of
* a document, instead of outputting the formatted text.
*
* Note that the abstract method setQSyntaxHighlighter(QSyntaxHighlighter *).
* Since this header file does not include the header file for QSyntaxHighlighter,
* then this same class can be re-used both for Qt3 and for Qt4 (the subclasses
* of this class will include the correct header file for QSyntaxHighlighter).
*
*/
class TextFormatter: public srchilite::Formatter {
protected:
/// the language element represented by this formatter
std::string elem;
public:
TextFormatter(const std::string &elem_ = "normal");
virtual ~TextFormatter();
/**
* @return the language element represented by this formatter
*/
const std::string &getElem() const { return elem; }
void setElem(const std::string &e) { elem = e; }
virtual void setQSyntaxHighlighter(QSyntaxHighlighter *qSyntaxHighlighter_) = 0;
};
/// shared pointer for TextFormatter
typedef boost::shared_ptr<TextFormatter> TextFormatterPtr;
}
#endif /* TEXTFORMATTER_H_ */
|