Merge v0.6.0 and v0.6.1 #29

Merged
dorian merged 30 commits from version/0.5.1 into master 2024-10-17 17:52:37 +02:00
4 changed files with 14 additions and 14 deletions
Showing only changes of commit 1ce24be35b - Show all commits

View file

@ -13,8 +13,8 @@ The poster offsets are (always top left of the element):
- Width: 1654 - Width: 1654
- Height: 2339 - Height: 2339
### QR-Code ### QR-Code
- Cooridnates: 276, 276 - Cooridnates: 414, 414
- Size: 1100x1100 - Size: 1650x1650
### Comp name ### Comp name
- Cooridnates: x: 216, y: 1670 - Cooridnates: x: 324, y: 2500
- Size: 44 per line; 1220 width - Size: 64 per line; 1835 width; 150 max height

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 KiB

Binary file not shown.

View file

@ -124,26 +124,26 @@ void BlueRockBackend::shareResultsAsPoster(QString url, QString compName) {
} }
// dimensions // dimensions
QRect qrCodeRect = QRect(276, 276, 1100, 1100); QRect qrCodeRect = QRect(414, 414, 1650, 1650);
int compNameTextLineHeight = 44; int compNameTextLineHeight = 64;
QFont compNameTextFont("OpenSans-Light"); QFont compNameTextFont("OpenSans-Light");
compNameTextFont.setPixelSize(compNameTextLineHeight); compNameTextFont.setPixelSize(compNameTextLineHeight);
QRect compNameTextRect = QRect( QRect compNameTextRect = QRect(
216, 324,
1670, 2500,
1220, 1835,
100 150
); );
QPdfWriter writer(&file); QPdfWriter writer(&file);
writer.setPageSize(QPageSize(QSizeF(70.02, 99.02), QPageSize::Millimeter)); writer.setPageSize(QPageSize(QPageSize::A4));
writer.setPageMargins(QMargins(0, 0, 0, 0)); writer.setPageMargins(QMargins(0, 0, 0, 0));
writer.setResolution(600); writer.setResolution(300);
QPainter painter(&writer); QPainter painter(&writer);
QPixmap background(":/PosterTemplate.png"); QPixmap posterTemplate(":/PosterTemplate.png");
painter.drawPixmap(0,0, writer.width(), writer.height(), background); painter.drawPixmap(0,0, writer.width(), writer.height(), posterTemplate);
QPixmap barcode; QPixmap barcode;
QZXingEncoderConfig encoderConfig(QZXing::EncoderFormat_QR_CODE, qrCodeRect.size(), QZXing::EncodeErrorCorrectionLevel_H, false, false); QZXingEncoderConfig encoderConfig(QZXing::EncoderFormat_QR_CODE, qrCodeRect.size(), QZXing::EncodeErrorCorrectionLevel_H, false, false);