OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | Friends | List of all members
CSVWorld::ScriptEdit Class Reference

Editor for scripts. More...

#include <scriptedit.hpp>

Inheritance diagram for CSVWorld::ScriptEdit:
Collaboration diagram for CSVWorld::ScriptEdit:

Classes

class  ChangeLock
 

Public Member Functions

 ScriptEdit (const CSMDoc::Document &document, ScriptHighlighter::Mode mode, QWidget *parent)
 
bool isChangeLocked () const
 
void lineNumberAreaPaintEvent (QPaintEvent *event)
 
int lineNumberAreaWidth ()
 
void showLineNum (bool show)
 

Protected Member Functions

bool event (QEvent *event)
 
virtual void resizeEvent (QResizeEvent *e)
 

Private Slots

void settingChanged (const CSMPrefs::Setting *setting)
 Update editor when related setting is changed. More...
 
void idListChanged ()
 
void updateHighlighting ()
 
void updateLineNumberAreaWidth (int newBlockCount)
 
void updateLineNumberArea (const QRect &, int)
 

Private Member Functions

void dragEnterEvent (QDragEnterEvent *event)
 
void dropEvent (QDropEvent *event)
 
void dragMoveEvent (QDragMoveEvent *event)
 
bool stringNeedsQuote (const std::string &id) const
 
void setTabWidth ()
 Set tab width for script editor. More...
 
void wrapLines (bool wrap)
 Turn line wrapping in script editor on or off. More...
 

Private Attributes

int mChangeLocked
 
ScriptHighlightermHighlighter
 
QTimer mUpdateTimer
 
bool mShowLineNum
 
LineNumberAreamLineNumberArea
 
QFont mDefaultFont
 
QFont mMonoFont
 
int mTabCharCount
 
QVector
< CSMWorld::UniversalId::Type
mAllowedTypes
 
const CSMDoc::DocumentmDocument
 
const QRegExp mWhiteListQoutes
 

Friends

class ChangeLock
 

Detailed Description

Editor for scripts.

Constructor & Destructor Documentation

CSVWorld::ScriptEdit::ScriptEdit ( const CSMDoc::Document document,
ScriptHighlighter::Mode  mode,
QWidget parent 
)

Here is the call graph for this function:

Member Function Documentation

void CSVWorld::ScriptEdit::dragEnterEvent ( QDragEnterEvent *  event)
private
void CSVWorld::ScriptEdit::dragMoveEvent ( QDragMoveEvent *  event)
private
void CSVWorld::ScriptEdit::dropEvent ( QDropEvent *  event)
private

Here is the call graph for this function:

bool CSVWorld::ScriptEdit::event ( QEvent *  event)
protected
void CSVWorld::ScriptEdit::idListChanged ( )
privateslot

Here is the caller graph for this function:

bool CSVWorld::ScriptEdit::isChangeLocked ( ) const

Should changes to the data be ignored (i.e. not cause updated)?

Note
This mechanism is used to avoid infinite update recursions
void CSVWorld::ScriptEdit::lineNumberAreaPaintEvent ( QPaintEvent *  event)
int CSVWorld::ScriptEdit::lineNumberAreaWidth ( )
void CSVWorld::ScriptEdit::resizeEvent ( QResizeEvent *  e)
protectedvirtual
void CSVWorld::ScriptEdit::setTabWidth ( )
private

Set tab width for script editor.

Here is the caller graph for this function:

void CSVWorld::ScriptEdit::settingChanged ( const CSMPrefs::Setting setting)
privateslot

Update editor when related setting is changed.

Parameters
settingSetting that was changed.

Here is the call graph for this function:

Here is the caller graph for this function:

void CSVWorld::ScriptEdit::showLineNum ( bool  show)
bool CSVWorld::ScriptEdit::stringNeedsQuote ( const std::string &  id) const
private
void CSVWorld::ScriptEdit::updateHighlighting ( )
privateslot

Here is the caller graph for this function:

void CSVWorld::ScriptEdit::updateLineNumberArea ( const QRect &  rect,
int  dy 
)
privateslot

Here is the caller graph for this function:

void CSVWorld::ScriptEdit::updateLineNumberAreaWidth ( int  newBlockCount)
privateslot

Here is the caller graph for this function:

void CSVWorld::ScriptEdit::wrapLines ( bool  wrap)
private

Turn line wrapping in script editor on or off.

Parameters
wrapWhether or not to wrap lines.

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class ChangeLock
friend

Member Data Documentation

QVector<CSMWorld::UniversalId::Type> CSVWorld::ScriptEdit::mAllowedTypes
private
int CSVWorld::ScriptEdit::mChangeLocked
private
QFont CSVWorld::ScriptEdit::mDefaultFont
private
const CSMDoc::Document& CSVWorld::ScriptEdit::mDocument
private
ScriptHighlighter* CSVWorld::ScriptEdit::mHighlighter
private
LineNumberArea* CSVWorld::ScriptEdit::mLineNumberArea
private
QFont CSVWorld::ScriptEdit::mMonoFont
private
bool CSVWorld::ScriptEdit::mShowLineNum
private
int CSVWorld::ScriptEdit::mTabCharCount
private
QTimer CSVWorld::ScriptEdit::mUpdateTimer
private
const QRegExp CSVWorld::ScriptEdit::mWhiteListQoutes
private

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