diff --git a/libquickevent/libquickeventcore/src/codedef.cpp b/libquickevent/libquickeventcore/src/codedef.cpp index 6c6714116..c12014deb 100644 --- a/libquickevent/libquickeventcore/src/codedef.cpp +++ b/libquickevent/libquickeventcore/src/codedef.cpp @@ -109,6 +109,12 @@ std::optional CodeDef::codeToStartNumber(int code) return {}; } +int CodeDef::startNumberToCode(int start) +{ + return start + START_PUNCH_CODE; +} + + std::optional CodeDef::codeToFinishNumber(int code) { if(CodeDef::codeToType(code) == CodeDef::Type::Finish) diff --git a/libquickevent/libquickeventcore/src/codedef.h b/libquickevent/libquickeventcore/src/codedef.h index c733208e5..b0c32675c 100644 --- a/libquickevent/libquickeventcore/src/codedef.h +++ b/libquickevent/libquickeventcore/src/codedef.h @@ -45,6 +45,7 @@ class QUICKEVENTCORE_DECL_EXPORT CodeDef : public QVariantMap static Type codeToType(int code); static std::optional codeToStartNumber(int code); static std::optional codeToFinishNumber(int code); + static int startNumberToCode(int start); QString toString() const; }; diff --git a/libquickevent/libquickeventgui/src/reportoptionsdialog.cpp b/libquickevent/libquickeventgui/src/reportoptionsdialog.cpp index ac450a2cf..f48eaeff4 100644 --- a/libquickevent/libquickeventgui/src/reportoptionsdialog.cpp +++ b/libquickevent/libquickeventgui/src/reportoptionsdialog.cpp @@ -6,6 +6,9 @@ #include #include +#include + +#include #include #include @@ -36,14 +39,32 @@ ReportOptionsDialog::ReportOptionsDialog(QWidget *parent) ui->grpResultOptions->setVisible(false); ui->grpStartTimes->setVisible(false); ui->grpStartlistOrderBy->setVisible(false); + ui->grpClassStartSelection->setVisible(false); ui->btRegExp->setEnabled(QSqlDatabase::database().driverName().endsWith(QLatin1String("PSQL"), Qt::CaseInsensitive)); + // fill start numbers from courses + QString query_str = "SELECT codes.code FROM codes" + " ORDER BY id"; + qf::core::sql::Query q; + q.exec(query_str, qf::core::Exception::Throw); + while (q.next()) { + auto code = q.value(0).toInt(); + if(auto n = core::CodeDef::codeToStartNumber(code); n.has_value()) { + ui->cbxStartNumber->addItem(QString("Start %1").arg(n.value()),n.value()); + } + } + if (ui->cbxStartNumber->count() < 1) { + ui->grpClassStartSelection->setEnabled(false); + ui->grpClassStartSelection->setChecked(false); + ui->cbxStartNumber->clear(); + } connect(ui->btSaveAsDefault, &QPushButton::clicked, [this]() { savePersistentSettings(); }); connect(this, &ReportOptionsDialog::persistentSettingsIdChanged, [this]() { loadPersistentSettings(); }); + connect(ui->btReset, &QPushButton::clicked, this, &ReportOptionsDialog::resetPersistentSettings); connect(this, &ReportOptionsDialog::startListOptionsVisibleChanged, ui->grpStartOptions, &QGroupBox::setVisible); connect(this, &ReportOptionsDialog::classFilterVisibleChanged, ui->grpClassFilter, &QGroupBox::setVisible); @@ -56,6 +77,7 @@ ReportOptionsDialog::ReportOptionsDialog(QWidget *parent) connect(this, &ReportOptionsDialog::resultOptionsVisibleChanged, ui->grpResultOptions, &QGroupBox::setVisible); connect(this, &ReportOptionsDialog::startTimeFormatVisibleChanged, ui->grpStartTimes, &QGroupBox::setVisible); connect(this, &ReportOptionsDialog::startlistOrderFirstByVisibleChanged, ui->grpStartlistOrderBy, &QGroupBox::setVisible); + connect(this, &ReportOptionsDialog::classStartSelectionVisibleChanged, ui->grpClassStartSelection, &QGroupBox::setVisible); //connect(ui->edStagesCount, &QSpinBox::valueChanged, [this](int n) { // qfInfo() << "stage cnt value changed:" << n; @@ -86,6 +108,7 @@ void ReportOptionsDialog::setClassNamesFilter(const QStringList &class_names) ui->btClassNames->setChecked(true); ui->chkClassFilterDoesntMatch->setChecked(false); ui->edFilter->setText(class_names.join(',')); + ui->grpClassStartSelection->setChecked(false); } int ReportOptionsDialog::stagesCount() const @@ -123,13 +146,33 @@ bool ReportOptionsDialog::isStartListPrintStartNumbers() const return ui->chkStartOpts_PrintStartNumbers->isChecked(); } -QString ReportOptionsDialog::sqlWhereExpression() const +QString ReportOptionsDialog::sqlWhereExpression(const int stage_id) const { const Options opts = options(); - return sqlWhereExpression(opts); + return sqlWhereExpression(opts,stage_id); } -QString ReportOptionsDialog::sqlWhereExpression(const ReportOptionsDialog::Options &opts) +QString ReportOptionsDialog::getClassesForStartNumber(const int number, const int stage_id) +{ + QString classes; + if (number > 0) { + int start_code = core::CodeDef::startNumberToCode(number); + + QString query_str = "SELECT classes.name FROM classes, classdefs, coursecodes, codes" + " WHERE classdefs.classId = classes.id AND classdefs.courseId = coursecodes.courseId AND" + " coursecodes.position = 0 AND coursecodes.codeId = codes.id AND classdefs.stageId = %2 AND codes.code = %1"; + qf::core::sql::Query q; + q.exec(query_str.arg(start_code).arg(stage_id), qf::core::Exception::Throw); + while (q.next()) { + if (!classes.isEmpty()) + classes += ","; + classes += q.value(0).toString(); + } + } + return classes; +} + +QString ReportOptionsDialog::sqlWhereExpression(const ReportOptionsDialog::Options &opts,const int stage_id) { if(opts.isUseClassFilter()) { QString filter_str = opts.classFilter(); @@ -157,6 +200,13 @@ QString ReportOptionsDialog::sqlWhereExpression(const ReportOptionsDialog::Optio return ret; } } + + } + else if (opts.isUseClassStartSelectionFilter()) { + qf::core::String s = getClassesForStartNumber(opts.classStartNumber(),stage_id); + QStringList sl = s.splitAndTrim(','); + QString ret = QString("classes.name IN('%2')").arg(sl.join("','")); + return ret; } return QString(); } @@ -196,7 +246,6 @@ void ReportOptionsDialog::setOptions(const ReportOptionsDialog::Options &options ui->edPageHeight->setValue(options.pageHeight()); ui->edHorizontalMargin->setValue(options.horizontalMargin()); ui->edVerticalMargin->setValue(options.verticalMargin()); - //ui->chkShirinkPageWidthToColumnCount->setChecked(options.isShirinkPageWidthToColumnCount()); ui->grpClassFilter->setChecked(options.isUseClassFilter()); ui->chkClassFilterDoesntMatch->setChecked(options.isInvertClassFilter()); ui->edFilter->setText(options.classFilter()); @@ -204,6 +253,10 @@ void ReportOptionsDialog::setOptions(const ReportOptionsDialog::Options &options ui->btWildCard->setChecked(filter_type == FilterType::WildCard); ui->btRegExp->setChecked(filter_type == FilterType::RegExp); ui->btClassNames->setChecked(filter_type == FilterType::ClassName); + if (ui->grpClassStartSelection->isEnabled() && ui->grpClassStartSelection->isVisible()) + ui->grpClassStartSelection->setChecked(options.isUseClassStartSelectionFilter()); + auto index = ui->cbxStartNumber->findData(options.classStartNumber()); + ui->cbxStartNumber->setCurrentIndex(index); ui->chkStartOpts_PrintVacants->setChecked(options.isStartListPrintVacants()); ui->chkStartOpts_PrintStartNumbers->setChecked(options.isStartListPrintStartNumbers()); ui->edStartersOptionsLineSpacing->setValue(options.startersOptionsLineSpacing()); @@ -233,10 +286,11 @@ ReportOptionsDialog::Options ReportOptionsDialog::options() const opts.setPageHeight(ui->edPageHeight->value()); opts.setHorizontalMargin(ui->edHorizontalMargin->value()); opts.setVerticalMargin(ui->edVerticalMargin->value()); - //opts.setShirinkPageWidthToColumnCount(ui->chkShirinkPageWidthToColumnCount->isChecked()); opts.setUseClassFilter(ui->grpClassFilter->isChecked()); opts.setInvertClassFilter(ui->chkClassFilterDoesntMatch->isChecked()); opts.setClassFilter(ui->edFilter->text()); + opts.setClassStartNumber(ui->cbxStartNumber->currentData().toInt()); + opts.setUseClassStartSelectionFilter(ui->grpClassStartSelection->isChecked()); FilterType filter_type = ui->btWildCard->isChecked()? FilterType::WildCard: ui->btRegExp->isChecked()? FilterType::RegExp: FilterType::ClassName; opts.setClassFilterType((int)filter_type); opts.setStartListPrintVacants(isStartListPrintVacants()); @@ -329,6 +383,12 @@ ReportOptionsDialog::StartlistOrderFirstBy ReportOptionsDialog::startlistOrderFi return start_order_by; } +void ReportOptionsDialog::resetPersistentSettings() +{ + Options new_options; + setOptions(new_options); + savePersistentSettings(); +} }} diff --git a/libquickevent/libquickeventgui/src/reportoptionsdialog.h b/libquickevent/libquickeventgui/src/reportoptionsdialog.h index da73a7893..10fc1346a 100644 --- a/libquickevent/libquickeventgui/src/reportoptionsdialog.h +++ b/libquickevent/libquickeventgui/src/reportoptionsdialog.h @@ -32,6 +32,7 @@ class QUICKEVENTGUI_DECL_EXPORT ReportOptionsDialog : public QDialog, public qf: Q_PROPERTY(bool resultOptionsVisible READ isResultOptionsVisible WRITE setResultOptionsVisible NOTIFY resultOptionsVisibleChanged) Q_PROPERTY(bool startTimeFormatVisible READ isStartTimeFormatVisible WRITE setStartTimeFormatVisible NOTIFY startTimeFormatVisibleChanged) Q_PROPERTY(bool startlistOrderFirstByVisible READ isStartlistOrderFirstByVisible WRITE setStartlistOrderFirstByVisible NOTIFY startlistOrderFirstByVisibleChanged) + Q_PROPERTY(bool classStartSelectionVisible READ isClassStartSelectionVisible WRITE setClassStartSelectionVisible NOTIFY classStartSelectionVisibleChanged) QF_PROPERTY_BOOL_IMPL2(c, C, lassFilterVisible, true) QF_PROPERTY_BOOL_IMPL2(s, S, tartListOptionsVisible, false) @@ -44,6 +45,7 @@ class QUICKEVENTGUI_DECL_EXPORT ReportOptionsDialog : public QDialog, public qf: QF_PROPERTY_BOOL_IMPL2(r, R, esultOptionsVisible, false) QF_PROPERTY_BOOL_IMPL2(s, S, tartTimeFormatVisible, false) QF_PROPERTY_BOOL_IMPL2(s, S, tartlistOrderFirstByVisible, false) + QF_PROPERTY_BOOL_IMPL2(c, C, lassStartSelectionVisible, false) private: using Super = QDialog; public: @@ -62,7 +64,6 @@ class QUICKEVENTGUI_DECL_EXPORT ReportOptionsDialog : public QDialog, public qf: QF_VARIANTMAP_FIELD2(int, c, setC, olumnCount, 2) QF_VARIANTMAP_FIELD2(int, h, setH, orizontalMargin, 10) QF_VARIANTMAP_FIELD2(int, v, setV, erticalMargin, 5) - QF_VARIANTMAP_FIELD2(bool, is, set, ShirinkPageWidthToColumnCount, false) QF_VARIANTMAP_FIELD(QString, c, setC, lassFilter) QF_VARIANTMAP_FIELD2(int, c, setC, lassFilterType, 0) QF_VARIANTMAP_FIELD(bool, is, set, UseClassFilter) @@ -75,6 +76,8 @@ class QUICKEVENTGUI_DECL_EXPORT ReportOptionsDialog : public QDialog, public qf: QF_VARIANTMAP_FIELD2(bool, isR, setR, esultExcludeDisq, false) QF_VARIANTMAP_FIELD2(int, s, setS, tartTimeFormat, 0) QF_VARIANTMAP_FIELD2(int, s, setS, tartlistOrderFirstBy, 0) + QF_VARIANTMAP_FIELD(bool, is, set, UseClassStartSelectionFilter) + QF_VARIANTMAP_FIELD2(int, c, setC, lassStartNumber, 0) public: Options(const QVariantMap &o = QVariantMap()) : QVariantMap(o) {} }; @@ -100,6 +103,7 @@ class QUICKEVENTGUI_DECL_EXPORT ReportOptionsDialog : public QDialog, public qf: void loadPersistentSettings(const Options &default_options); Q_SLOT void loadPersistentSettings(); Q_SLOT void savePersistentSettings(); + Q_SLOT void resetPersistentSettings(); void setClassNamesFilter(const QStringList &class_names); @@ -117,8 +121,9 @@ class QUICKEVENTGUI_DECL_EXPORT ReportOptionsDialog : public QDialog, public qf: Q_INVOKABLE bool isBreakAfterEachClass() const {return breakType() != BreakType::None;} Q_INVOKABLE bool isColumnBreak() const {return breakType() == BreakType::Column;} Q_INVOKABLE int resultNumPlaces() const; - Q_INVOKABLE QString sqlWhereExpression() const; - static QString sqlWhereExpression(const Options &opts); + Q_INVOKABLE QString sqlWhereExpression(const int stage_id = 1) const; + static QString sqlWhereExpression(const Options &opts, const int stage_id); + static QString getClassesForStartNumber(const int number, const int stage_id); protected: //void showEvent(QShowEvent *event) Q_DECL_OVERRIDE; private: diff --git a/libquickevent/libquickeventgui/src/reportoptionsdialog.ui b/libquickevent/libquickeventgui/src/reportoptionsdialog.ui index 88311eec8..fa777ccf2 100644 --- a/libquickevent/libquickeventgui/src/reportoptionsdialog.ui +++ b/libquickevent/libquickeventgui/src/reportoptionsdialog.ui @@ -91,13 +91,10 @@ 5 - - - - Posix regular expression - + + - RegExp + Doesn't match @@ -114,10 +111,13 @@ - - + + + + Posix regular expression + - Doesn't match + RegExp @@ -137,6 +137,28 @@ + + + + Class filter - start number selection + + + true + + + + + + Use only class from selected start + + + + + + + + + @@ -507,6 +529,13 @@ + + + + Reset + + + @@ -523,16 +552,25 @@ edStagesCount + edLegsCount grpClassFilter btWildCard btRegExp btClassNames edFilter chkClassFilterDoesntMatch + grpClassStartSelection + cbxStartNumber edNumPlaces + chkExcludeDisq edStartersOptionsLineSpacing chkStartOpts_PrintVacants chkStartOpts_PrintStartNumbers + btStartTimes1 + btStartTimes2 + btStartOrder1 + btStartOrder2 + btStartOrder3 edPageWidth edHorizontalMargin edColumnCount @@ -540,6 +578,7 @@ edVerticalMargin cbxBreakAfterClassType btSaveAsDefault + btReset diff --git a/quickevent/app/quickevent/plugins/Relays/qml/reports/results.qml b/quickevent/app/quickevent/plugins/Relays/qml/reports/results.qml index e6fb0cde6..6cc3dd7aa 100644 --- a/quickevent/app/quickevent/plugins/Relays/qml/reports/results.qml +++ b/quickevent/app/quickevent/plugins/Relays/qml/reports/results.qml @@ -64,8 +64,8 @@ Report { } textStyle: myStyle.textStyleDefault - width: root.options.isShirinkPageWidthToColumnCount? 210/2*root.options.columnCount: 210 - height: 297 + width: root.options.pageWidth? root.options.pageWidth: 210 + height: root.options.pageHeight? root.options.pageHeight: 297 hinset: root.options.horizontalMargin? root.options.horizontalMargin: 10 vinset: root.options.verticalMargin? root.options.verticalMargin: 5 Frame { diff --git a/quickevent/app/quickevent/plugins/Relays/qml/reports/results_condensed.qml b/quickevent/app/quickevent/plugins/Relays/qml/reports/results_condensed.qml index 0b242565b..45d6e446b 100644 --- a/quickevent/app/quickevent/plugins/Relays/qml/reports/results_condensed.qml +++ b/quickevent/app/quickevent/plugins/Relays/qml/reports/results_condensed.qml @@ -64,8 +64,8 @@ Report { } textStyle: myStyle.textStyleDefault - width: root.options.isShirinkPageWidthToColumnCount? 210/2*root.options.columnCount: 210 - height: 297 + width: root.options.pageWidth? root.options.pageWidth: 210 + height: root.options.pageHeight? root.options.pageHeight: 297 hinset: root.options.horizontalMargin? root.options.horizontalMargin: 10 vinset: root.options.verticalMargin? root.options.verticalMargin: 5 Frame { diff --git a/quickevent/app/quickevent/plugins/Relays/qml/reports/startList_classes.qml b/quickevent/app/quickevent/plugins/Relays/qml/reports/startList_classes.qml index 5833f1f42..7addc9bc2 100644 --- a/quickevent/app/quickevent/plugins/Relays/qml/reports/startList_classes.qml +++ b/quickevent/app/quickevent/plugins/Relays/qml/reports/startList_classes.qml @@ -32,8 +32,8 @@ Report { } textStyle: myStyle.textStyleDefault - width: root.options.isShirinkPageWidthToColumnCount? 210/2*root.options.columnCount: 210 - height: 297 + width: root.options.pageWidth? root.options.pageWidth: 210 + height: root.options.pageHeight? root.options.pageHeight: 297 hinset: root.options.horizontalMargin? root.options.horizontalMargin: 10 vinset: root.options.verticalMargin? root.options.verticalMargin: 5 Frame { diff --git a/quickevent/app/quickevent/plugins/Relays/qml/reports/startList_clubs.qml b/quickevent/app/quickevent/plugins/Relays/qml/reports/startList_clubs.qml index 62f752c0b..66186e7af 100644 --- a/quickevent/app/quickevent/plugins/Relays/qml/reports/startList_clubs.qml +++ b/quickevent/app/quickevent/plugins/Relays/qml/reports/startList_clubs.qml @@ -32,8 +32,8 @@ Report { } textStyle: myStyle.textStyleDefault - width: root.options.isShirinkPageWidthToColumnCount? 210/2*root.options.columnCount: 210 - height: 297 + width: root.options.pageWidth? root.options.pageWidth: 210 + height: root.options.pageHeight? root.options.pageHeight: 297 hinset: root.options.horizontalMargin? root.options.horizontalMargin: 10 vinset: root.options.verticalMargin? root.options.verticalMargin: 5 Frame { diff --git a/quickevent/app/quickevent/plugins/Runs/qml/reports/competitorsWithCardRent.qml b/quickevent/app/quickevent/plugins/Runs/qml/reports/competitorsWithCardRent.qml index 6a32cf9b3..e38e47a20 100644 --- a/quickevent/app/quickevent/plugins/Runs/qml/reports/competitorsWithCardRent.qml +++ b/quickevent/app/quickevent/plugins/Runs/qml/reports/competitorsWithCardRent.qml @@ -8,6 +8,7 @@ Report { id: root objectName: "root" + property var options property string reportTitle: qsTr("Competitors with rented cards in stage %1").arg(stageId); property var stageId @@ -19,10 +20,10 @@ Report { } textStyle: myStyle.textStyleDefault - width: 210 - height: 297 - hinset: 5 - vinset: 5 + width: root.options.pageWidth? root.options.pageWidth: 210 + height: root.options.pageHeight? root.options.pageHeight: 297 + hinset: root.options.horizontalMargin? root.options.horizontalMargin: 10 + vinset: root.options.verticalMargin? root.options.verticalMargin: 5 Frame { width: "%" height: "%" diff --git a/quickevent/app/quickevent/plugins/Runs/qml/reports/results_nstages.qml b/quickevent/app/quickevent/plugins/Runs/qml/reports/results_nstages.qml index 5e53c1912..a9fc23453 100644 --- a/quickevent/app/quickevent/plugins/Runs/qml/reports/results_nstages.qml +++ b/quickevent/app/quickevent/plugins/Runs/qml/reports/results_nstages.qml @@ -82,10 +82,10 @@ Report { } textStyle: myStyle.textStyleDefault - width: 210 - height: 297 - hinset: 5 - vinset: 5 + width: root.options.pageWidth? root.options.pageWidth: 210 + height: root.options.pageHeight? root.options.pageHeight: 297 + hinset: root.options.horizontalMargin? root.options.horizontalMargin: 10 + vinset: root.options.verticalMargin? root.options.verticalMargin: 5 Frame { width: "%" height: "%" diff --git a/quickevent/app/quickevent/plugins/Runs/qml/reports/results_nstagesSpeaker.qml b/quickevent/app/quickevent/plugins/Runs/qml/reports/results_nstagesSpeaker.qml index c164a7e43..715f7fdba 100644 --- a/quickevent/app/quickevent/plugins/Runs/qml/reports/results_nstagesSpeaker.qml +++ b/quickevent/app/quickevent/plugins/Runs/qml/reports/results_nstagesSpeaker.qml @@ -7,6 +7,7 @@ import "qrc:/quickevent/core/js/ogtime.js" as OGTime Report { id: root + property var options property int stagesCount: 1 //property bool excludeDisqualified: true @@ -79,10 +80,10 @@ Report { } textStyle: myStyle.textStyleDefault - width: 210 - height: 297 - hinset: 5 - vinset: 5 + width: root.options.pageWidth? root.options.pageWidth: 210 + height: root.options.pageHeight? root.options.pageHeight: 297 + hinset: root.options.horizontalMargin? root.options.horizontalMargin: 10 + vinset: root.options.verticalMargin? root.options.verticalMargin: 5 Frame { width: "%" height: "%" diff --git a/quickevent/app/quickevent/plugins/Runs/qml/reports/startList_starters.qml b/quickevent/app/quickevent/plugins/Runs/qml/reports/startList_starters.qml index 6b0d62631..8365181c3 100644 --- a/quickevent/app/quickevent/plugins/Runs/qml/reports/startList_starters.qml +++ b/quickevent/app/quickevent/plugins/Runs/qml/reports/startList_starters.qml @@ -31,8 +31,8 @@ Report { } textStyle: myStyle.textStyleDefault - width: root.options.isShirinkPageWidthToColumnCount? 210 / 2 * root.options.columnCount: 210 - height: 297 + width: root.options.pageWidth? root.options.pageWidth: 210 + height: root.options.pageHeight? root.options.pageHeight: 297 hinset: root.options.horizontalMargin? root.options.horizontalMargin: 10 vinset: root.options.verticalMargin? root.options.verticalMargin: 5 Frame { diff --git a/quickevent/app/quickevent/plugins/Runs/src/eventstatisticswidget.cpp b/quickevent/app/quickevent/plugins/Runs/src/eventstatisticswidget.cpp index d3fab2075..15fa50da1 100644 --- a/quickevent/app/quickevent/plugins/Runs/src/eventstatisticswidget.cpp +++ b/quickevent/app/quickevent/plugins/Runs/src/eventstatisticswidget.cpp @@ -560,7 +560,7 @@ void EventStatisticsWidget::printResultsForRows(const QList &rows) opts.setClassFilterType((int)quickevent::gui::ReportOptionsDialog::FilterType::ClassName); opts.setClassFilter(class_names.join(',')); } - QVariant td = getPlugin()->currentStageResultsTableData(quickevent::gui::ReportOptionsDialog::sqlWhereExpression(opts)); + QVariant td = getPlugin()->currentStageResultsTableData(quickevent::gui::ReportOptionsDialog::sqlWhereExpression(opts, getPlugin()->currentStageId())); QVariantMap props; props["isBreakAfterEachClass"] = (opts.breakType() != (int)quickevent::gui::ReportOptionsDialog::BreakType::None); props["isColumnBreak"] = (opts.breakType() == (int)quickevent::gui::ReportOptionsDialog::BreakType::Column); diff --git a/quickevent/app/quickevent/plugins/Runs/src/runsplugin.cpp b/quickevent/app/quickevent/plugins/Runs/src/runsplugin.cpp index bded984d1..bedea8280 100644 --- a/quickevent/app/quickevent/plugins/Runs/src/runsplugin.cpp +++ b/quickevent/app/quickevent/plugins/Runs/src/runsplugin.cpp @@ -1433,8 +1433,9 @@ void RunsPlugin::report_startListClasses() dlg.setStartListOptionsVisible(true); dlg.setPageLayoutVisible(true); dlg.setStartTimeFormatVisible(true); + dlg.setClassStartSelectionVisible(true); if(dlg.exec()) { - auto tt = startListClassesTable(dlg.sqlWhereExpression(), dlg.isStartListPrintVacants(), dlg.startTimeFormat()); + auto tt = startListClassesTable(dlg.sqlWhereExpression(getPlugin()->currentStageId()), dlg.isStartListPrintVacants(), dlg.startTimeFormat()); auto opts = dlg.optionsMap(); QVariantMap props; props["options"] = opts; @@ -1486,8 +1487,9 @@ void RunsPlugin::report_startListStarters() dlg.setStartListOptionsVisible(true); dlg.setStartListPrintVacantsVisible(false); dlg.setStartersOptionsVisible(true); + dlg.setClassStartSelectionVisible(true); if(dlg.exec()) { - auto tt = startListStartersTable(dlg.sqlWhereExpression()); + auto tt = startListStartersTable(dlg.sqlWhereExpression(getPlugin()->currentStageId())); auto opts = dlg.optionsMap(); QVariantMap props; props["options"] = opts;