Feature/printawards - added print awards for the relays and added basic designer #1176
Feature/printawards - added print awards for the relays and added basic designer #1176lukaskett wants to merge 16 commits into
Conversation
lukaskett
commented
Jun 26, 2026
- added print awards for the relays, Podpora pro tisk diplomů u štafetových závodů #869
- added filter for the awards, Omezení kategorií při tisku diplomů #301
- fixed Tisk diplomů - špatná první stránka #422
- added basic designer that persists templates in the config table
fvacek
left a comment
There was a problem hiding this comment.
- cannot test because designer crash on exit
- please fix clang tidy errors
| ui->edFilter->setText(opts.value("classFilterText").toString()); | ||
| ui->chkClassFilterDoesntMatch->setChecked(opts.value("invertClassFilter", false).toBool()); | ||
| int ft = opts.value("classFilterType", 0).toInt(); | ||
| if (ft == 1) ui->btRegExp->setChecked(true); |
There was a problem hiding this comment.
please use always braces and body on newline with if
| halign: Frame.AlignHCenter | ||
| textStyle: myStyle.textStyleBold | ||
| text: root.eventConfig.director() | ||
| text: root.eventConfig.director |
There was a problem hiding this comment.
2026-06-28T19:53:39[reportviewwidget.cpp:78]|I| Show report: /home/fanda/b/quickbox/quickevent/app/quickevent/reports/Runs/qml/reports/awards/results_stage_awards.qml
QQmlExpression: Expression file:///home/fanda/b/quickbox/quickevent/app/quickevent/reports/Runs/qml/reports/awards/results_stage_awards.qml:142:11 depends on non-bindable properties:
Event::EventConfig::director
QQmlExpression: Expression file:///home/fanda/b/quickbox/quickevent/app/quickevent/reports/Runs/qml/reports/awards/results_stage_awards.qml:117:10 depends on non-bindable properties:
Event::EventConfig::mainReferee
file:///home/fanda/b/quickbox/quickevent/app/quickevent/reports/Runs/qml/reports/awards/results_stage_awards.qml:117: TypeError: Property 'mainReferee' of object Event::EventConfig(0x563b1c438b00) is not a function
file:///home/fanda/b/quickbox/quickevent/app/quickevent/reports/Runs/qml/reports/awards/results_stage_awards.qml:142: TypeError: Property 'director' of object Event::EventConfig(0x563b1c438b00) is not a function
| class AwardDesignerDialog; | ||
| } | ||
|
|
||
| class AwardDesignerDialog : public QDialog |
There was a problem hiding this comment.
2026-06-28T19:59:53[runsplugin.cpp:952]|I| QVariantMap Runs::RunsPlugin::printAwardsOptionsWithDialog(const QVariantMap &)
ASSERT failure in AwardDesignerScene: "Called object is not of the correct type (class destructor may have already run)", file /home/fanda/app/qt5/6.10.1/gcc_64/include/QtCore/qobjectdefs_impl.h, line 106
22:00:46: The command "/home/fanda/b/quickbox/quickevent/app/quickevent/quickevent -v tablemodel:M" terminated abnormally.
error when designer is closed
| connect(m_scene, &AwardDesignerScene::selectedItemChanged, | ||
| this, &AwardDesignerDialog::onSelectedItemChanged); | ||
|
|
||
| connect(ui->btnAddField, &QPushButton::clicked, this, &AwardDesignerDialog::onAddFieldClicked); |
There was a problem hiding this comment.
remove extra spaces everywhere please
| connect(ui->btnFitView, &QPushButton::clicked, this, [this]() { | ||
| ui->graphicsView->fitInView(m_scene->sceneRect(), Qt::KeepAspectRatio); | ||
| }); | ||
| connect(ui->btnZoomIn, &QPushButton::clicked, this, [this]() { |
There was a problem hiding this comment.
+ is not very descriptive icon for zoom-in
| AwardDesigner::Design currentDesign() const; | ||
| QString designName() const; | ||
|
|
||
| private Q_SLOTS: |
There was a problem hiding this comment.
| private Q_SLOTS: | |
| private: |
| { | ||
| QString name = ui->edDesignName->text().trimmed(); | ||
| if (name.isEmpty()) { | ||
| QMessageBox::warning(this, tr("Uložit návrh"), tr("Zadejte prosím název návrhu.")); |
There was a problem hiding this comment.
English phrases everywhere please
| return false; | ||
| } | ||
| QString key = dbKey(name); | ||
| QString json = QString::fromUtf8(QJsonDocument(toJson()).toJson(QJsonDocument::Compact)); |
| return d; | ||
| } | ||
|
|
||
| QJsonObject Item::toJson() const |
|
Report preview is not working |
|
This patch introduces new report system to QE, what is rather big change. I'm afraid that some AI solution cannot be used without some architectural discussion. I agree that QML reports are not ideal and idea of designer is beautiful, but if I commit this change, then every reports should be covered by the new system. I do not like to have awards solved by AI slop without any connection to QE reporting system, sorry. I was thinking about QE new reporting system already and if I would make decision, than I would try Typst!. https://typst.app/ Then we can generate any of current QE report (including awards) and get rid of QML. I really do not believe, that QE can be sustainably developed by applying ad-hoc AI patches without bigger plan. I also really appreciate idea of better reports system, ideally with designer. So thank you to open this topic and we can start to work on that. |
|
Printing awards is cool feature that saves time and stress in my point of view. But prepare QML template, load it and use it is too complicated at this moment. When fixing few issue I got an idea of the designer that could make it more user friendly and simply configurable. I agree that it needs more discussion, it is mainly POC to show another approach that is more focused on basic users. We can close PR or I can try to finish requested changes to start with simple designer. Let me know. I am happy that you like the idea and you were also thinking about it already👌You are the one who knows QE into details and you should decide which reporting system suits QE needs the best. |
|
What is your opinion on using Typst! for QE report rendering? |
