1
0
mirror of git://projects.qi-hardware.com/nn-usb-fpga.git synced 2025-04-21 12:27:27 +03:00

Adding bases to the code generator. Code text edit, fixing input/output ID control, etc.

This commit is contained in:
Juan64Bits
2010-11-20 16:19:34 -05:00
parent 9d578912b7
commit 2efe106cf3
29 changed files with 531 additions and 157 deletions

View File

@@ -47,6 +47,7 @@
#include <QtXml>
#include "diagramtextitem.h"
#include "arrow.h"
#include "mainwindow.h"
QT_BEGIN_NAMESPACE
class QGraphicsSceneMouseEvent;
@@ -56,8 +57,9 @@ class QGraphicsLineItem;
class QFont;
class QGraphicsTextItem;
class QColor;
class QStatusBar;
QT_END_NAMESPACE
class MainWindow;
class Arrow;
class DiagramTextItem;
@@ -68,7 +70,7 @@ class DiagramScene : public QGraphicsScene
public:
enum Mode { MoveItem , EditPolygon, InsertText };
DiagramScene(QMenu *itemMenu, QObject *parent = 0);
DiagramScene(QMenu *itemMenu, MainWindow *ownerWindow, QObject *parent=0);
QDomDocument toXmlFormat();
int fromXmlFormat(QDomDocument xmlDocument);
@@ -81,6 +83,8 @@ public:
int addTextItem(DiagramTextItem * textItem);
void removeTextItem(DiagramTextItem * textItem);
QString createPrototype();
public slots:
void setMode(Mode mode){myMode=mode;}
void editorLostFocus(DiagramTextItem *item);
@@ -116,6 +120,7 @@ private:
short int myGrid;
int myCorners;
QHash<int,DiagramTextItem*> textItemsByID;
MainWindow *myOwnerWindow;
};
#endif