33 #include "ui_autonumberingmanagementw.h" 73 return(former_project);
121 return(
tr(
"Général",
"configuration page title"));
135 bool modified_project =
false;
140 modified_project =
true;
144 if (
m_project -> projectProperties() != new_properties) {
145 m_project -> setProjectProperties(new_properties);
146 modified_project =
true;
148 if (modified_project) {
164 title_label_ =
new QLabel(
tr(
"Titre du projet :",
"label when configuring"));
166 title_information_ =
new QLabel(
tr(
"Ce titre sera disponible pour tous les folios de ce projet en tant que %projecttitle.",
"informative label"));
169 "Vous pouvez définir ci-dessous des propriétés personnalisées qui seront disponibles pour tous les folios de ce projet (typiquement pour les cartouches).",
182 QVBoxLayout *main_layout0 =
new QVBoxLayout();
183 QHBoxLayout *title_layout0 =
new QHBoxLayout();
186 main_layout0 -> addLayout(title_layout0);
188 main_layout0 -> addSpacing(10);
191 setLayout(main_layout0);
192 this -> setMinimumWidth(680);
209 bool is_read_only =
m_project -> isReadOnly();
235 return tr(
"Numérotation auto");
258 QTabWidget *tab_widget =
new QTabWidget(
this);
262 tab_widget->addTab(
m_amw,
tr(
"Management"));
278 tab_widget->addTab(
m_faw,
tr(
"Numérotation auto des folios"));
280 QHBoxLayout *main_layout =
new QHBoxLayout();
281 main_layout->addWidget(tab_widget);
282 setLayout(main_layout);
369 if (str ==
tr(
"Nom de la nouvelle numérotation"))
486 while (foliosRemaining > 0){
488 foliosRemaining = foliosRemaining-1;
508 if (
m_amw->
ui->m_apply_project_rb->isChecked()) {
514 from =
m_amw->
ui->m_from_folios_cb->itemData(
m_amw->
ui->m_from_folios_cb->currentIndex()).toInt();
515 to =
m_amw->
ui->m_to_folios_cb->itemData(
m_amw->
ui->m_to_folios_cb->currentIndex()).toInt();
520 if (
m_amw->
ui->m_both_conductor_rb->isChecked()) {
527 else if (
m_amw->
ui->m_new_conductor_rb->isChecked()) {
534 else if (
m_amw->
ui->m_existent_conductor_rb->isChecked()) {
541 else if (
m_amw->
ui->m_disable_conductor_rb->isChecked()) {
550 if (
m_amw->
ui->m_both_element_rb->isChecked()) {
557 else if (
m_amw->
ui->m_new_element_rb->isChecked()) {
564 else if (
m_amw->
ui->m_existent_element_rb->isChecked()) {
571 else if (
m_amw->
ui->m_disable_element_rb->isChecked()) {
579 if (
m_amw->
ui->m_both_folio_rb->isChecked()) {
582 else if (
m_amw->
ui->m_new_folio_rb->isChecked()) {
585 else if (
m_amw->
ui->m_existent_folio_rb->isChecked()) {
588 else if (
m_amw->
ui->m_disable_folio_rb->isChecked()) {
QList< Diagram * > diagrams() const
void saveContextFolio()
ProjectAutoNumConfigPage::saveContext_folio Save the current displayed folio context in project...
void applyProjectConf() override
void addFolioAutoNum(const QString &key, const NumerotationContext &context)
QETProject::addFolioAutoNum Add a new folio numerotation context. If key already exist, replace old context by the new context.
void conductorAutoNumAdded()
void folioAutoNumRemoved()
SelectAutonumW * m_saw_conductor
void setContext(QList< QString > autonums)
FolioAutonumberingW::setContext construct autonums in the comboBox selected in the QcomboBox...
void initWidgets() override
ProjectAutoNumConfigPage::initWidgets Init some widget of this page.
void saveContextConductor()
ProjectAutoNumConfigPage::saveContext_conductor Save the current displayed conductor context in proje...
void conductorAutoNumRemoved()
void autoFolioNumberingSelectedFolios(int, int, const QString &)
QETProject::autoFolioNumberingNewFolios.
QHash< QString, NumerotationContext > conductorAutoNum() const
QETProject::conductorAutoNum.
SelectAutonumW * m_saw_element
void removeContextElement()
ProjectAutoNumConfigPage::removeContextElement Remove from project the current element numerotation c...
void setCurrrentElementAutonum(QString autoNum)
QETProject::setCurrrentElementAutonum.
void adjustReadOnly() override
void freezeNewElementLabel(bool freeze, int from, int to)
QETProject::freezeNewElementLabel Freeze New Elements in the selected folios.
int newFoliosNumber()
FolioAutonumberingW::newFoliosNumber returns the number of folios to create.
void applyAutoNum()
ProjectAutoNumConfigPage::applyAutoNum Apply auto folio numbering, New Folios or Selected Folios...
Ui::AutoNumberingManagementW * ui
QString title() const override
void removeElementAutoNum(const QString &key)
QETProject::removeElementAutonum Remove Element Numerotation Context stored with key.
void autoFolioNumberingNewFolios()
QETProject::autoFolioNumberingNewFolios emit Signal to add new Diagram with autonum properties...
void saveContextElement()
ProjectAutoNumConfigPage::saveContextElement Save the current displayed Element formula in project...
SelectAutonumW * m_saw_folio
virtual void initWidgets()=0
virtual void changeToTab(int)
ProjectAutoNumConfigPage::changeToTab.
QHash< QString, NumerotationContext > folioAutoNum() const
QETProject::folioAutoNum.
void setCurrentConductorAutoNum(QString autoNum)
QETProject::setCurrentConductorAutoNum.
QETProject * m_project
Currently edited project.
QString title() const override
ProjectAutoNumConfigPage::title Title of this config page.
void initWidgets() override
ProjectMainConfigPage(QETProject *, QWidget *=nullptr)
virtual void initLayout()=0
QString projectTitle() const
void adjustReadOnly() override
ProjectAutoNumConfigPage::adjustReadOnly set this config page disable if project is read only...
~ProjectMainConfigPage() override
QIcon icon() const override
int toFolio()
FolioAutonumberingW::toFolio returns the current "To Folio" index.
void setFreezeNewElements(bool)
QETProject::setfreezeNewElements Set Project Wide freeze new elements.
int fromFolio()
FolioAutonumberingW::fromFolio returns the current "From Folio" index.
void updateContextFolio(const QString &)
ProjectAutoNumConfigPage::updateContext_folio Display the current selected context for folio...
QString autoNumSelected()
FolioAutonumberingW::autoNumSelected returns the current autonum selected.
void addConductorAutoNum(const QString &key, const NumerotationContext &context)
QETProject::addConductorAutoNum Add a new conductor numerotation context. If key already exist...
void applyConf() override
void readValuesFromProject() override
void buildConnections()
ProjectAutoNumConfigPage::buildConnections setup some connections.
ProjectAutoNumConfigPage(QETProject *project, QWidget *parent=nullptr)
ProjectAutoNumConfigPage::ProjectAutoNumConfigPage Default constructor.
QLabel * title_information_
void freezeNewConductorLabel(bool freeze, int from, int to)
QETProject::freezeNewConductorLabel Freeze New Conductors in the selected folios. ...
QComboBox * contextComboBox() const
void setFreezeNewConductors(bool)
QETProject::setfreezeNewConductors Set Project Wide freeze new conductors.
void applyManagement()
ProjectAutoNumConfigPage::applyAutoManagement Apply Management Options in Selected Folios...
void updateContextElement(const QString &)
ProjectAutoNumConfigPage::updateContextElement Display the current selected context for element...
void setContext(const NumerotationContext &context)
SelectAutonumW::setCurrentContext build the context of current diagram selected in the QcomboBox...
AutoNumberingManagementW * m_amw
void initLayout() override
void freezeExistentConductorLabel(bool freeze, int from, int to)
QETProject::freezeExistentConductorLabel Freeze Existent Conductors in the selected folios...
void removeContextConductor()
ProjectAutoNumConfigPage::removeContext Remove from project the current conductor numerotation contex...
void updateContextConductor(const QString &)
ProjectAutoNumConfigPage::updateContext_conductor Display the current selected context for conductor...
void readValuesFromProject() override
ProjectAutoNumConfigPage::readValuesFromProject Read value stored on project, and update display...
void removeContextFolio()
ProjectAutoNumConfigPage::removeContext_folio Remove from project the current folio numerotation cont...
void applyProjectConf() override
ProjectAutoNumConfigPage::applyProjectConf.
virtual QETProject * setProject(QETProject *project, bool=true)
void freezeExistentElementLabel(bool freeze, int from, int to)
QETProject::freezeExistentElementLabel Freeze Existent Elements in the selected folios.
DiagramContextWidget * project_variables_
virtual void readValuesFromProject()=0
~ProjectConfigPage() override
virtual QETProject * project() const
QLabel * project_variables_label_
QIcon icon() const override
ProjectAutoNumConfigPage::icon Icon of this config pafe.
NumerotationContext toNumContext() const
SelectAutonumW::toNumContext.
void addElementAutoNum(const QString &key, const NumerotationContext &context)
QETProject::addElementAutoNum Add a new element numerotation context. If key already exist...
QHash< QString, NumerotationContext > elementAutoNum() const
QETProject::elementAutoNum.
virtual void adjustReadOnly()=0
FolioAutonumberingW * m_faw
ProjectConfigPage(QETProject *, QWidget *=nullptr)
virtual void applyProjectConf()=0