19 XmlSettingsDialog*
OpenXSD (
const QString& title,
const QString& filename, Util::BaseSettingsManager *bsm)
21 auto lay =
new QVBoxLayout;
23 auto xsd =
new XmlSettingsDialog;
24 xsd->RegisterObject (bsm, filename);
25 lay->addWidget (xsd->GetWidget ());
27 auto bbox =
new QDialogButtonBox { QDialogButtonBox::Ok | QDialogButtonBox::Cancel };
28 lay->addWidget (bbox);
30 auto dia =
new QDialog;
33 QObject::connect (bbox,
34 &QDialogButtonBox::accepted,
36 &XmlSettingsDialog::accept);
37 QObject::connect (bbox,
38 &QDialogButtonBox::rejected,
40 &XmlSettingsDialog::reject);
41 QObject::connect (bbox,
42 &QDialogButtonBox::accepted,
45 QObject::connect (bbox,
46 &QDialogButtonBox::rejected,
50 dia->setAttribute (Qt::WA_DeleteOnClose);
51 dia->setWindowTitle (title);
59 std::shared_ptr<QSettings> settings
63 QCoreApplication::organizationName (),
64 QCoreApplication::applicationName () +
'_' + suffix
66 [] (QSettings *settings)
68 settings->endGroup ();
72 settings->beginGroup (groupName);
XmlSettingsDialog * OpenXSD(const QString &title, const QString &filename, Util::BaseSettingsManager *bsm)
Opens XML settings dialog for the given XML filename.