19 #include "ui_autonumberingmanagementw.h" 21 #include <QMessageBox> 24 #include "ui_formulaautonumberingw.h" 36 ui =
new Ui::AutoNumberingManagementW;
38 ui->m_apply_locations_rb->setHidden(
true);
39 ui->m_selected_locations_le->setHidden(
true);
40 ui->folioWidget->setHidden(
true);
41 ui->m_selected_folios_widget->setDisabled(
true);
42 ui->m_selected_folios_le->setDisabled(
true);
43 ui->m_selected_folios_le->setReadOnly(
true);
44 ui->m_apply_project_rb->setChecked(
true);
61 ui->m_status_cb->addItem(
tr(
"Under Development"));
62 ui->m_status_cb->addItem(
tr(
"Installing"));
63 ui->m_status_cb->addItem(
tr(
"Built"));
74 ui->conductorWidget->setEnabled(
true);
75 ui->elementWidget->setEnabled(
true);
76 ui->folioWidget->setEnabled(
true);
77 ui->m_both_conductor_rb->setChecked(
true);
78 ui->m_both_element_rb->setChecked(
true);
79 ui->m_both_folio_rb->setChecked(
true);
82 else if (index == 1) {
83 ui->conductorWidget->setEnabled(
true);
84 ui->elementWidget->setEnabled(
true);
85 ui->folioWidget->setEnabled(
true);
86 ui->m_new_conductor_rb->setChecked(
true);
87 ui->m_new_element_rb->setChecked(
true);
88 ui->m_new_folio_rb->setChecked(
true);
91 else if (index == 2) {
92 ui->m_disable_conductor_rb->setChecked(
true);
93 ui->m_disable_element_rb->setChecked(
true);
94 ui->m_disable_folio_rb->setChecked(
true);
103 if (
ui->m_apply_folios_rb->isChecked()) {
104 ui->m_selected_folios_widget->setEnabled(
true);
105 ui->m_selected_folios_le->setEnabled(
true);
106 if (
ui->m_from_folios_cb->count()<=0) {
107 ui->m_from_folios_cb->clear();
108 ui->m_from_folios_cb->addItem(
"");
110 if (diagram->
title() !=
"")
115 if (
ui->m_from_folios_cb->currentIndex() > 0)
126 ui->m_to_folios_cb->clear();
127 ui->m_selected_folios_le->clear();
128 ui->m_selected_folios_le->setEnabled(
true);
130 ui->m_to_folios_cb->setEnabled(
true);
131 ui->m_to_folios_cb->addItem(
"");
139 ui->m_selected_folios_le->clear();
140 ui->m_selected_folios_le->insert(
ui->m_from_folios_cb->currentText());
151 QString from =
ui->m_from_folios_cb->currentText();
152 QString to =
ui->m_to_folios_cb->currentText();
153 ui->m_selected_folios_le->clear();
154 ui->m_selected_folios_le->insert(from +
" - " + to);
155 ui->m_selected_folios_le->setDisabled(
true);
165 ui->m_selected_folios_widget->setDisabled(
true);
166 ui->m_selected_folios_le->setDisabled(
true);
176 int answer =
ui -> buttonBox -> buttonRole(button);
179 case QDialogButtonBox::ApplyRole:
183 case QDialogButtonBox::HelpRole:
185 tr(
"In this Menu you can set whether you want the Auto Numberings to be updated or not." 186 " For Element Auto Numbering you have 4 options of Update Policy:\n" 187 "-Both: both New and Existent Element labels will be updated. This is the default option.\n" 188 "-Update Only New: only new created Elements will be updated. Existent Element labels will be frozen.\n" 189 "-Update Only Existent: only existent Elements will be updated. New Elements will be assigned " 190 "their formula but will not update once created.\n" 191 "-Disable: both New and Existent Element labels will not be updated. This is valid for new folios as well.\n" 192 "Note: These options DO NOT allow or block Auto Numberings, only their Update Policy." 205 if (
ui->m_apply_project_rb->isChecked())
206 ui -> buttonBox -> button(QDialogButtonBox::Apply) -> setEnabled(valid);
207 else if (
ui->m_apply_folios_rb->isChecked())
208 ui -> buttonBox -> button(QDialogButtonBox::Apply) -> setEnabled(valid);
211 ui -> buttonBox -> button(QDialogButtonBox::Apply) -> setEnabled(b);
QList< Diagram * > diagrams() const
void on_m_apply_project_rb_clicked()
AutoNumberingManagementW::on_m_apply_project_rb_clicked Disable folio widget.
AutoNumberingManagementW(QETProject *project, QWidget *parent=nullptr)
Ui::AutoNumberingManagementW * ui
void on_m_apply_folios_rb_clicked()
AutoNumberingManagementW::on_m_apply_folios_rb_clicked Set From Folios Combobox.
void applyEnable(bool=true)
AutoNumberingManagementW::applyEnable enable/disable the apply button.
~AutoNumberingManagementW() override
QMessageBox::StandardButton information(QWidget *, const QString &, const QString &, QMessageBox::StandardButtons=QMessageBox::Ok, QMessageBox::StandardButton=QMessageBox::NoButton)
void on_buttonBox_clicked(QAbstractButton *)
AutoNumberingManagementW::on_buttonBox_clicked Action on clicked.
void setProjectContext()
AutoNumberingManagementW::setProjectContext Add Default Project Status.
void on_m_to_folios_cb_currentIndexChanged(int)
AutoNumberingManagementW::on_m_to_folios_cb_currentIndexChanged Set selected folios Line Edit content...
void on_m_status_cb_currentIndexChanged(int)
AutoNumberingManagementW::on_m_status_cb_currentIndexChanged Load Default Status Options.
void on_m_from_folios_cb_currentIndexChanged(int)
AutoNumberingManagementW::on_m_from_folios_cb_currentIndexChanged Set To Folios Combobox.