ScriptWindow Class Reference

Python script window. More...

`#include <ScriptWindow.h>`

Inheritance diagram for ScriptWindow:

## Public Slots

ScriptEdit * | editor ()
void | languageChange ()
void | newScript ()
void | open (const QString &fn=QString())
void | save ()
void | saveAs ()
virtual void | setVisible (bool visible)

## Signals

void | visibilityChanged (bool visible)

## Public Member Functions

void | executeAll ()
| ScriptWindow (ScriptingEnv *env, ApplicationWindow *app)
void | showLineNumbers (bool show=true)
| Enables/Disables the line number display. More...
| ~ScriptWindow ()

## Private Slots

void | decreaseIndent ()
void | enableActions ()
void | find ()
void | findNext ()
void | findPrevious ()
void | increaseIndent ()
void | printPreview ()
void | redirectOutput (bool)
void | replace ()
void | setAlwaysOnTop (bool on)
void | showWorkspace (bool on=true)

## Private Member Functions

void | initActions ()
void | initMenu ()
void | moveEvent (QMoveEvent *)
void | resizeEvent (QResizeEvent *)

## Private Attributes

QAction * | actionAlwaysOnTop
QAction * | actionCopy
QAction * | actionCut
QAction * | actionDecreaseIndent
QAction * | actionEval
QAction * | actionExecute
QAction * | actionExecuteAll
QAction * | actionFind
QAction * | actionFindNext
QAction * | actionFindPrev
QAction * | actionHide
QAction * | actionIncreaseIndent
QAction * | actionNew
QAction * | actionOpen
QAction * | actionPaste
QAction * | actionPrint
QAction * | actionPrintPreview
QAction * | actionRedirectOutput
QAction * | actionRedo
QAction * | actionReplace
QAction * | actionSave
QAction * | actionSaveAs
QAction * | actionShowConsole
QAction * | actionShowLineNumbers
QAction * | actionShowWorkspace
QAction * | actionUndo
QTextEdit * | console
QDockWidget * | consoleWindow
ApplicationWindow * | d_app
QWidget * | d_frame
LineNumberDisplay * | d_line_number
QMenu * | edit
QMenu * | file
QString | fileName
QMenu * | run
ScriptEdit * | te
QMenu * | windowMenu

## Detailed Description

Python script window.

## Constructor & Destructor Documentation

## ScriptWindow()

ScriptWindow::ScriptWindow | ( | ScriptingEnv * | env,
|  | ApplicationWindow * | app
| ) |  |

References console, consoleWindow, d_app, d_frame, d_line_number, enableActions(), fileName, initActions(), initMenu(), ApplicationWindow::scriptsDirPath, ScriptEdit::setContext(), ScriptEdit::setDirPath(), and te.

## ~ScriptWindow()

ScriptWindow::~ScriptWindow | ( |  | ) |

inline

References languageChange(), newScript(), open(), save(), saveAs(), and setVisible().

## Member Function Documentation

## decreaseIndent

void ScriptWindow::decreaseIndent | ( |  | ) |

private slot

References te.

Referenced by executeAll(), and initActions().

## editor

ScriptEdit* ScriptWindow::editor | ( |  | ) |

inline slot

References te.

Referenced by ApplicationWindow::enableCompletion(), ApplicationWindow::loadScript(), and ApplicationWindow::showScriptWindow().

## enableActions

void ScriptWindow::enableActions | ( |  | ) |

private slot

References actionEval, actionExecute, actionExecuteAll, actionFind, actionFindNext, actionFindPrev, actionReplace, and te.

Referenced by executeAll(), and ScriptWindow().

## executeAll()

void ScriptWindow::executeAll | ( |  | ) |

inline

References decreaseIndent(), enableActions(), ScriptEdit::executeAll(), find(), findNext(), findPrevious(), increaseIndent(), initActions(), initMenu(), moveEvent(), printPreview(), redirectOutput(), replace(), resizeEvent(), setAlwaysOnTop(), showLineNumbers(), showWorkspace(), te, and visibilityChanged().

Referenced by initActions(), ApplicationWindow::loadScript(), and ApplicationWindow::parseCommandLineArguments().

## find

void ScriptWindow::find | ( |  | ) |

private slot

References ScriptEdit::showFindDialog(), and te.

Referenced by executeAll(), and initActions().

## findNext

void ScriptWindow::findNext | ( |  | ) |

private slot

References ScriptEdit::findNext(), and te.

Referenced by executeAll(), and initActions().

## findPrevious

void ScriptWindow::findPrevious | ( |  | ) |

private slot

References ScriptEdit::findPrevious(), and te.

Referenced by executeAll(), and initActions().

## increaseIndent

void ScriptWindow::increaseIndent | ( |  | ) |

private slot

References te.

Referenced by executeAll(), and initActions().

## initActions()

void ScriptWindow::initActions | ( |  | ) |

private

References actionAlwaysOnTop, actionCopy, actionCut, actionDecreaseIndent, actionEval, actionExecute, actionExecuteAll, actionFind, actionFindNext, actionFindPrev, actionHide, actionIncreaseIndent, actionNew, actionOpen, actionPaste, actionPrint, actionPrintPreview, actionRedirectOutput, actionRedo, actionReplace, actionSave, actionSaveAs, actionShowConsole, actionShowLineNumbers, actionShowWorkspace, actionUndo, consoleWindow, d_app, d_line_number, ApplicationWindow::d_note_line_numbers, ApplicationWindow::d_script_win_on_top, decreaseIndent(), edit, executeAll(), file, find(), findNext(), findPrevious(), increaseIndent(), ApplicationWindow::isMdiAreaEnabled(), newScript(), open(), printPreview(), redirectOutput(), replace(), run, save(), saveAs(), setAlwaysOnTop(), setVisible(), showWorkspace(), te, and windowMenu.

Referenced by executeAll(), and ScriptWindow().

## initMenu()

void ScriptWindow::initMenu | ( |  | ) |

private

References edit, file, run, and windowMenu.

Referenced by executeAll(), and ScriptWindow().

## languageChange

void ScriptWindow::languageChange | ( |  | ) |

slot

References actionCopy, actionCut, actionDecreaseIndent, actionEval, actionExecute, actionExecuteAll, actionFind, actionFindNext, actionFindPrev, actionIncreaseIndent, actionNew, actionOpen, actionPaste, actionPrint, actionPrintPreview, actionRedirectOutput, actionRedo, actionReplace, actionSave, actionSaveAs, actionShowConsole, actionShowWorkspace, actionUndo, consoleWindow, edit, file, and run.

Referenced by ~ScriptWindow().

## moveEvent()

void ScriptWindow::moveEvent | ( | QMoveEvent * | e | ) |

private

References d_app, and ApplicationWindow::d_script_win_rect.

Referenced by executeAll().

## newScript

void ScriptWindow::newScript | ( |  | ) |

slot

References fileName, and te.

Referenced by initActions(), and ~ScriptWindow().

## open

void ScriptWindow::open | ( | const QString & | fn = `QString()` | ) |

slot

References fileName, ScriptEdit::importASCII(), and te.

Referenced by initActions(), ApplicationWindow::loadScript(), ApplicationWindow::parseCommandLineArguments(), and ~ScriptWindow().

## printPreview

void ScriptWindow::printPreview | ( |  | ) |

private slot

References te.

Referenced by executeAll(), and initActions().

## redirectOutput

void ScriptWindow::redirectOutput | ( | bool | inside | ) |

private slot

References console, ScriptEdit::redirectOutputTo(), and te.

Referenced by executeAll(), and initActions().

## replace

void ScriptWindow::replace | ( |  | ) |

private slot

References ScriptEdit::showFindDialog(), and te.

Referenced by executeAll(), and initActions().

## resizeEvent()

void ScriptWindow::resizeEvent | ( | QResizeEvent * | e | ) |

private

References d_app, and ApplicationWindow::d_script_win_rect.

Referenced by executeAll().

## save

void ScriptWindow::save | ( |  | ) |

slot

References fileName, saveAs(), and te.

Referenced by initActions(), and ~ScriptWindow().

## saveAs

void ScriptWindow::saveAs | ( |  | ) |

slot

References ScriptEdit::exportASCII(), fileName, and te.

Referenced by initActions(), save(), and ~ScriptWindow().

## setAlwaysOnTop

void ScriptWindow::setAlwaysOnTop | ( | bool | on | ) |

private slot

References d_app, and ApplicationWindow::d_script_win_on_top.

Referenced by executeAll(), and initActions().

## setVisible

void ScriptWindow::setVisible | ( | bool | visible | ) |

virtual slot

References visibilityChanged().

Referenced by initActions(), and ~ScriptWindow().

## showLineNumbers()

void ScriptWindow::showLineNumbers | ( | bool | show = `true` | ) |

Enables/Disables the line number display.

References d_line_number, and LineNumberDisplay::updateLineNumbers().

Referenced by executeAll(), and ApplicationWindow::showScriptWindow().

## showWorkspace

void ScriptWindow::showWorkspace | ( | bool | on = `true` | ) |

private slot

References d_app, and ApplicationWindow::enableMdiArea().

Referenced by executeAll(), and initActions().

## visibilityChanged

void ScriptWindow::visibilityChanged | ( | bool | visible | ) |

signal

Referenced by executeAll(), and setVisible().

## Member Data Documentation

## actionAlwaysOnTop

QAction* ScriptWindow::actionAlwaysOnTop

private

Referenced by initActions().

## actionCopy

QAction * ScriptWindow::actionCopy

private

Referenced by initActions(), and languageChange().

## actionCut

QAction * ScriptWindow::actionCut

private

Referenced by initActions(), and languageChange().

## actionDecreaseIndent

QAction * ScriptWindow::actionDecreaseIndent

private

Referenced by initActions(), and languageChange().

## actionEval

QAction * ScriptWindow::actionEval

private

Referenced by enableActions(), initActions(), and languageChange().

## actionExecute

QAction* ScriptWindow::actionExecute

private

Referenced by enableActions(), initActions(), and languageChange().

## actionExecuteAll

QAction * ScriptWindow::actionExecuteAll

private

Referenced by enableActions(), initActions(), and languageChange().

## actionFind

QAction* ScriptWindow::actionFind

private

Referenced by enableActions(), initActions(), and languageChange().

## actionFindNext

QAction * ScriptWindow::actionFindNext

private

Referenced by enableActions(), initActions(), and languageChange().

## actionFindPrev

QAction * ScriptWindow::actionFindPrev

private

Referenced by enableActions(), initActions(), and languageChange().

## actionHide

QAction * ScriptWindow::actionHide

private

Referenced by initActions().

## actionIncreaseIndent

QAction* ScriptWindow::actionIncreaseIndent

private

Referenced by initActions(), and languageChange().

## actionNew

QAction* ScriptWindow::actionNew

private

Referenced by initActions(), and languageChange().

## actionOpen

QAction * ScriptWindow::actionOpen

private

Referenced by initActions(), and languageChange().

## actionPaste

QAction * ScriptWindow::actionPaste

private

Referenced by initActions(), and languageChange().

## actionPrint

QAction * ScriptWindow::actionPrint

private

Referenced by initActions(), and languageChange().

## actionPrintPreview

QAction * ScriptWindow::actionPrintPreview

private

Referenced by initActions(), and languageChange().

## actionRedirectOutput

QAction * ScriptWindow::actionRedirectOutput

private

Referenced by initActions(), and languageChange().

## actionRedo

QAction * ScriptWindow::actionRedo

private

Referenced by initActions(), and languageChange().

## actionReplace

QAction * ScriptWindow::actionReplace

private

Referenced by enableActions(), initActions(), and languageChange().

## actionSave

QAction* ScriptWindow::actionSave

private

Referenced by initActions(), and languageChange().

## actionSaveAs

QAction * ScriptWindow::actionSaveAs

private

Referenced by initActions(), and languageChange().

## actionShowConsole

QAction* ScriptWindow::actionShowConsole

private

Referenced by initActions(), and languageChange().

## actionShowLineNumbers

QAction * ScriptWindow::actionShowLineNumbers

private

Referenced by initActions().

## actionShowWorkspace

QAction* ScriptWindow::actionShowWorkspace

private

Referenced by initActions(), and languageChange().

## actionUndo

QAction * ScriptWindow::actionUndo

private

Referenced by initActions(), and languageChange().

## console

QTextEdit* ScriptWindow::console

private

Referenced by redirectOutput(), and ScriptWindow().

## consoleWindow

QDockWidget* ScriptWindow::consoleWindow

private

Referenced by initActions(), languageChange(), and ScriptWindow().

## d_app

ApplicationWindow* ScriptWindow::d_app

private

Referenced by initActions(), moveEvent(), resizeEvent(), ScriptWindow(), setAlwaysOnTop(), and showWorkspace().

## d_frame

QWidget* ScriptWindow::d_frame

private

Referenced by ScriptWindow().

## d_line_number

LineNumberDisplay* ScriptWindow::d_line_number

private

Referenced by initActions(), ScriptWindow(), and showLineNumbers().

## edit

QMenu * ScriptWindow::edit

private

Referenced by initActions(), initMenu(), and languageChange().

## file

QMenu* ScriptWindow::file

private

Referenced by initActions(), initMenu(), and languageChange().

## fileName

QString ScriptWindow::fileName

private

Referenced by newScript(), open(), save(), saveAs(), and ScriptWindow().

## run

QMenu * ScriptWindow::run

private

Referenced by initActions(), initMenu(), and languageChange().

## te

ScriptEdit* ScriptWindow::te

private

Referenced by decreaseIndent(), editor(), enableActions(), executeAll(), find(), findNext(), findPrevious(), increaseIndent(), initActions(), newScript(), open(), printPreview(), redirectOutput(), replace(), save(), saveAs(), and ScriptWindow().

## windowMenu

QMenu * ScriptWindow::windowMenu

private

Referenced by initActions(), and initMenu().

The documentation for this class was generated from the following files:

- qtiplot/src/scripting/ScriptWindow.h
- qtiplot/src/scripting/ScriptWindow.cpp