mirror of
https://github.com/leozide/leocad.git
synced 2026-10-27 06:20:55 +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.
50 lines
984 B
C++
50 lines
984 B
C++
#include "lc_global.h"
|
|
#include "lc_categorydialog.h"
|
|
#include "ui_lc_categorydialog.h"
|
|
#include "lc_category.h"
|
|
|
|
lcCategoryDialog::lcCategoryDialog(QWidget* Parent, lcLibraryCategory* Options)
|
|
: QDialog(Parent), ui(new Ui::lcCategoryDialog)
|
|
{
|
|
ui->setupUi(this);
|
|
|
|
mOptions = Options;
|
|
|
|
if (!mOptions->Name.isEmpty())
|
|
setWindowTitle(tr("Edit Category"));
|
|
else
|
|
setWindowTitle(tr("New Category"));
|
|
|
|
ui->name->setText(mOptions->Name);
|
|
ui->keywords->setText(mOptions->Keywords);
|
|
}
|
|
|
|
lcCategoryDialog::~lcCategoryDialog()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void lcCategoryDialog::accept()
|
|
{
|
|
QString Name = ui->name->text();
|
|
|
|
if (Name.isEmpty())
|
|
{
|
|
QMessageBox::information(this, windowTitle(), tr("Name cannot be empty."));
|
|
return;
|
|
}
|
|
|
|
QString Keywords = ui->keywords->text();
|
|
|
|
if (Keywords.isEmpty())
|
|
{
|
|
QMessageBox::information(this, windowTitle(), tr("Keywords cannot be empty."));
|
|
return;
|
|
}
|
|
|
|
mOptions->Name = Name;
|
|
mOptions->Keywords = Keywords.toLatin1();
|
|
|
|
QDialog::accept();
|
|
}
|