void ArtGameSquare::placeSquare(int col, int row, Point root) { int posX = root.x + col * _pieceSize.width + 0.5 * _pieceSize.width; int posY = root.y + row * _pieceSize.height + 0.5 * _pieceSize.height; setPosition(posX, posY); _col = col; _row = row; updateArrow(); }
void LCDScreen::displayInitialStatus( double temp, int current_cycle ) { lcd.clear(); lcd.home(); updateArrow( temp ); lcd.setCursor( 0, 1 ); lcd.print( "Cycle no. " ); lcd.print( current_cycle ); lcd.print( "/" ); lcd.print( maxCycles ); }
void widgetEventFilter(QEvent *event) { switch (event->type()) { case QEvent::Resize: updatePosition(); updateOpacity(); break; case QEvent::Move: case QEvent::Show: case QEvent::Hide: updatePosition(); updateOpacity(); updateArrow(); break; default: break; } }