#include <importexport.h>
Public Slots | |
| void | batchConverter () |
| void | retranslateUi () |
Signals | |
| void | modified () |
| signal page modified, emitted if save or open functions finished | |
| void | active () |
| signal savePage(QString Str) function active, emitted if save functions started | |
| void | ready () |
| signal savePage(QString Str) function ready, emitted if save function finished | |
Public Member Functions | |
| ImportExport (PageCtrl *pageCtrl, Prototype *prototype) | |
| virtual | ~ImportExport () |
| QString | createKMHeader (QString Str) |
| QString | currentTabText () |
| int | currentTabIndex () |
| bool | OpenPrepare (QStringList files) |
| int | savePage (QString Str) |
| void | SavePrepare (int pageIndex, QString fn, QStringList *tmpList, int Ext) |
| void | saveAllPages (QString batchPath, int batchExt) |
Public Attributes | |
| bool | savePTT |
| save prototype flag, used by preferences dialog | |
| bool | usePresetDir |
| use preset dir flag, used by preferences dialog | |
| bool | usePrgLngDetection |
| use programming language detection | |
| QString | lastDir |
| last directory of save or open function | |
| QStringList | errorFiles |
| string list for files which could not be opened | |
Private Member Functions | |
| int | nextPOUEndIndexAt (QStringList *tmpList, int index) |
| QString | getCoDeSysVISU (QStringList *tmpList, int index, int end) |
| QString | getSiemensDBData (QStringList *tmpList, int index, int end) |
| bool | OpenReinforce (QStringList *tmpList, int index, int endPos, QString ExtStr) |
| void | setProgressBar (int files, int minFiles, QString msg) |
| QString | strippedFileName (const QString &fullFileName) |
Private Attributes | |
| QString | msg_progress_fopen |
| message at progressbar "file open" | |
| QString | msg_progress_batch |
| message at progressbar "batch converter" | |
| QProgressBar * | progressBar |
| instance of qprogressbar | |
| PageCtrl * | m_PageCtrl |
| instance of PageCtrl class | |
| Prototype * | m_Prototype |
| instance of Prototype class | |
| ImportExport::~ImportExport | ( | ) | [virtual] |
virtual destructor
| void ImportExport::active | ( | ) | [signal] |
signal savePage(QString Str) function active, emitted if save functions started
| void ImportExport::batchConverter | ( | ) | [slot] |
batch converting / file resaving function
The batch dialog returns the full string of the combobox:
'only copy'
'clean POU (.txt)'
'Moeller POE (.poe)'
'CoDeSys (.EXP)'
'Siemens S7 (.awl / .scl - keep current language)'
'KW-Software (.IL / .ST - keep current language)'
If Siemens of KW-Software were detected the called saveAllPages(QString batchPath, int batchExt) function will only get batchExt=4 or batchExt=6 to keep the current programming language by self detection.
| QString ImportExport::createKMHeader | ( | QString | Str | ) |
revise Moeller header from string input
| int ImportExport::currentTabIndex | ( | ) |
return current page index
| QString ImportExport::currentTabText | ( | ) |
return file name of current page
| QString ImportExport::getCoDeSysVISU | ( | QStringList * | tmpList, | |
| int | index, | |||
| int | end | |||
| ) | [private] |
return CoDeSys VISU section from a list, by using a start index and an end position
| QString ImportExport::getSiemensDBData | ( | QStringList * | tmpList, | |
| int | index, | |||
| int | end | |||
| ) | [private] |
return Siemens DB data from a list, by using a start index and an end position
| void ImportExport::modified | ( | ) | [signal] |
signal page modified, emitted if save or open functions finished
| int ImportExport::nextPOUEndIndexAt | ( | QStringList * | tmpList, | |
| int | index | |||
| ) | [private] |
return next POU end index of tmpList up from index
| bool ImportExport::OpenPrepare | ( | QStringList | files | ) |
prepare file opening of string list content and call open reinforce function
| bool ImportExport::OpenReinforce | ( | QStringList * | tmpList, | |
| int | index, | |||
| int | endPos, | |||
| QString | ExtStr | |||
| ) | [private] |
reinforce import of file content in tmpList up from index until endPos, respecting the ExtStr value
supported extension values:
| void ImportExport::ready | ( | ) | [signal] |
signal savePage(QString Str) function ready, emitted if save function finished
| void ImportExport::retranslateUi | ( | ) | [slot] |
retranslate Ui
| void ImportExport::saveAllPages | ( | QString | batchPath, | |
| int | batchExt | |||
| ) |
save all pages
| batchPath | contains save path, if empty call PageCtrl->filePathOf(i) | |
| batchExt | contains the selected file extension, if set to 99 use PageCtrl->fileExtOf(i) |
| int ImportExport::savePage | ( | QString | Str | ) |
save page content into path which is setted in Str and call saveprepare function
| void ImportExport::SavePrepare | ( | int | pageIndex, | |
| QString | fn, | |||
| QStringList * | tmpList, | |||
| int | Ext | |||
| ) |
prepare file storage for content at pageIndex into tmpList, with specified by filename and extension from fn and Ext
supported extension values:
| void ImportExport::setProgressBar | ( | int | files, | |
| int | minFiles, | |||
| QString | msg | |||
| ) | [private] |
set progressbar with number of files, min. files to be activated, message string
| QString ImportExport::strippedFileName | ( | const QString & | fullFileName | ) | [private] |
strip filename from fullFileName (path + file name)
| QStringList ImportExport::errorFiles |
string list for files which could not be opened
| QString ImportExport::lastDir |
last directory of save or open function
PageCtrl* ImportExport::m_PageCtrl [private] |
instance of PageCtrl class
Prototype* ImportExport::m_Prototype [private] |
instance of Prototype class
QString ImportExport::msg_progress_batch [private] |
message at progressbar "batch converter"
QString ImportExport::msg_progress_fopen [private] |
message at progressbar "file open"
QProgressBar* ImportExport::progressBar [private] |
instance of qprogressbar
save prototype flag, used by preferences dialog
use preset dir flag, used by preferences dialog
use programming language detection
1.5.8