#include <pagectrl.h>
Public Slots | |
void | changeSplitMode () |
void | changeInputWindow () |
void | configureCurrentEditor (int i) |
void | copy () |
void | createHighlighters (int i) |
void | cut () |
void | deleteCurrentHighlighters (int i) |
void | deletePage () |
void | deletePageIndex (int index) |
void | newPage () |
void | setPageModified (bool modified) |
void | paste () |
void | redo () |
void | selectAll () |
void | setNewSplitterVisible () |
void | undo () |
void | retranslateUi () |
Signals | |
void | compareWith () |
signal file comparision with | |
void | compareWithNext () |
signal file comparision with next | |
void | compareWithPrev () |
signal file comparision with previous | |
void | currentChanged (int i) |
signal page selection changed to i | |
void | cursorModified () |
signal cursor position modified at current inputwindow | |
void | modified () |
signal page was modified, used by MainWindow class to update status bar | |
void | pageDeleted (int i) |
signal page i was deleted, used by create highlighters slot | |
void | saveRequest () |
signal page save requested | |
Public Member Functions | |
PageCtrl (QWidget *parent=0) | |
virtual | ~PageCtrl () |
QString | activeInputWindow () |
int | countPages () |
void | correctRecentFilesListLength () |
QString | currentDeclaration () |
bool | currentDeclarationIsVisible () |
QString | currentFncType () |
QString | currentFileEnd () |
int | currentFileExt () |
QString | currentFileExtStr () |
QString | currentFileName () |
QString | currentFilePath () |
QString | currentFileType () |
QString | currentFileTypeShort () |
QString | currentInstruction () |
QString | currentMELSOFTConfig () |
QString | currentMULTIPROGProperties () |
QString | currentMULTIPROGDescription () |
QString | currentMULTIPROGWorkSheetName () |
QString | currentSTEP7DBData () |
QString | currentSucosoftHeader () |
QString | currentPrgLng () |
QString | currentSelection () |
QString | currentSplitMode () |
int | currentSplitSize () |
int | currentTabIndex () |
int | currentTabStopWidth () |
QString | currentTabText () |
QString | cursorPosDec () |
QString | cursorPosIns () |
QString | declarationOf (int index) |
QString | strFromDefinedPOUExtListAt (int index) |
void | delVARTypeItems () |
void | fillCurrentDeclaration (QString Str) |
void | fillCurrentInstruction (QString Str) |
void | fillDeclarationOf (int index, QString Str) |
void | fillInstructionOf (int index, QString Str) |
void | fillRecentFilesList (int index) |
QString | fileEndOf (int index) |
int | fileExtOf (int index) |
QString | fileExtStrOf (int index) |
QString | fileNameOf (int index) |
QString | fncTypeOf (int index) |
QString | filePathOf (int index) |
QString | fileTypeOf (int index) |
bool | find (QString window, QString fStr, QString rStr, QTextDocument::FindFlags options) |
void | insertText (QString window, QString Str) |
void | insertTextOf (QString window, QString Str, int index) |
QString | instructionOf (int index) |
void | moveToStartDeclarations () |
void | moveToStartInstructions () |
QString | MELSOFTConfigOf (int index) |
QString | MULTIPROGDescriptionOf (int index) |
QString | MULTIPROGPropertiesOf (int index) |
QString | MULTIPROGWorkSheetNameOf (int index) |
bool | pageModifiedOf (int index) |
bool | pagesModified () |
QString | prgLngOf (int index) |
void | setCurrentDeclarationVisible (bool visible) |
void | setCurrentFncType (QString Str) |
void | setCurrentFileEnd (QString Str) |
void | setCurrentFileExt (QString Str) |
void | setCurrentFileListItemText (QString Str) |
void | setCurrentFileName (QString Str) |
void | setCurrentFilePath (QString Str) |
void | setCurrentFileType (QString Str) |
void | setCurrentFont (QFont font) |
void | setCurrentMELSOFTConfig (QString Str) |
void | setCurrentMULTIPROGDescription (QString Str) |
void | setCurrentMULTIPROGProperties (QString Str) |
void | setCurrentMULTIPROGWorkSheetName (QString Str) |
void | setCurrentPrgLng (QString Str) |
void | setCurrentSplitMode (QString Str) |
void | setCurrentSplitSize (int i) |
void | setCurrentSTEP7DBData (QString Str) |
void | setCurrentSucosoftHeader (QString Str) |
void | setCurrentTypeData (QString filetype, QString functiontype, QString fileendmark) |
void | setCurrentTabStops (int width) |
void | setCurrentTabText (QString Str) |
void | setFileListVisible (bool visible) |
void | setMELSOFTConfigOf (int index, QString Str) |
void | setMULTIPROGPropertiesOf (int index, QString Str) |
void | setPageCtrlSignalsBlocked (bool blocked) |
void | setPrgLngOf (int index, QString Str) |
void | setPageModifiedOf (int index, bool modified) |
void | setSplitModeOf (int index, QString Str) |
void | setTabCtrlVisible (bool visible) |
void | setTabPosition (int pos) |
QString | STEP7DBDataOf (int index) |
QString | SucosoftHeaderOf (int index) |
QString | tabTextOf (int index) |
Public Attributes | |
QString | defaultPOUExt |
default extension for new POUs as into string converted number/index | |
QStringList | definedPOUExtList |
list of supported POU extensions | |
bool | flg_fileListVisible |
flag file list visible, used by preferences dialog | |
bool | flg_inhibit_createHighlighters |
flag inhibit create highlighters, used by ImportExport class | |
bool | flg_activate_highlighters |
flag activate highlighters, used by preferences dialog | |
bool | flg_enableHighlightLines |
flag enable highlighting lines | |
QColor | hiLineColor |
highlighting color for current line | |
QFont | font |
current application-global font | |
QString | Sucosoft_KM_TEXT |
Moeller Sucosoft header copyright string, used by ImportExport class. | |
int | maxRecentFiles |
number of recent files to be hold | |
QString | prgLngStr |
application-global programming language | |
int | printArea |
print area indicator postion for declarations and instructions | |
QStringList | recentFiles |
recent file paths list | |
QString | Sucosoft_S40_VERSION |
Moeller Sucosoft header compatibility string, used by ImportExport class. | |
QString | splitMode |
application-global split mode for inputwindows | |
int | splitSize |
application-global split size for inputwindows | |
int | tabPosition |
application-global tab position for pages | |
int | tabStopWidth |
application-global tabstop width for inputwindows | |
bool | unsavedNotice |
flag notification for unsaved files | |
Private Slots | |
void | compareWithNextCheck () |
void | compareWithPrevCheck () |
void | cursorPositionChanged () |
void | setFileListRow (int index) |
Private Member Functions | |
QString | strippedFileName (const QString &fullFileName) |
Private Attributes | |
bool | openInProcess |
QString | msg_text_closepage |
message text for close page dialog | |
QString | okButtonText |
messagebox button text ok | |
QString | cancelButtonText |
messagebox button text cancel | |
QString | saveButtonText |
messagebox button text save | |
QListWidget * | FileList |
list of opened files | |
Highlighter_Dec * | highlighter_dec |
syntax highlighter for declaration section | |
Highlighter_Ins * | highlighter_ins |
syntax highlighter for instruction section | |
TabWidget * | TabCtrl |
QTabwidget instance, holds pages. | |
QToolButton * | delPageButton |
delete pages button, shown in tab row |
PageCtrl::PageCtrl | ( | QWidget * | parent = 0 |
) |
creating function
PageCtrl::~PageCtrl | ( | ) | [virtual] |
QString PageCtrl::activeInputWindow | ( | ) |
return active inputwindow of current page as short name (Dec, Ins)
void PageCtrl::changeInputWindow | ( | ) | [slot] |
toggle focus and cursor for declaratins and Instructions
void PageCtrl::changeSplitMode | ( | ) | [slot] |
reversing splitter orientation
void PageCtrl::compareWith | ( | ) | [signal] |
signal file comparision with
void PageCtrl::compareWithNext | ( | ) | [signal] |
signal file comparision with next
void PageCtrl::compareWithNextCheck | ( | ) | [private, slot] |
check if next editor window exists
void PageCtrl::compareWithPrev | ( | ) | [signal] |
signal file comparision with previous
void PageCtrl::compareWithPrevCheck | ( | ) | [private, slot] |
check if previous editor window exists
void PageCtrl::configureCurrentEditor | ( | int | i | ) | [slot] |
set lines highlighter
i | is only needed for signal-slot handling |
void PageCtrl::copy | ( | ) | [slot] |
copy from current inputwindow
void PageCtrl::correctRecentFilesListLength | ( | ) |
correct length of recent files list
int PageCtrl::countPages | ( | ) |
count number of tabs
void PageCtrl::createHighlighters | ( | int | i | ) | [slot] |
slot create syntax highlighters of current page
i | is only needed for signal-slot handling |
void PageCtrl::currentChanged | ( | int | i | ) | [signal] |
signal page selection changed to i
QString PageCtrl::currentDeclaration | ( | ) |
return current declaration content
bool PageCtrl::currentDeclarationIsVisible | ( | ) |
return visibility of current declaration inputwindow
QString PageCtrl::currentFileEnd | ( | ) |
return current file end
int PageCtrl::currentFileExt | ( | ) |
return curent file extension
QString PageCtrl::currentFileExtStr | ( | ) |
return curent file extension string
QString PageCtrl::currentFileName | ( | ) |
return current filename without the extension string
QString PageCtrl::currentFilePath | ( | ) |
return curent file path (without file name)
QString PageCtrl::currentFileType | ( | ) |
return current file type
QString PageCtrl::currentFileTypeShort | ( | ) |
return current file type as short information:
QString PageCtrl::currentFncType | ( | ) |
return current function type
QString PageCtrl::currentInstruction | ( | ) |
return current instruction content
QString PageCtrl::currentMELSOFTConfig | ( | ) |
QString PageCtrl::currentMULTIPROGDescription | ( | ) |
QString PageCtrl::currentMULTIPROGProperties | ( | ) |
QString PageCtrl::currentMULTIPROGWorkSheetName | ( | ) |
QString PageCtrl::currentPrgLng | ( | ) |
return programming language of current page
QString PageCtrl::currentSelection | ( | ) |
return selected text of current input window
QString PageCtrl::currentSplitMode | ( | ) |
return splitter mode of current page
int PageCtrl::currentSplitSize | ( | ) |
return splitter size of current page
QString PageCtrl::currentSTEP7DBData | ( | ) |
QString PageCtrl::currentSucosoftHeader | ( | ) |
int PageCtrl::currentTabIndex | ( | ) |
return current tab/page index
int PageCtrl::currentTabStopWidth | ( | ) |
return current tabstop width information
QString PageCtrl::currentTabText | ( | ) |
return current tab text = filename + extension
void PageCtrl::cursorModified | ( | ) | [signal] |
signal cursor position modified at current inputwindow
QString PageCtrl::cursorPosDec | ( | ) |
return cursor position of current declaration inputwindow
QString PageCtrl::cursorPosIns | ( | ) |
return cursor position of current instruction inputwindow
void PageCtrl::cursorPositionChanged | ( | ) | [private, slot] |
slot curosr postion changed, does emit cursor modified signal
void PageCtrl::cut | ( | ) | [slot] |
cut from current inputwindow
QString PageCtrl::declarationOf | ( | int | index | ) |
return declaration content of tab/page index
void PageCtrl::deleteCurrentHighlighters | ( | int | i | ) | [slot] |
slot delete syntax highlighters of current page
i | is only needed for signal-slot handling |
void PageCtrl::deletePage | ( | ) | [slot] |
delete current page
void PageCtrl::deletePageIndex | ( | int | index | ) | [slot] |
delete page index
void PageCtrl::delVARTypeItems | ( | ) |
delete items which are not used in GLOBAL_VAR lists (instruction inputwindow, moeller header)
QString PageCtrl::fileEndOf | ( | int | index | ) |
return file end of tab/page index
int PageCtrl::fileExtOf | ( | int | index | ) |
return file extension of tab/page index
QString PageCtrl::fileExtStrOf | ( | int | index | ) |
return file extension as string of tab/page index
QString PageCtrl::fileNameOf | ( | int | index | ) |
return filename of tab/page index without the extension string
QString PageCtrl::filePathOf | ( | int | index | ) |
return file path of tab/page index
QString PageCtrl::fileTypeOf | ( | int | index | ) |
return file type of tab/page index
void PageCtrl::fillCurrentDeclaration | ( | QString | Str | ) |
clear and fill declaration inputwindow
void PageCtrl::fillCurrentInstruction | ( | QString | Str | ) |
clear and fill instruction inputwindow
void PageCtrl::fillDeclarationOf | ( | int | index, | |
QString | Str | |||
) |
clear and fill declaration inputwindow of index
void PageCtrl::fillInstructionOf | ( | int | index, | |
QString | Str | |||
) |
clear and fill instruction inputwindow of index
void PageCtrl::fillRecentFilesList | ( | int | index | ) |
fill recent files list with item at index
bool PageCtrl::find | ( | QString | window, | |
QString | fStr, | |||
QString | rStr, | |||
QTextDocument::FindFlags | options | |||
) |
find given fStr or replace with rStr in window by using QTextDocument::FindFlags
window | must be set to 'Dec' or 'Ins' |
QString PageCtrl::fncTypeOf | ( | int | index | ) |
return function type of tab/page index
void PageCtrl::insertText | ( | QString | window, | |
QString | Str | |||
) |
insert Str into window
window | must be set to 'Dec' or 'Ins' |
void PageCtrl::insertTextOf | ( | QString | window, | |
QString | Str, | |||
int | index | |||
) |
insert Str into window on tab/page index
window | must be set to 'Dec' or 'Ins' |
QString PageCtrl::instructionOf | ( | int | index | ) |
return instruction content of tab/page index
QString PageCtrl::MELSOFTConfigOf | ( | int | index | ) |
return MELSOFT config of tab/page index
void PageCtrl::modified | ( | ) | [signal] |
signal page was modified, used by MainWindow class to update status bar
void PageCtrl::moveToStartDeclarations | ( | ) |
move anchor to start for declarations
void PageCtrl::moveToStartInstructions | ( | ) |
move anchor to start for instructions
QString PageCtrl::MULTIPROGDescriptionOf | ( | int | index | ) |
return MULTIPROG description section of tab/page index
QString PageCtrl::MULTIPROGPropertiesOf | ( | int | index | ) |
return MULTIPROG properties section of tab/page index
QString PageCtrl::MULTIPROGWorkSheetNameOf | ( | int | index | ) |
return MULTIPROG worksheet name of tab/page index
void PageCtrl::newPage | ( | ) | [slot] |
create a new page
pages contain a splitter, two inputwindows and some labels for page specific data PLCEdit uses no database to store file specific data. The file specific data are stored into hidden labels on the pages. Only the Splitter and the TextEdits are visible. The content/components of the page can be edited by diverse public functions.
page components:
void PageCtrl::pageDeleted | ( | int | i | ) | [signal] |
signal page i was deleted, used by create highlighters slot
bool PageCtrl::pageModifiedOf | ( | int | index | ) |
return page modified status
bool PageCtrl::pagesModified | ( | ) |
return if any page is modified
void PageCtrl::paste | ( | ) | [slot] |
paste into current inputwindow
QString PageCtrl::prgLngOf | ( | int | index | ) |
return programming language of tab/page index
void PageCtrl::redo | ( | ) | [slot] |
redo last input on current inputwindow
void PageCtrl::retranslateUi | ( | ) | [slot] |
retranslate Ui
void PageCtrl::saveRequest | ( | ) | [signal] |
signal page save requested
void PageCtrl::selectAll | ( | ) | [slot] |
select all text in current inputwindow
void PageCtrl::setCurrentDeclarationVisible | ( | bool | visible | ) |
set visibility of current declaration inputwindow
void PageCtrl::setCurrentFileEnd | ( | QString | Str | ) |
set file end string of current page
void PageCtrl::setCurrentFileExt | ( | QString | Str | ) |
set file extension string of current page
void PageCtrl::setCurrentFileListItemText | ( | QString | Str | ) |
insert FileList item named in Str
void PageCtrl::setCurrentFileName | ( | QString | Str | ) |
set file path for current page
void PageCtrl::setCurrentFilePath | ( | QString | Str | ) |
set file path for current page
void PageCtrl::setCurrentFileType | ( | QString | Str | ) |
set file type of current page
void PageCtrl::setCurrentFncType | ( | QString | Str | ) |
set function type of current page
void PageCtrl::setCurrentFont | ( | QFont | font | ) |
set font of current instruction and declaration inputwindows
void PageCtrl::setCurrentMELSOFTConfig | ( | QString | Str | ) |
set MELSOFT config for current tab/page
void PageCtrl::setCurrentMULTIPROGDescription | ( | QString | Str | ) |
set MULTIPROG description section for current tab/page
void PageCtrl::setCurrentMULTIPROGProperties | ( | QString | Str | ) |
set MULTIPROG properties section for current tab/page
void PageCtrl::setCurrentMULTIPROGWorkSheetName | ( | QString | Str | ) |
set MULTIPROG worksheet name for current tab/page
void PageCtrl::setCurrentPrgLng | ( | QString | Str | ) |
set programming language for current tab/page
void PageCtrl::setCurrentSplitMode | ( | QString | Str | ) |
set splitter mode of current tab/page
void PageCtrl::setCurrentSplitSize | ( | int | i | ) |
set split size for current tab/page
void PageCtrl::setCurrentSTEP7DBData | ( | QString | Str | ) |
set STEP 7 DB Data for current tab/page
void PageCtrl::setCurrentSucosoftHeader | ( | QString | Str | ) |
set Sucosoft header for current tab/page
void PageCtrl::setCurrentTabStops | ( | int | width | ) |
set tab width of current instruction and declaration inputwindows
void PageCtrl::setCurrentTabText | ( | QString | Str | ) |
set tab text of current tab/page
void PageCtrl::setCurrentTypeData | ( | QString | filetype, | |
QString | functiontype, | |||
QString | fileendmark | |||
) |
set type of file, type of function, end of file string for current tab/page
void PageCtrl::setFileListRow | ( | int | index | ) | [private, slot] |
slot for set FileList row by index
void PageCtrl::setFileListVisible | ( | bool | visible | ) |
set visibility of FileList
void PageCtrl::setMELSOFTConfigOf | ( | int | index, | |
QString | Str | |||
) |
set MELSOFT config of tab/page index
void PageCtrl::setMULTIPROGPropertiesOf | ( | int | index, | |
QString | Str | |||
) |
set MULTIPROG properties section of tab/page index
void PageCtrl::setNewSplitterVisible | ( | ) | [slot] |
set visibility of new created page
void PageCtrl::setPageCtrlSignalsBlocked | ( | bool | blocked | ) |
set signals of FileList and TabCtrl blocked
void PageCtrl::setPageModified | ( | bool | modified | ) | [slot] |
slot page modified to handle changed content of declarations and instructions
modified | is only needed for signal-slot handling |
void PageCtrl::setPageModifiedOf | ( | int | index, | |
bool | modified | |||
) |
set page modified status of tab/page index
void PageCtrl::setPrgLngOf | ( | int | index, | |
QString | Str | |||
) |
set programming language of tab/page index
void PageCtrl::setSplitModeOf | ( | int | index, | |
QString | Str | |||
) |
set split mode of tab/page index
void PageCtrl::setTabCtrlVisible | ( | bool | visible | ) |
set visibility of TabCtrl
void PageCtrl::setTabPosition | ( | int | pos | ) |
set tab orientation by selected postion
pos | 1=north, 2=south, 3=east, 4=west, default is north |
QString PageCtrl::STEP7DBDataOf | ( | int | index | ) |
return STEP 7 DB Data of index
QString PageCtrl::strFromDefinedPOUExtListAt | ( | int | index | ) |
return extension string from POU extension definition list at index
QString PageCtrl::strippedFileName | ( | const QString & | fullFileName | ) | [private] |
strip filename from fullFileName (path + filename)
QString PageCtrl::SucosoftHeaderOf | ( | int | index | ) |
return Sucosoft header of tab/page index
QString PageCtrl::tabTextOf | ( | int | index | ) |
return tab text of tab/page index = filename + extension
void PageCtrl::undo | ( | ) | [slot] |
undo last typing in current inputwindow
QString PageCtrl::cancelButtonText [private] |
messagebox button text cancel
QString PageCtrl::defaultPOUExt |
default extension for new POUs as into string converted number/index
QStringList PageCtrl::definedPOUExtList |
list of supported POU extensions
QToolButton* PageCtrl::delPageButton [private] |
delete pages button, shown in tab row
QListWidget* PageCtrl::FileList [private] |
list of opened files
flag activate highlighters, used by preferences dialog
flag enable highlighting lines
flag file list visible, used by preferences dialog
flag inhibit create highlighters, used by ImportExport class
QFont PageCtrl::font |
current application-global font
Highlighter_Dec* PageCtrl::highlighter_dec [private] |
syntax highlighter for declaration section
Highlighter_Ins* PageCtrl::highlighter_ins [private] |
syntax highlighter for instruction section
QColor PageCtrl::hiLineColor |
highlighting color for current line
number of recent files to be hold
QString PageCtrl::msg_text_closepage [private] |
message text for close page dialog
QString PageCtrl::okButtonText [private] |
messagebox button text ok
bool PageCtrl::openInProcess [private] |
QString PageCtrl::prgLngStr |
application-global programming language
print area indicator postion for declarations and instructions
QStringList PageCtrl::recentFiles |
recent file paths list
QString PageCtrl::saveButtonText [private] |
messagebox button text save
QString PageCtrl::splitMode |
application-global split mode for inputwindows
application-global split size for inputwindows
QString PageCtrl::Sucosoft_KM_TEXT |
Moeller Sucosoft header copyright string, used by ImportExport class.
QString PageCtrl::Sucosoft_S40_VERSION |
Moeller Sucosoft header compatibility string, used by ImportExport class.
TabWidget* PageCtrl::TabCtrl [private] |
QTabwidget instance, holds pages.
application-global tab position for pages
application-global tabstop width for inputwindows
flag notification for unsaved files