|
a/src/qtgui/preview_w.h |
|
b/src/qtgui/preview_w.h |
1 |
#ifndef _PREVIEW_W_H_INCLUDED_
|
1 |
#ifndef _PREVIEW_W_H_INCLUDED_
|
2 |
#define _PREVIEW_W_H_INCLUDED_
|
2 |
#define _PREVIEW_W_H_INCLUDED_
|
3 |
/* @(#$Id: preview_w.h,v 1.18 2008-07-01 08:27:58 dockes Exp $ (C) 2006 J.F.Dockes */
|
3 |
/* @(#$Id: preview_w.h,v 1.19 2008-10-03 08:09:35 dockes Exp $ (C) 2006 J.F.Dockes */
|
4 |
/*
|
4 |
/*
|
5 |
* This program is free software; you can redistribute it and/or modify
|
5 |
* This program is free software; you can redistribute it and/or modify
|
6 |
* it under the terms of the GNU General Public License as published by
|
6 |
* it under the terms of the GNU General Public License as published by
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
8 |
* (at your option) any later version.
|
8 |
* (at your option) any later version.
|
|
... |
|
... |
67 |
|
67 |
|
68 |
// Subclass plainToRich to add <termtag>s and anchors to the preview text
|
68 |
// Subclass plainToRich to add <termtag>s and anchors to the preview text
|
69 |
class PlainToRichQtPreview : public PlainToRich {
|
69 |
class PlainToRichQtPreview : public PlainToRich {
|
70 |
public:
|
70 |
public:
|
71 |
int lastanchor;
|
71 |
int lastanchor;
|
72 |
PlainToRichQtPreview() {
|
72 |
PlainToRichQtPreview(bool inputhtml = false) : PlainToRich(inputhtml) {
|
73 |
lastanchor = 0;
|
73 |
lastanchor = 0;
|
74 |
}
|
74 |
}
|
75 |
virtual ~PlainToRichQtPreview() {}
|
75 |
virtual ~PlainToRichQtPreview() {}
|
76 |
virtual string header() {
|
76 |
virtual string header() {
|
|
|
77 |
if (m_inputhtml) {
|
|
|
78 |
return snull;
|
|
|
79 |
} else {
|
77 |
return string("<qt><head><title></title></head><body><p>");
|
80 |
return string("<qt><head><title></title></head><body><p>");
|
|
|
81 |
}
|
78 |
}
|
82 |
}
|
79 |
virtual string startMatch() {return string("<termtag>");}
|
83 |
virtual string startMatch() {return string("<termtag>");}
|
80 |
virtual string endMatch() {return string("</termtag>");}
|
84 |
virtual string endMatch() {return string("</termtag>");}
|
81 |
virtual string termAnchorName(int i) {
|
85 |
virtual string termAnchorName(int i) {
|
82 |
static const char *termAnchorNameBase = "TRM";
|
86 |
static const char *termAnchorNameBase = "TRM";
|