fwGeneral
8.4.1
|
Functions | |
void | fwScreenShot_screenShotUserMenu (dyn_string &exceptionInfo, string sModuleName="", string sPanelName="") |
void | fwScreenShot_exportTableContentUserMenu (string sTableName, dyn_string &exceptionInfo) |
void | _fwScreenShot_takeScreenShotToFile (string sFileName, dyn_string &exceptionInfo, string sModuleName="", string sPanelName="") |
void | _fwScreenShot_takeTableContentToFile (string sTableName, string sFileName, dyn_string &exceptionInfo) |
void | fwScreenShot_sendScreenShotByEmail (dyn_string &exceptionInfo, string sModuleName="", string sPanelName="") |
void | fwScreenShot_sendTableContentByEmail (string sTableName, dyn_string &exceptionInfo) |
void | fwScreenShot_saveScreenShotToFile (dyn_string &exceptionInfo, string sModuleName="", string sPanelName="") |
void | fwScreenShot_saveTableContentToFile (string sTableName, dyn_string &exceptionInfo) |
string | _fwScreenShot_getTemporaryFileName (string sFilePrefix, string sExtension, dyn_string &exceptionInfo) |
string | _fwScreenShot_getUserWritableFolder (dyn_string &exceptionInfo) |
bool | _fwScreenShot_isFileWritable (string sFileName, dyn_string &exceptionInfo) |
void | _fwScreenShot_checkFileExtension (string &sFileName, string sExtension, dyn_string &exceptionInfo) |
This library is used to take a screen shot of the current module and panel and either save it or send it by email. It also provides the functions to export the content of a table to file or by email.
The two functions fwScreenShot_exportTableContentUserMenu and fwScreenShot_screenShotUserMenu are selfcontained and be called directly from any panel. It will proposed a dropdown menu allowing the user to choose what action he wants to do, i.e. send by email or save to disk.
void fwScreenShot_screenShotUserMenu | ( | dyn_string & | exceptionInfo, |
string | sModuleName = "" , |
||
string | sPanelName = "" |
||
) |
Open an popup menu for the user to decide if he wants to save the screenshot to disk or to send it by mail and perform the actions
dyn_string | exceptionInfo: Details of errors/exceptions returns here |
string | sModuleName: name of the module which will be screenshoted. By default myModuleName is considered |
string | sPanelName: name of the panel which will be screenshoted. By default myPanelName is considered |
void fwScreenShot_exportTableContentUserMenu | ( | string | sTableName, |
dyn_string & | exceptionInfo | ||
) |
Open an popup menu for the user to decide if he wants to save the content of a table to disk or to send it by mail and perform the actions
string | sTableName: name of the table shape for which the content need to be exported |
dyn_string | exceptionInfo: Details of errors/exceptions returns here |
void _fwScreenShot_takeScreenShotToFile | ( | string | sFileName, |
dyn_string & | exceptionInfo, | ||
string | sModuleName = "" , |
||
string | sPanelName = "" |
||
) |
Take a screenshot of a given panel and module and save it to a file
string | sFileName: name of the file (absolute path) to which the screenshot will be saved |
dyn_string | exceptionInfo: Details of errors/exceptions returns here |
string | sModuleName: name of the module which will be screenshoted. By default myModuleName is considered |
string | sPanelName: name of the panel which will be screenshoted. By default myPanelName is considered |
void _fwScreenShot_takeTableContentToFile | ( | string | sTableName, |
string | sFileName, | ||
dyn_string & | exceptionInfo | ||
) |
Take a screenshot of a given panel and module and save it to a file
string | sTableName: name of the table shape which content needs to be exported |
string | sFileName: name of the file (absolute path) to which the screenshot will be saved |
dyn_string | exceptionInfo: Details of errors/exceptions returns here |
void fwScreenShot_sendScreenShotByEmail | ( | dyn_string & | exceptionInfo, |
string | sModuleName = "" , |
||
string | sPanelName = "" |
||
) |
Take a screenshot of a given panel and module and send it by email To send a screenshot by email, a file containing the screenshot must be created first. The function will first try to find a place where to create this file, but in case of failure it will ask the user to choose a writtable folder where the screenshot can be saved.
dyn_string | exceptionInfo: Details of errors/exceptions returns here |
string | sModuleName: name of the module which will be screenshoted. By default myModuleName is considered |
string | sPanelName: name of the panel which will be screenshoted. By default myPanelName is considered |
void fwScreenShot_sendTableContentByEmail | ( | string | sTableName, |
dyn_string & | exceptionInfo | ||
) |
Take the content of table and send it by email as an attachement The function will first try to find a place where to create this attachement, but in case of failure it will ask the user to choose a writtable folder where the file can be saved.
string | sTableName: name of the table shape which content needs to send by email |
dyn_string | exceptionInfo: Details of errors/exceptions returns here |
void fwScreenShot_saveScreenShotToFile | ( | dyn_string & | exceptionInfo, |
string | sModuleName = "" , |
||
string | sPanelName = "" |
||
) |
Allow the user to save the screenshot of any given module and panel to a specific file. By default the user will be proposed to save the file in its own directory
dyn_string | exceptionInfo: Details of errors/exceptions returns here |
string | sModuleName: name of the module which will be screenshoted. By default myModuleName is considered |
string | sPanelName: name of the panel which will be screenshoted. By default myPanelName is considered |
void fwScreenShot_saveTableContentToFile | ( | string | sTableName, |
dyn_string & | exceptionInfo | ||
) |
Allow the user to save the content of a table passed as parameter to a csv file. By default the user will be proposed to save the file in its own directory
string | sTableName: name of the tabel shape to be exported |
dyn_string | exceptionInfo: Details of errors/exceptions returns here |
string | sModuleName: name of the module which will be screenshoted. By default myModuleName is considered |
string | sPanelName: name of the panel which will be screenshoted. By default myPanelName is considered |
string _fwScreenShot_getTemporaryFileName | ( | string | sFilePrefix, |
string | sExtension, | ||
dyn_string & | exceptionInfo | ||
) |
Return the name of a file along with its path which can be used to take the screenshot when sending by email
string | sFilePrefix: prefix for the file name with will be build |
string | sExtension: extension used for the file name |
dyn_string | exceptionInfo: Details of errors/exceptions returns here |
string _fwScreenShot_getUserWritableFolder | ( | dyn_string & | exceptionInfo | ) |
Return the name of folder in which the user can save a file. It scans the usual windows folders as well as the linux folder. If no writable folder can be found, an empty string is returned
dyn_string | exceptionInfo: Details of errors/exceptions returns here |
bool _fwScreenShot_isFileWritable | ( | string | sFileName, |
dyn_string & | exceptionInfo | ||
) |
Check if a file can be created/written. Compared to the function access(), this function can handle cases where the file does not exists yet
string | sFileName: absolute file name to be checked |
dyn_string | exceptionInfo: Details of errors/exceptions returns here |
void _fwScreenShot_checkFileExtension | ( | string & | sFileName, |
string | sExtension, | ||
dyn_string & | exceptionInfo | ||
) |
Check if a file has a particular extension. If it does not, it adds the extension to the name of the file
string | sFileName: file name to be checked |
string | sExtension: extension to be checked without the . |
dyn_string | exceptionInfo: Details of errors/exceptions returns here |