public class TileScene
extends com.trolltech.qt.gui.QGraphicsScene
com.trolltech.qt.gui.QGraphicsScene.ItemIndexMethod, com.trolltech.qt.gui.QGraphicsScene.SceneLayer, com.trolltech.qt.gui.QGraphicsScene.SceneLayers
com.trolltech.qt.QSignalEmitter.AbstractSignal, com.trolltech.qt.QSignalEmitter.PrivateSignal0, com.trolltech.qt.QSignalEmitter.PrivateSignal1<A>, com.trolltech.qt.QSignalEmitter.PrivateSignal2<A,B>, com.trolltech.qt.QSignalEmitter.PrivateSignal3<A,B,C>, com.trolltech.qt.QSignalEmitter.PrivateSignal4<A,B,C,D>, com.trolltech.qt.QSignalEmitter.PrivateSignal5<A,B,C,D,E>, com.trolltech.qt.QSignalEmitter.PrivateSignal6<A,B,C,D,E,F>, com.trolltech.qt.QSignalEmitter.PrivateSignal7<A,B,C,D,E,F,G>, com.trolltech.qt.QSignalEmitter.PrivateSignal8<A,B,C,D,E,F,G,H>, com.trolltech.qt.QSignalEmitter.PrivateSignal9<A,B,C,D,E,F,G,H,I>, com.trolltech.qt.QSignalEmitter.Signal0, com.trolltech.qt.QSignalEmitter.Signal1<A>, com.trolltech.qt.QSignalEmitter.Signal2<A,B>, com.trolltech.qt.QSignalEmitter.Signal3<A,B,C>, com.trolltech.qt.QSignalEmitter.Signal4<A,B,C,D>, com.trolltech.qt.QSignalEmitter.Signal5<A,B,C,D,E>, com.trolltech.qt.QSignalEmitter.Signal6<A,B,C,D,E,F>, com.trolltech.qt.QSignalEmitter.Signal7<A,B,C,D,E,F,G>, com.trolltech.qt.QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, com.trolltech.qt.QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I>
Modifier and Type | Field and Description |
---|---|
int |
cols
Number of tile columns being referenced on the device
|
int |
currX
The current X location of the mouse
|
int |
currY
The current Y location of the mouse
|
com.trolltech.qt.gui.QPen |
cursorPen
Pen used to draw tile cursor
|
Device |
device
The device corresponding to this scene
|
Tile[][] |
drawnTiles
When hiding tiles, this contains the grid of drawn tiles
|
com.trolltech.qt.gui.QGraphicsRectItem |
highlit
The actual square used to highlight a tile
|
double |
lineWidth
Width of the lines drawn in between tiles when columns/rows are hidden
|
com.trolltech.qt.QSignalEmitter.Signal0 |
mousePressed
The signal which is made when a mouse button is pressed
|
int |
prevX
The previous X location of the mouse
|
int |
prevY
The previous Y location of the mouse
|
com.trolltech.qt.gui.QImage |
qImage
This is the actual image shown in the scene of the FPGA fabric
|
int |
rows
Number of tile rows being referenced on the device
|
com.trolltech.qt.core.QSize |
sceneSize
Qt Size container for the scene
|
HashSet<GUIModuleInst>[][] |
tileOccupantCount |
int |
tileSize
The rendered size of each Tile
|
HashMap<Tile,Integer> |
tileXMap
Gets the X coordinate of the tile in the drawnTiles grid
|
HashMap<Tile,Integer> |
tileYMap
Gets the Y coordinate of the tile in the drawnTiles grid
|
com.trolltech.qt.QSignalEmitter.Signal2<String,Tile> |
updateStatus
The signal which updates the status bar
|
Constructor and Description |
---|
TileScene()
Empty constructor
|
TileScene(Design design,
boolean hideTiles,
boolean drawPrimitives)
Creates a new tile scene with a design.
|
TileScene(Device device,
boolean hideTiles,
boolean drawPrimitives)
Creates a new tile scene with a device.
|
Modifier and Type | Method and Description |
---|---|
void |
drawBackground(com.trolltech.qt.gui.QPainter painter,
com.trolltech.qt.core.QRectF rect) |
double |
getCurrX() |
double |
getCurrY() |
Design |
getDesign() |
Device |
getDevice() |
int |
getDrawnTileX(Tile tile) |
int |
getDrawnTileY(Tile tile) |
com.trolltech.qt.core.QSize |
getSceneSize() |
Tile |
getTile(double x,
double y)
Gets the tile based on the x and y coordinates given (typically from mouse input)
|
Tile |
getTile(com.trolltech.qt.gui.QGraphicsSceneMouseEvent event)
Gets the tile based on the mouse position in the event.
|
int |
getTileSize() |
void |
initializeScene(boolean hideTiles,
boolean drawPrimitives)
Initializes the scene
|
boolean |
isUseImage() |
void |
mouseDoubleClickEvent(com.trolltech.qt.gui.QGraphicsSceneMouseEvent event) |
void |
mouseMoveEvent(com.trolltech.qt.gui.QGraphicsSceneMouseEvent event) |
void |
setDesign(Design design) |
void |
setDevice(Device device) |
void |
setUseImage(boolean useImage) |
void |
updateCurrXY(int currX,
int currY) |
void |
updateCursor() |
activeWindow, addEllipse, addEllipse, addEllipse, addEllipse, addEllipse, addEllipse, addItem, addLine, addLine, addLine, addLine, addPath, addPath, addPath, addPixmap, addPolygon, addPolygon, addPolygon, addRect, addRect, addRect, addRect, addRect, addRect, addSimpleText, addSimpleText, addText, addText, addWidget, addWidget, addWidget, advance, backgroundBrush, bspTreeDepth, clear, clearFocus, clearSelection, collidingItems, collidingItems, createItemGroup, destroyItemGroup, event, eventFilter, focusItem, font, foregroundBrush, fromNativePointer, hasFocus, height, inputMethodQuery, invalidate, invalidate, invalidate, invalidate, invalidate, invalidate, invalidate, isSortCacheEnabled, itemAt, itemAt, itemIndexMethod, items, items, items, items, items, items, items, items, items, items, itemsBoundingRect, mouseGrabberItem, palette, removeItem, render, render, render, render, sceneRect, selectedItems, selectionArea, setActiveWindow, setBackgroundBrush, setBspTreeDepth, setFocus, setFocus, setFocusItem, setFocusItem, setFont, setForegroundBrush, setItemIndexMethod, setPalette, setSceneRect, setSceneRect, setSelectionArea, setSelectionArea, setSortCacheEnabled, setStickyFocus, setStyle, stickyFocus, style, update, update, update, views, width
blockSignals, children, connectSlotsByName, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, indexOfProperty, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, properties, property, removeEventFilter, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, toString, userProperty
public com.trolltech.qt.gui.QGraphicsRectItem highlit
public com.trolltech.qt.gui.QPen cursorPen
public int currX
public int currY
public int prevX
public int prevY
public int tileSize
public int cols
public int rows
public Tile[][] drawnTiles
public HashMap<Tile,Integer> tileXMap
public HashMap<Tile,Integer> tileYMap
public double lineWidth
public Device device
public com.trolltech.qt.QSignalEmitter.Signal2<String,Tile> updateStatus
public com.trolltech.qt.QSignalEmitter.Signal0 mousePressed
public com.trolltech.qt.gui.QImage qImage
public com.trolltech.qt.core.QSize sceneSize
public HashSet<GUIModuleInst>[][] tileOccupantCount
public TileScene()
public TileScene(Design design, boolean hideTiles, boolean drawPrimitives)
design
- The design and device to associate with this scene.hideTiles
- A flag to hide/show certain tiles to make the fabric appear more homogeneous.drawPrimitives
- A flag to draw boxes to represent primitives.public TileScene(Device device, boolean hideTiles, boolean drawPrimitives)
device
- The device to associate with this scene.hideTiles
- A flag to hide/show certain tiles to make the fabric appear more homogeneous.drawPrimitives
- A flag to draw boxes to represent primitives.public com.trolltech.qt.core.QSize getSceneSize()
public boolean isUseImage()
public void setUseImage(boolean useImage)
public void initializeScene(boolean hideTiles, boolean drawPrimitives)
hideTiles
- drawPrimitives
- public void drawBackground(com.trolltech.qt.gui.QPainter painter, com.trolltech.qt.core.QRectF rect)
drawBackground
in class com.trolltech.qt.gui.QGraphicsScene
public Tile getTile(double x, double y)
x
- The x location on the screen.y
- The y location on the screen.public Tile getTile(com.trolltech.qt.gui.QGraphicsSceneMouseEvent event)
event
- The recent mouse eventpublic void mouseMoveEvent(com.trolltech.qt.gui.QGraphicsSceneMouseEvent event)
mouseMoveEvent
in class com.trolltech.qt.gui.QGraphicsScene
public void mouseDoubleClickEvent(com.trolltech.qt.gui.QGraphicsSceneMouseEvent event)
mouseDoubleClickEvent
in class com.trolltech.qt.gui.QGraphicsScene
public void updateCursor()
public void updateCurrXY(int currX, int currY)
public int getDrawnTileX(Tile tile)
public int getDrawnTileY(Tile tile)
public Design getDesign()
public void setDesign(Design design)
public Device getDevice()
public void setDevice(Device device)
public double getCurrX()
public double getCurrY()
public int getTileSize()