MainPage   Related pages 
Public Member Functions | List of all members
desiteCoreGui::DataBaseWebInterfaceWidget Class Reference

#include <desiteCoreGui/DataBaseWebInterfaceWidget.h>

Inheritance diagram for desiteCoreGui::DataBaseWebInterfaceWidget:

Public Member Functions

double getZoomFactor ()
 
void setZoomFactor (double v)
 
void savePicture ()
 
HEADER, FOOTER
void setFooterVisible (bool visible)
 
void setHeaderVisible (bool visible)
 
void showNavigation (bool visible)
 
void showConsole (bool)
 
PRINTING
QString createPdfByTemplate (QString templateFileName, QString pdfFileName, bool openPdf=true)
 
void setPaperSize (int paperSize)
 
void setOrientation (int orientation)
 
void setPageMargins (double L, double R, double T, double B)
 
double getPageMarginTop ()
 
double getPageMarginBottom ()
 
double getPageMarginLeft ()
 
double getPageMarginRight ()
 
double getLogicalDpi ()
 
DATABASE
void processUpdate ()
 
void dataChanged ()
 
void setImmediateUpdate (bool)
 
URL, PAGE
void reloadPage ()
 
void loadUrl (QString url)
 
void addSuffix (QString suffix)
 
void resetSuffixList ()
 
void clearHistory ()
 
void redirectUrl (QString originalUrl, QString redirectUrl)
 
PROGRESS
void showProgress (const QVariantMap &v)
 
void hideProgress ()
 
void clearProgressMessage ()
 
void showProgressMessage (const QString &)
 
void showProgressMessageLabel (const QString &)
 
void showProgressValue (double v)
 
void showProgressMessageConsole (QString v)
 
int getProgressState ()
 
void processEvents ()
 
void enableInterruptJavaScriptMsg (bool enable)
 
void clearMemoryCaches ()
 
void disableObjectCache ()
 

Detailed Description

API in WebForms
Objectname: desiteMD

Since
2013
Id
DataBaseWebInterfaceWidget.h 4764 2021-04-14 19:48:25Z stefan.losch

(c) ceapoint aec technologies GmbH

Member Function Documentation

◆ addSuffix()

void desiteCoreGui::DataBaseWebInterfaceWidget::addSuffix ( QString  suffix)

Add a file name extension to the list of suffixes handled by calling windows desktop services when clicked instead of handling within DESITE. All documents ending with one of the file name extensions in this list are handled by calling the desktop services, i.e. using the standard application set in the opertaing system.

Parameters
suffixfile name extension e.g. '.html'
Remarks
Files with extension '.cpa', '.pdf' and '.zip' are always forwarded to the operating system.
href-urls starting with 'desiteProject://' are handled as a relative link to a file within the current project folder.
E.g. the following code will try to open the file callback.html within project folder:
<a href='desiteProject://callback.html'>Click here</>
update 2.3.1, 05 dec 2018, ar, url schema 'desiteProject' added

◆ clearHistory()

void desiteCoreGui::DataBaseWebInterfaceWidget::clearHistory ( )
Since
2.0.19, 02 mar 2018, jh

◆ clearMemoryCaches()

void desiteCoreGui::DataBaseWebInterfaceWidget::clearMemoryCaches ( )

Clear all cached data. Useful for webform development.

Since
2.1.6, 06 mar 2018, ar

◆ clearProgressMessage()

void desiteCoreGui::DataBaseWebInterfaceWidget::clearProgressMessage ( )

Clear progress widget text.

Since
1.4.11

◆ createPdfByTemplate()

QString desiteCoreGui::DataBaseWebInterfaceWidget::createPdfByTemplate ( QString  templateFileName,
QString  pdfFileName,
bool  openPdf = true 
)

Create a PDF from a html print template.
Page settings can be configured by setPapersize(), setOrientation() and setMargins(). Page settings configured by the dialog are taken into account as well.

Parameters
templateFileNameText containing the html print template
pdfFileNameSave file name for the PDF. If empty, a file dialog to choose the save file name will be opened.
openPdfIf true, the created PDF will be opened after the creation (optional, default: true).
Returns
File Name
'Error' if file could not be printed.
Since
2013
Remarks
2.8.2, 14 apr 2021, sl: optional parameter 'openPdf' added to allow creation of several PDF without opening them automatically

◆ dataChanged()

void desiteCoreGui::DataBaseWebInterfaceWidget::dataChanged ( )

React to changed data on <input>, <select> and <textarea> tags and write the data into a specified property on the database.
If the given Property Type does not exist yet, it will be created.

The behaviour is controlled through these attributes on the tag:

Parameters
pName[mandatory] Name of the Property Type
pType[mandatory] Datatype of the Property Type
pObjIDs[optional] ID or list of IDs (semicolon-separated) of object(s) to write the data to. If not given, the currently selected object(s) will be used.
pDomain[optional] Lookup domain both for selected elements and target Property Type. Geometry by default.

Example:

<input type="text" name="dataChangedExample" onchange="desiteMD.dataChanged()" pName="targetProperty" pType="xs:string"/>
Since
2013
2.4.4, 2019-06-07, ah: documentation

◆ disableObjectCache()

void desiteCoreGui::DataBaseWebInterfaceWidget::disableObjectCache ( )

Disable all object caches. Useful for webform development.

Since
2.1.6, 06 mar 2018, ar

◆ enableInterruptJavaScriptMsg()

void desiteCoreGui::DataBaseWebInterfaceWidget::enableInterruptJavaScriptMsg ( bool  enable)

By default, the browser engine will show an interrupt message if scripts take a long time to complete.
You can enable or suppress that message with this call.
To have an effect, this must be done on page initialization (e.g. in the "onLoad" event handler).

Parameters
enabletrue: An interrupt message is shown if a script runs for a long period of time.
false: No message is displayed, the script will run without interruption.
Since
1.5.0, 09 feb 2016, mm

◆ getPageMarginBottom()

double desiteCoreGui::DataBaseWebInterfaceWidget::getPageMarginBottom ( )
Since
2013

◆ getPageMarginLeft()

double desiteCoreGui::DataBaseWebInterfaceWidget::getPageMarginLeft ( )
Since
2013

◆ getPageMarginRight()

double desiteCoreGui::DataBaseWebInterfaceWidget::getPageMarginRight ( )
Since
2013

◆ getPageMarginTop()

double desiteCoreGui::DataBaseWebInterfaceWidget::getPageMarginTop ( )
Since
2013

◆ getProgressState()

int desiteCoreGui::DataBaseWebInterfaceWidget::getProgressState ( )

Get state of the progress widget.

See also
showProgress();
hideProgress();
Returns
0 : undefined / not created
1 : open 2 : closed
Since
1.4.11

◆ getZoomFactor()

double desiteCoreGui::DataBaseWebInterfaceWidget::getZoomFactor ( )
Since
2.0.19, 02 mar 2018, jh

◆ hideProgress()

void desiteCoreGui::DataBaseWebInterfaceWidget::hideProgress ( )

Hide progress widget.

Since
1.4.11

◆ loadUrl()

void desiteCoreGui::DataBaseWebInterfaceWidget::loadUrl ( QString  url)

Clear webpage cache and open URL.

◆ processEvents()

void desiteCoreGui::DataBaseWebInterfaceWidget::processEvents ( )
inline

Enforce the processing of the event queue.

◆ processUpdate()

void desiteCoreGui::DataBaseWebInterfaceWidget::processUpdate ( )

Trigger an update of database data on the current form.
This is the same as clicking the "Update" button in the GUI.
It is never necessary to call this if 'Immediate Update' is set.

See also
setImmediateUpdate();
Since
2013
2.4.4, 2019-06-07, ah: documentation

◆ redirectUrl()

void desiteCoreGui::DataBaseWebInterfaceWidget::redirectUrl ( QString  originalUrl,
QString  redirectUrl 
)
inline

Let the WebForms browser redirect a URL.
Note that this works by simple string replacement, so incomplete/partial addresses will work, and passed parameters will be preserved.

Since
2.5.3, 2019-12-06, ah

◆ reloadPage()

void desiteCoreGui::DataBaseWebInterfaceWidget::reloadPage ( )

Load start page.

◆ resetSuffixList()

void desiteCoreGui::DataBaseWebInterfaceWidget::resetSuffixList ( )

Clear the list of file name extensions handled by calling desktop services.

◆ savePicture()

void desiteCoreGui::DataBaseWebInterfaceWidget::savePicture ( )

Open file dialog and save current view as screenshot.

◆ setFooterVisible()

void desiteCoreGui::DataBaseWebInterfaceWidget::setFooterVisible ( bool  visible)
Since
1.3.7, 01 may 2014, jh

◆ setHeaderVisible()

void desiteCoreGui::DataBaseWebInterfaceWidget::setHeaderVisible ( bool  visible)
Since
1.3.7, 01 may 2014, jh

◆ setImmediateUpdate()

void desiteCoreGui::DataBaseWebInterfaceWidget::setImmediateUpdate ( bool  )

Set 'Immediate Update'-flag.
If this flag is set to true, the database values in this widget are updated immediately after every change of the selection in the 3D-model. (This is the same as activating the lock-icon in the GUI.)
If this flag is set to false, you can manually trigger updates via processUpdate().

Since
10 mar 2017, 2.0.10, jh

◆ setOrientation()

void desiteCoreGui::DataBaseWebInterfaceWidget::setOrientation ( int  orientation)

Portrait 0 the page's height is greater than its width. Landscape 1 the page's width is greater than its height.

◆ setPageMargins()

void desiteCoreGui::DataBaseWebInterfaceWidget::setPageMargins ( double  L,
double  R,
double  T,
double  B 
)

Set page margins in mm.

Left, Right, Top, Bottom

◆ setPaperSize()

void desiteCoreGui::DataBaseWebInterfaceWidget::setPaperSize ( int  paperSize)

Set paper size. These values are available

A0 5 841 x 1189 mm
A1 6 594 x 841 mm
A2 7 420 x 594 mm
A3 8 297 x 420 mm
A4 0 210 x 297 mm, 8.26 x 11.69 inches
A5 9 148 x 210 mm
A6 10 105 x 148 mm
A7 11 74 x 105 mm
A8 12 52 x 74 mm
A9 13 37 x 52 mm
B0 14 1000 x 1414 mm
B1 15 707 x 1000 mm
B2 17 500 x 707 mm
B3 18 353 x 500 mm
B4 19 250 x 353 mm
B5 1 176 x 250 mm, 6.93 x 9.84 inches
B6 20 125 x 176 mm
B7 21 88 x 125 mm
B8 22 62 x 88 mm
B9 23 33 x 62 mm
B10 16 31 x 44 mm
C5E 24 163 x 229 mm
Comm10E 25 105 x 241 mm, U.S. Common 10 Envelope
DLE 26 110 x 220 mm
Executive 4 7.5 x 10 inches, 190.5 x 254 mm
Folio 27 210 x 330 mm
Ledger 28 431.8 x 279.4 mm
3 8.5 x 14 inches, 215.9 x 355.6 mm
Letter 2 8.5 x 11 inches, 215.9 x 279.4 mm
Tabloid 29 279.4 x 431.8 mm
Custom 30 Unknown, or a user defined size.
Since
1.3.0, 15 nov 2013, jh

◆ setZoomFactor()

void desiteCoreGui::DataBaseWebInterfaceWidget::setZoomFactor ( double  v)
Since
2.0.19, 02 mar 2018, jh

◆ showConsole()

void desiteCoreGui::DataBaseWebInterfaceWidget::showConsole ( bool  )

Show/hide debug console.

◆ showNavigation()

void desiteCoreGui::DataBaseWebInterfaceWidget::showNavigation ( bool  visible)
Since
2.5.3, 2019-11-22, ah

◆ showProgress()

void desiteCoreGui::DataBaseWebInterfaceWidget::showProgress ( const QVariantMap &  v)

Show progress widget.

Parameters
vConfig as JSON

Config:

{
text: true,
bar: true,
label: true,
closeButton: false,
title: "Write data"
}

"text" is for the main window content (multi-line), "label" is a single-line output above the progress bar.

Since
1.4.11
Remarks
2.2.4, 2018-10-09, ah; added "closeButton" option. Previously, the button was always shown but did nothing.

◆ showProgressMessage()

void desiteCoreGui::DataBaseWebInterfaceWidget::showProgressMessage ( const QString &  )

Add a message to the progress widget.

Since
1.4.11

◆ showProgressMessageConsole()

void desiteCoreGui::DataBaseWebInterfaceWidget::showProgressMessageConsole ( QString  v)

Print to console.

◆ showProgressMessageLabel()

void desiteCoreGui::DataBaseWebInterfaceWidget::showProgressMessageLabel ( const QString &  )

Set the progress label text (shows at the bottom, above the progress bar)

Since
1.4.11

◆ showProgressValue()

void desiteCoreGui::DataBaseWebInterfaceWidget::showProgressValue ( double  v)

Set value of the progress bar as a floating point number.
Value range [0,1]

Since
1.4.11

The documentation for this class was generated from the following file:

Created: Tue Dec 13 2022 13:14:00