itom 1.1.0
ito::ScriptEditorWidget Class Reference
Inheritance diagram for ito::ScriptEditorWidget:
ito::AbstractPyScintillaWidget

List of all members.

Public Slots

void menuToggleBookmark ()
void menuClearAllBookmarks ()
void menuGotoNextBookmark ()
void menuGotoPreviousBookmark ()
void menuToggleBreakpoint ()
void menuToggleEnableBreakpoint ()
void menuEditBreakpoint ()
void menuClearAllBreakpoints ()
void menuGotoNextBreakPoint ()
void menuGotoPreviousBreakPoint ()
void menuCut ()
void menuCopy ()
void menuPaste ()
void menuIndent ()
void menuUnindent ()
void menuComment ()
void menuUncomment ()
void menuRunScript ()
void menuRunSelection ()
void menuDebugScript ()
void menuStopScript ()
void pythonStateChanged (tPythonTransitions pyTransition)
void pythonDebugPositionChanged (QString filename, int lineno)
void breakPointAdd (BreakPointItem bp, int row)
 < slot, invoked by BreakPointModel
void breakPointDelete (QString filename, int lineNo, int pyBpNumber)
 < slot, invoked by BreakPointModel
void breakPointChange (BreakPointItem oldBp, BreakPointItem newBp)
 < slot, invoked by BreakPointModel
void print ()

Signals

void pythonRunFile (QString filename)
void pythonRunSelection (QString selectionText)
void pythonDebugFile (QString filename)
void closeRequest (ScriptEditorWidget *sew, bool ignoreModifications)
void marginChanged ()

Public Member Functions

 ScriptEditorWidget (QWidget *parent=NULL)
 ~ScriptEditorWidget ()
RetVal saveFile (bool askFirst=true)
RetVal saveAsFile (bool askFirst=true)
RetVal openFile (QString file, bool ignorePresentDocument=false)
QString getFilename () const
bool hasNoFilename () const
bool getCanCopy () const
bool isBookmarked () const
QString getUntitledName () const
RetVal setCursorPosAndEnsureVisible (int line)

Protected Member Functions

bool canInsertFromMimeData (const QMimeData *source) const
void dropEvent (QDropEvent *event)
virtual void loadSettings ()

Private Types

enum  msgType {
  msgReturnInfo, msgReturnWarning, msgReturnError, msgTextInfo,
  msgTextWarning, msgTextError
}

Private Slots

void marginClicked (int margin, int line, Qt::KeyboardModifiers state)
void copyAvailable (bool yes)
void nrOfLinesChanged ()
RetVal preShowContextMenuMargin ()
RetVal preShowContextMenuEditor ()
void fileSysWatcherFileChanged (const QString &path)
void printPreviewRequested (QPrinter *printer)

Private Member Functions

RetVal initEditor ()
void contextMenuEvent (QContextMenuEvent *event)
int getMarginNumber (int xPos)
RetVal initMenus ()
RetVal toggleBookmark (int line)
 < bookmark handling
RetVal clearAllBookmarks ()
RetVal gotoNextBookmark ()
RetVal gotoPreviousBookmark ()
RetVal toggleBreakpoint (int line)
RetVal toggleEnableBreakpoint (int line)
RetVal editBreakpoint (int line)
RetVal clearAllBreakpoints ()
RetVal gotoNextBreakPoint ()
RetVal gotoPreviousBreakPoint ()
RetVal changeFilename (QString newFilename)

Private Attributes

QFileSystemWatcher * m_pFileSysWatcher
QMutex fileSystemWatcherMutex
 marker handling
std::list< int > bookmarkHandles
int syntaxErrorHandle
std::list< QPair< int, int > > breakPointMap
 <int bpHandle, int lineNo>
unsigned int markBreakPoint
unsigned int markCBreakPoint
unsigned int markBreakPointDisabled
unsigned int markCBreakPointDisabled
unsigned int markBookmark
unsigned int markSyntaxError
unsigned int markCurrentLine
int markCurrentLineHandle
unsigned int markMask1
unsigned int markMask2
unsigned int markMaskBreakpoints
QMenu * bookmarkMenu
 < menus
QMenu * syntaxErrorMenu
QMenu * breakpointMenu
QMenu * editorMenu
std::map< QString, QAction * > bookmarkMenuActions
std::map< QString, QAction * > breakpointMenuActions
std::map< QString, QAction * > editorMenuActions
int contextMenuLine
QString filename
int unnamedNumber
bool pythonBusy
 true: python is executing or debugging a script, a command...
bool canCopy

Static Private Attributes

static const QString lineBreak = QString("\n")
 < constants
static int unnamedAutoIncrement = 1

Constructor & Destructor Documentation

ito::ScriptEditorWidget::ScriptEditorWidget ( QWidget *  parent = NULL)

< check if BreakPointModel already contains breakpoints for this editor and load them

ito::ScriptEditorWidget::~ScriptEditorWidget ( )

< delete remaining break-points (not neccesary)


Member Function Documentation

void ito::ScriptEditorWidget::breakPointAdd ( BreakPointItem  bp,
int  row 
) [slot]

< slot, invoked by BreakPointModel

< there is already a breakpoint in this line, do not add the new one

void ito::ScriptEditorWidget::breakPointChange ( BreakPointItem  oldBp,
BreakPointItem  newBp 
) [slot]

< slot, invoked by BreakPointModel

< -1 has no task

void ito::ScriptEditorWidget::contextMenuEvent ( QContextMenuEvent *  event) [private]

< bookmarks

< line numbers

< break points

< folds

RetVal ito::ScriptEditorWidget::initEditor ( ) [private]

< bookmark margin

< line number

< breakpoint, syntax error margin

< folding margin

void ito::ScriptEditorWidget::marginClicked ( int  margin,
int  line,
Qt::KeyboardModifiers  state 
) [private, slot]

< bookmarks

< set or remove breakpoint (standard form)

void ito::ScriptEditorWidget::nrOfLinesChanged ( ) [private, slot]

< marker has been deleted:

RetVal ito::ScriptEditorWidget::openFile ( QString  file,
bool  ignorePresentDocument = false 
)

< check for modifications in the present document first

< check if BreakPointModel already contains breakpoints for this editor and load them

RetVal ito::ScriptEditorWidget::preShowContextMenuMargin ( ) [private, slot]

< breakpoints only if filename != ""

RetVal ito::ScriptEditorWidget::toggleBookmark ( int  line) [private]

< bookmark handling

< markerLine(handle) returns -1, if marker doesn't exist any more (because lines have been deleted...)

< in order to mark it for removal

RetVal ito::ScriptEditorWidget::toggleBreakpoint ( int  line) [private]

< markerLine(handle) returns -1, if marker doesn't exist any more (because lines have been deleted...)


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends