Albert S
9a70a821bd
Generate previews that show the line number and surrounding lines (like grep -C) for context.
19 рядки
617 B
C++
19 рядки
617 B
C++
#ifndef PREVIEWGENERATORPLAINTEXT_H
|
|
#define PREVIEWGENERATORPLAINTEXT_H
|
|
#include <QTextStream>
|
|
#include "previewgenerator.h"
|
|
|
|
class PreviewGeneratorPlainText : public PreviewGenerator
|
|
{
|
|
protected:
|
|
const unsigned int MAX_SNIPPETS = 7;
|
|
|
|
public:
|
|
using PreviewGenerator::PreviewGenerator;
|
|
QString generatePreviewText(QString content, RenderConfig config, QString fileName);
|
|
QString generateLineBasedPreviewText(QTextStream &in, RenderConfig config, QString fileName);
|
|
QSharedPointer<PreviewResult> generate(RenderConfig config, QString documentPath, unsigned int page);
|
|
};
|
|
|
|
#endif // PREVIEWGENERATORPLAINTEXT_H
|