#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 | newPage () |
| void | paste () |
| void | redo () |
| void | selectAll () |
| void | setNewSplitterVisible () |
| void | undo () |
| void | retranslateUi () |
Signals | |
| void | currentChanged (int i) |
| signal page selection changed to i | |
| void | cursorAtStartPos () |
| signal cursor has changed inputwindow and is at start position of new window | |
| 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 | |
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 | currentFilePath () |
| QString | currentFileType () |
| QString | currentFileTypeShort () |
| QString | currentInstruction () |
| QString | currentKMHeader () |
| QString | currentKWProperties () |
| QString | currentKWDescription () |
| QString | currentKWWorkSheetName () |
| QString | currentSiemensDBData () |
| int | currentTabIndex () |
| QString | currentPrgLng () |
| QString | currentSelection () |
| QString | currentSplitMode () |
| int | currentSplitSize () |
| QString | currentTabText () |
| QString | cursorPosDec () |
| QString | cursorPosIns () |
| QString | declarationOf (int index) |
| void | delVARTypeItems () |
| QString | fncTypeOf (int index) |
| void | fillCurrentDeclaration (QString Str) |
| void | fillCurrentInstruction (QString Str) |
| void | fillRecentFilesList (int index) |
| QString | fileEndOf (int index) |
| int | fileExtOf (int index) |
| QString | tabTextOf (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) |
| QString | KMHeaderOf (int index) |
| QString | KWDescriptionOf (int index) |
| QString | KWPropertiesOf (int index) |
| QString | KWWorkSheetNameOf (int index) |
| QString | SiemensDBDataOf (int index) |
| 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 | setCurrentFilePath (QString Str) |
| void | setCurrentFileType (QString Str) |
| void | setCurrentFont (QFont font) |
| void | setCurrentKMHeader (QString Str) |
| void | setCurrentKWDescription (QString Str) |
| void | setCurrentKWProperties (QString Str) |
| void | setCurrentKWWorkSheetName (QString Str) |
| void | setCurrentSiemensDBData (QString Str) |
| void | setCurrentPrgLng (QString Str) |
| void | setCurrentSplitMode (QString Str) |
| void | setCurrentSplitSize (int i) |
| void | setCurrentTypeData (QString filetype, QString functiontype, QString fileendmark) |
| void | setCurrentTabStops (int width) |
| void | setCurrentTabText (QString Str) |
| void | setFileListVisible (bool visible) |
| void | setKWPropertiesOf (int index, QString Str) |
| void | setPrgLngOf (int index, QString Str) |
| void | setSplitModeOf (int index, QString Str) |
| void | setTabCtrlVisible (bool visible) |
| void | setTabPosition (int pos) |
Public Attributes | |
| 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 | KM_TEXT |
| Moeller 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 | S40_VERSION |
| Moeller 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 | |
Private Slots | |
| void | setFileListRow (int i) |
| void | cursorPositionChanged () |
Private Member Functions | |
| QString | strippedFileName (const QString &fullFileName) |
Private Attributes | |
| bool | openInProcess |
| QListWidget * | FileList |
| list of opened files | |
| Highlighter_Dec * | highlighter_dec |
| syntax highlighter for declaration section | |
| Highlighter_Ins * | highlighter_ins |
| syntax highlighter for instruction section | |
| QTabWidget * | 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::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::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::currentKMHeader | ( | ) |
| QString PageCtrl::currentKWDescription | ( | ) |
| QString PageCtrl::currentKWProperties | ( | ) |
| QString PageCtrl::currentKWWorkSheetName | ( | ) |
| QString PageCtrl::currentPrgLng | ( | ) |
return programming language of current page
| QString PageCtrl::currentSelection | ( | ) |
return selected text of current input window
| QString PageCtrl::currentSiemensDBData | ( | ) |
| QString PageCtrl::currentSplitMode | ( | ) |
return splitter mode of current page
| int PageCtrl::currentSplitSize | ( | ) |
return splitter size of current page
| int PageCtrl::currentTabIndex | ( | ) |
return current tab/page index
| QString PageCtrl::currentTabText | ( | ) |
return current tab/page text
| void PageCtrl::cursorAtStartPos | ( | ) | [signal] |
signal cursor has changed inputwindow and is at start position of new window
| 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::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::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::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::KMHeaderOf | ( | int | index | ) |
return Moeller header of tab/page index
| QString PageCtrl::KWDescriptionOf | ( | int | index | ) |
return KW-Software description section of tab/page index
| QString PageCtrl::KWPropertiesOf | ( | int | index | ) |
return KW-Software properties section of tab/page index
| QString PageCtrl::KWWorkSheetNameOf | ( | int | index | ) |
return worksheet name of index
| void PageCtrl::modified | ( | ) | [signal] |
signal page was modified, used by MainWindow class to update status bar
| 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
| 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::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::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::setCurrentKMHeader | ( | QString | Str | ) |
set Moeller header for current tab/page
| void PageCtrl::setCurrentKWDescription | ( | QString | Str | ) |
set KW-Software description section for current tab/page
| void PageCtrl::setCurrentKWProperties | ( | QString | Str | ) |
set KW-Software properties section for current tab/page
| void PageCtrl::setCurrentKWWorkSheetName | ( | QString | Str | ) |
set worksheet name for current tab/page
| void PageCtrl::setCurrentPrgLng | ( | QString | Str | ) |
set programming language for current tab/page
| void PageCtrl::setCurrentSiemensDBData | ( | QString | Str | ) |
set Siemens DB Data 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::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 | i | ) | [private, slot] |
slot for set FileList row by i
| void PageCtrl::setFileListVisible | ( | bool | visible | ) |
set visibility of FileList
| void PageCtrl::setKWPropertiesOf | ( | int | index, | |
| QString | Str | |||
| ) |
set KW-Software properties section of index
| void PageCtrl::setNewSplitterVisible | ( | ) | [slot] |
set visibility of new created page
| void PageCtrl::setPrgLngOf | ( | int | index, | |
| QString | Str | |||
| ) |
set programming language of index
| void PageCtrl::setSplitModeOf | ( | int | index, | |
| QString | Str | |||
| ) |
set split mode of 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::SiemensDBDataOf | ( | int | index | ) |
return Siemens DB Data of index
| QString PageCtrl::strippedFileName | ( | const QString & | fullFileName | ) | [private] |
strip filename from fullFileName (path + filename)
| QString PageCtrl::tabTextOf | ( | int | index | ) |
return tab text == file name of tab/page index
| void PageCtrl::undo | ( | ) | [slot] |
undo last typing in current inputwindow
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
| QString PageCtrl::KM_TEXT |
Moeller header copyright string, used by ImportExport class.
number of recent files to be hold
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::S40_VERSION |
Moeller header compatibility string, used by ImportExport class.
| QString PageCtrl::splitMode |
application-global split mode for inputwindows
application-global split size for inputwindows
QTabWidget* PageCtrl::TabCtrl [private] |
QTabwidget instance, holds pages.
application-global tab position for pages
application-global tabstop width for inputwindows
1.5.8