• Main Page
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

C:/Users/David/Documents/QtProjects/visualsc/scgraphicsview/scgraphicsview.h

Go to the documentation of this file.
00001 /*
00002     visualsc - Visual State Chart Editing for SCXML State Engines
00003     Copyright (C) 2011  David W. Drell (david@davidwdrell.net) and
00004     Contributing Authors:
00005 
00006 
00007     This program is free software: you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation, either version 3 of the License, or
00010     (at your option) any later version.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00019 */
00020 
00021 #ifndef SCGRAPHICSVIEW_H
00022 #define SCGRAPHICSVIEW_H
00023 
00024 #include "scgraphicsview_global.h"
00025 #include "scdatamodel.h"
00026 #include <QObject>
00027 #include <QGraphicsView>
00028 #include "stateattributes.h"
00029 #include "stateboxgraphic.h"
00030 #include "selectablelinesegmentgraphic.h"
00031 #include "textformattoolbar.h"
00032 #include <QMap>
00033 
00048 class SCGRAPHICSVIEWSHARED_EXPORT SCGraphicsView : QWidget
00049 {
00050       Q_OBJECT
00051 
00052 
00053 public:
00054     SCGraphicsView(QWidget *parent, SCDataModel * dm);
00055 
00056     QGraphicsView * getQGraphicsView();
00057 
00058 signals:
00059 
00060 private slots:
00061 
00062     void handleNewState(SCState * newState);
00063     void handleNewTransition(SCTransition*);
00064 
00065 private:
00066 
00067     // private data
00068 
00069     QGraphicsScene  _scene;
00070     QGraphicsView   _view;
00071     SCDataModel    *_dm;
00072     QMap<SCState*,StateBoxGraphic*> _mapStateToGraphic;
00073 
00074 
00075     //  private methods
00076 
00077     void increaseSizeOfAllAncestors (SCState * state);
00078 
00079     SCState * lookUpTargetState(QString target);
00080 
00081 
00082 };
00083 
00084 #endif // SCGRAPHICSVIEW_H

Generated on Mon Sep 26 2011 06:59:25 for visualsc by  doxygen 1.7.1