mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 14:50:53 +01:00
Added AutoNumbering Management Tab. Update Policy support to Element.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4585 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
#include "diagrameventinterface.h"
|
#include "diagrameventinterface.h"
|
||||||
#include "qetapp.h"
|
#include "qetapp.h"
|
||||||
#include "elementcollectionhandler.h"
|
#include "elementcollectionhandler.h"
|
||||||
|
#include "element.h"
|
||||||
|
|
||||||
const int Diagram::xGrid = 10;
|
const int Diagram::xGrid = 10;
|
||||||
const int Diagram::yGrid = 10;
|
const int Diagram::yGrid = 10;
|
||||||
@@ -57,7 +58,8 @@ Diagram::Diagram(QETProject *project) :
|
|||||||
use_border_ (true),
|
use_border_ (true),
|
||||||
draw_terminals_ (true),
|
draw_terminals_ (true),
|
||||||
draw_colored_conductors_ (true),
|
draw_colored_conductors_ (true),
|
||||||
m_event_interface (nullptr)
|
m_event_interface (nullptr),
|
||||||
|
m_freeze_new_elements_ (false)
|
||||||
{
|
{
|
||||||
setProject(project);
|
setProject(project);
|
||||||
qgi_manager_ = new QGIManager(this);
|
qgi_manager_ = new QGIManager(this);
|
||||||
@@ -467,6 +469,9 @@ QDomDocument Diagram::toXml(bool whole_content) {
|
|||||||
if (!m_conductors_autonum_name.isEmpty()) {
|
if (!m_conductors_autonum_name.isEmpty()) {
|
||||||
racine.setAttribute("conductorAutonum", m_conductors_autonum_name);
|
racine.setAttribute("conductorAutonum", m_conductors_autonum_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Default New Element
|
||||||
|
racine.setAttribute("freezeNewElement", m_freeze_new_elements_ ? "true" : "false");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//this method with whole_content to false,
|
//this method with whole_content to false,
|
||||||
@@ -649,6 +654,9 @@ bool Diagram::fromXml(QDomElement &document, QPointF position, bool consider_inf
|
|||||||
|
|
||||||
// Load the autonum
|
// Load the autonum
|
||||||
m_conductors_autonum_name = root.attribute("conductorAutonum");
|
m_conductors_autonum_name = root.attribute("conductorAutonum");
|
||||||
|
|
||||||
|
// Load Freeze New Element
|
||||||
|
m_freeze_new_elements_ = root.attribute("freezeNewElement").toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
// if child haven't got a child, loading is finish (diagram is empty)
|
// if child haven't got a child, loading is finish (diagram is empty)
|
||||||
@@ -1156,6 +1164,50 @@ bool Diagram::usesTitleBlockTemplate(const QString &name) {
|
|||||||
return(name == border_and_titleblock.titleBlockTemplateName());
|
return(name == border_and_titleblock.titleBlockTemplateName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Diagram::freezeElements
|
||||||
|
* Freeze every existent element label.
|
||||||
|
*/
|
||||||
|
void Diagram::freezeElements() {
|
||||||
|
foreach (Element *elmt, elements()) {
|
||||||
|
elmt->freezeLabel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Diagram::unfreezeElements
|
||||||
|
* Unfreeze every existent element label.
|
||||||
|
*/
|
||||||
|
void Diagram::unfreezeElements() {
|
||||||
|
foreach (Element *elmt, elements()) {
|
||||||
|
elmt->unfreezeLabel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Diagram::freezeNew
|
||||||
|
* Set new element label to be frozen.
|
||||||
|
*/
|
||||||
|
void Diagram::freezeNew() {
|
||||||
|
m_freeze_new_elements_ = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Diagram::unfreezeNew
|
||||||
|
* Set new element label to not be frozen.
|
||||||
|
*/
|
||||||
|
void Diagram::unfreezeNew() {
|
||||||
|
m_freeze_new_elements_ = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Diagram::freezeNewElements
|
||||||
|
* @return current freeze new element status .
|
||||||
|
*/
|
||||||
|
bool Diagram::freezeNewElements() {
|
||||||
|
return m_freeze_new_elements_;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Diagram::adjustSceneRect
|
* @brief Diagram::adjustSceneRect
|
||||||
* Recalcul and adjust the size of the scene
|
* Recalcul and adjust the size of the scene
|
||||||
|
|||||||
@@ -103,6 +103,8 @@ class Diagram : public QGraphicsScene
|
|||||||
QString m_conductors_autonum_name;
|
QString m_conductors_autonum_name;
|
||||||
DiagramEventInterface *m_event_interface;
|
DiagramEventInterface *m_event_interface;
|
||||||
|
|
||||||
|
bool m_freeze_new_elements_;
|
||||||
|
|
||||||
// METHODS
|
// METHODS
|
||||||
protected:
|
protected:
|
||||||
virtual void drawBackground(QPainter *, const QRectF &);
|
virtual void drawBackground(QPainter *, const QRectF &);
|
||||||
@@ -200,6 +202,12 @@ class Diagram : public QGraphicsScene
|
|||||||
QUndoStack &undoStack();
|
QUndoStack &undoStack();
|
||||||
QGIManager &qgiManager();
|
QGIManager &qgiManager();
|
||||||
|
|
||||||
|
void freezeElements();
|
||||||
|
void unfreezeElements();
|
||||||
|
void freezeNew();
|
||||||
|
void unfreezeNew();
|
||||||
|
bool freezeNewElements();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void adjustSceneRect ();
|
void adjustSceneRect ();
|
||||||
void titleChanged(const QString &);
|
void titleChanged(const QString &);
|
||||||
|
|||||||
@@ -234,5 +234,6 @@ void DiagramEventAddElement::addElement()
|
|||||||
};
|
};
|
||||||
m_diagram -> undoStack().push(undo_object);
|
m_diagram -> undoStack().push(undo_object);
|
||||||
element->setSeq();
|
element->setSeq();
|
||||||
|
element->freezeNewAddedElement();
|
||||||
element->updateLabel();
|
element->updateLabel();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,9 @@
|
|||||||
#include "numerotationcontext.h"
|
#include "numerotationcontext.h"
|
||||||
#include "folioautonumbering.h"
|
#include "folioautonumbering.h"
|
||||||
#include "elementautonumberingw.h"
|
#include "elementautonumberingw.h"
|
||||||
|
#include "autonumberingmanagementw.h"
|
||||||
|
#include "ui_autonumberingmanagementw.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Constructor
|
Constructor
|
||||||
@param project Project this page is editing.
|
@param project Project this page is editing.
|
||||||
@@ -255,6 +258,9 @@ void ProjectAutoNumConfigPage::initWidgets() {
|
|||||||
|
|
||||||
tab_widget = new QTabWidget(this);
|
tab_widget = new QTabWidget(this);
|
||||||
|
|
||||||
|
management_tab_widget = new QWidget(this);
|
||||||
|
m_amw = new AutoNumberingManagementW(project(), management_tab_widget);
|
||||||
|
|
||||||
//Conductor Tab
|
//Conductor Tab
|
||||||
conductor_tab_widget = new QWidget(this);
|
conductor_tab_widget = new QWidget(this);
|
||||||
conductor_tab_widget->setObjectName("ConductorTab");
|
conductor_tab_widget->setObjectName("ConductorTab");
|
||||||
@@ -314,6 +320,9 @@ void ProjectAutoNumConfigPage::initWidgets() {
|
|||||||
*/
|
*/
|
||||||
void ProjectAutoNumConfigPage::initLayout() {
|
void ProjectAutoNumConfigPage::initLayout() {
|
||||||
|
|
||||||
|
//Management Tab
|
||||||
|
tab_widget->addTab(management_tab_widget, tr("Management"));
|
||||||
|
|
||||||
//Conductor Tab
|
//Conductor Tab
|
||||||
tab_widget->addTab(conductor_tab_widget, tr("Conductor"));
|
tab_widget->addTab(conductor_tab_widget, tr("Conductor"));
|
||||||
|
|
||||||
@@ -365,7 +374,7 @@ void ProjectAutoNumConfigPage::initLayout() {
|
|||||||
//Auto Numbering Tab
|
//Auto Numbering Tab
|
||||||
tab_widget->addTab(autoNumbering_tab_widget,tr ("Folio Auto Numbering"));
|
tab_widget->addTab(autoNumbering_tab_widget,tr ("Folio Auto Numbering"));
|
||||||
|
|
||||||
tab_widget->resize(465,590);
|
tab_widget->resize(540,590);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -410,20 +419,26 @@ void ProjectAutoNumConfigPage::buildConnections() {
|
|||||||
|
|
||||||
connect(tab_widget,SIGNAL(currentChanged(int)),this,SLOT(tabChanged(int)));
|
connect(tab_widget,SIGNAL(currentChanged(int)),this,SLOT(tabChanged(int)));
|
||||||
|
|
||||||
|
//Management Tab
|
||||||
|
connect (m_amw, SIGNAL(applyPressed()), this, SLOT(applyManagement()));
|
||||||
|
|
||||||
//Conductor Tab
|
//Conductor Tab
|
||||||
connect (m_context_cb_conductor, SIGNAL (currentTextChanged(QString)), m_saw_conductor, SLOT(applyEnableOnContextChanged(QString)));
|
connect (m_context_cb_conductor, SIGNAL (currentTextChanged(QString)), m_saw_conductor, SLOT (applyEnableOnContextChanged(QString)));
|
||||||
|
connect (m_context_cb_conductor, SIGNAL (currentTextChanged(QString)), this, SLOT (updateContext_conductor(QString)));
|
||||||
connect (m_context_cb_conductor, SIGNAL (currentIndexChanged(QString)), this, SLOT (updateContext_conductor(QString)));
|
connect (m_context_cb_conductor, SIGNAL (currentIndexChanged(QString)), this, SLOT (updateContext_conductor(QString)));
|
||||||
connect (m_saw_conductor, SIGNAL (applyPressed()), this, SLOT (saveContext_conductor()));
|
connect (m_saw_conductor, SIGNAL (applyPressed()), this, SLOT (saveContext_conductor()));
|
||||||
connect (m_remove_pb_conductor, SIGNAL (clicked()), this, SLOT (removeContext_conductor()));
|
connect (m_remove_pb_conductor, SIGNAL (clicked()), this, SLOT (removeContext_conductor()));
|
||||||
|
|
||||||
//Element Tab
|
//Element Tab
|
||||||
connect (m_context_cb_element, SIGNAL (currentTextChanged(QString)), m_saw_element, SLOT(applyEnableOnContextChanged(QString)));
|
connect (m_context_cb_element, SIGNAL (currentTextChanged(QString)), m_saw_element, SLOT(applyEnableOnContextChanged(QString)));
|
||||||
|
connect (m_context_cb_element, SIGNAL (currentTextChanged(QString)), this, SLOT (updateContext_element(QString)));
|
||||||
connect (m_context_cb_element, SIGNAL (currentIndexChanged(QString)), this, SLOT (updateContext_element(QString)));
|
connect (m_context_cb_element, SIGNAL (currentIndexChanged(QString)), this, SLOT (updateContext_element(QString)));
|
||||||
connect (m_saw_element, SIGNAL (applyPressed()), this, SLOT (saveContext_element()));
|
connect (m_saw_element, SIGNAL (applyPressed()), this, SLOT (saveContext_element()));
|
||||||
connect (m_remove_pb_element, SIGNAL (clicked()), this, SLOT (removeContext_element()));
|
connect (m_remove_pb_element, SIGNAL (clicked()), this, SLOT (removeContext_element()));
|
||||||
|
|
||||||
//Folio Tab
|
//Folio Tab
|
||||||
connect (m_context_cb_folio, SIGNAL (currentTextChanged(QString)), m_saw_folio, SLOT(applyEnableOnContextChanged(QString)));
|
connect (m_context_cb_folio, SIGNAL (currentTextChanged(QString)), m_saw_folio, SLOT(applyEnableOnContextChanged(QString)));
|
||||||
|
connect (m_context_cb_folio, SIGNAL (currentTextChanged(QString)), this, SLOT (updateContext_folio(QString)));
|
||||||
connect (m_context_cb_folio, SIGNAL (currentIndexChanged(QString)), this, SLOT (updateContext_folio(QString)));
|
connect (m_context_cb_folio, SIGNAL (currentIndexChanged(QString)), this, SLOT (updateContext_folio(QString)));
|
||||||
connect (m_saw_folio, SIGNAL (applyPressed()), this, SLOT (saveContext_folio()));
|
connect (m_saw_folio, SIGNAL (applyPressed()), this, SLOT (saveContext_folio()));
|
||||||
connect (m_remove_pb_folio, SIGNAL (clicked()), this, SLOT (removeContext_folio()));
|
connect (m_remove_pb_folio, SIGNAL (clicked()), this, SLOT (removeContext_folio()));
|
||||||
@@ -562,6 +577,84 @@ void ProjectAutoNumConfigPage::applyAutoNum() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ProjectAutoNumConfigPage::applyAutoManagement
|
||||||
|
* Apply Management Options in Selected Folios
|
||||||
|
*/
|
||||||
|
void ProjectAutoNumConfigPage::applyManagement() {
|
||||||
|
int from;
|
||||||
|
int to;
|
||||||
|
//Apply to Entire Project
|
||||||
|
if (m_amw->ui->m_apply_project_rb->isChecked()) {
|
||||||
|
from = 0;
|
||||||
|
to = project()->diagrams().size() - 1;
|
||||||
|
}
|
||||||
|
//Apply to selected Folios
|
||||||
|
else {
|
||||||
|
from = m_amw->ui->m_from_folios_cb->itemData(m_amw->ui->m_from_folios_cb->currentIndex()).toInt();
|
||||||
|
to = m_amw->ui->m_to_folios_cb->itemData(m_amw->ui->m_to_folios_cb->currentIndex()).toInt();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Conductor Autonumbering Status
|
||||||
|
if (m_amw->ui->m_both_conductor_rb->isChecked()) {
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (m_amw->ui->m_new_conductor_rb->isChecked()) {
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (m_amw->ui->m_existent_conductor_rb->isChecked()) {
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (m_amw->ui->m_disable_conductor_rb->isChecked()) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Element Autonumbering Update Policy
|
||||||
|
//Allow Both Existent and New Elements
|
||||||
|
if (m_amw->ui->m_both_element_rb->isChecked()) {
|
||||||
|
//Unfreeze Existent and New Elements
|
||||||
|
project()->unfreezeExistentElementLabel(from,to);
|
||||||
|
project()->unfreezeNewElementLabel(from,to);
|
||||||
|
project()->setFreezeNewElements(false);
|
||||||
|
}
|
||||||
|
//Allow Only New
|
||||||
|
else if (m_amw->ui->m_new_element_rb->isChecked()) {
|
||||||
|
//Freeze Existent and Unfreeze New Elements
|
||||||
|
project()->freezeExistentElementLabel(from,to);
|
||||||
|
project()->unfreezeNewElementLabel(from,to);
|
||||||
|
project()->setFreezeNewElements(false);
|
||||||
|
}
|
||||||
|
//Allow Only Existent
|
||||||
|
else if (m_amw->ui->m_existent_element_rb->isChecked()) {
|
||||||
|
//Freeze New and Unfreeze Existent Elements, Set Freeze Element Project Wide
|
||||||
|
project()->unfreezeExistentElementLabel(from,to);
|
||||||
|
project()->freezeNewElementLabel(from,to);
|
||||||
|
project()->setFreezeNewElements(true);
|
||||||
|
}
|
||||||
|
//Disable
|
||||||
|
else if (m_amw->ui->m_disable_element_rb->isChecked()) {
|
||||||
|
//Freeze Existent and New Elements, Set Freeze Element Project Wide
|
||||||
|
project()->freezeExistentElementLabel(from,to);
|
||||||
|
project()->freezeNewElementLabel(from,to);
|
||||||
|
project()->setFreezeNewElements(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Folio Autonumbering Status
|
||||||
|
if (m_amw->ui->m_both_folio_rb->isChecked()) {
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (m_amw->ui->m_new_folio_rb->isChecked()) {
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (m_amw->ui->m_existent_folio_rb->isChecked()) {
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (m_amw->ui->m_disable_folio_rb->isChecked()) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief ProjectAutoNumConfigPage::removeContext
|
* @brief ProjectAutoNumConfigPage::removeContext
|
||||||
* Remove from project the current conductor numerotation context
|
* Remove from project the current conductor numerotation context
|
||||||
@@ -613,12 +706,15 @@ void ProjectAutoNumConfigPage::changeToTab(int i){
|
|||||||
* Used to resize window to correct size
|
* Used to resize window to correct size
|
||||||
*/
|
*/
|
||||||
void ProjectAutoNumConfigPage::tabChanged(int i){
|
void ProjectAutoNumConfigPage::tabChanged(int i){
|
||||||
if (i>0){
|
if (i>=1){
|
||||||
if (tab_widget->currentIndex()==3){
|
if (tab_widget->currentIndex() == 4){
|
||||||
tab_widget->resize(470,tab_widget->height());
|
tab_widget->resize(480,tab_widget->height());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
tab_widget->resize(465,tab_widget->height());
|
tab_widget->resize(475,tab_widget->height());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
tab_widget->resize(540,tab_widget->height());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ class QComboBox;
|
|||||||
class QPushButton;
|
class QPushButton;
|
||||||
class FolioAutonumberingW;
|
class FolioAutonumberingW;
|
||||||
class ElementAutonumberingW;
|
class ElementAutonumberingW;
|
||||||
|
class AutoNumberingManagementW;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This class, derived from ConfigPage, aims at providing the basic skeleton
|
This class, derived from ConfigPage, aims at providing the basic skeleton
|
||||||
@@ -152,6 +153,7 @@ class ProjectAutoNumConfigPage : public ProjectConfigPage {
|
|||||||
void removeContext_element();
|
void removeContext_element();
|
||||||
|
|
||||||
void applyAutoNum();
|
void applyAutoNum();
|
||||||
|
void applyManagement();
|
||||||
|
|
||||||
void tabChanged(int);
|
void tabChanged(int);
|
||||||
|
|
||||||
@@ -164,6 +166,7 @@ class ProjectAutoNumConfigPage : public ProjectConfigPage {
|
|||||||
//Attributes
|
//Attributes
|
||||||
private:
|
private:
|
||||||
QTabWidget *tab_widget;
|
QTabWidget *tab_widget;
|
||||||
|
QWidget *management_tab_widget;
|
||||||
QWidget *conductor_tab_widget;
|
QWidget *conductor_tab_widget;
|
||||||
QWidget *element_tab_widget;
|
QWidget *element_tab_widget;
|
||||||
QWidget *folio_tab_widget;
|
QWidget *folio_tab_widget;
|
||||||
@@ -182,7 +185,7 @@ class ProjectAutoNumConfigPage : public ProjectConfigPage {
|
|||||||
SelectAutonumW *m_saw_folio;
|
SelectAutonumW *m_saw_folio;
|
||||||
SelectAutonumW *m_saw_element;
|
SelectAutonumW *m_saw_element;
|
||||||
FolioAutonumberingW *m_faw;
|
FolioAutonumberingW *m_faw;
|
||||||
ElementAutonumberingW *m_eaw;
|
AutoNumberingManagementW *m_amw;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#include "PropertiesEditor/propertieseditordialog.h"
|
#include "PropertiesEditor/propertieseditordialog.h"
|
||||||
#include "elementpropertieswidget.h"
|
#include "elementpropertieswidget.h"
|
||||||
#include "numerotationcontextcommands.h"
|
#include "numerotationcontextcommands.h"
|
||||||
|
#include "diagramcontext.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Constructeur pour un element sans scene ni parent
|
Constructeur pour un element sans scene ni parent
|
||||||
@@ -819,3 +820,46 @@ QString Element::getPrefix() {
|
|||||||
void Element::setPrefix(QString prefix) {
|
void Element::setPrefix(QString prefix) {
|
||||||
m_prefix = prefix;
|
m_prefix = prefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Element::freezeLabel
|
||||||
|
* Freeze this element label
|
||||||
|
*/
|
||||||
|
void Element::freezeLabel() {
|
||||||
|
DiagramContext &dc = this->rElementInformations();
|
||||||
|
QString freezelabel = dc["label"].toString();
|
||||||
|
QString label = assignVariables(freezelabel,this);
|
||||||
|
if (!(label == freezelabel)) {
|
||||||
|
dc.addValue("frozenlabel", freezelabel);
|
||||||
|
dc.addValue("label",label);
|
||||||
|
this->setTaggedText("label", label);
|
||||||
|
this->setElementInformations(dc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Element::unfreezeLabel
|
||||||
|
* Unfreeze this element label
|
||||||
|
*/
|
||||||
|
void Element::unfreezeLabel() {
|
||||||
|
DiagramContext &dc = this->rElementInformations();
|
||||||
|
QString label = dc["label"].toString();
|
||||||
|
QString frozenlabel = dc["frozenlabel"].toString();
|
||||||
|
if (frozenlabel == "") return;
|
||||||
|
dc.addValue("frozenlabel", "");
|
||||||
|
dc.addValue("label",frozenlabel);
|
||||||
|
frozenlabel = assignVariables(frozenlabel,this);
|
||||||
|
this->setTaggedText("label", frozenlabel);
|
||||||
|
this->setElementInformations(dc);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Element::freezeNewAddedElement
|
||||||
|
* Freeze this label if needed
|
||||||
|
*/
|
||||||
|
void Element::freezeNewAddedElement() {
|
||||||
|
if (this->diagram()->freezeNewElements() || this->diagram()->project()->freezeNewElements()) {
|
||||||
|
freezeLabel();
|
||||||
|
}
|
||||||
|
else return;
|
||||||
|
}
|
||||||
|
|||||||
@@ -138,6 +138,9 @@ class Element : public QetGraphicsItem {
|
|||||||
void setSeq ();
|
void setSeq ();
|
||||||
void setPrefix(QString);
|
void setPrefix(QString);
|
||||||
QString getPrefix();
|
QString getPrefix();
|
||||||
|
void freezeLabel();
|
||||||
|
void unfreezeLabel();
|
||||||
|
void freezeNewAddedElement();
|
||||||
|
|
||||||
//ATTRIBUTES
|
//ATTRIBUTES
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ QETProject::QETProject(int diagrams, QObject *parent) :
|
|||||||
folioSheetsQuantity (0 ),
|
folioSheetsQuantity (0 ),
|
||||||
m_auto_conductor (true ),
|
m_auto_conductor (true ),
|
||||||
m_elements_collection (nullptr),
|
m_elements_collection (nullptr),
|
||||||
m_auto_folio (true )
|
m_freeze_new_elements (false)
|
||||||
{
|
{
|
||||||
// 0 a n schema(s) vide(s)
|
// 0 a n schema(s) vide(s)
|
||||||
int diagrams_count = qMax(0, diagrams);
|
int diagrams_count = qMax(0, diagrams);
|
||||||
@@ -79,8 +79,7 @@ QETProject::QETProject(const QString &path, QObject *parent) :
|
|||||||
titleblocks_ (this ),
|
titleblocks_ (this ),
|
||||||
folioSheetsQuantity (0 ),
|
folioSheetsQuantity (0 ),
|
||||||
m_auto_conductor (true ),
|
m_auto_conductor (true ),
|
||||||
m_elements_collection (nullptr),
|
m_elements_collection (nullptr)
|
||||||
m_auto_folio (true )
|
|
||||||
{
|
{
|
||||||
//Open the file
|
//Open the file
|
||||||
QFile project_file(path);
|
QFile project_file(path);
|
||||||
@@ -418,10 +417,10 @@ QHash <QString, NumerotationContext> QETProject::elementAutoNum() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief QETProject::elementAutoNum_2
|
* @brief QETProject::elementAutoNumHash
|
||||||
* @return Title and Formula Hash
|
* @return Title and Formula Hash
|
||||||
*/
|
*/
|
||||||
QHash <QString, QString> QETProject::elementAutoNum_2() {
|
QHash <QString, QString> QETProject::elementAutoNumHash() {
|
||||||
return m_element_autonum_formula;
|
return m_element_autonum_formula;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -573,6 +572,70 @@ NumerotationContext QETProject::folioAutoNum (const QString &key) const {
|
|||||||
else return NumerotationContext();
|
else return NumerotationContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief QETProject::freezeExistentElementLabel
|
||||||
|
* Freeze Existent Elements in the selected folios
|
||||||
|
* @param from - first folio index to apply freeze
|
||||||
|
* @param to - last folio index to apply freeze
|
||||||
|
*/
|
||||||
|
void QETProject::freezeExistentElementLabel(int from, int to) {
|
||||||
|
for (int i = from; i <= to; i++) {
|
||||||
|
diagrams_.at(i)->freezeElements();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief QETProject::unfreezeExistentElementLabel
|
||||||
|
* Unfreeze Existent Elements in the selected folios
|
||||||
|
* @param from - first folio index to apply unfreeze
|
||||||
|
* @param to - last folio index to apply unfreeze
|
||||||
|
*/
|
||||||
|
void QETProject::unfreezeExistentElementLabel(int from, int to) {
|
||||||
|
for (int i = from; i <= to; i++) {
|
||||||
|
diagrams_.at(i)->unfreezeElements();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief QETProject::freezeNewElementLabel
|
||||||
|
* Freeze New Elements in the selected folios
|
||||||
|
* @param from - first folio index to apply freeze
|
||||||
|
* @param to - last folio index to apply freeze
|
||||||
|
*/
|
||||||
|
void QETProject::freezeNewElementLabel(int from, int to) {
|
||||||
|
for (int i = from; i <= to; i++) {
|
||||||
|
diagrams_.at(i)->freezeNew();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief QETProject::unfreezeNewElementLabel
|
||||||
|
* Unfreeze New Elements in the selected folios
|
||||||
|
* @param from - first folio index to apply unfreeze
|
||||||
|
* @param to - last folio index to apply unfreeze
|
||||||
|
*/
|
||||||
|
void QETProject::unfreezeNewElementLabel(int from, int to) {
|
||||||
|
for (int i = from; i <= to; i++) {
|
||||||
|
diagrams_.at(i)->unfreezeNew();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief QETProject::freezeNewElements
|
||||||
|
* @return freeze new elements Project Wide status
|
||||||
|
*/
|
||||||
|
bool QETProject::freezeNewElements() {
|
||||||
|
return m_freeze_new_elements;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief QETProject::setfreezeNewElements
|
||||||
|
* Set Project Wide freeze new elements
|
||||||
|
*/
|
||||||
|
void QETProject::setFreezeNewElements(bool set) {
|
||||||
|
m_freeze_new_elements = set;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief QETProject::autoConductor
|
* @brief QETProject::autoConductor
|
||||||
* @return true if use of auto conductor is authorized.
|
* @return true if use of auto conductor is authorized.
|
||||||
@@ -583,16 +646,6 @@ bool QETProject::autoConductor() const
|
|||||||
return m_auto_conductor;
|
return m_auto_conductor;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief QETProject::autoFolio
|
|
||||||
* @return true if use of auto folio is authorized.
|
|
||||||
* See also Q_PROPERTY autoConductor
|
|
||||||
*/
|
|
||||||
bool QETProject::autoFolio() const
|
|
||||||
{
|
|
||||||
return m_auto_folio;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief QETProject::setAutoConductor
|
* @brief QETProject::setAutoConductor
|
||||||
* @param ac
|
* @param ac
|
||||||
@@ -605,18 +658,6 @@ void QETProject::setAutoConductor(bool ac)
|
|||||||
m_auto_conductor = ac;
|
m_auto_conductor = ac;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief QETProject::setAutoFolio
|
|
||||||
* @param ac
|
|
||||||
* Enable the use of auto folio if true
|
|
||||||
* See also Q_PROPERTY autoFolio
|
|
||||||
*/
|
|
||||||
void QETProject::setAutoFolio(bool af)
|
|
||||||
{
|
|
||||||
if (af != m_auto_folio)
|
|
||||||
m_auto_folio = af;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief QETProject::autoFolioNumberingNewFolios
|
* @brief QETProject::autoFolioNumberingNewFolios
|
||||||
* emit Signal to add new Diagram with autonum
|
* emit Signal to add new Diagram with autonum
|
||||||
@@ -1332,6 +1373,7 @@ void QETProject::readDefaultPropertiesXml(QDomDocument &xml_project)
|
|||||||
{
|
{
|
||||||
m_current_element_autonum = element_autonums.attribute("current_autonum");
|
m_current_element_autonum = element_autonums.attribute("current_autonum");
|
||||||
m_current_element_formula = element_autonums.attribute("current_formula");
|
m_current_element_formula = element_autonums.attribute("current_formula");
|
||||||
|
m_freeze_new_elements = element_autonums.attribute("freeze_new_elements").toInt();
|
||||||
foreach (QDomElement elmt, QET::findInDomElement(element_autonums, "element_autonum"))
|
foreach (QDomElement elmt, QET::findInDomElement(element_autonums, "element_autonum"))
|
||||||
{
|
{
|
||||||
NumerotationContext nc;
|
NumerotationContext nc;
|
||||||
@@ -1414,6 +1456,7 @@ void QETProject::writeDefaultPropertiesXml(QDomElement &xml_element) {
|
|||||||
QDomElement element_autonums = xml_document.createElement("element_autonums");
|
QDomElement element_autonums = xml_document.createElement("element_autonums");
|
||||||
element_autonums.setAttribute("current_autonum", m_current_element_autonum);
|
element_autonums.setAttribute("current_autonum", m_current_element_autonum);
|
||||||
element_autonums.setAttribute("current_formula", m_current_element_formula);
|
element_autonums.setAttribute("current_formula", m_current_element_formula);
|
||||||
|
element_autonums.setAttribute("freeze_new_elements", m_freeze_new_elements ? "true" : "false");
|
||||||
foreach (QString key, elementAutoNum().keys()) {
|
foreach (QString key, elementAutoNum().keys()) {
|
||||||
QDomElement element_autonum = elementAutoNum(key).toXml(xml_document, "element_autonum");
|
QDomElement element_autonum = elementAutoNum(key).toXml(xml_document, "element_autonum");
|
||||||
if (key != "" && elementAutoNumFormula(key) != "") {
|
if (key != "" && elementAutoNumFormula(key) != "") {
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class QETProject : public QObject
|
|||||||
|
|
||||||
QHash <QString, NumerotationContext> conductorAutoNum() const;
|
QHash <QString, NumerotationContext> conductorAutoNum() const;
|
||||||
QHash <QString, NumerotationContext> elementAutoNum() const;
|
QHash <QString, NumerotationContext> elementAutoNum() const;
|
||||||
QHash <QString, QString> elementAutoNum_2();
|
QHash <QString, QString> elementAutoNumHash();
|
||||||
QHash <QString, NumerotationContext> folioAutoNum() const;
|
QHash <QString, NumerotationContext> folioAutoNum() const;
|
||||||
void addConductorAutoNum (QString key, NumerotationContext context);
|
void addConductorAutoNum (QString key, NumerotationContext context);
|
||||||
void addElementAutoNum (QString key, NumerotationContext context);
|
void addElementAutoNum (QString key, NumerotationContext context);
|
||||||
@@ -125,12 +125,18 @@ class QETProject : public QObject
|
|||||||
QString elementAutoNumFormula() const;
|
QString elementAutoNumFormula() const;
|
||||||
QString elementCurrentAutoNum () const;
|
QString elementCurrentAutoNum () const;
|
||||||
|
|
||||||
|
void freezeExistentElementLabel(int,int);
|
||||||
|
void freezeNewElementLabel(int,int);
|
||||||
|
void unfreezeExistentElementLabel(int,int);
|
||||||
|
void unfreezeNewElementLabel(int,int);
|
||||||
|
bool freezeNewElements();
|
||||||
|
void setFreezeNewElements(bool);
|
||||||
|
|
||||||
bool autoConductor () const;
|
bool autoConductor () const;
|
||||||
bool autoElement () const;
|
bool autoElement () const;
|
||||||
bool autoFolio () const;
|
bool autoFolio () const;
|
||||||
void setAutoConductor (bool ac);
|
void setAutoConductor (bool ac);
|
||||||
void setAutoElement (bool ae);
|
void setAutoElement (bool ae);
|
||||||
void setAutoFolio (bool af);
|
|
||||||
void autoFolioNumberingNewFolios ();
|
void autoFolioNumberingNewFolios ();
|
||||||
void autoFolioNumberingSelectedFolios(int, int, QString);
|
void autoFolioNumberingSelectedFolios(int, int, QString);
|
||||||
|
|
||||||
@@ -250,7 +256,7 @@ class QETProject : public QObject
|
|||||||
int folioSheetsQuantity;
|
int folioSheetsQuantity;
|
||||||
bool m_auto_conductor;
|
bool m_auto_conductor;
|
||||||
XmlElementCollection *m_elements_collection;
|
XmlElementCollection *m_elements_collection;
|
||||||
bool m_auto_folio;
|
bool m_freeze_new_elements;
|
||||||
};
|
};
|
||||||
Q_DECLARE_METATYPE(QETProject *)
|
Q_DECLARE_METATYPE(QETProject *)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ void AutoNumberingDockWidget::setActive() {
|
|||||||
//Element
|
//Element
|
||||||
QString current_element_autonum = project_->elementCurrentAutoNum();
|
QString current_element_autonum = project_->elementCurrentAutoNum();
|
||||||
QString element_formula = project_->elementAutoNumFormula();
|
QString element_formula = project_->elementAutoNumFormula();
|
||||||
QString active_element_autonum = project_->elementAutoNum_2().key(element_formula);
|
QString active_element_autonum = project_->elementAutoNumHash().key(element_formula);
|
||||||
int el_index = ui->m_element_cb->findText(active_element_autonum);
|
int el_index = ui->m_element_cb->findText(active_element_autonum);
|
||||||
ui->m_element_cb->setCurrentIndex(el_index);
|
ui->m_element_cb->setCurrentIndex(el_index);
|
||||||
|
|
||||||
|
|||||||
214
sources/ui/autonumberingmanagementw.cpp
Normal file
214
sources/ui/autonumberingmanagementw.cpp
Normal file
@@ -0,0 +1,214 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2006-2016 The QElectroTech Team
|
||||||
|
This file is part of QElectroTech.
|
||||||
|
|
||||||
|
QElectroTech is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
QElectroTech is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "autonumberingmanagementw.h"
|
||||||
|
#include "ui_autonumberingmanagementw.h"
|
||||||
|
#include "numparteditorw.h"
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include "numerotationcontextcommands.h"
|
||||||
|
#include "elementautonumberingw.h"
|
||||||
|
#include "ui_elementautonumberingw.h"
|
||||||
|
#include "qdebug.h"
|
||||||
|
#include "qetproject.h"
|
||||||
|
#include "diagram.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
|
AutoNumberingManagementW::AutoNumberingManagementW(QETProject *project, QWidget *parent) :
|
||||||
|
QWidget(parent),
|
||||||
|
project_(project)
|
||||||
|
{
|
||||||
|
ui = new Ui::AutoNumberingManagementW;
|
||||||
|
ui->setupUi(this);
|
||||||
|
ui->m_apply_locations_rb->setHidden(true);
|
||||||
|
ui->m_selected_locations_le->setHidden(true);
|
||||||
|
ui->conductorWidget->setHidden(true);
|
||||||
|
ui->folioWidget->setHidden(true);
|
||||||
|
ui->m_selected_folios_widget->setDisabled(true);
|
||||||
|
ui->m_selected_folios_le->setDisabled(true);
|
||||||
|
ui->m_selected_folios_le->setReadOnly(true);
|
||||||
|
applyEnable(false);
|
||||||
|
setProjectContext();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor
|
||||||
|
*/
|
||||||
|
AutoNumberingManagementW::~AutoNumberingManagementW()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief AutoNumberingManagementW::setProjectContext
|
||||||
|
* Add Default Project Status
|
||||||
|
*/
|
||||||
|
void AutoNumberingManagementW::setProjectContext() {
|
||||||
|
ui->m_status_cb->addItem(tr("Under Development"));
|
||||||
|
ui->m_status_cb->addItem(tr("Installing"));
|
||||||
|
ui->m_status_cb->addItem(tr("Built"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief AutoNumberingManagementW::on_m_status_cb_currentIndexChanged
|
||||||
|
* Load Default Status Options
|
||||||
|
*/
|
||||||
|
void AutoNumberingManagementW::on_m_status_cb_currentIndexChanged(int index) {
|
||||||
|
|
||||||
|
//Under Development
|
||||||
|
if (index == 0) {
|
||||||
|
ui->conductorWidget->setEnabled(true);
|
||||||
|
ui->elementWidget->setEnabled(true);
|
||||||
|
ui->folioWidget->setEnabled(true);
|
||||||
|
ui->m_both_conductor_rb->setChecked(true);
|
||||||
|
ui->m_both_element_rb->setChecked(true);
|
||||||
|
ui->m_both_folio_rb->setChecked(true);
|
||||||
|
}
|
||||||
|
//Installing
|
||||||
|
else if (index == 1) {
|
||||||
|
ui->conductorWidget->setEnabled(true);
|
||||||
|
ui->elementWidget->setEnabled(true);
|
||||||
|
ui->folioWidget->setEnabled(true);
|
||||||
|
ui->m_new_conductor_rb->setChecked(true);
|
||||||
|
ui->m_new_element_rb->setChecked(true);
|
||||||
|
ui->m_new_folio_rb->setChecked(true);
|
||||||
|
}
|
||||||
|
//Built
|
||||||
|
else if (index == 2) {
|
||||||
|
ui->m_disable_conductor_rb->setChecked(true);
|
||||||
|
ui->m_disable_element_rb->setChecked(true);
|
||||||
|
ui->m_disable_folio_rb->setChecked(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief AutoNumberingManagementW::on_m_apply_folios_rb_clicked
|
||||||
|
* Set From Folios Combobox
|
||||||
|
*/
|
||||||
|
void AutoNumberingManagementW::on_m_apply_folios_rb_clicked() {
|
||||||
|
if (ui->m_apply_folios_rb->isChecked()) {
|
||||||
|
ui->m_selected_folios_widget->setEnabled(true);
|
||||||
|
ui->m_selected_folios_le->setEnabled(true);
|
||||||
|
if (ui->m_from_folios_cb->count()<=0) {
|
||||||
|
ui->m_from_folios_cb->clear();
|
||||||
|
ui->m_from_folios_cb->addItem("");
|
||||||
|
foreach (Diagram *diagram, project_->diagrams()){
|
||||||
|
if (diagram->title() != "")
|
||||||
|
ui->m_from_folios_cb->addItem(diagram->title(),diagram->folioIndex());
|
||||||
|
else ui->m_from_folios_cb->addItem(QString::number(diagram->folioIndex()),diagram->folioIndex());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ui->m_from_folios_cb->currentIndex() > 0)
|
||||||
|
applyEnable(true);
|
||||||
|
else applyEnable(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief AutoNumberingManagementW::on_m_from_folios_cb_currentIndexChanged
|
||||||
|
* Set To Folios Combobox
|
||||||
|
*/
|
||||||
|
void AutoNumberingManagementW::on_m_from_folios_cb_currentIndexChanged(int index) {
|
||||||
|
ui->m_to_folios_cb->clear();
|
||||||
|
ui->m_selected_folios_le->clear();
|
||||||
|
ui->m_selected_folios_le->setEnabled(true);
|
||||||
|
if (index > 0) {
|
||||||
|
ui->m_to_folios_cb->setEnabled(true);
|
||||||
|
ui->m_to_folios_cb->addItem("");
|
||||||
|
for (int i=index;i<project_->diagrams().size();i++) {
|
||||||
|
if (project_->diagrams().at(i)->title() != "") {
|
||||||
|
ui->m_to_folios_cb->addItem(project_->diagrams().at(i)->title(),project_->diagrams().at(i)->folioIndex());
|
||||||
|
}
|
||||||
|
else ui->m_to_folios_cb->addItem(QString::number(project_->diagrams().at(i)->folioIndex()),project_->diagrams().at(i)->folioIndex());
|
||||||
|
}
|
||||||
|
applyEnable(true);
|
||||||
|
ui->m_selected_folios_le->clear();
|
||||||
|
ui->m_selected_folios_le->insert(ui->m_from_folios_cb->currentText());
|
||||||
|
}
|
||||||
|
else applyEnable(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief AutoNumberingManagementW::on_m_to_folios_cb_currentIndexChanged
|
||||||
|
* Set selected folios Line Edit content
|
||||||
|
*/
|
||||||
|
void AutoNumberingManagementW::on_m_to_folios_cb_currentIndexChanged(int index) {
|
||||||
|
if (index > 0) {
|
||||||
|
QString from = ui->m_from_folios_cb->currentText();
|
||||||
|
QString to = ui->m_to_folios_cb->currentText();
|
||||||
|
ui->m_selected_folios_le->clear();
|
||||||
|
ui->m_selected_folios_le->insert(from + " - " + to);
|
||||||
|
ui->m_selected_folios_le->setDisabled(true);
|
||||||
|
}
|
||||||
|
applyEnable(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief AutoNumberingManagementW::on_m_apply_project_rb_clicked
|
||||||
|
* Disable folio widget
|
||||||
|
*/
|
||||||
|
void AutoNumberingManagementW::on_m_apply_project_rb_clicked() {
|
||||||
|
ui->m_selected_folios_widget->setDisabled(true);
|
||||||
|
ui->m_selected_folios_le->setDisabled(true);
|
||||||
|
applyEnable(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief AutoNumberingManagementW::on_buttonBox_clicked
|
||||||
|
* Action on @buttonBox clicked
|
||||||
|
*/
|
||||||
|
void AutoNumberingManagementW::on_buttonBox_clicked(QAbstractButton *button) {
|
||||||
|
//transform button to int
|
||||||
|
int answer = ui -> buttonBox -> buttonRole(button);
|
||||||
|
switch (answer) {
|
||||||
|
//apply the context in the diagram displayed by @diagram_chooser.
|
||||||
|
case QDialogButtonBox::ApplyRole:
|
||||||
|
applyEnable(false);
|
||||||
|
emit applyPressed();
|
||||||
|
break;
|
||||||
|
case QDialogButtonBox::HelpRole:
|
||||||
|
QMessageBox::information(this, tr("Auto Numbering Management", "title window"),
|
||||||
|
tr("In this Menu you can set whether you want the Auto Numberings to be updated or not."
|
||||||
|
" For Element Auto Numbering you have 4 options of Update Policy:\n"
|
||||||
|
"-Both: both New and Existent Element labels will be updated. This is the default option.\n"
|
||||||
|
"-Update Only New: only new created Elements will be updated. Existent Element labels will be frozen.\n"
|
||||||
|
"-Update Only Existent: only existent Elements will be updated. New Elements will be assigned "
|
||||||
|
"their formula but will not update once created.\n"
|
||||||
|
"-Disable: both New and Existent Element labels will not be updated. This is valid for new folios as well.\n"
|
||||||
|
"Note: These options DO NOT allow or block Auto Numberings, only their Update Policy."
|
||||||
|
));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief AutoNumberingManagementW::applyEnable
|
||||||
|
* enable/disable the apply button
|
||||||
|
*/
|
||||||
|
void AutoNumberingManagementW::applyEnable(bool b) {
|
||||||
|
if (b){
|
||||||
|
bool valid= true;
|
||||||
|
if (ui->m_apply_project_rb->isChecked())
|
||||||
|
ui -> buttonBox -> button(QDialogButtonBox::Apply) -> setEnabled(valid);
|
||||||
|
else if (ui->m_apply_folios_rb->isChecked())
|
||||||
|
ui -> buttonBox -> button(QDialogButtonBox::Apply) -> setEnabled(valid);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ui -> buttonBox -> button(QDialogButtonBox::Apply) -> setEnabled(b);
|
||||||
|
}
|
||||||
|
}
|
||||||
63
sources/ui/autonumberingmanagementw.h
Normal file
63
sources/ui/autonumberingmanagementw.h
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2006-2016 The QElectroTech Team
|
||||||
|
This file is part of QElectroTech.
|
||||||
|
|
||||||
|
QElectroTech is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
QElectroTech is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#ifndef AUTONUMBERINGMANAGEMENTW_H
|
||||||
|
#define AUTONUMBERINGMANAGEMENTW_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
class NumPartEditorW;
|
||||||
|
class QAbstractButton;
|
||||||
|
class QETProject;
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class AutoNumberingManagementW;
|
||||||
|
}
|
||||||
|
|
||||||
|
class AutoNumberingManagementW : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
//METHODS
|
||||||
|
public:
|
||||||
|
explicit AutoNumberingManagementW(QETProject *project, QWidget *parent = 0);
|
||||||
|
~AutoNumberingManagementW();
|
||||||
|
Ui::AutoNumberingManagementW *ui;
|
||||||
|
void setProjectContext ();
|
||||||
|
void contextToFormula ();
|
||||||
|
QString elementFormula();
|
||||||
|
|
||||||
|
//SIGNALS
|
||||||
|
signals:
|
||||||
|
void applyPressed();
|
||||||
|
|
||||||
|
//SLOTS
|
||||||
|
private slots:
|
||||||
|
void on_m_from_folios_cb_currentIndexChanged(int);
|
||||||
|
void on_m_to_folios_cb_currentIndexChanged(int);
|
||||||
|
void on_m_status_cb_currentIndexChanged(int);
|
||||||
|
void on_m_apply_folios_rb_clicked();
|
||||||
|
void on_m_apply_project_rb_clicked();
|
||||||
|
void on_buttonBox_clicked(QAbstractButton *);
|
||||||
|
void applyEnable (bool = true);
|
||||||
|
|
||||||
|
//ATTRIBUTES
|
||||||
|
private:
|
||||||
|
QETProject *project_;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // AUTONUMBERINGMANAGEMENTW_H
|
||||||
470
sources/ui/autonumberingmanagementw.ui
Normal file
470
sources/ui/autonumberingmanagementw.ui
Normal file
@@ -0,0 +1,470 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>AutoNumberingManagementW</class>
|
||||||
|
<widget class="QWidget" name="AutoNumberingManagementW">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>520</width>
|
||||||
|
<height>550</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>460</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<property name="sizeConstraint">
|
||||||
|
<enum>QLayout::SetDefaultConstraint</enum>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QScrollArea" name="scrollArea">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>50</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>450</width>
|
||||||
|
<height>253</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="sizeIncrement">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>50</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="mouseTracking">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="layoutDirection">
|
||||||
|
<enum>Qt::LeftToRight</enum>
|
||||||
|
</property>
|
||||||
|
<property name="verticalScrollBarPolicy">
|
||||||
|
<enum>Qt::ScrollBarAsNeeded</enum>
|
||||||
|
</property>
|
||||||
|
<property name="horizontalScrollBarPolicy">
|
||||||
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeAdjustPolicy">
|
||||||
|
<enum>QAbstractScrollArea::AdjustToContents</enum>
|
||||||
|
</property>
|
||||||
|
<property name="widgetResizable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignHCenter|Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>500</width>
|
||||||
|
<height>495</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>430</width>
|
||||||
|
<height>250</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<property name="sizeConstraint">
|
||||||
|
<enum>QLayout::SetFixedSize</enum>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Project Status:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QComboBox" name="m_status_cb">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="sizeAdjustPolicy">
|
||||||
|
<enum>QComboBox::AdjustToContents</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1" colspan="3">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1" colspan="3">
|
||||||
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
|
<property name="title">
|
||||||
|
<string>Range</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLineEdit" name="m_selected_folios_le">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QRadioButton" name="m_apply_locations_rb">
|
||||||
|
<property name="text">
|
||||||
|
<string>Apply to Selected Locations</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QRadioButton" name="m_apply_folios_rb">
|
||||||
|
<property name="text">
|
||||||
|
<string>Apply to Selected Folios</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QRadioButton" name="m_apply_project_rb">
|
||||||
|
<property name="text">
|
||||||
|
<string>Apply to Entire Project</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLineEdit" name="m_selected_locations_le"/>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QWidget" name="m_selected_folios_widget" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>From</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="m_from_folios_cb">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>To</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="m_to_folios_cb">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="4">
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Update Policy</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="conductorWidget" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="conductor_hl">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Conductor</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="m_new_conductor_rb">
|
||||||
|
<property name="text">
|
||||||
|
<string>Only New</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="m_existent_conductor_rb">
|
||||||
|
<property name="text">
|
||||||
|
<string>Existent and New</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="m_both_conductor_rb">
|
||||||
|
<property name="text">
|
||||||
|
<string>Both</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="m_disable_conductor_rb">
|
||||||
|
<property name="text">
|
||||||
|
<string>Disable</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="elementWidget" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="element_hl">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Element</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="m_both_element_rb">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Both</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="m_new_element_rb">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Only New</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="m_existent_element_rb">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Only Existent</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="m_disable_element_rb">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Disable</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="folioWidget" native="true">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>50</weight>
|
||||||
|
<bold>false</bold>
|
||||||
|
<kerning>true</kerning>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="folio_hl">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Folio</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="m_new_folio_rb">
|
||||||
|
<property name="text">
|
||||||
|
<string>Only New</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="m_existent_folio_rb">
|
||||||
|
<property name="text">
|
||||||
|
<string>Existent</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="m_both_folio_rb">
|
||||||
|
<property name="text">
|
||||||
|
<string>Both</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="m_disable_folio_rb">
|
||||||
|
<property name="text">
|
||||||
|
<string>Disable</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Apply|QDialogButtonBox::Help</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
@@ -72,5 +72,5 @@ void ProjectPropertiesDialog::setCurrentPage(ProjectPropertiesDialog::Page p) {
|
|||||||
*/
|
*/
|
||||||
void ProjectPropertiesDialog::changeToFolio() {
|
void ProjectPropertiesDialog::changeToFolio() {
|
||||||
ProjectAutoNumConfigPage *autoNumPage = static_cast <ProjectAutoNumConfigPage*>(m_properties_dialog->pages.at(2));
|
ProjectAutoNumConfigPage *autoNumPage = static_cast <ProjectAutoNumConfigPage*>(m_properties_dialog->pages.at(2));
|
||||||
autoNumPage->changeToTab(2);
|
autoNumPage->changeToTab(3);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user