mirror of
https://github.com/leozide/leocad.git
synced 2026-10-26 22:10:32 +00:00
Replace generic application and error titles with the operation that triggered the message. Reuse translated dialog titles for validation and render errors, preserve the current submodel naming action, and label edge-color prompts. Require callers of the shared Blender message helper to provide a title so installation, updates, extraction, settings, and output messages identify their action instead of falling back to a product name. Refresh all eight language catalogs and supply new title translations as unfinished drafts with provenance comments. Preserve existing translations and their review status, with drafts still included in release catalogs. Validation: Qt 6.10 debug build; source and catalog coverage for all 2,058 active messages; existing translation preservation and generic-title checks; runtime translation and plural checks; git diff --check.
73 lines
2.3 KiB
C++
73 lines
2.3 KiB
C++
#include "lc_global.h"
|
|
#include "lc_htmldialog.h"
|
|
#include "ui_lc_htmldialog.h"
|
|
#include "project.h"
|
|
|
|
lcHTMLDialog::lcHTMLDialog(QWidget* Parent, lcHTMLExportOptions* Options)
|
|
: QDialog(Parent), ui(new Ui::lcHTMLDialog)
|
|
{
|
|
ui->setupUi(this);
|
|
|
|
connect(ui->outputFolderBrowse, &QPushButton::clicked, this, &lcHTMLDialog::OutputFolderBrowseClicked);
|
|
|
|
ui->stepWidth->setValidator(new QIntValidator(0, 2048, ui->stepWidth));
|
|
ui->stepHeight->setValidator(new QIntValidator(0, 2048, ui->stepHeight));
|
|
|
|
mOptions = Options;
|
|
|
|
ui->outputFolder->setText(QDir::toNativeSeparators(mOptions->PathName));
|
|
|
|
if (mOptions->CurrentOnly)
|
|
ui->currentModelOnly->setChecked(true);
|
|
else if (mOptions->SubModels)
|
|
ui->currentModelSubmodels->setChecked(true);
|
|
else
|
|
ui->allModels->setChecked(true);
|
|
|
|
ui->transparentImages->setChecked(mOptions->TransparentImages);
|
|
ui->singlePage->setChecked(mOptions->SinglePage);
|
|
ui->oneStepPerPage->setChecked(!mOptions->SinglePage);
|
|
ui->indexPage->setChecked(mOptions->SinglePage);
|
|
ui->stepWidth->setText(QString::number(mOptions->StepImagesWidth));
|
|
ui->stepHeight->setText(QString::number(mOptions->StepImagesHeight));
|
|
ui->partsAfterEachStep->setChecked(mOptions->PartsListStep);
|
|
ui->partsAtTheEnd->setChecked(mOptions->PartsListEnd);
|
|
}
|
|
|
|
lcHTMLDialog::~lcHTMLDialog()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void lcHTMLDialog::accept()
|
|
{
|
|
QString pathName = ui->outputFolder->text();
|
|
|
|
if (pathName.isEmpty())
|
|
{
|
|
QMessageBox::information(this, tr("Export HTML"), tr("Output folder cannot be empty."));
|
|
return;
|
|
}
|
|
|
|
mOptions->PathName = pathName;
|
|
mOptions->SubModels = ui->currentModelSubmodels->isChecked();
|
|
mOptions->CurrentOnly = ui->currentModelOnly->isChecked();
|
|
mOptions->TransparentImages = ui->transparentImages->isChecked();
|
|
mOptions->SinglePage = ui->singlePage->isChecked();
|
|
mOptions->IndexPage = ui->indexPage->isChecked();
|
|
mOptions->StepImagesWidth = ui->stepWidth->text().toInt();
|
|
mOptions->StepImagesHeight = ui->stepHeight->text().toInt();
|
|
mOptions->PartsListStep = ui->partsAfterEachStep->isChecked();
|
|
mOptions->PartsListEnd = ui->partsAtTheEnd->isChecked();
|
|
|
|
QDialog::accept();
|
|
}
|
|
|
|
void lcHTMLDialog::OutputFolderBrowseClicked()
|
|
{
|
|
QString result = QFileDialog::getExistingDirectory(this, tr("Select Output Folder"), ui->outputFolder->text());
|
|
|
|
if (!result.isEmpty())
|
|
ui->outputFolder->setText(QDir::toNativeSeparators(result));
|
|
}
|