#include <mainwindow.h>
Public Member Functions | |
MainWindow (const QString &fileName="") | |
~MainWindow () | |
void | setStatusBar (const QString &s) |
void | setStatusBar (const QString &s, int ms) |
Protected Member Functions | |
void | addSuffix (QString &fn, Editor::Format f) |
void | closeEvent (QCloseEvent *event) |
void | loadPlugins () |
void | processAlgorithmsPlugin (IAlgorithmHolder *algHolder) |
void | processGraphVizPlugin (IGraphViz *graphVizWrapper) |
Private Slots | |
void | about () |
void | aboutQt () |
void | actionChanged (int) |
void | actualizeChecking (bool, bool) |
void | alignToGrid () |
void | copy () |
void | cut () |
void | enableEditMenu () |
void | exportTo () |
void | newFile () |
void | openFile () |
void | paste () |
void | remove () |
bool | save () |
bool | saveAs () |
void | setItemsAvailable (bool available) |
void | setSelection () |
void | setState () |
void | setToolsAvailable (bool available) |
void | setTransition () |
void | setUtilsAvailable (bool available) |
void | snapToGrid () |
void | undoViewClosed () |
void | updateEditMenu () |
Private Member Functions | |
void | createActions () |
void | createMenus () |
void | createStatusBar () |
void | createToolBars () |
Private Attributes | |
QMenu * | algorithmMenu |
QAction * | editCopy |
QAction * | editCut |
QAction * | editGridRect |
QMenu * | editMenu |
Editor * | editor |
QAction * | editPaste |
QAction * | editRedo |
QAction * | editRemove |
QAction * | editShowUndoStack |
QAction * | editStateParams |
QToolBar * | editToolBar |
QAction * | editTransitionParams |
QAction * | editUndo |
QAction * | extraGeneration |
QAction * | extraLaTeXTable |
QMenu * | extraMenu |
QAction * | extraSimulation |
QToolBar * | extraToolBar |
QAction * | fileExport |
QMenu * | fileMenu |
QAction * | fileNew |
QAction * | fileOpen |
QAction * | fileQuit |
QAction * | fileSave |
QAction * | fileSaveAs |
QToolBar * | fileToolBar |
QAction * | helpAbout |
QAction * | helpAboutQt |
QMenu * | helpMenu |
QMenu * | itemsMenu |
QAction * | itemsSelection |
QAction * | itemsState |
QToolBar * | itemsToolBar |
QAction * | itemsTransition |
QAction * | resetZoom |
QAction * | showAntialias |
QAction * | showFrame |
QAction * | showGrid |
QMenu * | showMenu |
QToolBar * | showToolBar |
QAction * | toolsAlignStatesToGrid |
QAction * | toolsExpandGrid |
QMenu * | toolsMenu |
QAction * | toolsSnapToGrid |
QToolBar * | toolsToolBar |
QAction * | zoomIn |
QAction * | zoomOut |
QToolBar * | zoomToolBar |
Definition at line 16 of file mainwindow.h.
MainWindow::MainWindow | ( | const QString & | fileName = "" |
) |
check Qt version first!!!
Definition at line 42 of file mainwindow.cpp.
References actionChanged(), actualizeChecking(), createActions(), createMenus(), createStatusBar(), createToolBars(), DBGLOG, editor, editRedo, editShowUndoStack, editUndo, fileNew, fileOpen, fileSave, INIT_ACTION, loadPlugins(), NEW_FILENAME, Editor::openFile(), PROGRAM_NAME, RELLOG, Editor::setAction(), setItemsAvailable(), setToolsAvailable(), setUtilsAvailable(), zoomIn, and zoomOut.
MainWindow::~MainWindow | ( | ) | [inline] |
Definition at line 87 of file mainwindow.h.
void MainWindow::about | ( | ) | [private, slot] |
Definition at line 893 of file mainwindow.cpp.
References PROGRAM_NAME.
Referenced by createActions().
void MainWindow::aboutQt | ( | ) | [private, slot] |
Definition at line 911 of file mainwindow.cpp.
References PROGRAM_NAME.
Referenced by createActions().
void MainWindow::actionChanged | ( | int | action | ) | [private, slot] |
Definition at line 922 of file mainwindow.cpp.
References Editor::eInsertState, Editor::eInsertTransition, Editor::eSelection, and itemsSelection.
Referenced by MainWindow().
void MainWindow::actualizeChecking | ( | bool | sg, | |
bool | sf | |||
) | [private, slot] |
Definition at line 916 of file mainwindow.cpp.
References showFrame, and showGrid.
Referenced by MainWindow().
void MainWindow::addSuffix | ( | QString & | fn, | |
Editor::Format | f | |||
) | [protected] |
Definition at line 618 of file mainwindow.cpp.
References Editor::bmp, Editor::eps, Editor::gml, Editor::png, Editor::svg, Editor::tex, Editor::vcg, and Editor::xpm.
Referenced by exportTo(), and saveAs().
void MainWindow::alignToGrid | ( | ) | [private, slot] |
Definition at line 888 of file mainwindow.cpp.
References editor, and Editor::slotAlignToGrid().
Referenced by createActions().
void MainWindow::closeEvent | ( | QCloseEvent * | event | ) | [protected] |
Definition at line 786 of file mainwindow.cpp.
References DBGLOG, DBGPAR, editor, Editor::isChanged(), and save().
void MainWindow::copy | ( | ) | [private, slot] |
Definition at line 832 of file mainwindow.cpp.
References Editor::copySelection(), editor, and Editor::isSomethingSelected().
Referenced by createActions().
void MainWindow::createActions | ( | ) | [private] |
Definition at line 243 of file mainwindow.cpp.
References about(), aboutQt(), alignToGrid(), copy(), cut(), editCopy, editCut, editGridRect, editor, editPaste, editRedo, editRemove, editShowUndoStack, editStateParams, editTransitionParams, editUndo, exportTo(), extraGeneration, extraLaTeXTable, extraSimulation, fileExport, fileNew, fileOpen, fileQuit, fileSave, fileSaveAs, helpAbout, helpAboutQt, INIT_ANTIALIASING, itemsSelection, itemsState, itemsTransition, newFile(), openFile(), paste(), resetZoom, save(), saveAs(), setSelection(), setState(), setTransition(), SHOW_FRAME, SHOW_GRID, showAntialias, showFrame, showGrid, SNAP_TO_GRID, snapToGrid(), toolsAlignStatesToGrid, toolsExpandGrid, toolsSnapToGrid, undoViewClosed(), zoomIn, and zoomOut.
Referenced by MainWindow().
void MainWindow::createMenus | ( | ) | [private] |
Definition at line 431 of file mainwindow.cpp.
References algorithmMenu, editCopy, editCut, editGridRect, editMenu, editPaste, editRedo, editRemove, editShowUndoStack, editStateParams, editTransitionParams, editUndo, enableEditMenu(), extraGeneration, extraLaTeXTable, extraMenu, extraSimulation, fileExport, fileMenu, fileNew, fileOpen, fileQuit, fileSave, fileSaveAs, helpAbout, helpAboutQt, helpMenu, itemsMenu, itemsSelection, itemsState, itemsTransition, resetZoom, showAntialias, showFrame, showGrid, showMenu, toolsAlignStatesToGrid, toolsExpandGrid, toolsMenu, toolsSnapToGrid, updateEditMenu(), zoomIn, and zoomOut.
Referenced by MainWindow().
void MainWindow::createStatusBar | ( | ) | [private] |
Definition at line 228 of file mainwindow.cpp.
Referenced by MainWindow().
void MainWindow::createToolBars | ( | ) | [private] |
Definition at line 493 of file mainwindow.cpp.
References editRedo, editToolBar, editUndo, extraGeneration, extraLaTeXTable, extraSimulation, extraToolBar, fileExport, fileNew, fileOpen, fileSave, fileToolBar, itemsSelection, itemsState, itemsToolBar, itemsTransition, resetZoom, showAntialias, showFrame, showGrid, showToolBar, toolsAlignStatesToGrid, toolsExpandGrid, toolsSnapToGrid, toolsToolBar, zoomIn, zoomOut, and zoomToolBar.
Referenced by MainWindow().
void MainWindow::cut | ( | ) | [private, slot] |
Definition at line 848 of file mainwindow.cpp.
References Editor::cutSelection(), editor, and Editor::isSomethingSelected().
Referenced by createActions().
void MainWindow::enableEditMenu | ( | ) | [private, slot] |
Definition at line 824 of file mainwindow.cpp.
References editCopy, editCut, editPaste, and editRemove.
Referenced by createMenus().
void MainWindow::exportTo | ( | ) | [private, slot] |
Definition at line 707 of file mainwindow.cpp.
References addSuffix(), DBGLOG, editor, Editor::eps, Editor::exportToEPS(), Editor::exportToGraphML(), Editor::exportToPixmap(), Editor::exportToSVG(), Editor::getFileName(), Editor::gml, PROGRAM_NAME, RELLOG, and Editor::svg.
Referenced by createActions().
void MainWindow::loadPlugins | ( | ) | [protected] |
Definition at line 130 of file mainwindow.cpp.
References DBGLOG, DBGPAR, processAlgorithmsPlugin(), and processGraphVizPlugin().
Referenced by MainWindow().
void MainWindow::newFile | ( | ) | [private, slot] |
Definition at line 534 of file mainwindow.cpp.
References editor, Editor::isChanged(), Editor::newFile(), and save().
Referenced by createActions().
void MainWindow::openFile | ( | ) | [private, slot] |
Definition at line 555 of file mainwindow.cpp.
References DBGLOG, DBGPAR, editor, Editor::getFileName(), Editor::isChanged(), Editor::openFile(), and save().
Referenced by createActions().
void MainWindow::paste | ( | ) | [private, slot] |
Definition at line 840 of file mainwindow.cpp.
References editor, Editor::isPastePossible(), and Editor::paste().
Referenced by createActions().
void MainWindow::processAlgorithmsPlugin | ( | IAlgorithmHolder * | algHolder | ) | [protected] |
Definition at line 173 of file mainwindow.cpp.
References Editor::addAlgorithm(), algorithmMenu, DBGLOG, DBGLOG_AI, DBGPAR, editor, IAlgorithmHolder::getAlgorithms(), IAlgorithmHolder::getPluginName(), IAlgorithmHolder::getVersion(), and RELLOG.
Referenced by loadPlugins().
void MainWindow::processGraphVizPlugin | ( | IGraphViz * | graphVizWrapper | ) | [protected] |
Definition at line 211 of file mainwindow.cpp.
References Editor::addGraphVizDrawAlgorithm(), DBGLOG, editor, IGraphViz::getVersion(), and RELLOG.
Referenced by loadPlugins().
void MainWindow::remove | ( | ) | [private, slot] |
Definition at line 856 of file mainwindow.cpp.
References editor, Editor::isSomethingSelected(), and Editor::removeSelection().
bool MainWindow::save | ( | ) | [private, slot] |
Definition at line 602 of file mainwindow.cpp.
References DBGLOG, editor, Editor::exportToVaucanson(), Editor::getFileName(), Editor::isAddition(), Editor::isChanged(), Editor::isSaved(), and saveAs().
Referenced by closeEvent(), createActions(), newFile(), and openFile().
bool MainWindow::saveAs | ( | ) | [private, slot] |
Definition at line 637 of file mainwindow.cpp.
References addSuffix(), DBGLOG, DBGPAR, DEFAULT_SUFFIX_VCG, editor, Editor::exportToVaucanson(), Editor::getFileName(), PROGRAM_NAME, Editor::setFileName(), Editor::tex, and Editor::vcg.
Referenced by createActions(), and save().
void MainWindow::setItemsAvailable | ( | bool | available | ) | [private, slot] |
Definition at line 939 of file mainwindow.cpp.
References itemsMenu, itemsSelection, itemsState, and itemsTransition.
Referenced by MainWindow().
void MainWindow::setSelection | ( | ) | [private, slot] |
Definition at line 864 of file mainwindow.cpp.
References editor, Editor::eSelection, and Editor::setAction().
Referenced by createActions().
void MainWindow::setState | ( | ) | [private, slot] |
Definition at line 870 of file mainwindow.cpp.
References editor, Editor::eInsertState, and Editor::setAction().
Referenced by createActions().
void MainWindow::setStatusBar | ( | const QString & | s, | |
int | ms | |||
) |
Definition at line 238 of file mainwindow.cpp.
void MainWindow::setStatusBar | ( | const QString & | s | ) |
Definition at line 233 of file mainwindow.cpp.
Referenced by Editor::editState(), Editor::editStateParams(), Editor::editTransition(), Editor::editTransitionParams(), Editor::exportToEPS(), Editor::exportToGraphML(), Editor::exportToPixmap(), Editor::insertState(), Editor::insertTransition(), Editor::mouseMoveEvent(), Editor::openFile(), Editor::saveToFile(), Editor::setStatusBar(), Editor::slotAlignToGrid(), Editor::slotShowFrame(), Editor::slotShowGrid(), and Editor::slotSnapToGrid().
void MainWindow::setToolsAvailable | ( | bool | available | ) | [private, slot] |
Definition at line 949 of file mainwindow.cpp.
References toolsAlignStatesToGrid, toolsMenu, and toolsSnapToGrid.
Referenced by MainWindow().
void MainWindow::setTransition | ( | ) | [private, slot] |
Definition at line 876 of file mainwindow.cpp.
References editor, Editor::eInsertTransition, and Editor::setAction().
Referenced by createActions().
void MainWindow::setUtilsAvailable | ( | bool | available | ) | [private, slot] |
Definition at line 957 of file mainwindow.cpp.
References algorithmMenu, extraGeneration, and extraSimulation.
Referenced by MainWindow().
void MainWindow::snapToGrid | ( | ) | [private, slot] |
Definition at line 883 of file mainwindow.cpp.
References editor, and Editor::slotSnapToGrid().
Referenced by createActions().
void MainWindow::undoViewClosed | ( | ) | [private, slot] |
Definition at line 811 of file mainwindow.cpp.
References editShowUndoStack.
Referenced by createActions().
void MainWindow::updateEditMenu | ( | ) | [private, slot] |
Definition at line 816 of file mainwindow.cpp.
References editCopy, editCut, editor, editPaste, editRemove, Editor::isPastePossible(), and Editor::isSomethingSelected().
Referenced by createMenus().
QMenu* MainWindow::algorithmMenu [private] |
Definition at line 82 of file mainwindow.h.
Referenced by createMenus(), processAlgorithmsPlugin(), and setUtilsAvailable().
QAction* MainWindow::editCopy [private] |
Definition at line 53 of file mainwindow.h.
Referenced by createActions(), createMenus(), enableEditMenu(), and updateEditMenu().
QAction* MainWindow::editCut [private] |
Definition at line 55 of file mainwindow.h.
Referenced by createActions(), createMenus(), enableEditMenu(), and updateEditMenu().
QAction* MainWindow::editGridRect [private] |
Definition at line 60 of file mainwindow.h.
Referenced by createActions(), and createMenus().
QMenu* MainWindow::editMenu [private] |
Definition at line 28 of file mainwindow.h.
Referenced by createMenus().
Editor* MainWindow::editor [private] |
Definition at line 20 of file mainwindow.h.
Referenced by alignToGrid(), closeEvent(), copy(), createActions(), cut(), exportTo(), MainWindow(), newFile(), openFile(), paste(), processAlgorithmsPlugin(), processGraphVizPlugin(), remove(), save(), saveAs(), setSelection(), setState(), setTransition(), snapToGrid(), and updateEditMenu().
QAction* MainWindow::editPaste [private] |
Definition at line 54 of file mainwindow.h.
Referenced by createActions(), createMenus(), enableEditMenu(), and updateEditMenu().
QAction* MainWindow::editRedo [private] |
Definition at line 51 of file mainwindow.h.
Referenced by createActions(), createMenus(), createToolBars(), and MainWindow().
QAction* MainWindow::editRemove [private] |
Definition at line 56 of file mainwindow.h.
Referenced by createActions(), createMenus(), enableEditMenu(), and updateEditMenu().
QAction* MainWindow::editShowUndoStack [private] |
Definition at line 52 of file mainwindow.h.
Referenced by createActions(), createMenus(), MainWindow(), and undoViewClosed().
QAction* MainWindow::editStateParams [private] |
Definition at line 61 of file mainwindow.h.
Referenced by createActions(), and createMenus().
QToolBar* MainWindow::editToolBar [private] |
Definition at line 36 of file mainwindow.h.
Referenced by createToolBars().
QAction* MainWindow::editTransitionParams [private] |
Definition at line 62 of file mainwindow.h.
Referenced by createActions(), and createMenus().
QAction* MainWindow::editUndo [private] |
Definition at line 50 of file mainwindow.h.
Referenced by createActions(), createMenus(), createToolBars(), and MainWindow().
QAction* MainWindow::extraGeneration [private] |
Definition at line 80 of file mainwindow.h.
Referenced by createActions(), createMenus(), createToolBars(), and setUtilsAvailable().
QAction* MainWindow::extraLaTeXTable [private] |
Definition at line 79 of file mainwindow.h.
Referenced by createActions(), createMenus(), and createToolBars().
QMenu* MainWindow::extraMenu [private] |
Definition at line 32 of file mainwindow.h.
Referenced by createMenus().
QAction* MainWindow::extraSimulation [private] |
Definition at line 81 of file mainwindow.h.
Referenced by createActions(), createMenus(), createToolBars(), and setUtilsAvailable().
QToolBar* MainWindow::extraToolBar [private] |
Definition at line 41 of file mainwindow.h.
Referenced by createToolBars().
QAction* MainWindow::fileExport [private] |
Definition at line 47 of file mainwindow.h.
Referenced by createActions(), createMenus(), and createToolBars().
QMenu* MainWindow::fileMenu [private] |
Definition at line 27 of file mainwindow.h.
Referenced by createMenus().
QAction* MainWindow::fileNew [private] |
Definition at line 43 of file mainwindow.h.
Referenced by createActions(), createMenus(), createToolBars(), and MainWindow().
QAction* MainWindow::fileOpen [private] |
Definition at line 44 of file mainwindow.h.
Referenced by createActions(), createMenus(), createToolBars(), and MainWindow().
QAction* MainWindow::fileQuit [private] |
Definition at line 48 of file mainwindow.h.
Referenced by createActions(), and createMenus().
QAction* MainWindow::fileSave [private] |
Definition at line 45 of file mainwindow.h.
Referenced by createActions(), createMenus(), createToolBars(), and MainWindow().
QAction* MainWindow::fileSaveAs [private] |
Definition at line 46 of file mainwindow.h.
Referenced by createActions(), and createMenus().
QToolBar* MainWindow::fileToolBar [private] |
Definition at line 35 of file mainwindow.h.
Referenced by createToolBars().
QAction* MainWindow::helpAbout [private] |
Definition at line 76 of file mainwindow.h.
Referenced by createActions(), and createMenus().
QAction* MainWindow::helpAboutQt [private] |
Definition at line 77 of file mainwindow.h.
Referenced by createActions(), and createMenus().
QMenu* MainWindow::helpMenu [private] |
Definition at line 33 of file mainwindow.h.
Referenced by createMenus().
QMenu* MainWindow::itemsMenu [private] |
Definition at line 29 of file mainwindow.h.
Referenced by createMenus(), and setItemsAvailable().
QAction* MainWindow::itemsSelection [private] |
Definition at line 64 of file mainwindow.h.
Referenced by actionChanged(), createActions(), createMenus(), createToolBars(), and setItemsAvailable().
QAction* MainWindow::itemsState [private] |
Definition at line 65 of file mainwindow.h.
Referenced by createActions(), createMenus(), createToolBars(), and setItemsAvailable().
QToolBar* MainWindow::itemsToolBar [private] |
Definition at line 38 of file mainwindow.h.
Referenced by createToolBars().
QAction* MainWindow::itemsTransition [private] |
Definition at line 66 of file mainwindow.h.
Referenced by createActions(), createMenus(), createToolBars(), and setItemsAvailable().
QAction* MainWindow::resetZoom [private] |
Definition at line 59 of file mainwindow.h.
Referenced by createActions(), createMenus(), and createToolBars().
QAction* MainWindow::showAntialias [private] |
Definition at line 74 of file mainwindow.h.
Referenced by createActions(), createMenus(), and createToolBars().
QAction* MainWindow::showFrame [private] |
Definition at line 73 of file mainwindow.h.
Referenced by actualizeChecking(), createActions(), createMenus(), and createToolBars().
QAction* MainWindow::showGrid [private] |
Definition at line 72 of file mainwindow.h.
Referenced by actualizeChecking(), createActions(), createMenus(), and createToolBars().
QMenu* MainWindow::showMenu [private] |
Definition at line 31 of file mainwindow.h.
Referenced by createMenus().
QToolBar* MainWindow::showToolBar [private] |
Definition at line 40 of file mainwindow.h.
Referenced by createToolBars().
QAction* MainWindow::toolsAlignStatesToGrid [private] |
Definition at line 69 of file mainwindow.h.
Referenced by createActions(), createMenus(), createToolBars(), and setToolsAvailable().
QAction* MainWindow::toolsExpandGrid [private] |
Definition at line 70 of file mainwindow.h.
Referenced by createActions(), createMenus(), and createToolBars().
QMenu* MainWindow::toolsMenu [private] |
Definition at line 30 of file mainwindow.h.
Referenced by createMenus(), and setToolsAvailable().
QAction* MainWindow::toolsSnapToGrid [private] |
Definition at line 68 of file mainwindow.h.
Referenced by createActions(), createMenus(), createToolBars(), and setToolsAvailable().
QToolBar* MainWindow::toolsToolBar [private] |
Definition at line 39 of file mainwindow.h.
Referenced by createToolBars().
QAction* MainWindow::zoomIn [private] |
Definition at line 57 of file mainwindow.h.
Referenced by createActions(), createMenus(), createToolBars(), and MainWindow().
QAction* MainWindow::zoomOut [private] |
Definition at line 58 of file mainwindow.h.
Referenced by createActions(), createMenus(), createToolBars(), and MainWindow().
QToolBar* MainWindow::zoomToolBar [private] |
Definition at line 37 of file mainwindow.h.
Referenced by createToolBars().