BPS C++ API  2.24.4
bpsmdehtml.h
Go to the documentation of this file.
1 
4 #ifndef BPSMDEHTML_H
5 #define BPSMDEHTML_H
6 
7 #include "bpscore_global.h"
8 #include <QString>
9 
10 class BpsMdeApplication;
11 class BpsMdeRequest;
12 class BpsMdeSession;
13 
19 {
20 public:
25  BpsMdeHtml(const QString& aString);
26 
31  BpsMdeHtml(const char* aFile);
32 
37  BpsMdeHtml(const QByteArray& aFile);
38 
46  BpsMdeHtml trn(const QString& aText, const QString& aTranslated);
47 
55  BpsMdeHtml set(const QString& aTag, const QString& aValue);
56 
63  BpsMdeHtml set(const QString& aTag, bool aValue);
64 
71  BpsMdeHtml set(const QString& aTag, int aValue);
72 
79  BpsMdeHtml set(const QString& aTag, qlonglong aValue);
80 
87  BpsMdeHtml set(const QString& aTag, qulonglong aValue);
88 
107 
114  static QString toHtml(const QString& aText);
115 
121  static QString fromHtml(const QString& aText);
122 
128  static QString escapeHtml(const QString& aText);
129 
133  static QString nbsp();
134 
140  static QString dialogTags(BpsMdeSession* aSession);
141 
147  static QString menuTags(BpsMdeSession* aSession);
148 
154  static QString prevNextTags(BpsMdeSession* aSession);
155 
161  static QString quitTags(BpsMdeSession* aSession);
162 
171  static void errorPage(
172  BpsMdeRequest* aRequest,
173  BpsMdeSession* aSession,
174  const QString& aTitle,
175  const QString& aMessage,
176  const QString& aUrl = QString());
177 
189  static void menuPage(
190  BpsMdeRequest* aRequest,
191  BpsMdeSession* aSession,
192  const QString& aTitle,
193  const QList<BpsMdeApplication*>& aApplications);
194 };
195 
196 #endif // BPSMDEHTML_H
Public include file for BPS CORE library macros.
#define BPSCORE_EXPORT
Declare class to be an import from the shared library.
Definition: bpscore_global.h:22
Virtual class for MDE applications.
Definition: bpsmdeapplication.h:21
A helper class derived from QString to conveniently read HTML files, replace translatable texts and r...
Definition: bpsmdehtml.h:19
static QString toHtml(const QString &aText)
Convert a normal text to HTML.
BpsMdeHtml(const QByteArray &aFile)
Construct by reading the HTML template from a file.
static QString prevNextTags(BpsMdeSession *aSession)
Return the browser specific header tags for a dialog page with previous/next buttons.
static QString fromHtml(const QString &aText)
Convert a HTML to normal text.
BpsMdeHtml set(const QString &aTag, const QString &aValue)
Replace parameter tags marked in the HTML with {{aTag}} by another value.
static void menuPage(BpsMdeRequest *aRequest, BpsMdeSession *aSession, const QString &aTitle, const QList< BpsMdeApplication * > &aApplications)
Shows a standard menu page of the MDE server.
BpsMdeHtml set(const QString &aTag, qulonglong aValue)
Replace parameter tags marked in the HTML with {{aTag}} by another value.
BpsMdeHtml set(const QString &aTag, qlonglong aValue)
Replace parameter tags marked in the HTML with {{aTag}} by another value.
static QString nbsp()
static QString escapeHtml(const QString &aText)
Escapes special chars by their html entity: less than, greater than, ampersand.
static QString quitTags(BpsMdeSession *aSession)
Return the browser specific header tags for the quit page.
BpsMdeHtml set(const QString &aTag, int aValue)
Replace parameter tags marked in the HTML with {{aTag}} by another value.
static QString menuTags(BpsMdeSession *aSession)
Return the browser specific header tags for a menu page.
static void errorPage(BpsMdeRequest *aRequest, BpsMdeSession *aSession, const QString &aTitle, const QString &aMessage, const QString &aUrl=QString())
Shows the standard error page of the MDE server.
BpsMdeHtml setInputTypes(BpsMdeSession *aSession)
Replace input type tags by the approptiate HTML input type:
BpsMdeHtml trn(const QString &aText, const QString &aTranslated)
Replace translation texts marked in the HTML with [[aText]] by a translated text.
BpsMdeHtml(const QString &aString)
Construct a HTML object from a QString.
BpsMdeHtml set(const QString &aTag, bool aValue)
Replace parameter tags marked in the HTML with {{aTag}} by another value.
static QString dialogTags(BpsMdeSession *aSession)
Return the browser specific header tags for a regular dialog page.
BpsMdeHtml(const char *aFile)
Construct by reading the HTML template from a file.
BPS MDE request.
Definition: bpsmderequest.h:21
BPS MDE session object.
Definition: bpsmdesession.h:24