Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Slots | Friends

Editor Class Reference

#include <editor.h>

Collaboration diagram for Editor:

List of all members.

Public Types

enum  EAction {
  eSelection,
  eInsertState,
  eInsertTransition
}
enum  EMouseAction {
  eNoMouseAction,
  eMoveItem,
  eMoveMultItem,
  eInsertItem,
  eSelectItem,
  eSelectMultipleItems,
  eShowPopup,
  eShowSelectionPopup
}
 

holds current mouse aciton, affected by accelerators (CTRL, SHIFT) and by which mouse button is pressed

More...
enum  Format {
  vcg,
  tex,
  gml,
  eps,
  svg,
  png,
  bmp,
  xpm
}
typedef QList< State * > TStateList
typedef QMap< QString, State * > TStateMap
typedef QList< Transition * > TTransitionList

Public Slots

void canRedoChangedSlot (bool can)
void canUndoChangedSlot (bool can)
void copySelection ()
void copyState ()
void cutSelection ()
void cutState ()
void expandGrid (int bound=0)
void moveState ()
void paste ()
void paste (const QPoint &insertPoint)
void redo ()
void removeSelection ()
void resetZoom ()
void runAlgorithm ()
 sender() is QAction and its data is set as index to algorithmList
void showGridRectDialog ()
void showUndoView (bool show)
void simulateAutomatonWork ()
 runs SimulationDialog
void slotShowFrame (bool show)
void slotShowGrid (bool show)
void stateMoved (State *state, const QPointF &oldPos)
void undo ()
void zoomIn ()
void zoomOut ()
editing methods

void editState (State *state)
void editTransition (OneStateTransition *tr)
void editTransition (TwoStatesTransition *tr)
void editStateStyleParams ()
void editTransitionStyleParams ()
extra functions

void switchAntialiasing ()
void generateGraph ()
void createLaTeXTable ()

Signals

void actionChanged (int action)
bool canNewFile (bool can)
bool canOpenFile (bool can)
bool canRedoChanged (bool can)
bool canSaveFile (bool can)
bool canUndoChanged (bool can)
bool canZoomIn (bool can)
bool canZoomOut (bool can)
void isChanged (bool changed)
bool itemsAvailable (bool available)
void showChanged (bool showG, bool showF)
bool showUndoStackAvailable (bool available)
bool toolsAvailable (bool available)
void undoViewClosed ()
bool utilsAvailable (bool available)

Public Member Functions

 Editor (MainWindow *parent=0)
 ~Editor ()
int addAlgorithm (const QSharedPointer< IAlgorithm > &algorithm)
 returns algorithm index
void addGraphVizDrawAlgorithm (IGraphViz *graphVizWrapper)
 add GraphVizDrawAlgorithm which uses given GraphViz Wrapper plugin
void addToListAndScene (LabelX *pLabel)
void addToListAndScene (Transition *transition)
void addToListsAndScene (Transition *transition)
void addToListsAndScene (State *state)
EAction getAction ()
QSharedPointer< IAutomataCreatorgetAutomataCreator ()
 returns public automata creator
int getBorder ()
QString getFileName () const
QRect getGridRect ()
 grid coordinates
StategetStateByName (const TStateMap &stateMap, const QString &name) const
QList< State * > getStateList ()
QList< Transition * > getTransitionList ()
QString getUniqueAutoName ()
void insertTransition ()
bool isAddition () const
bool isChanged () const
 returns m_undoStack's clean state
bool isPastePossible ()
bool isSaved () const
bool isSomethingSelected ()
bool itemAlignToGrid (QGraphicsItem *item)
template<typename T >
bool itemsAlignToGrid (QList< T * > items)
IAutomaton::TAutomataList loadAutomata (const QString &dialogTitle, int count, QStringList &fileNames, IAlgorithm *algorithm=NULL)
QPointF mapToGrid (const QPointF &scenePos)
 maps scene positon to grid position
void newFile ()
void openFile (const QString &fn)
void removeFromListAndScene (Transition *transition)
void removeFromListAndScene (LabelX *pLabel)
void removeFromListsAndScene (State *state)
void removeFromListsAndScene (Transition *transition)
void removeTransition (Transition *transition)
void renameState (State *state, const QString &name)
void setAction (EAction action)
void setBorder (int b)
void setFileName (const QString &fn)
void setGridRect (QRect gridRect)
 sets new grid rect coordinates
void setSelectedState (State *state)
void setSelectedTransition (Transition *transition)
void setShowGridFrame (bool grid, bool frame)
void setStatePrevParamsDef (StatePrevParams &prevParams)
void setStatusBar (const QString &text, int ms)
void setTrPrevParamsDef (EdgePrevParams &prevTrParams)
void showPopup (OneStateTransition *transition, const QPointF &point)
void showPopup (TwoStatesTransition *transition, const QPointF &point)
bool showPopup (State *state)
void slotAlignToGrid ()
void slotSnapToGrid ()
bool snapped ()
bool testStateName (const QString &s)
QPoint toScenePos (const QPointF &gridPos)
 converts
void update ()
Exporting methods

void exportToVaucanson (const QString &fn, bool additionals=0)
void exportToGraphML (const QString &fn=0)
void exportToEPS (const QString &fn)
void exportToSVG (const QString &fn)
void exportToPixmap (const QString &fn, Format f)
void saveToFile (const QString &fn, bool latexHeader=false)
void saveLaTeXHeader (QTextStream &out)
void saveHeader (QTextStream &out)
void saveVCSettings (QTextStream &out)
void saveGraph (QTextStream &out)
void saveFooter (QTextStream &out)
void saveLaTeXFooter (QTextStream &out)

Static Public Member Functions

static QString parseCharacter (const QString &text)
 ensures that given text contains just one symbol
static ITransition::TCharSet parseCharSet (const QString &text)
 primarilly used for parse alphabet

Public Attributes

state parameters adjustable

Qt::PenStyle stateLineStyle
float stateLineWidth
QString stateLineColor
QString stateLabelColor
float stateLabelScale
Qt::BrushStyle stateFillStatus
QString stateFillColor
state parameters preset

Qt::PenStyle dimStateLineStyle
QString dimStateLineColor
float dimStateLineCoef
QString dimStateLabelColor
QString dimStateFillColor
state parameters double

float stateLineDoubleCoef
float stateLineDoubleSep
edge parameters adjustable

Qt::PenStyle edgeLineStyle
float edgeLineWidth
QString edgeLineColor
QString edgeLabelColor
float edgeLabelScale
bool edgeLineDblStatus
transition parameters dimmed

Qt::PenStyle dimEdgeLineStyle
QString dimEdgeLineColor
float dimEdgeLineCoef
QString dimEdgeLabelColor
transition parameters border

float edgeLineBorderCoef
QString edgeLineBorderColor
transition parameters double

float edgeLineDblCoef
float edgeLineDblSep

Protected Types

typedef QList< QSharedPointer
< IAlgorithm > > 
TAlgorithmList
typedef QList< QSharedPointer
< IDrawAlgorithm > > 
TDrawAlgorithmList

Protected Member Functions

void addToUndoStack (QUndoCommand *command)
QList< State * > createGraphicsItems (const QSharedPointer< IAutomaton > &automaton)
void createUndoView ()
bool detectAutomataSettings (const QList< State * > &stateList, ITransition::TCharSet &alphabet, QString &alphabetSymbol, QString &epsilonSymbol)
void drawBackground (QPainter *painter, const QRectF &rect)
 paints grid and labels, if required
QList< State * > generateDistance (int typ, QString string, int distance, QPoint startPoint)
QList< State * > generateExactMatching (QString string, QPoint startPoint)
QSharedPointer< AutomatonImplgetAutomaton (const TStateList &stateList, ITransition::TCharSet &alphabet, QString &alphabetSymbol, QString &epsilonSymbol)
QStringList getDrawAlgorithms () const
QRect getExpandedGridRect (const TStateList &states, int bound)
 retunrs expanded gridRect in a way that all states will be in grid with given boundary (int grid coordinates)
QList< State * > getFinalStates (const QList< State * > &stateList)
QList< State * > getInitialStates (const QList< State * > &stateList)
int getNewStateNumber ()
QRectF getPrintRect ()
StategetStateByName (const QString &name) const
QString getUniqueAutoName (const TStateMap &stateMap)
void increaseNewStateNumber ()
void insertState (const QPoint &point)
StateinsertState (State *state)
 used by parser
void itemsInvertSelection (QList< QGraphicsItem * > items)
QSharedPointer< AutomatonImplloadAutomaton (const QString &dialogTitle)
void mouseDoubleClickEvent (QMouseEvent *event)
void mouseMoveEvent (QMouseEvent *event)
void mousePressEvent (QMouseEvent *event)
void mouseReleaseEvent (QMouseEvent *event)
void resizeEvent (QResizeEvent *event)
 holds background large enought (according to scene)
void scaleView (qreal scaleFactor)
void setActionCursor (EAction action)
void setActionInternal (EAction action)
void setRightSceneRect ()
bool testStateName (const QString &s, const TStateMap &stateMap)
void updateMenuState ()
 sets metu items enabled/disabled as necessary
void wheelEvent (QWheelEvent *event)

Protected Attributes

bool antial
 true if scene is rendered in anialiasing mode
QPoint br
 bottomRight -> scene usage
QRect gridRect
 VauCanSon-G grid metrics.
TAlgorithmList m_algorithmList
 holds list of available algorithms
int m_currentDrawAlgorithm
 index of lastly used drawing algorithm
EMouseAction m_currentMouseAction
 holds current mouse action
TDrawAlgorithmList m_drawAlgorithmList
 holds drawing algorithms
bool m_itemsMoved
 for performance -> no undo command needed if nothing is moved
EMouseClick m_lastMouseAction
 remembers last mouse action
QPointF m_origPos
 original mouse position for moving with multiple states
QVector< QPointF > m_origPositions
 original positions of selected items before moving them
QRubberBand * m_rubberBand
 determines current selection
QPoint m_rubberBandOrigin
 rubberBand origin point (stored on press event)
bool m_sceneChanged
EAction m_selectedAction
 holds selected editor tool
bool m_simulationIsRun
 if simulation is running, no operations with object on scene are available
bool m_stateIsMoving
 special selected state of editor, state is moved by mouse move, click to release this mode
TStateMap m_stateMap
TTransitionList m_transitionList
QUndoStack * m_undoStack
 undo, redo functionality
UndoViewm_undoView
 allows to show m_undoStack and operate on it
qreal m_zoomInFactor
 zoomOutFactor = 1/m_zoomInFactor;
MainWindowmw
 parent window, for display messages with statusBar()
int newStateNumber
 automatic naming as Q1, Q2, ...
int sceneBorder
StateselectedState
 for operations on states
TransitionselectedTransition
 for operations on transitions
bool showFrame
bool showGrid
bool snapToGrid
StatestartState
 for inserting transitions
popup menu

QMenu * popup
QAction * popupPasteHere
QMenu * popupSelection
QMenu * popupState
QAction * popupStateLabel
QMenu * popupTransition
QAction * popupTransitionLabel
QAction * popupTransitionEdit
QAction * popupOneStateTransitionEdit
QAction * popupTwoStatesTransitionEdit
QPoint m_popupPoint
save

QString fileName
bool saved
bool addition

Private Slots

void editNextLabels ()
void editOneStateTransition ()
void editState ()
void editStateParams ()
void editTransitionParams ()
void editTwoStatesTransition ()
void pasteOnPos ()
 private only for pasting form popup
void removeState ()
void removeTransition ()
void sceneChanged (const QList< QRectF > &rects)
 due to performance -> only sets up internal flag m_sceneChanged when scene signal changed() is emited -> don't forget connect it!
void setClean (bool clean)
 sets mainwindow head according to m_undoStack clean state
void setStatesMarked (QList< State * > states, bool marked)
void simulationFinished ()

Friends

class NextLabelsDialog
class Parser
struct StateSerializer
class StateStyleChangeCommand
class StateStyleDialog
struct TransitionSerializer
class TransitionStyleChangeCommand
class TransitionStyleDialog

Detailed Description

Definition at line 57 of file editor.h.


Member Typedef Documentation

typedef QList<QSharedPointer<IAlgorithm> > Editor::TAlgorithmList [protected]

Definition at line 487 of file editor.h.

typedef QList<QSharedPointer<IDrawAlgorithm> > Editor::TDrawAlgorithmList [protected]

Definition at line 490 of file editor.h.

typedef QList<State*> Editor::TStateList

Definition at line 63 of file editor.h.

typedef QMap<QString, State*> Editor::TStateMap

Definition at line 62 of file editor.h.

Definition at line 64 of file editor.h.


Member Enumeration Documentation

determinec selected action in editor, possible to do all actions in eSelection mode (eSelection is default mode)

Enumerator:
eSelection 
eInsertState 
eInsertTransition 

Definition at line 89 of file editor.h.

holds current mouse aciton, affected by accelerators (CTRL, SHIFT) and by which mouse button is pressed

Enumerator:
eNoMouseAction 
eMoveItem 
eMoveMultItem 
eInsertItem 
eSelectItem 
eSelectMultipleItems 
eShowPopup 
eShowSelectionPopup 

Definition at line 91 of file editor.h.

Enumerator:
vcg 
tex 
gml 
eps 
svg 
png 
bmp 
xpm 

Definition at line 66 of file editor.h.


Constructor & Destructor Documentation

Editor::Editor ( MainWindow parent = 0  ) 

right action will be selected when used according to transition type

needed because editor propagates mouse click to main window

Definition at line 123 of file editor.cpp.

References antial, canRedoChanged(), canRedoChangedSlot(), canUndoChanged(), canUndoChangedSlot(), copySelection(), copyState(), createUndoView(), cutSelection(), cutState(), DBGLOG, DBGPAR, dimEdgeLabelColor, dimEdgeLineCoef, dimEdgeLineColor, dimEdgeLineStyle, dimStateFillColor, dimStateLabelColor, dimStateLineCoef, dimStateLineColor, dimStateLineStyle, edgeLabelColor, edgeLabelScale, edgeLineBorderCoef, edgeLineBorderColor, edgeLineColor, edgeLineDblCoef, edgeLineDblSep, edgeLineDblStatus, edgeLineStyle, edgeLineWidth, editNextLabels(), editOneStateTransition(), editState(), editStateParams(), editStateStyleParams(), editTransitionParams(), editTransitionStyleParams(), editTwoStatesTransition(), fileName, LLX, LLY, m_currentDrawAlgorithm, m_drawAlgorithmList, m_rubberBand, m_undoStack, m_undoView, m_zoomInFactor, moveState(), NEW_FILENAME, newStateNumber, pasteOnPos(), popup, popupOneStateTransitionEdit, popupPasteHere, popupSelection, popupState, popupStateLabel, popupTransition, popupTransitionEdit, popupTransitionLabel, popupTwoStatesTransitionEdit, removeSelection(), removeState(), removeTransition(), sceneChanged(), setClean(), setGridRect(), showGridRectDialog(), stateFillColor, stateFillStatus, stateLabelColor, stateLabelScale, stateLineColor, stateLineDoubleCoef, stateLineDoubleSep, stateLineStyle, stateLineWidth, UNDO_LIMIT, undoViewClosed(), URX, URY, and ZOOM_DIVIDER.

Here is the call graph for this function:

Editor::~Editor (  ) 

Definition at line 282 of file editor.cpp.

References DBGLOG, TransitionManager::getInstance(), StateManager::getInstance(), getStateList(), and m_undoStack.

Here is the call graph for this function:


Member Function Documentation

void Editor::actionChanged ( int  action  )  [signal]

Definition at line 367 of file moc_editor.cpp.

Referenced by setActionInternal().

Here is the caller graph for this function:

int Editor::addAlgorithm ( const QSharedPointer< IAlgorithm > &  algorithm  ) 

returns algorithm index

Definition at line 3137 of file editor.cpp.

References getAutomataCreator(), and m_algorithmList.

Referenced by MainWindow::processAlgorithmsPlugin().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::addGraphVizDrawAlgorithm ( IGraphViz graphVizWrapper  ) 

add GraphVizDrawAlgorithm which uses given GraphViz Wrapper plugin

Definition at line 3146 of file editor.cpp.

References DBGLOG, IGraphViz::getGraphVizVersion(), GRAPHVIZ_VERSION, m_currentDrawAlgorithm, m_drawAlgorithmList, and RELLOG.

Referenced by MainWindow::processGraphVizPlugin().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::addToListAndScene ( LabelX pLabel  ) 

Definition at line 2850 of file editor.cpp.

References Transition::addNextLabel(), DBGLOG_ADD, and LabelX::getTransition().

Here is the call graph for this function:

void Editor::addToListAndScene ( Transition transition  ) 

Definition at line 2828 of file editor.cpp.

References DBGLOG_ADD, and m_transitionList.

Referenced by addToListsAndScene(), ItemsAddCommand::redo(), GeneratedGraphAddCommand::redo(), NextLabelAddCommand::redo(), and NextLabelDeleteCommand::undo().

Here is the caller graph for this function:

void Editor::addToListsAndScene ( Transition transition  ) 
void Editor::addToListsAndScene ( State state  ) 

Definition at line 2864 of file editor.cpp.

References DBGLOG_ADD, DBGPAR, State::getName(), and m_stateMap.

Here is the call graph for this function:

void Editor::addToUndoStack ( QUndoCommand *  command  )  [protected]

Definition at line 3132 of file editor.cpp.

References m_undoStack.

Referenced by NextLabelsDialog::addLabel(), NextLabelsDialog::deleteLabel(), and NextLabelsDialog::editLabel().

Here is the caller graph for this function:

bool Editor::canNewFile ( bool  can  )  [signal]

Definition at line 275 of file moc_editor.cpp.

Referenced by updateMenuState().

Here is the caller graph for this function:

bool Editor::canOpenFile ( bool  can  )  [signal]

Definition at line 266 of file moc_editor.cpp.

Referenced by updateMenuState().

Here is the caller graph for this function:

bool Editor::canRedoChanged ( bool  can  )  [signal]

Definition at line 257 of file moc_editor.cpp.

Referenced by canRedoChangedSlot(), Editor(), and updateMenuState().

Here is the caller graph for this function:

void Editor::canRedoChangedSlot ( bool  can  )  [slot]

Definition at line 410 of file editor.cpp.

References canRedoChanged(), and m_simulationIsRun.

Referenced by Editor().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Editor::canSaveFile ( bool  can  )  [signal]

Definition at line 284 of file moc_editor.cpp.

Referenced by updateMenuState().

Here is the caller graph for this function:

bool Editor::canUndoChanged ( bool  can  )  [signal]

Definition at line 248 of file moc_editor.cpp.

Referenced by canUndoChangedSlot(), Editor(), and updateMenuState().

Here is the caller graph for this function:

void Editor::canUndoChangedSlot ( bool  can  )  [slot]

Definition at line 404 of file editor.cpp.

References canUndoChanged(), and m_simulationIsRun.

Referenced by Editor().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Editor::canZoomIn ( bool  can  )  [signal]

Definition at line 349 of file moc_editor.cpp.

Referenced by scaleView().

Here is the caller graph for this function:

bool Editor::canZoomOut ( bool  can  )  [signal]

Definition at line 358 of file moc_editor.cpp.

Referenced by scaleView().

Here is the caller graph for this function:

void Editor::copySelection (  )  [slot]

Definition at line 1643 of file editor.cpp.

References CLIPBOARD_FORMAT.

Referenced by MainWindow::copy(), cutSelection(), and Editor().

Here is the caller graph for this function:

void Editor::copyState (  )  [slot]

Definition at line 1627 of file editor.cpp.

References CLIPBOARD_FORMAT_STATE, selectedState, and StateSerializer.

Referenced by cutState(), and Editor().

Here is the caller graph for this function:

QList< State * > Editor::createGraphicsItems ( const QSharedPointer< IAutomaton > &  automaton  )  [protected]

Should be used only if algorithm does positioning

See also:
IAutomaton::hasPositions()

Definition at line 3313 of file editor.cpp.

Referenced by runAlgorithm().

Here is the caller graph for this function:

void Editor::createLaTeXTable (  )  [slot]

Definition at line 3117 of file editor.cpp.

References loadAutomaton(), and RELLOG.

Here is the call graph for this function:

void Editor::createUndoView (  )  [protected]

Definition at line 300 of file editor.cpp.

References m_undoStack, and m_undoView.

Referenced by Editor().

Here is the caller graph for this function:

void Editor::cutSelection (  )  [slot]

Definition at line 1564 of file editor.cpp.

References copySelection(), and removeSelection().

Referenced by MainWindow::cut(), and Editor().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::cutState (  )  [slot]

Definition at line 1621 of file editor.cpp.

References copyState(), and removeState().

Referenced by Editor().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Editor::detectAutomataSettings ( const QList< State * > &  stateList,
ITransition::TCharSet alphabet,
QString &  alphabetSymbol,
QString &  epsilonSymbol 
) [protected]

Detects parameters of automata on scene.

See also:
Transition::getCharactersOccureces().

Definition at line 3557 of file editor.cpp.

References DBGLOG_AI, AutomataCreator::defaultAlphabetSymbList, AutomataCreator::defaultEpsilonSymbList, Transition::getCharactersOccurences(), State::getOutgoingTransitions(), and RELLOG.

Referenced by getAutomaton().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::drawBackground ( QPainter *  painter,
const QRectF &  rect 
) [protected]

paints grid and labels, if required

Definition at line 2649 of file editor.cpp.

References GRID_STEP, gridRect, showFrame, and showGrid.

void Editor::editNextLabels (  )  [private, slot]

Definition at line 2458 of file editor.cpp.

References Transition::adjust(), and selectedTransition.

Referenced by Editor().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::editOneStateTransition (  )  [private, slot]

Definition at line 2338 of file editor.cpp.

References editTransition(), and selectedTransition.

Referenced by Editor().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::editState (  )  [private, slot]
void Editor::editState ( State state  )  [slot]

Definition at line 2325 of file editor.cpp.

References editState(), and selectedState.

Referenced by State::mouseReleaseEvent().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::editStateParams (  )  [private, slot]
void Editor::editStateStyleParams (  )  [slot]

Definition at line 2319 of file editor.cpp.

Referenced by Editor().

Here is the caller graph for this function:

void Editor::editTransition ( OneStateTransition tr  )  [slot]
void Editor::editTransition ( TwoStatesTransition tr  )  [slot]
void Editor::editTransitionParams (  )  [private, slot]
void Editor::editTransitionStyleParams (  )  [slot]

Definition at line 2484 of file editor.cpp.

Referenced by Editor().

Here is the caller graph for this function:

void Editor::editTwoStatesTransition (  )  [private, slot]

Definition at line 2343 of file editor.cpp.

References editTransition(), and selectedTransition.

Referenced by Editor().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::expandGrid ( int  bound = 0  )  [slot]

expands grid according to items bounding box

Parameters:
bound keeps free space around items

Definition at line 3324 of file editor.cpp.

References getBorder(), getExpandedGridRect(), m_stateMap, and m_undoStack.

Here is the call graph for this function:

void Editor::exportToEPS ( const QString &  fn  ) 

Definition at line 1422 of file editor.cpp.

References DBGLOG, getPrintRect(), mw, and MainWindow::setStatusBar().

Referenced by MainWindow::exportTo().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::exportToGraphML ( const QString &  fn = 0  ) 

Definition at line 945 of file editor.cpp.

References DEF_ARC_ANGLE, DEF_ARC_CURV, DEF_VCURV_ANGLE, DEF_VCURV_ANGLE_B, Transition::dimEdgeLabelColor, dimEdgeLabelColor, Transition::dimEdgeLineCoef, dimEdgeLineCoef, Transition::dimEdgeLineColor, dimEdgeLineColor, Transition::dimEdgeLineStyle, dimEdgeLineStyle, State::dimStateFillColor, dimStateFillColor, State::dimStateLabelColor, dimStateLabelColor, State::dimStateLineCoef, dimStateLineCoef, State::dimStateLineColor, dimStateLineColor, State::dimStateLineStyle, dimStateLineStyle, Transition::edgeLabelColor, edgeLabelColor, Transition::edgeLabelScale, edgeLabelScale, Transition::edgeLineBorderCoef, edgeLineBorderCoef, Transition::edgeLineBorderColor, edgeLineBorderColor, Transition::edgeLineColor, edgeLineColor, Transition::edgeLineDblCoef, edgeLineDblCoef, Transition::edgeLineDblSep, edgeLineDblSep, Transition::edgeLineDblStatus, edgeLineDblStatus, Transition::edgeLineStyle, edgeLineStyle, Transition::edgeLineWidth, edgeLineWidth, Transition::getEndState(), Transition::getGraphMLParams(), State::getLabel(), Transition::getLabelText(), State::getName(), Transition::getStartState(), getStateList(), Transition::getTypeName(), State::getTypeName(), Transition::getTypeNameSuffix(), Transition::hasEndState(), Transition::isDimmed(), State::isDimmed(), State::isDoubleBorder(), m_transitionList, mapToGrid(), mw, MainWindow::setStatusBar(), State::stateFillColor, stateFillColor, State::stateFillStatus, stateFillStatus, State::stateLabelColor, stateLabelColor, State::stateLabelScale, stateLabelScale, State::stateLineColor, stateLineColor, State::stateLineDoubleCoef, stateLineDoubleCoef, State::stateLineDoubleSep, stateLineDoubleSep, State::stateLineStyle, stateLineStyle, State::stateLineWidth, stateLineWidth, trBool(), trFillStatus(), and trLineStyle().

Referenced by MainWindow::exportTo().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::exportToPixmap ( const QString &  fn,
Format  f 
)

Definition at line 1473 of file editor.cpp.

References bmp, getPrintRect(), mw, png, MainWindow::setStatusBar(), and xpm.

Referenced by MainWindow::exportTo().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::exportToSVG ( const QString &  fn  ) 

Referenced by MainWindow::exportTo().

Here is the caller graph for this function:

void Editor::exportToVaucanson ( const QString &  fn,
bool  additionals = 0 
)

Definition at line 640 of file editor.cpp.

References saveToFile().

Referenced by MainWindow::save(), and MainWindow::saveAs().

Here is the call graph for this function:

Here is the caller graph for this function:

QList< State * > Editor::generateDistance ( int  typ,
QString  string,
int  distance,
QPoint  startPoint 
) [protected]
QList< State * > Editor::generateExactMatching ( QString  string,
QPoint  startPoint 
) [protected]
void Editor::generateGraph (  )  [slot]
EAction Editor::getAction (  )  [inline]

Definition at line 96 of file editor.h.

References m_selectedAction.

Referenced by Transition::mouseDoubleClickEvent(), State::mouseDoubleClickEvent(), State::mouseMoveEvent(), State::mousePressEvent(), and State::mouseReleaseEvent().

Here is the caller graph for this function:

QSharedPointer< IAutomataCreator > Editor::getAutomataCreator (  ) 

returns public automata creator

Definition at line 3878 of file editor.cpp.

Referenced by addAlgorithm().

Here is the caller graph for this function:

QSharedPointer< AutomatonImpl > Editor::getAutomaton ( const TStateList stateList,
ITransition::TCharSet alphabet,
QString &  alphabetSymbol,
QString &  epsilonSymbol 
) [protected]

Parse one automaton from whole scene. Uses getAutomata() and then join parsed automata. Can detect automata setting if needed.

Definition at line 3478 of file editor.cpp.

References DBGLOG, DBGPAR, AutomataCreator::defaultAlphabetSymbList, AutomataCreator::defaultEpsilonSymbList, detectAutomataSettings(), Transition::getCharacters(), Transition::getEndStateName(), getInitialStates(), State::getLabel(), State::getName(), Transition::getStartStateName(), Transition::getTypeName(), State::isFinal(), and State::isInitial().

Referenced by loadAutomata(), and loadAutomaton().

Here is the call graph for this function:

Here is the caller graph for this function:

int Editor::getBorder (  )  [inline]

Definition at line 84 of file editor.h.

References sceneBorder.

Referenced by EditorChangeGridRectCommand::EditorChangeGridRectCommand(), expandGrid(), and runAlgorithm().

Here is the caller graph for this function:

QStringList Editor::getDrawAlgorithms (  )  const [protected]

Definition at line 3159 of file editor.cpp.

References m_drawAlgorithmList.

Referenced by loadAutomata().

Here is the caller graph for this function:

QRect Editor::getExpandedGridRect ( const TStateList states,
int  bound 
) [protected]

retunrs expanded gridRect in a way that all states will be in grid with given boundary (int grid coordinates)

Definition at line 3331 of file editor.cpp.

References Transition::boundingRect(), State::boundingRect(), DBGLOG, DBGPAR, State::getOutgoingTransitions(), and mapToGrid().

Referenced by expandGrid(), and runAlgorithm().

Here is the call graph for this function:

Here is the caller graph for this function:

QString Editor::getFileName (  )  const [inline]

Definition at line 159 of file editor.h.

References fileName.

Referenced by MainWindow::exportTo(), MainWindow::openFile(), MainWindow::save(), and MainWindow::saveAs().

Here is the caller graph for this function:

QList< State * > Editor::getFinalStates ( const QList< State * > &  stateList  )  [protected]

Definition at line 3896 of file editor.cpp.

References State::isFinal().

Here is the call graph for this function:

QRect Editor::getGridRect (  ) 
QList< State * > Editor::getInitialStates ( const QList< State * > &  stateList  )  [protected]

Definition at line 3883 of file editor.cpp.

References State::isInitial().

Referenced by getAutomaton().

Here is the call graph for this function:

Here is the caller graph for this function:

int Editor::getNewStateNumber (  )  [inline, protected]

Definition at line 363 of file editor.h.

References newStateNumber.

Referenced by getUniqueAutoName().

Here is the caller graph for this function:

QRectF Editor::getPrintRect (  )  [protected]

Definition at line 1412 of file editor.cpp.

References showFrame.

Referenced by exportToEPS(), and exportToPixmap().

Here is the caller graph for this function:

State* Editor::getStateByName ( const QString &  name  )  const [inline, protected]

Definition at line 415 of file editor.h.

References getStateByName(), and m_stateMap.

Here is the call graph for this function:

State * Editor::getStateByName ( const TStateMap stateMap,
const QString &  name 
) const

returns state instance from

Parameters:
stateMap accorgin to given
name 
Return values:
NULL if no state has
Parameters:
name 

Definition at line 2641 of file editor.cpp.

Referenced by NaiveDrawAlgorithm::drawAutomaton(), BaseDrawAlgorithm::drawTransitions(), and getStateByName().

Here is the caller graph for this function:

QList<State*> Editor::getStateList (  )  [inline]
QList<Transition*> Editor::getTransitionList (  )  [inline]

Definition at line 196 of file editor.h.

References m_transitionList.

Referenced by TransitionStyleChangeCommand::TransitionStyleChangeCommand().

Here is the caller graph for this function:

QString Editor::getUniqueAutoName ( const TStateMap stateMap  )  [protected]

Definition at line 2622 of file editor.cpp.

References getNewStateNumber(), increaseNewStateNumber(), and testStateName().

Here is the call graph for this function:

QString Editor::getUniqueAutoName (  ) 

Definition at line 2617 of file editor.cpp.

References m_stateMap.

Referenced by StateDialog::changeAutoName(), StateSerializer::createState(), generateDistance(), generateExactMatching(), and insertState().

Here is the caller graph for this function:

void Editor::increaseNewStateNumber (  )  [inline, protected]

Definition at line 364 of file editor.h.

References newStateNumber.

Referenced by StateSerializer::createState(), and getUniqueAutoName().

Here is the caller graph for this function:

void Editor::insertState ( const QPoint &  point  )  [protected]
State * Editor::insertState ( State state  )  [protected]

used by parser

Definition at line 2539 of file editor.cpp.

References addToListsAndScene(), State::getName(), and State::setAutoNammed().

Here is the call graph for this function:

void Editor::insertTransition (  ) 
bool Editor::isAddition (  )  const [inline]

Definition at line 160 of file editor.h.

References addition.

Referenced by MainWindow::save().

Here is the caller graph for this function:

bool Editor::isChanged (  )  const

returns m_undoStack's clean state

Definition at line 504 of file editor.cpp.

References m_undoStack.

Referenced by MainWindow::closeEvent(), MainWindow::newFile(), MainWindow::openFile(), MainWindow::save(), and setClean().

Here is the caller graph for this function:

void Editor::isChanged ( bool  changed  )  [signal]

Definition at line 329 of file moc_editor.cpp.

bool Editor::isPastePossible (  ) 

Definition at line 1608 of file editor.cpp.

References CLIPBOARD_FORMAT, CLIPBOARD_FORMAT_STATE, DBGLOG, and m_simulationIsRun.

Referenced by mouseReleaseEvent(), MainWindow::paste(), and MainWindow::updateEditMenu().

Here is the caller graph for this function:

bool Editor::isSaved (  )  const [inline]

Definition at line 161 of file editor.h.

References saved.

Referenced by MainWindow::save().

Here is the caller graph for this function:

bool Editor::isSomethingSelected (  ) 

Definition at line 1603 of file editor.cpp.

Referenced by MainWindow::copy(), MainWindow::cut(), MainWindow::remove(), and MainWindow::updateEditMenu().

Here is the caller graph for this function:

bool Editor::itemAlignToGrid ( QGraphicsItem *  item  ) 

Definition at line 1756 of file editor.cpp.

References GRID_STEP.

Referenced by itemsAlignToGrid(), State::mouseMoveEvent(), and mouseMoveEvent().

Here is the caller graph for this function:

template<typename T >
bool Editor::itemsAlignToGrid ( QList< T * >  items  )  [inline]

Definition at line 169 of file editor.h.

References itemAlignToGrid().

Referenced by mouseMoveEvent(), and slotAlignToGrid().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Editor::itemsAvailable ( bool  available  )  [signal]

Definition at line 293 of file moc_editor.cpp.

Referenced by updateMenuState().

Here is the caller graph for this function:

void Editor::itemsInvertSelection ( QList< QGraphicsItem * >  items  )  [protected]

Definition at line 1748 of file editor.cpp.

Referenced by mousePressEvent(), and mouseReleaseEvent().

Here is the caller graph for this function:

IAutomaton::TAutomataList Editor::loadAutomata ( const QString &  dialogTitle,
int  count,
QStringList &  fileNames,
IAlgorithm algorithm = NULL 
)

Definition at line 3197 of file editor.cpp.

References DBGLOG_AI, DBGPAR, getAutomaton(), getDrawAlgorithms(), Parser::getReport(), getStateList(), m_currentDrawAlgorithm, m_drawAlgorithmList, m_stateMap, RELLOG, and Parser::run().

Referenced by runAlgorithm().

Here is the call graph for this function:

Here is the caller graph for this function:

QSharedPointer< AutomatonImpl > Editor::loadAutomaton ( const QString &  dialogTitle  )  [protected]

loads single automaton from current file for actions with automaton (use when don't want to modify automaton)

Definition at line 3170 of file editor.cpp.

References LoadAutomataDialog::alphabetIsSet(), LoadAutomataDialog::alphabetSymbolIsSet(), LoadAutomataDialog::epsilonSymbolIsSet(), LoadAutomataDialog::getAlphabet(), LoadAutomataDialog::getAlphabetSymbol(), getAutomaton(), LoadAutomataDialog::getEpsilonSymbol(), getStateList(), and m_stateMap.

Referenced by createLaTeXTable(), and simulateAutomatonWork().

Here is the call graph for this function:

Here is the caller graph for this function:

QPointF Editor::mapToGrid ( const QPointF &  scenePos  ) 

maps scene positon to grid position

Definition at line 603 of file editor.cpp.

References GRID_STEP, and gridRect.

Referenced by exportToGraphML(), getExpandedGridRect(), State::getVCCommand(), and mouseMoveEvent().

Here is the caller graph for this function:

void Editor::mouseDoubleClickEvent ( QMouseEvent *  event  )  [protected]

Definition at line 2146 of file editor.cpp.

References DBGLOG_ME, m_currentMouseAction, and m_simulationIsRun.

void Editor::mouseMoveEvent ( QMouseEvent *  event  )  [protected]
void Editor::mousePressEvent ( QMouseEvent *  event  )  [protected]
void Editor::mouseReleaseEvent ( QMouseEvent *  event  )  [protected]
void Editor::moveState (  )  [slot]

Definition at line 1548 of file editor.cpp.

References DBGLOG_ME, m_itemsMoved, m_origPos, m_origPositions, m_stateIsMoving, and selectedState.

Referenced by Editor().

Here is the caller graph for this function:

void Editor::newFile (  ) 

Definition at line 526 of file editor.cpp.

References getStateList(), m_stateMap, m_transitionList, m_undoStack, NEW_FILENAME, newStateNumber, saved, setClean(), and setFileName().

Referenced by MainWindow::newFile(), and openFile().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::openFile ( const QString &  fn  ) 

Definition at line 548 of file editor.cpp.

References DBGLOG, Parser::getReport(), mw, newFile(), ItemsAddCommand::redo(), RELLOG, Parser::run(), saved, setClean(), setFileName(), MainWindow::setStatusBar(), showFrame, showGrid, and update().

Referenced by MainWindow::MainWindow(), and MainWindow::openFile().

Here is the call graph for this function:

Here is the caller graph for this function:

QString Editor::parseCharacter ( const QString &  text  )  [static]

ensures that given text contains just one symbol

Definition at line 3930 of file editor.cpp.

References StringProcessor::computeCharacterList().

Referenced by LoadAutomataDialog::myAccept().

Here is the call graph for this function:

Here is the caller graph for this function:

ITransition::TCharSet Editor::parseCharSet ( const QString &  text  )  [static]

primarilly used for parse alphabet

Definition at line 3910 of file editor.cpp.

References StringProcessor::computeCharacterList().

Referenced by LoadAutomataDialog::myAccept().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::paste (  )  [slot]

Definition at line 1737 of file editor.cpp.

Referenced by MainWindow::paste(), and pasteOnPos().

Here is the caller graph for this function:

void Editor::paste ( const QPoint &  insertPoint  )  [slot]
void Editor::pasteOnPos (  )  [private, slot]

private only for pasting form popup

Definition at line 1743 of file editor.cpp.

References m_popupPoint, and paste().

Referenced by Editor().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::redo (  )  [slot]

Definition at line 2739 of file editor.cpp.

References m_undoStack, and startState.

Referenced by AutomataWorkSimulator::processStep().

Here is the caller graph for this function:

void Editor::removeFromListAndScene ( Transition transition  ) 

Definition at line 2797 of file editor.cpp.

References DBGLOG_ADD, and m_transitionList.

Referenced by NextLabelDeleteCommand::redo(), removeFromListsAndScene(), ItemsAddCommand::undo(), GeneratedGraphAddCommand::undo(), and NextLabelAddCommand::undo().

Here is the caller graph for this function:

void Editor::removeFromListAndScene ( LabelX pLabel  ) 

Definition at line 2821 of file editor.cpp.

References DBGLOG_ADD, LabelX::getTransition(), and Transition::removeNextLabel().

Here is the call graph for this function:

void Editor::removeFromListsAndScene ( Transition transition  ) 
void Editor::removeFromListsAndScene ( State state  ) 

Definition at line 2784 of file editor.cpp.

References DBGLOG_ADD, DBGPAR, State::getName(), m_stateMap, and selectedState.

Here is the call graph for this function:

void Editor::removeSelection (  )  [slot]

Definition at line 1570 of file editor.cpp.

References getStateList(), m_transitionList, and m_undoStack.

Referenced by cutSelection(), Editor(), and MainWindow::remove().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::removeState (  )  [private, slot]

Definition at line 2331 of file editor.cpp.

References m_undoStack, and selectedState.

Referenced by cutState(), and Editor().

Here is the caller graph for this function:

void Editor::removeTransition (  )  [private, slot]

Definition at line 2489 of file editor.cpp.

References m_undoStack, and selectedTransition.

Referenced by Editor().

Here is the caller graph for this function:

void Editor::removeTransition ( Transition transition  ) 
void Editor::renameState ( State state,
const QString &  name 
)

Definition at line 2874 of file editor.cpp.

References State::getName(), m_stateMap, and State::setName().

Referenced by StateEditCommand::redo(), and StateEditCommand::undo().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::resetZoom (  )  [slot]

Definition at line 2765 of file editor.cpp.

References scaleView().

Here is the call graph for this function:

void Editor::resizeEvent ( QResizeEvent *  event  )  [protected]

holds background large enought (according to scene)

Definition at line 1512 of file editor.cpp.

References setRightSceneRect().

Here is the call graph for this function:

void Editor::runAlgorithm (  )  [slot]

sender() is QAction and its data is set as index to algorithmList

Definition at line 3357 of file editor.cpp.

References createGraphicsItems(), DBGLOG, DBGLOG_AI, getBorder(), getExpandedGridRect(), getStateList(), gridRect, loadAutomata(), m_algorithmList, m_currentDrawAlgorithm, m_drawAlgorithmList, m_transitionList, m_undoStack, and RELLOG.

Here is the call graph for this function:

void Editor::saveFooter ( QTextStream &  out  ) 

Definition at line 702 of file editor.cpp.

Referenced by AutomataWorkSimulator::generateSlideshow(), and saveToFile().

Here is the caller graph for this function:

void Editor::saveGraph ( QTextStream &  out  ) 

Definition at line 707 of file editor.cpp.

References EdgePrevParams::dimEdgeLabelColor, EdgePrevParams::dimEdgeLineCoef, EdgePrevParams::dimEdgeLineColor, EdgePrevParams::dimEdgeLineStyle, StatePrevParams::dimStateFillColor, StatePrevParams::dimStateLabelColor, StatePrevParams::dimStateLineCoef, StatePrevParams::dimStateLineColor, StatePrevParams::dimStateLineStyle, edgeLabelColor, EdgePrevParams::edgeLabelColor, EdgePrevParams::edgeLabelScale, EdgePrevParams::edgeLineBorderCoef, EdgePrevParams::edgeLineBorderColor, edgeLineColor, EdgePrevParams::edgeLineColor, EdgePrevParams::edgeLineDblCoef, EdgePrevParams::edgeLineDblSep, edgeLineDblStatus, EdgePrevParams::edgeLineDblStatus, edgeLineStyle, EdgePrevParams::edgeLineStyle, EdgePrevParams::edgeLineWidth, getStateList(), Transition::getTypeName(), Transition::getVCCommand(), State::getVCCommand(), Transition::getVCParams(), State::getVCParams(), Transition::isDimmed(), State::isDimmed(), m_stateMap, m_transitionList, SBS_IF, SBS_STATES, SBS_TRAN, setStatePrevParamsDef(), setTrPrevParamsDef(), stateFillColor, StatePrevParams::stateFillColor, stateFillStatus, StatePrevParams::stateFillStatus, stateLabelColor, StatePrevParams::stateLabelColor, StatePrevParams::stateLabelScale, stateLineColor, StatePrevParams::stateLineColor, StatePrevParams::stateLineDoubleCoef, StatePrevParams::stateLineDoubleSep, stateLineStyle, StatePrevParams::stateLineStyle, and StatePrevParams::stateLineWidth.

Referenced by AutomataWorkSimulator::generateSlideshow(), and saveToFile().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::saveHeader ( QTextStream &  out  ) 

Definition at line 658 of file editor.cpp.

References gridRect, showFrame, and showGrid.

Referenced by AutomataWorkSimulator::generateSlideshow(), and saveToFile().

Here is the caller graph for this function:

void Editor::saveLaTeXFooter ( QTextStream &  out  ) 

Definition at line 653 of file editor.cpp.

Referenced by AutomataWorkSimulator::generateSlideshow(), and saveToFile().

Here is the caller graph for this function:

void Editor::saveLaTeXHeader ( QTextStream &  out  ) 

Definition at line 645 of file editor.cpp.

Referenced by AutomataWorkSimulator::generateSlideshow(), and saveToFile().

Here is the caller graph for this function:

void Editor::saveToFile ( const QString &  fn,
bool  latexHeader = false 
)

Definition at line 906 of file editor.cpp.

References addition, m_undoStack, mw, RELLOG, saved, saveFooter(), saveGraph(), saveHeader(), saveLaTeXFooter(), saveLaTeXHeader(), saveVCSettings(), and MainWindow::setStatusBar().

Referenced by exportToVaucanson().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::saveVCSettings ( QTextStream &  out  ) 
void Editor::scaleView ( qreal  scaleFactor  )  [protected]

Definition at line 1527 of file editor.cpp.

References canZoomIn(), and canZoomOut().

Referenced by resetZoom(), wheelEvent(), zoomIn(), and zoomOut().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::sceneChanged ( const QList< QRectF > &  rects  )  [private, slot]

due to performance -> only sets up internal flag m_sceneChanged when scene signal changed() is emited -> don't forget connect it!

Definition at line 1507 of file editor.cpp.

References m_sceneChanged.

Referenced by Editor().

Here is the caller graph for this function:

void Editor::setAction ( EAction  action  ) 

Definition at line 349 of file editor.cpp.

References eSelection, m_selectedAction, selectedState, setActionCursor(), State::setChecked(), and startState.

Referenced by MainWindow::MainWindow(), setActionInternal(), MainWindow::setSelection(), MainWindow::setState(), and MainWindow::setTransition().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::setActionCursor ( EAction  action  )  [protected]

Definition at line 366 of file editor.cpp.

References DBGLOG_ME, eInsertState, eInsertTransition, and eSelection.

Referenced by mouseReleaseEvent(), and setAction().

Here is the caller graph for this function:

void Editor::setActionInternal ( EAction  action  )  [protected]

Definition at line 387 of file editor.cpp.

References actionChanged(), and setAction().

Referenced by generateGraph(), and paste().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::setBorder ( int  b  )  [inline]

Definition at line 85 of file editor.h.

References sceneBorder.

Referenced by EditorChangeGridRectCommand::redo(), and EditorChangeGridRectCommand::undo().

Here is the caller graph for this function:

void Editor::setClean ( bool  clean  )  [private, slot]

sets mainwindow head according to m_undoStack clean state

Definition at line 509 of file editor.cpp.

References fileName, isChanged(), m_undoStack, mw, PROGRAM_NAME, and saved.

Referenced by Editor(), newFile(), and openFile().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::setFileName ( const QString &  fn  ) 

Definition at line 630 of file editor.cpp.

References DBGLOG, DBGPAR, fileName, mw, and PROGRAM_NAME.

Referenced by newFile(), openFile(), and MainWindow::saveAs().

Here is the caller graph for this function:

void Editor::setGridRect ( QRect  gridRect  ) 

sets new grid rect coordinates

Definition at line 308 of file editor.cpp.

References br, getStateList(), GRID_STEP, and sceneBorder.

Referenced by Editor(), ItemsAddCommand::redo(), GeneratedGraphAddCommand::redo(), EditorChangeGridRectCommand::redo(), ItemsAddCommand::undo(), GeneratedGraphAddCommand::undo(), EditorChangeGridRectCommand::undo(), and Parser::VCPicture().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::setRightSceneRect (  )  [protected]

Definition at line 1496 of file editor.cpp.

References br, and sceneBorder.

Referenced by mouseReleaseEvent(), and resizeEvent().

Here is the caller graph for this function:

void Editor::setSelectedState ( State state  ) 

Definition at line 393 of file editor.cpp.

References selectedState.

Referenced by State::mouseReleaseEvent().

Here is the caller graph for this function:

void Editor::setSelectedTransition ( Transition transition  )  [inline]

Definition at line 98 of file editor.h.

References selectedTransition.

void Editor::setShowGridFrame ( bool  grid,
bool  frame 
)

Definition at line 461 of file editor.cpp.

References showChanged(), showFrame, and showGrid.

Referenced by ShowGridFrameCommand::redo(), and ShowGridFrameCommand::undo().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::setStatePrevParamsDef ( StatePrevParams prevParams  ) 
void Editor::setStatesMarked ( QList< State * >  states,
bool  marked 
) [private, slot]

Definition at line 3452 of file editor.cpp.

References m_undoStack.

Referenced by simulateAutomatonWork().

Here is the caller graph for this function:

void Editor::setStatusBar ( const QString &  text,
int  ms 
)

Definition at line 2702 of file editor.cpp.

References mw, and MainWindow::setStatusBar().

Here is the call graph for this function:

void Editor::setTrPrevParamsDef ( EdgePrevParams prevTrParams  ) 
void Editor::showChanged ( bool  showG,
bool  showF 
) [signal]

Definition at line 342 of file moc_editor.cpp.

Referenced by Parser::Parser(), Parser::Predeclaration(), and setShowGridFrame().

Here is the caller graph for this function:

void Editor::showGridRectDialog (  )  [slot]
void Editor::showPopup ( TwoStatesTransition transition,
const QPointF &  point 
)
void Editor::showPopup ( OneStateTransition transition,
const QPointF &  point 
)
bool Editor::showPopup ( State state  ) 
Return values:
false if element was deleted!

Definition at line 2165 of file editor.cpp.

References State::getLabel(), State::getName(), m_stateIsMoving, popupState, popupStateLabel, selectedState, State::setChecked(), and startState.

Referenced by TwoStatesTransition::mouseReleaseEvent(), State::mouseReleaseEvent(), and OneStateTransition::mouseReleaseEvent().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Editor::showUndoStackAvailable ( bool  available  )  [signal]

Definition at line 320 of file moc_editor.cpp.

Referenced by updateMenuState().

Here is the caller graph for this function:

void Editor::showUndoView ( bool  show  )  [slot]

Definition at line 2747 of file editor.cpp.

References m_undoView.

void Editor::simulateAutomatonWork (  )  [slot]

runs SimulationDialog

Definition at line 3425 of file editor.cpp.

References loadAutomaton(), m_simulationIsRun, m_undoStack, AutomataWorkSimulator::run(), setStatesMarked(), simulationFinished(), and updateMenuState().

Here is the call graph for this function:

void Editor::simulationFinished (  )  [private, slot]

Definition at line 3441 of file editor.cpp.

References m_simulationIsRun, and updateMenuState().

Referenced by simulateAutomatonWork().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::slotAlignToGrid (  ) 

Definition at line 434 of file editor.cpp.

References createMoveItemsCommand(), DBGLOG, getStateList(), itemsAlignToGrid(), m_undoStack, mw, and MainWindow::setStatusBar().

Referenced by MainWindow::alignToGrid().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::slotShowFrame ( bool  show  )  [slot]

Definition at line 483 of file editor.cpp.

References m_undoStack, mw, MainWindow::setStatusBar(), showFrame, and showGrid.

Here is the call graph for this function:

void Editor::slotShowGrid ( bool  show  )  [slot]

Definition at line 472 of file editor.cpp.

References m_undoStack, mw, MainWindow::setStatusBar(), showFrame, and showGrid.

Here is the call graph for this function:

void Editor::slotSnapToGrid (  ) 

Definition at line 416 of file editor.cpp.

References mw, MainWindow::setStatusBar(), and snapToGrid.

Referenced by MainWindow::snapToGrid().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Editor::snapped (  )  [inline]
Return values:
true if automatic snapping is used

Definition at line 100 of file editor.h.

References snapToGrid.

Referenced by State::mouseMoveEvent(), mouseMoveEvent(), and mouseReleaseEvent().

Here is the caller graph for this function:

void Editor::stateMoved ( State state,
const QPointF &  oldPos 
) [slot]

Definition at line 2771 of file editor.cpp.

References m_undoStack, and update().

Referenced by mousePressEvent(), and State::mouseReleaseEvent().

Here is the call graph for this function:

Here is the caller graph for this function:

void Editor::switchAntialiasing (  )  [slot]

Definition at line 2889 of file editor.cpp.

References antial, DBGLOG, and DBGPAR.

bool Editor::testStateName ( const QString &  s,
const TStateMap stateMap 
) [protected]

Definition at line 499 of file editor.cpp.

bool Editor::testStateName ( const QString &  s  ) 

Definition at line 494 of file editor.cpp.

References m_stateMap.

Referenced by getUniqueAutoName(), and StateDialog::testAccept().

Here is the caller graph for this function:

bool Editor::toolsAvailable ( bool  available  )  [signal]

Definition at line 302 of file moc_editor.cpp.

Referenced by updateMenuState().

Here is the caller graph for this function:

QPoint Editor::toScenePos ( const QPointF &  gridPos  ) 

converts

Parameters:
gridPoc to scene position

Definition at line 2532 of file editor.cpp.

References GRID_STEP, and gridRect.

Referenced by FarthestFinalDrawAlgorithm::drawAutomaton(), generateDistance(), generateExactMatching(), and Parser::StateDeclaration().

Here is the caller graph for this function:

void Editor::undo (  )  [slot]

Definition at line 2732 of file editor.cpp.

References m_undoStack, and startState.

Referenced by AutomataWorkSimulator::stepBackward().

Here is the caller graph for this function:

void Editor::undoViewClosed (  )  [signal]

Definition at line 336 of file moc_editor.cpp.

Referenced by Editor().

Here is the caller graph for this function:

void Editor::update (  ) 
void Editor::updateMenuState (  )  [protected]

sets metu items enabled/disabled as necessary

Definition at line 3459 of file editor.cpp.

References canNewFile(), canOpenFile(), canRedoChanged(), canSaveFile(), canUndoChanged(), itemsAvailable(), m_simulationIsRun, m_undoStack, m_undoView, showUndoStackAvailable(), toolsAvailable(), and utilsAvailable().

Referenced by simulateAutomatonWork(), and simulationFinished().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Editor::utilsAvailable ( bool  available  )  [signal]

Definition at line 311 of file moc_editor.cpp.

Referenced by updateMenuState().

Here is the caller graph for this function:

void Editor::wheelEvent ( QWheelEvent *  event  )  [protected]

Definition at line 1517 of file editor.cpp.

References scaleView().

Here is the call graph for this function:

void Editor::zoomIn (  )  [slot]

Definition at line 2755 of file editor.cpp.

References m_zoomInFactor, and scaleView().

Here is the call graph for this function:

void Editor::zoomOut (  )  [slot]

Definition at line 2760 of file editor.cpp.

References m_zoomInFactor, and scaleView().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class NextLabelsDialog [friend]

Definition at line 76 of file editor.h.

friend class Parser [friend]

Definition at line 71 of file editor.h.

friend struct StateSerializer [friend]

Definition at line 77 of file editor.h.

Referenced by copyState().

friend class StateStyleChangeCommand [friend]

Definition at line 73 of file editor.h.

friend class StateStyleDialog [friend]

Definition at line 72 of file editor.h.

friend struct TransitionSerializer [friend]

Definition at line 78 of file editor.h.

friend class TransitionStyleChangeCommand [friend]

Definition at line 75 of file editor.h.

friend class TransitionStyleDialog [friend]

Definition at line 74 of file editor.h.


Member Data Documentation

bool Editor::addition [protected]

Definition at line 465 of file editor.h.

Referenced by isAddition(), Parser::Predeclaration(), and saveToFile().

bool Editor::antial [protected]

true if scene is rendered in anialiasing mode

Definition at line 459 of file editor.h.

Referenced by Editor(), and switchAntialiasing().

QPoint Editor::br [protected]

bottomRight -> scene usage

Definition at line 407 of file editor.h.

Referenced by setGridRect(), and setRightSceneRect().

Qt::PenStyle Editor::edgeLineStyle
QString Editor::fileName [protected]

Definition at line 463 of file editor.h.

Referenced by Editor(), getFileName(), setClean(), and setFileName().

QRect Editor::gridRect [protected]

holds list of available algorithms

Definition at line 488 of file editor.h.

Referenced by addAlgorithm(), and runAlgorithm().

index of lastly used drawing algorithm

Definition at line 492 of file editor.h.

Referenced by addGraphVizDrawAlgorithm(), Editor(), loadAutomata(), and runAlgorithm().

holds current mouse action

Definition at line 424 of file editor.h.

Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().

holds drawing algorithms

Definition at line 491 of file editor.h.

Referenced by addGraphVizDrawAlgorithm(), Editor(), getDrawAlgorithms(), loadAutomata(), and runAlgorithm().

bool Editor::m_itemsMoved [protected]

for performance -> no undo command needed if nothing is moved

Definition at line 474 of file editor.h.

Referenced by mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and moveState().

remembers last mouse action

Definition at line 471 of file editor.h.

QPointF Editor::m_origPos [protected]

original mouse position for moving with multiple states

Definition at line 472 of file editor.h.

Referenced by mouseMoveEvent(), mousePressEvent(), and moveState().

QVector<QPointF> Editor::m_origPositions [protected]

original positions of selected items before moving them

Definition at line 473 of file editor.h.

Referenced by mousePressEvent(), mouseReleaseEvent(), and moveState().

QPoint Editor::m_popupPoint [protected]

Definition at line 456 of file editor.h.

Referenced by mouseReleaseEvent(), and pasteOnPos().

QRubberBand* Editor::m_rubberBand [protected]

determines current selection

Definition at line 468 of file editor.h.

Referenced by Editor(), mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().

QPoint Editor::m_rubberBandOrigin [protected]

rubberBand origin point (stored on press event)

Definition at line 469 of file editor.h.

Referenced by mouseMoveEvent(), and mousePressEvent().

bool Editor::m_sceneChanged [protected]

performance flag for better handling mouse release event -> if scene has been changed, view's sceneRect should be updated

Definition at line 481 of file editor.h.

Referenced by mouseReleaseEvent(), and sceneChanged().

holds selected editor tool

Definition at line 423 of file editor.h.

Referenced by getAction(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and setAction().

bool Editor::m_simulationIsRun [protected]

if simulation is running, no operations with object on scene are available

Definition at line 483 of file editor.h.

Referenced by canRedoChangedSlot(), canUndoChangedSlot(), isPastePossible(), mouseDoubleClickEvent(), mousePressEvent(), simulateAutomatonWork(), simulationFinished(), and updateMenuState().

bool Editor::m_stateIsMoving [protected]

special selected state of editor, state is moved by mouse move, click to release this mode

Definition at line 477 of file editor.h.

Referenced by mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), moveState(), and showPopup().

QUndoStack* Editor::m_undoStack [protected]

allows to show m_undoStack and operate on it

Definition at line 436 of file editor.h.

Referenced by createUndoView(), Editor(), showUndoView(), and updateMenuState().

qreal Editor::m_zoomInFactor [protected]

zoomOutFactor = 1/m_zoomInFactor;

Definition at line 485 of file editor.h.

Referenced by Editor(), zoomIn(), and zoomOut().

MainWindow* Editor::mw [protected]
int Editor::newStateNumber [protected]

automatic naming as Q1, Q2, ...

Definition at line 426 of file editor.h.

Referenced by Editor(), getNewStateNumber(), increaseNewStateNumber(), and newFile().

QMenu* Editor::popup [protected]

Definition at line 441 of file editor.h.

Referenced by Editor(), and mouseReleaseEvent().

Definition at line 453 of file editor.h.

Referenced by Editor(), and showPopup().

QAction* Editor::popupPasteHere [protected]

Definition at line 442 of file editor.h.

Referenced by Editor(), and mouseReleaseEvent().

QMenu* Editor::popupSelection [protected]

Definition at line 444 of file editor.h.

Referenced by Editor(), and mouseReleaseEvent().

QMenu* Editor::popupState [protected]

Definition at line 446 of file editor.h.

Referenced by Editor(), and showPopup().

QAction* Editor::popupStateLabel [protected]

Definition at line 447 of file editor.h.

Referenced by Editor(), and showPopup().

QMenu* Editor::popupTransition [protected]

Definition at line 449 of file editor.h.

Referenced by Editor(), and showPopup().

QAction* Editor::popupTransitionEdit [protected]

Definition at line 452 of file editor.h.

Referenced by Editor(), and showPopup().

QAction* Editor::popupTransitionLabel [protected]

Definition at line 450 of file editor.h.

Referenced by Editor(), and showPopup().

Definition at line 454 of file editor.h.

Referenced by Editor(), and showPopup().

bool Editor::saved [protected]

Definition at line 464 of file editor.h.

Referenced by isSaved(), newFile(), openFile(), saveToFile(), and setClean().

int Editor::sceneBorder [protected]

Definition at line 405 of file editor.h.

Referenced by getBorder(), setBorder(), setGridRect(), setRightSceneRect(), and showGridRectDialog().

bool Editor::showFrame [protected]
bool Editor::showGrid [protected]
bool Editor::snapToGrid [protected]

Definition at line 431 of file editor.h.

Referenced by mouseMoveEvent(), slotSnapToGrid(), and snapped().

State* Editor::startState [protected]

for inserting transitions

Definition at line 410 of file editor.h.

Referenced by insertTransition(), redo(), setAction(), showPopup(), and undo().

Qt::BrushStyle Editor::stateFillStatus
Qt::PenStyle Editor::stateLineStyle

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