Examples of QPen


Examples of com.trolltech.qt.gui.QPen

    }
    rows = rows-rowsToSkip.size();
    cols = cols-colsToSkip.size();
   
    //Draw dashed lines where rows/columns have been removed
    QPen missingTileLinePen = new QPen(QColor.lightGray, 2, PenStyle.DashLine);
    painter.setPen(missingTileLinePen);
    i = 0;
    for(int col : colsToSkip){
      int realCol = col - i;
      painter.drawLine(tileSize*realCol-1, 0, tileSize*realCol-1, rows*tileSize-3);
 
View Full Code Here

Examples of com.trolltech.qt.gui.QPen

 
  public void setState(GuiShapeState newState){
   
    switch (newState) {
      case VALID:
        this.setPen(new QPen(GREEN));
        if(isAnchor)
          this.setBrush(ANCHOR_GREEN);
        else
          this.setBrush(new QBrush(GREEN));
        break;
      case COLLIDING:
        this.setPen(new QPen(ORANGE));
        if(isAnchor)
          this.setBrush(ANCHOR_ORANGE);
        else
          this.setBrush(new QBrush(ORANGE));
        break;
      case INVALID:
        this.setPen(new QPen(RED));
        if(isAnchor)
          this.setBrush(ANCHOR_RED);
        else
          this.setBrush(new QBrush(RED));
        break;
View Full Code Here

Examples of com.trolltech.qt.gui.QPen

  }
 
  public void setState(GuiShapeState newState){
    switch (newState) {
      case VALID:
        this.setPen(new QPen(HMTile.GREEN));
        if(gutsHidden)
          this.setBrush(new QBrush(HMTile.GREEN));
        else
          this.setBrush(new QBrush(QColor.transparent));
        break;
      case COLLIDING:
        this.setPen(new QPen(HMTile.ORANGE));
        if(gutsHidden)
          this.setBrush(new QBrush(HMTile.ORANGE));
        else
          this.setBrush(new QBrush(QColor.transparent));
        break;
      case INVALID:
        this.setPen(new QPen(HMTile.RED));
        if(gutsHidden)
          this.setBrush(new QBrush(HMTile.RED));
        else
          this.setBrush(new QBrush(QColor.transparent));
        break;
View Full Code Here

Examples of com.trolltech.qt.gui.QPen

  private float maxDelay = Float.MIN_VALUE;
 
  public DesignTileScene(){
    super();
    currLines = new ArrayList<PathItem>();
    wirePen = new QPen(QColor.yellow, 0.75, PenStyle.SolidLine);
  }
View Full Code Here

Examples of com.trolltech.qt.gui.QPen

 
  public DesignTileScene(Device device, WireEnumerator we, boolean hideTiles, boolean drawPrimitives){
    super(device, hideTiles, drawPrimitives);
    setWireEnumerator(we);
    currLines = new ArrayList<PathItem>();
    wirePen = new QPen(QColor.yellow, 0.25, PenStyle.SolidLine);
  }
View Full Code Here

Examples of com.trolltech.qt.gui.QPen

    // Draw colored tiles onto QImage   
    qImage = new QImage(new QSize((numCols + 1) * (tileSize + 1),
        (numRows + 1) * (tileSize + 1)), Format.Format_RGB16);
    QPainter painter = new QPainter(qImage);

    painter.setPen(new QPen(QColor.black, lineWidth));
    // Draw lines between tiles
    for (int i = 0; i <= numCols; i++) {
      painter.drawLine((i) * tileSize, tileSize, (i) * tileSize,
          (numRows) * tileSize);
    }
 
View Full Code Here

Examples of com.trolltech.qt.gui.QPen

    super.mouseMoveEvent(event);
  }

  private void updateCursor() {
    if (highlit == null) {
      QPen cursorPen = new QPen(QColor.yellow, 3);
      highlit = addRect(currX * tileSize, currY * tileSize, tileSize - 2,
          tileSize - 2, cursorPen);
    } else {
      highlit.moveBy((currX - prevX) * tileSize, (currY - prevY)
          * tileSize);
 
View Full Code Here

Examples of com.trolltech.qt.gui.QPen

 
  public DeviceBrowserScene(Device device, WireEnumerator we, boolean hideTiles, boolean drawPrimitives, DeviceBrowser browser){
    super(device, hideTiles, drawPrimitives);
    setWireEnumerator(we);
    currLines = new ArrayList<QGraphicsLineItem>();
    wirePen = new QPen(QColor.yellow, 0.25, PenStyle.SolidLine);
    this.browser = browser;
  }
View Full Code Here

Examples of com.trolltech.qt.gui.QPen

      TileScene scene, Tile tile, int wire){
    super(x1, y1, x2, y2);
    this.scene = scene;
    this.tile = tile;
    this.wire = wire;
    highlighted = new QPen(QColor.red, 0.25, PenStyle.SolidLine);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.