コード例 #1
0
ResultsExporterWidget::ResultsExporterWidget(QWidget *parent)
	: Super(parent)
	, ui(new Ui::ResultsExporterWidget)
{
	setPersistentSettingsId("EmmaClientWidget");
	ui->setupUi(this);

	ui->lstOutputFormat->addItem(tr("HTML multi page"), static_cast<int>(ResultsExporterSettings::OutputFormat::HtmlMulti));
	ui->lstOutputFormat->addItem(tr("CSOS fixed column sizes"), static_cast<int>(ResultsExporterSettings::OutputFormat::CSOS));
	ui->lstOutputFormat->addItem(tr("CSV"), static_cast<int>(ResultsExporterSettings::OutputFormat::CSV));
	ui->lstOutputFormat->addItem(tr("IOF-XML 3.0"), static_cast<int>(ResultsExporterSettings::OutputFormat::IofXml3));
	ui->lstOutputFormat->setCurrentIndex(-1);

	ResultsExporter *svc = service();
	if(svc) {
		ResultsExporterSettings ss = svc->settings();
		ui->edExportDir->setText(ss.exportDir());
		ui->edExportInterval->setValue(ss.exportIntervalSec());
		ui->edWhenFinishedRunCmd->setText(ss.whenFinishedRunCmd());
		int of = ss.outputFormat();
		ui->lstOutputFormat->setCurrentIndex(ui->lstOutputFormat->findData(of));
	}

	connect(ui->btChooseExportDir, &QPushButton::clicked, this, &ResultsExporterWidget::onBtChooseExportDirClicked);
	connect(ui->btExportResults, &QPushButton::clicked, this, &ResultsExporterWidget::onBtExportResultsClicked);
}
コード例 #2
0
RunsTableDialogWidget::RunsTableDialogWidget(QWidget *parent) :
	Super(parent),
	ui(new Ui::RunsTableDialogWidget)
{
	ui->setupUi(this);

	setPersistentSettingsId("RunsTableDialogWidget");
}
コード例 #3
0
ConnectDbDialogWidget::ConnectDbDialogWidget(QWidget *parent) :
    Super(parent),
    ui(new Ui::ConnectDbDialogWidget)
{
    setPersistentSettingsId("ConnectDbDialogWidget");
    setTitle("Data storage setup");

    ui->setupUi(this);
}
コード例 #4
0
ファイル: eventdialogwidget.cpp プロジェクト: mezkov/quickbox
EventDialogWidget::EventDialogWidget(QWidget *parent) :
	Super(parent),
	ui(new Ui::EventDialogWidget)
{
	setPersistentSettingsId("EventDialogWidget");
	ui->setupUi(this);

	QRegularExpression rx("[a-z0-9_]+");
	QValidator *validator = new QRegularExpressionValidator(rx, this);
	ui->ed_eventId->setValidator(validator);
}
コード例 #5
0
ファイル: emmaclientwidget.cpp プロジェクト: xkenia/quickbox
EmmaClientWidget::EmmaClientWidget(QWidget *parent)
	: Super(parent)
	, ui(new Ui::EmmaClientWidget)
{
	setPersistentSettingsId("EmmaClientWidget");
	ui->setupUi(this);

	EmmaClient *svc = service();
	if(svc) {
		ui->edFileName->setText(svc->fileName());
	}

	connect(ui->btChooseFile, &QPushButton::clicked, this, &EmmaClientWidget::onBtChooseFileClicked);
}
コード例 #6
0
AddLegDialogWidget::AddLegDialogWidget(QWidget *parent)
	: Super(parent)
	, ui(new Ui::AddLegDialogWidget)
{
	qfLogFuncFrame() << objectName();
	ui->setupUi(this);
	setPersistentSettingsId(objectName());
	ui->tblCompetitors->setPersistentSettingsId(ui->tblCompetitors->objectName());
	ui->tblRegistrations->setPersistentSettingsId(ui->tblRegistrations->objectName());

	qf::core::model::SqlTableModel *competitors_model = new qf::core::model::SqlTableModel(this);
	//competitors_model->addColumn("relays.club", tr("Club"));
	competitors_model->addColumn("relayName", tr("Name"));
	competitors_model->addColumn("runs.leg", tr("Leg"));
	competitors_model->addColumn("competitorName", tr("Name"));
	competitors_model->addColumn("registration", tr("Reg"));
	competitors_model->addColumn("licence", tr("Lic"));
	competitors_model->addColumn("competitors.siId", tr("SI"));
	qf::core::sql::QueryBuilder qb;
	qb.select2("runs", "id, relayId, leg")
			.select2("competitors", "id, registration, licence, siId")
			.select2("classes", "name")
			.select2("relays", "classId")
			.select("COALESCE(relays.club, '') || ' ' || COALESCE(relays.name, '') AS relayName")
			.select("COALESCE(lastName, '') || ' ' || COALESCE(firstName, '') AS competitorName")
			.from("runs")
			.join("runs.competitorId", "competitors.id")
			.join("runs.relayId", "relays.id")
			.join("relays.classId", "classes.id")
			.orderBy("competitorName");//.limit(10);
	competitors_model->setQueryBuilder(qb);
	ui->tblCompetitors->setTableModel(competitors_model);
	ui->tblCompetitors->setReadOnly(true);
	competitors_model->reload();

	qf::core::model::SqlTableModel *reg_model = competitorsPlugin()->registrationsModel();
	ui->tblRegistrations->setTableModel(reg_model);
	ui->tblRegistrations->setReadOnly(true);
	connect(reg_model, &qf::core::model::SqlTableModel::reloaded, [this]() {
		ui->tblRegistrations->horizontalHeader()->resizeSections(QHeaderView::ResizeToContents);
	});

	connect(ui->edFilter, &QLineEdit::textChanged, this, &AddLegDialogWidget::onFilterTextChanged);
	connect(ui->tblCompetitors, &qf::qmlwidgets::TableView::doubleClicked, this, &AddLegDialogWidget::onCompetitorSelected);
	connect(ui->tblRegistrations, &qf::qmlwidgets::TableView::doubleClicked, this, &AddLegDialogWidget::onRegistrationSelected);
}
コード例 #7
0
ファイル: mainwindow.cpp プロジェクト: mezkov/quickbox
void MainWindow::onPluginsLoaded()
{
	{
		auto *dw = new qf::qmlwidgets::framework::DockWidget(nullptr);
		dw->setObjectName("loggingDockWidget");
		dw->setWindowTitle(tr("Application log"));
		addDockWidget(Qt::BottomDockWidgetArea, dw);
		auto *w = new LoggerWidget();
		connect(dw, &qf::qmlwidgets::framework::DockWidget::visibilityChanged, w, &LoggerWidget::onDockWidgetVisibleChanged);
		dw->setWidget(w);
		dw->hide();
		auto *a = dw->toggleViewAction();
		//a->setCheckable(true);
		a->setShortcut(QKeySequence("ctrl+shift+L"));
		menuBar()->actionForPath("view")->addActionInto(a);
	}

	centralWidget()->setActivePart("Competitors", true);
	setPersistentSettingsId("MainWindow");
	loadPersistentSettings();
}
コード例 #8
0
ファイル: examplecppqml.cpp プロジェクト: Paukert/quickbox
ExampleCppQml::ExampleCppQml(QObject *parent)
	: Super(parent), qf::qmlwidgets::framework::IPersistentSettings(this)
{
	setPersistentSettingsId("ExampleCppQml");
	connect(this, &ExampleCppQml::installed, this, &ExampleCppQml::onInstalled, Qt::QueuedConnection);
}
コード例 #9
0
ファイル: oris.cpp プロジェクト: mezkov/quickbox
Oris::Oris(QObject *parent)
    : Super(parent), qf::qmlwidgets::framework::IPersistentSettings(this)
{
    setPersistentSettingsId("Oris");
    //connect(this, &Oris::installed, this, &Oris::onInstalled, Qt::QueuedConnection);
}