mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Minor : indentation
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5630 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -57,7 +57,7 @@ void SearchAndReplaceWorker::replaceDiagram(QList<Diagram *> diagram_list)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QUndoStack *us = project->undoStack();
|
QUndoStack *us = project->undoStack();
|
||||||
us->beginMacro(QObject::tr("Chercher/remplacer les propriétés de folio"));
|
us->beginMacro(QObject::tr("Chercher/remplacer les propriétés de folio"));
|
||||||
for (Diagram *d : diagram_list)
|
for (Diagram *d : diagram_list)
|
||||||
{
|
{
|
||||||
TitleBlockProperties old_propertie = d->border_and_titleblock.exportTitleBlock();
|
TitleBlockProperties old_propertie = d->border_and_titleblock.exportTitleBlock();
|
||||||
@@ -87,12 +87,12 @@ void SearchAndReplaceWorker::replaceDiagram(QList<Diagram *> diagram_list)
|
|||||||
new_properties.filename = m_titleblock_properties.filename;
|
new_properties.filename = m_titleblock_properties.filename;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!m_titleblock_properties.plant.isEmpty())
|
if (!m_titleblock_properties.plant.isEmpty())
|
||||||
{
|
{
|
||||||
if (m_titleblock_properties.plant == eraseText()) {
|
if (m_titleblock_properties.plant == eraseText()) {
|
||||||
new_properties.plant.clear();
|
new_properties.plant.clear();
|
||||||
} else {
|
} else {
|
||||||
new_properties.plant = m_titleblock_properties.plant;
|
new_properties.plant = m_titleblock_properties.plant;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!m_titleblock_properties.locmach.isEmpty())
|
if (!m_titleblock_properties.locmach.isEmpty())
|
||||||
@@ -168,7 +168,7 @@ void SearchAndReplaceWorker::replaceElement(QList<Element *> list)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
project_->undoStack()->beginMacro(QObject::tr("Chercher/remplacer les propriétés d'éléments"));
|
project_->undoStack()->beginMacro(QObject::tr("Chercher/remplacer les propriétés d'éléments"));
|
||||||
for (Element *elmt : list)
|
for (Element *elmt : list)
|
||||||
{
|
{
|
||||||
//We apply change only for master, slave, and terminal element.
|
//We apply change only for master, slave, and terminal element.
|
||||||
@@ -228,7 +228,7 @@ void SearchAndReplaceWorker::replaceIndiText(QList<IndependentTextItem *> list)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
project_->undoStack()->beginMacro(QObject::tr("Chercher/remplacer des textes independants"));
|
project_->undoStack()->beginMacro(QObject::tr("Chercher/remplacer des textes independants"));
|
||||||
for (IndependentTextItem *text : list)
|
for (IndependentTextItem *text : list)
|
||||||
{
|
{
|
||||||
QString before = text->toPlainText();
|
QString before = text->toPlainText();
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ void ReplaceElementDialog::setContext(DiagramContext context)
|
|||||||
DiagramContext ReplaceElementDialog::context() const
|
DiagramContext ReplaceElementDialog::context() const
|
||||||
{
|
{
|
||||||
DiagramContext context;
|
DiagramContext context;
|
||||||
for (ElementInfoPartWidget *eipw : m_eipw_list) {
|
for (ElementInfoPartWidget *eipw : m_eipw_list) {
|
||||||
context.addValue(eipw->key(), eipw->text());
|
context.addValue(eipw->key(), eipw->text());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ void ReplaceElementDialog::buildWidget()
|
|||||||
{
|
{
|
||||||
ElementInfoPartWidget *eipw = new ElementInfoPartWidget(str, QETApp::elementTranslatedInfoKey(str), this);
|
ElementInfoPartWidget *eipw = new ElementInfoPartWidget(str, QETApp::elementTranslatedInfoKey(str), this);
|
||||||
eipw->setEraseTextVisible(true);
|
eipw->setEraseTextVisible(true);
|
||||||
eipw->setPlaceHolderText(tr("Ne pas modifier"));
|
eipw->setPlaceHolderText(tr("Ne pas modifier"));
|
||||||
ui->m_scroll_layout->addWidget(eipw);
|
ui->m_scroll_layout->addWidget(eipw);
|
||||||
m_eipw_list << eipw;
|
m_eipw_list << eipw;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ TitleBlockProperties ReplaceFolioWidget::titleBlockProperties() const
|
|||||||
prop.title = ui->m_title_le ->text();
|
prop.title = ui->m_title_le ->text();
|
||||||
prop.author = ui->m_author_le->text();
|
prop.author = ui->m_author_le->text();
|
||||||
prop.filename = ui->m_file_le ->text();
|
prop.filename = ui->m_file_le ->text();
|
||||||
prop.plant = ui->m_plant ->text();
|
prop.plant = ui->m_plant ->text();
|
||||||
prop.locmach = ui->m_loc ->text();
|
prop.locmach = ui->m_loc ->text();
|
||||||
prop.indexrev = ui->m_indice ->text();
|
prop.indexrev = ui->m_indice ->text();
|
||||||
prop.folio = ui->m_folio_le ->text();
|
prop.folio = ui->m_folio_le ->text();
|
||||||
@@ -78,7 +78,7 @@ void ReplaceFolioWidget::setTitleBlockProperties(const TitleBlockProperties &pro
|
|||||||
ui->m_title_le ->setText (properties.title);
|
ui->m_title_le ->setText (properties.title);
|
||||||
ui->m_author_le->setText (properties.author);
|
ui->m_author_le->setText (properties.author);
|
||||||
ui->m_file_le ->setText (properties.filename);
|
ui->m_file_le ->setText (properties.filename);
|
||||||
ui->m_plant ->setText (properties.plant);
|
ui->m_plant ->setText (properties.plant);
|
||||||
ui->m_loc ->setText (properties.locmach);
|
ui->m_loc ->setText (properties.locmach);
|
||||||
ui->m_indice ->setText (properties.indexrev);
|
ui->m_indice ->setText (properties.indexrev);
|
||||||
ui->m_folio_le ->setText (properties.folio);
|
ui->m_folio_le ->setText (properties.folio);
|
||||||
@@ -148,31 +148,31 @@ void ReplaceFolioWidget::on_m_title_cb_clicked() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ReplaceFolioWidget::on_m_author_cb_clicked() {
|
void ReplaceFolioWidget::on_m_author_cb_clicked() {
|
||||||
ui->m_author_le->setText(ui->m_author_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
ui->m_author_le->setText(ui->m_author_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
||||||
ui->m_author_le->setDisabled(ui->m_author_cb->isChecked());
|
ui->m_author_le->setDisabled(ui->m_author_cb->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReplaceFolioWidget::on_m_file_cb_clicked() {
|
void ReplaceFolioWidget::on_m_file_cb_clicked() {
|
||||||
ui->m_file_le->setText(ui->m_file_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
ui->m_file_le->setText(ui->m_file_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
||||||
ui->m_file_le->setDisabled(ui->m_file_cb->isChecked());
|
ui->m_file_le->setDisabled(ui->m_file_cb->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReplaceFolioWidget::on_m_folio_cb_clicked() {
|
void ReplaceFolioWidget::on_m_folio_cb_clicked() {
|
||||||
ui->m_folio_le->setText(ui->m_folio_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
ui->m_folio_le->setText(ui->m_folio_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
||||||
ui->m_folio_le->setDisabled(ui->m_folio_cb->isChecked());
|
ui->m_folio_le->setDisabled(ui->m_folio_cb->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReplaceFolioWidget::on_m_plant_cb_clicked() {
|
void ReplaceFolioWidget::on_m_plant_cb_clicked() {
|
||||||
ui->m_plant->setText(ui->m_plant_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
ui->m_plant->setText(ui->m_plant_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
||||||
ui->m_plant->setDisabled(ui->m_plant_cb->isChecked());
|
ui->m_plant->setDisabled(ui->m_plant_cb->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReplaceFolioWidget::on_m_loc_cb_clicked() {
|
void ReplaceFolioWidget::on_m_loc_cb_clicked() {
|
||||||
ui->m_loc->setText(ui->m_loc_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
ui->m_loc->setText(ui->m_loc_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
||||||
ui->m_loc->setDisabled(ui->m_loc_cb->isChecked());
|
ui->m_loc->setDisabled(ui->m_loc_cb->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReplaceFolioWidget::on_m_indice_cb_clicked() {
|
void ReplaceFolioWidget::on_m_indice_cb_clicked() {
|
||||||
ui->m_indice->setText(ui->m_indice_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
ui->m_indice->setText(ui->m_indice_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
||||||
ui->m_indice->setDisabled(ui->m_indice_cb->isChecked());
|
ui->m_indice->setDisabled(ui->m_indice_cb->isChecked());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class ReplaceFolioWidget : public QWidget
|
|||||||
void on_m_author_cb_clicked();
|
void on_m_author_cb_clicked();
|
||||||
void on_m_file_cb_clicked();
|
void on_m_file_cb_clicked();
|
||||||
void on_m_folio_cb_clicked();
|
void on_m_folio_cb_clicked();
|
||||||
void on_m_plant_cb_clicked();
|
void on_m_plant_cb_clicked();
|
||||||
void on_m_loc_cb_clicked();
|
void on_m_loc_cb_clicked();
|
||||||
void on_m_indice_cb_clicked();
|
void on_m_indice_cb_clicked();
|
||||||
|
|
||||||
|
|||||||
@@ -151,36 +151,36 @@ void SearchAndReplaceWidget::setUpTreeItems()
|
|||||||
|
|
||||||
m_elements_qtwi = new QTreeWidgetItem(m_root_qtwi);
|
m_elements_qtwi = new QTreeWidgetItem(m_root_qtwi);
|
||||||
m_elements_qtwi->setIcon(0, QET::Icons::Element);
|
m_elements_qtwi->setIcon(0, QET::Icons::Element);
|
||||||
m_elements_qtwi->setText(0, tr("Eléments"));
|
m_elements_qtwi->setText(0, tr("Eléments"));
|
||||||
m_elements_qtwi->setCheckState(0, Qt::Checked);
|
m_elements_qtwi->setCheckState(0, Qt::Checked);
|
||||||
m_category_qtwi.append(m_elements_qtwi);
|
m_category_qtwi.append(m_elements_qtwi);
|
||||||
|
|
||||||
m_simple_elmt_qtwi = new QTreeWidgetItem(m_elements_qtwi);
|
m_simple_elmt_qtwi = new QTreeWidgetItem(m_elements_qtwi);
|
||||||
m_simple_elmt_qtwi->setText(0, tr("Eléments simple"));
|
m_simple_elmt_qtwi->setText(0, tr("Eléments simple"));
|
||||||
m_simple_elmt_qtwi->setIcon(0, QET::Icons::Element);
|
m_simple_elmt_qtwi->setIcon(0, QET::Icons::Element);
|
||||||
m_simple_elmt_qtwi->setCheckState(0, Qt::Checked);
|
m_simple_elmt_qtwi->setCheckState(0, Qt::Checked);
|
||||||
m_qtwi_elmts.append(m_simple_elmt_qtwi);
|
m_qtwi_elmts.append(m_simple_elmt_qtwi);
|
||||||
|
|
||||||
m_master_elmt_qtwi= new QTreeWidgetItem(m_elements_qtwi);
|
m_master_elmt_qtwi= new QTreeWidgetItem(m_elements_qtwi);
|
||||||
m_master_elmt_qtwi->setText(0, tr("Eléments maître"));
|
m_master_elmt_qtwi->setText(0, tr("Eléments maître"));
|
||||||
m_master_elmt_qtwi->setIcon(0, QET::Icons::ElementMaster);
|
m_master_elmt_qtwi->setIcon(0, QET::Icons::ElementMaster);
|
||||||
m_master_elmt_qtwi->setCheckState(0, Qt::Checked);
|
m_master_elmt_qtwi->setCheckState(0, Qt::Checked);
|
||||||
m_qtwi_elmts.append(m_master_elmt_qtwi);
|
m_qtwi_elmts.append(m_master_elmt_qtwi);
|
||||||
|
|
||||||
m_slave_elmt_qtwi = new QTreeWidgetItem(m_elements_qtwi);
|
m_slave_elmt_qtwi = new QTreeWidgetItem(m_elements_qtwi);
|
||||||
m_slave_elmt_qtwi->setText(0, tr("Eléments esclave"));
|
m_slave_elmt_qtwi->setText(0, tr("Eléments esclave"));
|
||||||
m_slave_elmt_qtwi->setIcon(0, QET::Icons::ElementSlave);
|
m_slave_elmt_qtwi->setIcon(0, QET::Icons::ElementSlave);
|
||||||
m_slave_elmt_qtwi->setCheckState(0, Qt::Checked);
|
m_slave_elmt_qtwi->setCheckState(0, Qt::Checked);
|
||||||
m_qtwi_elmts.append(m_slave_elmt_qtwi);
|
m_qtwi_elmts.append(m_slave_elmt_qtwi);
|
||||||
|
|
||||||
m_report_elmt_qtwi = new QTreeWidgetItem(m_elements_qtwi);
|
m_report_elmt_qtwi = new QTreeWidgetItem(m_elements_qtwi);
|
||||||
m_report_elmt_qtwi->setText(0, tr("Eléments report de folio"));
|
m_report_elmt_qtwi->setText(0, tr("Eléments report de folio"));
|
||||||
m_report_elmt_qtwi->setIcon(0, QET::Icons::FolioXrefComing);
|
m_report_elmt_qtwi->setIcon(0, QET::Icons::FolioXrefComing);
|
||||||
m_report_elmt_qtwi->setCheckState(0, Qt::Checked);
|
m_report_elmt_qtwi->setCheckState(0, Qt::Checked);
|
||||||
m_qtwi_elmts.append(m_report_elmt_qtwi);
|
m_qtwi_elmts.append(m_report_elmt_qtwi);
|
||||||
|
|
||||||
m_terminal_elmt_qtwi = new QTreeWidgetItem(m_elements_qtwi);
|
m_terminal_elmt_qtwi = new QTreeWidgetItem(m_elements_qtwi);
|
||||||
m_terminal_elmt_qtwi->setText(0, tr("Eléments bornier"));
|
m_terminal_elmt_qtwi->setText(0, tr("Eléments bornier"));
|
||||||
m_terminal_elmt_qtwi->setIcon(0, QET::Icons::ElementTerminal);
|
m_terminal_elmt_qtwi->setIcon(0, QET::Icons::ElementTerminal);
|
||||||
m_terminal_elmt_qtwi->setCheckState(0, Qt::Checked);
|
m_terminal_elmt_qtwi->setCheckState(0, Qt::Checked);
|
||||||
m_qtwi_elmts.append(m_terminal_elmt_qtwi);
|
m_qtwi_elmts.append(m_terminal_elmt_qtwi);
|
||||||
@@ -659,7 +659,7 @@ QStringList SearchAndReplaceWidget::searchTerms(Diagram *diagram) const
|
|||||||
list.append(prop.title);
|
list.append(prop.title);
|
||||||
list.append(prop.author);
|
list.append(prop.author);
|
||||||
list.append(prop.filename);
|
list.append(prop.filename);
|
||||||
list.append(prop.plant);
|
list.append(prop.plant);
|
||||||
list.append(prop.locmach);
|
list.append(prop.locmach);
|
||||||
list.append(prop.indexrev);
|
list.append(prop.indexrev);
|
||||||
list.append(prop.folio);
|
list.append(prop.folio);
|
||||||
@@ -692,7 +692,7 @@ QStringList SearchAndReplaceWidget::searchTerms(Element *element) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SearchAndReplaceWidget::on_m_quit_button_clicked() {
|
void SearchAndReplaceWidget::on_m_quit_button_clicked() {
|
||||||
this->setHidden(true);
|
this->setHidden(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SearchAndReplaceWidget::on_m_advanced_pb_toggled(bool checked) {
|
void SearchAndReplaceWidget::on_m_advanced_pb_toggled(bool checked) {
|
||||||
@@ -701,7 +701,7 @@ void SearchAndReplaceWidget::on_m_advanced_pb_toggled(bool checked) {
|
|||||||
|
|
||||||
void SearchAndReplaceWidget::on_m_tree_widget_itemDoubleClicked(QTreeWidgetItem *item, int column)
|
void SearchAndReplaceWidget::on_m_tree_widget_itemDoubleClicked(QTreeWidgetItem *item, int column)
|
||||||
{
|
{
|
||||||
Q_UNUSED(column);
|
Q_UNUSED(column);
|
||||||
|
|
||||||
if (m_diagram_hash.keys().contains(item))
|
if (m_diagram_hash.keys().contains(item))
|
||||||
{
|
{
|
||||||
@@ -856,8 +856,8 @@ void SearchAndReplaceWidget::on_m_folio_pb_clicked()
|
|||||||
if (result == QDialogButtonBox::AcceptRole)
|
if (result == QDialogButtonBox::AcceptRole)
|
||||||
{
|
{
|
||||||
QString text = ui->m_folio_pb->text();
|
QString text = ui->m_folio_pb->text();
|
||||||
if (!text.endsWith(tr(" [édité]"))) {
|
if (!text.endsWith(tr(" [édité]"))) {
|
||||||
text.append(tr(" [édité]"));
|
text.append(tr(" [édité]"));
|
||||||
}
|
}
|
||||||
ui->m_folio_pb->setText(text);
|
ui->m_folio_pb->setText(text);
|
||||||
m_worker.m_titleblock_properties = dialog->titleBlockProperties();
|
m_worker.m_titleblock_properties = dialog->titleBlockProperties();
|
||||||
@@ -865,8 +865,8 @@ void SearchAndReplaceWidget::on_m_folio_pb_clicked()
|
|||||||
else if (result == QDialogButtonBox::ResetRole)
|
else if (result == QDialogButtonBox::ResetRole)
|
||||||
{
|
{
|
||||||
QString text = ui->m_folio_pb->text();
|
QString text = ui->m_folio_pb->text();
|
||||||
if (text.endsWith(tr(" [édité]"))) {
|
if (text.endsWith(tr(" [édité]"))) {
|
||||||
text.remove(tr(" [édité]"));
|
text.remove(tr(" [édité]"));
|
||||||
}
|
}
|
||||||
ui->m_folio_pb->setText(text);
|
ui->m_folio_pb->setText(text);
|
||||||
m_worker.m_titleblock_properties = TitleBlockProperties();
|
m_worker.m_titleblock_properties = TitleBlockProperties();
|
||||||
@@ -885,7 +885,7 @@ void SearchAndReplaceWidget::on_m_replace_pb_clicked()
|
|||||||
}
|
}
|
||||||
if (!m_category_qtwi.contains(qtwi) && qtwi->checkState(0) == Qt::Checked)
|
if (!m_category_qtwi.contains(qtwi) && qtwi->checkState(0) == Qt::Checked)
|
||||||
{
|
{
|
||||||
if (ui->m_folio_pb->text().endsWith(tr(" [édité]")) &&
|
if (ui->m_folio_pb->text().endsWith(tr(" [édité]")) &&
|
||||||
m_diagram_hash.keys().contains(qtwi))
|
m_diagram_hash.keys().contains(qtwi))
|
||||||
{
|
{
|
||||||
QPointer<Diagram> d = m_diagram_hash.value(qtwi);
|
QPointer<Diagram> d = m_diagram_hash.value(qtwi);
|
||||||
@@ -893,7 +893,7 @@ void SearchAndReplaceWidget::on_m_replace_pb_clicked()
|
|||||||
m_worker.replaceDiagram(d.data());
|
m_worker.replaceDiagram(d.data());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (ui->m_element_pb->text().endsWith(tr(" [édité]")) &&
|
else if (ui->m_element_pb->text().endsWith(tr(" [édité]")) &&
|
||||||
m_element_hash.keys().contains(qtwi))
|
m_element_hash.keys().contains(qtwi))
|
||||||
{
|
{
|
||||||
QPointer<Element> e = m_element_hash.value(qtwi);
|
QPointer<Element> e = m_element_hash.value(qtwi);
|
||||||
@@ -923,7 +923,7 @@ void SearchAndReplaceWidget::on_m_replace_pb_clicked()
|
|||||||
void SearchAndReplaceWidget::on_m_replace_all_pb_clicked()
|
void SearchAndReplaceWidget::on_m_replace_all_pb_clicked()
|
||||||
{
|
{
|
||||||
//Replace folio
|
//Replace folio
|
||||||
if (ui->m_folio_pb->text().endsWith(tr(" [édité]")))
|
if (ui->m_folio_pb->text().endsWith(tr(" [édité]")))
|
||||||
{
|
{
|
||||||
QList <Diagram *> diagram_list;
|
QList <Diagram *> diagram_list;
|
||||||
for (QTreeWidgetItem *qtwi : m_diagram_hash.keys())
|
for (QTreeWidgetItem *qtwi : m_diagram_hash.keys())
|
||||||
@@ -939,7 +939,7 @@ void SearchAndReplaceWidget::on_m_replace_all_pb_clicked()
|
|||||||
m_worker.replaceDiagram(diagram_list);
|
m_worker.replaceDiagram(diagram_list);
|
||||||
}
|
}
|
||||||
//Replace text
|
//Replace text
|
||||||
if (ui->m_element_pb->text().endsWith(tr(" [édité]")))
|
if (ui->m_element_pb->text().endsWith(tr(" [édité]")))
|
||||||
{
|
{
|
||||||
QList <Element *> element_list;
|
QList <Element *> element_list;
|
||||||
for (QTreeWidgetItem *qtwi : m_element_hash.keys())
|
for (QTreeWidgetItem *qtwi : m_element_hash.keys())
|
||||||
@@ -989,8 +989,8 @@ void SearchAndReplaceWidget::on_m_element_pb_clicked()
|
|||||||
if (result == QDialogButtonBox::AcceptRole)
|
if (result == QDialogButtonBox::AcceptRole)
|
||||||
{
|
{
|
||||||
QString text = ui->m_element_pb->text();
|
QString text = ui->m_element_pb->text();
|
||||||
if (!text.endsWith(tr(" [édité]"))) {
|
if (!text.endsWith(tr(" [édité]"))) {
|
||||||
text.append(tr(" [édité]"));
|
text.append(tr(" [édité]"));
|
||||||
}
|
}
|
||||||
ui->m_element_pb->setText(text);
|
ui->m_element_pb->setText(text);
|
||||||
m_worker.m_element_context = dialog->context();
|
m_worker.m_element_context = dialog->context();
|
||||||
@@ -998,8 +998,8 @@ void SearchAndReplaceWidget::on_m_element_pb_clicked()
|
|||||||
else if (result == QDialogButtonBox::ResetRole)
|
else if (result == QDialogButtonBox::ResetRole)
|
||||||
{
|
{
|
||||||
QString text = ui->m_element_pb->text();
|
QString text = ui->m_element_pb->text();
|
||||||
if (text.endsWith(tr(" [édité]"))) {
|
if (text.endsWith(tr(" [édité]"))) {
|
||||||
text.remove(tr(" [édité]"));
|
text.remove(tr(" [édité]"));
|
||||||
}
|
}
|
||||||
ui->m_element_pb->setText(text);
|
ui->m_element_pb->setText(text);
|
||||||
m_worker.m_element_context = DiagramContext();
|
m_worker.m_element_context = DiagramContext();
|
||||||
@@ -1024,6 +1024,6 @@ void SearchAndReplaceWidget::on_m_mode_cb_currentIndexChanged(int index)
|
|||||||
*/
|
*/
|
||||||
void SearchAndReplaceWidget::on_m_case_sensitive_cb_stateChanged(int arg1)
|
void SearchAndReplaceWidget::on_m_case_sensitive_cb_stateChanged(int arg1)
|
||||||
{
|
{
|
||||||
Q_UNUSED(arg1);
|
Q_UNUSED(arg1);
|
||||||
search();
|
search();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -178,13 +178,13 @@ namespace autonum
|
|||||||
{
|
{
|
||||||
QString str = formula;
|
QString str = formula;
|
||||||
str.replace("%{label}", dc.value("label").toString());
|
str.replace("%{label}", dc.value("label").toString());
|
||||||
str.replace("%{plant}", dc.value("plant").toString());
|
str.replace("%{plant}", dc.value("plant").toString());
|
||||||
str.replace("%{comment}", dc.value("comment").toString());
|
str.replace("%{comment}", dc.value("comment").toString());
|
||||||
str.replace("%{description}", dc.value("description").toString());
|
str.replace("%{description}", dc.value("description").toString());
|
||||||
str.replace("%{designation}", dc.value("designation").toString());
|
str.replace("%{designation}", dc.value("designation").toString());
|
||||||
str.replace("%{manufacturer}", dc.value("manufacturer").toString());
|
str.replace("%{manufacturer}", dc.value("manufacturer").toString());
|
||||||
str.replace("%{manufacturer-reference}", dc.value("manufacturer-reference").toString());
|
str.replace("%{manufacturer-reference}", dc.value("manufacturer-reference").toString());
|
||||||
str.replace("%{supplier}", dc.value("supplier").toString());
|
str.replace("%{supplier}", dc.value("supplier").toString());
|
||||||
str.replace("%{quantity}", dc.value("quantity").toString());
|
str.replace("%{quantity}", dc.value("quantity").toString());
|
||||||
str.replace("%{unity}", dc.value("unity").toString());
|
str.replace("%{unity}", dc.value("unity").toString());
|
||||||
str.replace("%{auxiliary1}", dc.value("auxiliary1").toString());
|
str.replace("%{auxiliary1}", dc.value("auxiliary1").toString());
|
||||||
@@ -212,7 +212,7 @@ namespace autonum
|
|||||||
m_assigned_label.replace("%f", QString::number(m_diagram->folioIndex()+1));
|
m_assigned_label.replace("%f", QString::number(m_diagram->folioIndex()+1));
|
||||||
m_assigned_label.replace("%id", QString::number(m_diagram->folioIndex()+1));
|
m_assigned_label.replace("%id", QString::number(m_diagram->folioIndex()+1));
|
||||||
m_assigned_label.replace("%total", QString::number(m_diagram->border_and_titleblock.folioTotal()));
|
m_assigned_label.replace("%total", QString::number(m_diagram->border_and_titleblock.folioTotal()));
|
||||||
m_assigned_label.replace("%M", m_diagram -> border_and_titleblock.plant());
|
m_assigned_label.replace("%M", m_diagram -> border_and_titleblock.plant());
|
||||||
m_assigned_label.replace("%LM", m_diagram -> border_and_titleblock.locmach());
|
m_assigned_label.replace("%LM", m_diagram -> border_and_titleblock.locmach());
|
||||||
|
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
@@ -426,7 +426,7 @@ namespace autonum
|
|||||||
else if (type == "folio") {
|
else if (type == "folio") {
|
||||||
formula.append("%F");
|
formula.append("%F");
|
||||||
}
|
}
|
||||||
else if (type == "plant") {
|
else if (type == "plant") {
|
||||||
formula.append("%M");
|
formula.append("%M");
|
||||||
}
|
}
|
||||||
else if (type == "locmach") {
|
else if (type == "locmach") {
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ QStringList NumerotationContext::itemAt(const int i) const {
|
|||||||
* @return all type use to numerotation
|
* @return all type use to numerotation
|
||||||
*/
|
*/
|
||||||
QString NumerotationContext::validRegExpNum () const {
|
QString NumerotationContext::validRegExpNum () const {
|
||||||
return ("unit|unitfolio|ten|tenfolio|hundred|hundredfolio|string|idfolio|folio|plant|locmach|elementline|elementcolumn|elementprefix");
|
return ("unit|unitfolio|ten|tenfolio|hundred|hundredfolio|string|idfolio|folio|plant|locmach|elementline|elementcolumn|elementprefix");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -124,8 +124,8 @@ void NumerotationContextCommands::setNumStrategy(const QString &str) {
|
|||||||
strategy_ = new FolioNum (diagram_);
|
strategy_ = new FolioNum (diagram_);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (str=="plant"){
|
else if (str=="plant"){
|
||||||
strategy_ = new PlantNum (diagram_);
|
strategy_ = new PlantNum (diagram_);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (str=="locmach"){
|
else if (str=="locmach"){
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ class FolioNum: public NumStrategy
|
|||||||
class PlantNum: public NumStrategy
|
class PlantNum: public NumStrategy
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PlantNum (Diagram *);
|
PlantNum (Diagram *);
|
||||||
QString toRepresentedString(const QString) const override;
|
QString toRepresentedString(const QString) const override;
|
||||||
NumerotationContext next (const NumerotationContext &, const int) const override;
|
NumerotationContext next (const NumerotationContext &, const int) const override;
|
||||||
NumerotationContext previous (const NumerotationContext &, const int) const override;
|
NumerotationContext previous (const NumerotationContext &, const int) const override;
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ NumPartEditorW::NumPartEditorW (NumerotationContext &context, int i, int type, Q
|
|||||||
else if (strl.at(0)=="string") setType(NumPartEditorW::string);
|
else if (strl.at(0)=="string") setType(NumPartEditorW::string);
|
||||||
else if (strl.at(0)=="idfolio") setType(NumPartEditorW::idfolio);
|
else if (strl.at(0)=="idfolio") setType(NumPartEditorW::idfolio);
|
||||||
else if (strl.at(0)=="folio") setType(NumPartEditorW::folio);
|
else if (strl.at(0)=="folio") setType(NumPartEditorW::folio);
|
||||||
else if (strl.at(0)=="plant") setType(NumPartEditorW::plant);
|
else if (strl.at(0)=="plant") setType(NumPartEditorW::plant);
|
||||||
else if (strl.at(0)=="locmach") setType(NumPartEditorW::locmach);
|
else if (strl.at(0)=="locmach") setType(NumPartEditorW::locmach);
|
||||||
else if (strl.at(0)=="elementline") setType(NumPartEditorW::elementline);
|
else if (strl.at(0)=="elementline") setType(NumPartEditorW::elementline);
|
||||||
else if (strl.at(0)=="elementcolumn") setType(NumPartEditorW::elementcolumn);
|
else if (strl.at(0)=="elementcolumn") setType(NumPartEditorW::elementcolumn);
|
||||||
@@ -91,12 +91,12 @@ void NumPartEditorW::setVisibleItems()
|
|||||||
{
|
{
|
||||||
items << tr("Chiffre 1") << tr("Chiffre 1 - Folio") << tr("Chiffre 01")
|
items << tr("Chiffre 1") << tr("Chiffre 1 - Folio") << tr("Chiffre 01")
|
||||||
<< tr("Chiffre 01 - Folio") << tr("Chiffre 001") << tr("Chiffre 001 - Folio")
|
<< tr("Chiffre 01 - Folio") << tr("Chiffre 001") << tr("Chiffre 001 - Folio")
|
||||||
<< tr("Texte") << tr("N° folio") << tr("Folio") << tr("Installation") << tr("Locmach");
|
<< tr("Texte") << tr("N° folio") << tr("Folio") << tr("Installation") << tr("Locmach");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
items << tr("Chiffre 1") << tr("Chiffre 1 - Folio") << tr("Chiffre 01")
|
items << tr("Chiffre 1") << tr("Chiffre 1 - Folio") << tr("Chiffre 01")
|
||||||
<< tr("Chiffre 01 - Folio") << tr("Chiffre 001") << tr("Chiffre 001 - Folio")
|
<< tr("Chiffre 01 - Folio") << tr("Chiffre 001") << tr("Chiffre 001 - Folio")
|
||||||
<< tr("Texte") << tr("N° folio") << tr("Folio") << tr("Installation") << tr("Locmach")
|
<< tr("Texte") << tr("N° folio") << tr("Folio") << tr("Installation") << tr("Locmach")
|
||||||
<< tr("Element Line") << tr("Element Column") << tr("Element Prefix");
|
<< tr("Element Line") << tr("Element Column") << tr("Element Prefix");
|
||||||
ui->type_cb->insertItems(0,items);
|
ui->type_cb->insertItems(0,items);
|
||||||
}
|
}
|
||||||
@@ -136,8 +136,8 @@ NumerotationContext NumPartEditorW::toNumContext() {
|
|||||||
case folio:
|
case folio:
|
||||||
type_str = "folio";
|
type_str = "folio";
|
||||||
break;
|
break;
|
||||||
case plant:
|
case plant:
|
||||||
type_str = "plant";
|
type_str = "plant";
|
||||||
break;
|
break;
|
||||||
case locmach:
|
case locmach:
|
||||||
type_str = "locmach";
|
type_str = "locmach";
|
||||||
@@ -164,7 +164,7 @@ NumerotationContext NumPartEditorW::toNumContext() {
|
|||||||
* @return true if value field isn't empty or if type is folio
|
* @return true if value field isn't empty or if type is folio
|
||||||
*/
|
*/
|
||||||
bool NumPartEditorW::isValid() {
|
bool NumPartEditorW::isValid() {
|
||||||
if (type_ == folio || type_ == idfolio || type_ == elementline || type_ == plant || type_ == locmach ||
|
if (type_ == folio || type_ == idfolio || type_ == elementline || type_ == plant || type_ == locmach ||
|
||||||
type_ == elementcolumn || type_ == elementprefix) {return true;}
|
type_ == elementcolumn || type_ == elementprefix) {return true;}
|
||||||
else if(ui -> value_field -> text().isEmpty()) {return false;}
|
else if(ui -> value_field -> text().isEmpty()) {return false;}
|
||||||
else return true;
|
else return true;
|
||||||
@@ -193,8 +193,8 @@ void NumPartEditorW::on_type_cb_activated(int) {
|
|||||||
setType(idfolio);
|
setType(idfolio);
|
||||||
else if (ui->type_cb->currentText() == tr("Folio"))
|
else if (ui->type_cb->currentText() == tr("Folio"))
|
||||||
setType(folio);
|
setType(folio);
|
||||||
else if (ui->type_cb->currentText() == tr("Installation"))
|
else if (ui->type_cb->currentText() == tr("Installation"))
|
||||||
setType(plant);
|
setType(plant);
|
||||||
else if (ui->type_cb->currentText() == tr("Locmach"))
|
else if (ui->type_cb->currentText() == tr("Locmach"))
|
||||||
setType(locmach);
|
setType(locmach);
|
||||||
else if (ui->type_cb->currentText() == tr("Element Line"))
|
else if (ui->type_cb->currentText() == tr("Element Line"))
|
||||||
@@ -234,7 +234,7 @@ void NumPartEditorW::setType(NumPartEditorW::type t, bool fnum) {
|
|||||||
//if @t is a numeric type and preview type @type_ isn't a numeric type
|
//if @t is a numeric type and preview type @type_ isn't a numeric type
|
||||||
//or @fnum is true, we set numeric behavior
|
//or @fnum is true, we set numeric behavior
|
||||||
if ( ((t==unit || t==unitfolio || t==ten || t==tenfolio || t==hundred || t==hundredfolio) &&
|
if ( ((t==unit || t==unitfolio || t==ten || t==tenfolio || t==hundred || t==hundredfolio) &&
|
||||||
(type_==string || type_==folio || type_==plant || type_==locmach ||type_==idfolio ||
|
(type_==string || type_==folio || type_==plant || type_==locmach ||type_==idfolio ||
|
||||||
type_==elementcolumn || type_==elementline || type_==elementprefix))
|
type_==elementcolumn || type_==elementline || type_==elementprefix))
|
||||||
|| fnum) {
|
|| fnum) {
|
||||||
ui -> value_field -> clear();
|
ui -> value_field -> clear();
|
||||||
@@ -244,7 +244,7 @@ void NumPartEditorW::setType(NumPartEditorW::type t, bool fnum) {
|
|||||||
ui -> increase_spinBox -> setValue(1);
|
ui -> increase_spinBox -> setValue(1);
|
||||||
}
|
}
|
||||||
//@t isn't a numeric type
|
//@t isn't a numeric type
|
||||||
else if (t == string || t == folio || t == idfolio || t == elementline || t == plant || t == locmach ||
|
else if (t == string || t == folio || t == idfolio || t == elementline || t == plant || t == locmach ||
|
||||||
t == elementcolumn || t == elementprefix) {
|
t == elementcolumn || t == elementprefix) {
|
||||||
ui -> value_field -> clear();
|
ui -> value_field -> clear();
|
||||||
ui -> increase_spinBox -> setDisabled(true);
|
ui -> increase_spinBox -> setDisabled(true);
|
||||||
@@ -256,7 +256,7 @@ void NumPartEditorW::setType(NumPartEditorW::type t, bool fnum) {
|
|||||||
ui -> value_field -> setDisabled(true);
|
ui -> value_field -> setDisabled(true);
|
||||||
ui -> increase_spinBox -> setDisabled(true);
|
ui -> increase_spinBox -> setDisabled(true);
|
||||||
}
|
}
|
||||||
else if (t==plant) {
|
else if (t==plant) {
|
||||||
ui -> value_field -> setDisabled(true);
|
ui -> value_field -> setDisabled(true);
|
||||||
ui -> increase_spinBox -> setDisabled(true);
|
ui -> increase_spinBox -> setDisabled(true);
|
||||||
}
|
}
|
||||||
@@ -309,8 +309,8 @@ void NumPartEditorW::setCurrentIndex(NumPartEditorW::type t) {
|
|||||||
i = ui->type_cb->findText(tr("N° folio"));
|
i = ui->type_cb->findText(tr("N° folio"));
|
||||||
else if (t == folio)
|
else if (t == folio)
|
||||||
i = ui->type_cb->findText(tr("Folio"));
|
i = ui->type_cb->findText(tr("Folio"));
|
||||||
else if (t == plant)
|
else if (t == plant)
|
||||||
i = ui->type_cb->findText(tr("Installation"));
|
i = ui->type_cb->findText(tr("Installation"));
|
||||||
else if (t == locmach)
|
else if (t == locmach)
|
||||||
i = ui->type_cb->findText(tr("Locmach"));
|
i = ui->type_cb->findText(tr("Locmach"));
|
||||||
else if (t == elementline)
|
else if (t == elementline)
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class NumPartEditorW : public QWidget
|
|||||||
~NumPartEditorW() override;
|
~NumPartEditorW() override;
|
||||||
|
|
||||||
enum type {unit,unitfolio,ten,tenfolio, hundred, hundredfolio,
|
enum type {unit,unitfolio,ten,tenfolio, hundred, hundredfolio,
|
||||||
string,idfolio,folio,plant,locmach,
|
string,idfolio,folio,plant,locmach,
|
||||||
elementline,elementcolumn,elementprefix,
|
elementline,elementcolumn,elementprefix,
|
||||||
};
|
};
|
||||||
NumerotationContext toNumContext();
|
NumerotationContext toNumContext();
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ TitleBlockProperties BorderTitleBlock::exportTitleBlock() {
|
|||||||
ip.date = date();
|
ip.date = date();
|
||||||
ip.title = title();
|
ip.title = title();
|
||||||
ip.filename = fileName();
|
ip.filename = fileName();
|
||||||
ip.plant = plant();
|
ip.plant = plant();
|
||||||
ip.locmach = locmach();
|
ip.locmach = locmach();
|
||||||
ip.indexrev = indexrev();
|
ip.indexrev = indexrev();
|
||||||
ip.version = version();
|
ip.version = version();
|
||||||
@@ -264,7 +264,7 @@ void BorderTitleBlock::importTitleBlock(const TitleBlockProperties &ip) {
|
|||||||
setDate(ip.date);
|
setDate(ip.date);
|
||||||
setTitle(ip.title);
|
setTitle(ip.title);
|
||||||
setFileName(ip.filename);
|
setFileName(ip.filename);
|
||||||
setPlant(ip.plant);
|
setPlant(ip.plant);
|
||||||
setLocMach(ip.locmach);
|
setLocMach(ip.locmach);
|
||||||
setIndicerev(ip.indexrev);
|
setIndicerev(ip.indexrev);
|
||||||
setVersion(QET::displayedVersion);
|
setVersion(QET::displayedVersion);
|
||||||
@@ -715,7 +715,7 @@ void BorderTitleBlock::updateDiagramContextForTitleBlock(const DiagramContext &i
|
|||||||
context.addValue("date", btb_date_.toString(Qt::SystemLocaleShortDate));
|
context.addValue("date", btb_date_.toString(Qt::SystemLocaleShortDate));
|
||||||
context.addValue("title", btb_title_);
|
context.addValue("title", btb_title_);
|
||||||
context.addValue("filename", btb_filename_);
|
context.addValue("filename", btb_filename_);
|
||||||
context.addValue("plant", btb_plant_);
|
context.addValue("plant", btb_plant_);
|
||||||
context.addValue("locmach", btb_locmach_);
|
context.addValue("locmach", btb_locmach_);
|
||||||
context.addValue("indexrev", btb_indexrev_);
|
context.addValue("indexrev", btb_indexrev_);
|
||||||
context.addValue("version", btb_version_);
|
context.addValue("version", btb_version_);
|
||||||
|
|||||||
@@ -97,8 +97,8 @@ class BorderTitleBlock : public QObject
|
|||||||
QString folio() const { return(btb_folio_); }
|
QString folio() const { return(btb_folio_); }
|
||||||
/// @return the value of the title block "Folio" field as displayed
|
/// @return the value of the title block "Folio" field as displayed
|
||||||
QString finalfolio() const { return(btb_final_folio_); }
|
QString finalfolio() const { return(btb_final_folio_); }
|
||||||
/// @return the value of the title block "Plant" field
|
/// @return the value of the title block "Plant" field
|
||||||
QString plant() const { return(btb_plant_); }
|
QString plant() const { return(btb_plant_); }
|
||||||
/// @return the value of the title block "Locmach" field
|
/// @return the value of the title block "Locmach" field
|
||||||
QString locmach() const { return(btb_locmach_); }
|
QString locmach() const { return(btb_locmach_); }
|
||||||
/// @return the value of the revision index block "Folio" field
|
/// @return the value of the revision index block "Folio" field
|
||||||
@@ -155,7 +155,7 @@ class BorderTitleBlock : public QObject
|
|||||||
}
|
}
|
||||||
void setFolioData(int, int, const QString& = nullptr, const DiagramContext & = DiagramContext());
|
void setFolioData(int, int, const QString& = nullptr, const DiagramContext & = DiagramContext());
|
||||||
/// @param author the new value of the "File" field
|
/// @param author the new value of the "File" field
|
||||||
void setPlant(const QString &plant) { btb_plant_ = plant; }
|
void setPlant(const QString &plant) { btb_plant_ = plant; }
|
||||||
void setLocMach(const QString &locmach) { btb_locmach_ = locmach; }
|
void setLocMach(const QString &locmach) { btb_locmach_ = locmach; }
|
||||||
void setIndicerev(const QString &indexrev){ btb_indexrev_ = indexrev; }
|
void setIndicerev(const QString &indexrev){ btb_indexrev_ = indexrev; }
|
||||||
void setFileName(const QString &filename) { btb_filename_ = filename; }
|
void setFileName(const QString &filename) { btb_filename_ = filename; }
|
||||||
@@ -237,7 +237,7 @@ class BorderTitleBlock : public QObject
|
|||||||
QDate btb_date_;
|
QDate btb_date_;
|
||||||
QString btb_title_;
|
QString btb_title_;
|
||||||
QString btb_folio_;
|
QString btb_folio_;
|
||||||
QString btb_plant_;
|
QString btb_plant_;
|
||||||
QString btb_locmach_;
|
QString btb_locmach_;
|
||||||
QString btb_indexrev_;
|
QString btb_indexrev_;
|
||||||
QString btb_final_folio_;
|
QString btb_final_folio_;
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ void DiagramFolioList::drawBackground(QPainter *p, const QRectF &r)
|
|||||||
fillRow(p, row_rect, diagram_list[i] -> border_and_titleblock.author(),
|
fillRow(p, row_rect, diagram_list[i] -> border_and_titleblock.author(),
|
||||||
diagram_list[i] -> title(),
|
diagram_list[i] -> title(),
|
||||||
diagram_list[i] -> border_and_titleblock.finalfolio(),
|
diagram_list[i] -> border_and_titleblock.finalfolio(),
|
||||||
diagram_list[i] -> border_and_titleblock.plant(),
|
diagram_list[i] -> border_and_titleblock.plant(),
|
||||||
diagram_list[i] -> border_and_titleblock.locmach(),
|
diagram_list[i] -> border_and_titleblock.locmach(),
|
||||||
diagram_list[i] -> border_and_titleblock.indexrev(),
|
diagram_list[i] -> border_and_titleblock.indexrev(),
|
||||||
diagram_list[i] -> border_and_titleblock.date().toString(Qt::SystemLocaleShortDate));
|
diagram_list[i] -> border_and_titleblock.date().toString(Qt::SystemLocaleShortDate));
|
||||||
@@ -101,7 +101,7 @@ void DiagramFolioList::drawBackground(QPainter *p, const QRectF &r)
|
|||||||
fillRow(p, row_rect, diagram_list[i] -> border_and_titleblock.author(),
|
fillRow(p, row_rect, diagram_list[i] -> border_and_titleblock.author(),
|
||||||
diagram_list[i] -> title(),
|
diagram_list[i] -> title(),
|
||||||
QString::number(diagram_list[i] ->folioIndex()+1),
|
QString::number(diagram_list[i] ->folioIndex()+1),
|
||||||
diagram_list[i] -> border_and_titleblock.plant(),
|
diagram_list[i] -> border_and_titleblock.plant(),
|
||||||
diagram_list[i] -> border_and_titleblock.locmach(),
|
diagram_list[i] -> border_and_titleblock.locmach(),
|
||||||
diagram_list[i] -> border_and_titleblock.indexrev(),
|
diagram_list[i] -> border_and_titleblock.indexrev(),
|
||||||
diagram_list[i] -> border_and_titleblock.date().toString(Qt::SystemLocaleShortDate));
|
diagram_list[i] -> border_and_titleblock.date().toString(Qt::SystemLocaleShortDate));
|
||||||
@@ -120,7 +120,7 @@ void DiagramFolioList::drawBackground(QPainter *p, const QRectF &r)
|
|||||||
* @param row_rect rectangle where we must draw the new row
|
* @param row_rect rectangle where we must draw the new row
|
||||||
*/
|
*/
|
||||||
void DiagramFolioList::fillRow(QPainter *qp, const QRectF &row_rect, const QString& author, const QString& title,
|
void DiagramFolioList::fillRow(QPainter *qp, const QRectF &row_rect, const QString& author, const QString& title,
|
||||||
const QString& folio, const QString& plant, const QString& loc, const QString& indexrev, const QString& date)
|
const QString& folio, const QString& plant, const QString& loc, const QString& indexrev, const QString& date)
|
||||||
{
|
{
|
||||||
qreal x = row_rect.topLeft().x();
|
qreal x = row_rect.topLeft().x();
|
||||||
qreal y = row_rect.topLeft().y();
|
qreal y = row_rect.topLeft().y();
|
||||||
@@ -166,12 +166,12 @@ void DiagramFolioList::fillRow(QPainter *qp, const QRectF &row_rect, const QStri
|
|||||||
x += colWidths[1]*row_rect.width();
|
x += colWidths[1]*row_rect.width();
|
||||||
|
|
||||||
|
|
||||||
if (origFontMetrics.width(plant) > 0.95*colWidths[2]*row_rect.width())
|
if (origFontMetrics.width(plant) > 0.95*colWidths[2]*row_rect.width())
|
||||||
workingFont.setPointSizeF(origFontSize * 0.95*colWidths[2]*row_rect.width() / origFontMetrics.width(plant));
|
workingFont.setPointSizeF(origFontSize * 0.95*colWidths[2]*row_rect.width() / origFontMetrics.width(plant));
|
||||||
else
|
else
|
||||||
workingFont.setPointSizeF(origFontSize);
|
workingFont.setPointSizeF(origFontSize);
|
||||||
qp -> setFont(workingFont);
|
qp -> setFont(workingFont);
|
||||||
qp -> drawText(QRectF(x, y, colWidths[3]*row_rect.width(), row_rect.height()), Qt::AlignCenter, plant);
|
qp -> drawText(QRectF(x, y, colWidths[3]*row_rect.width(), row_rect.height()), Qt::AlignCenter, plant);
|
||||||
x += colWidths[2]*row_rect.width();
|
x += colWidths[2]*row_rect.width();
|
||||||
|
|
||||||
|
|
||||||
@@ -219,15 +219,15 @@ void DiagramFolioList::buildGrid(QPainter *qp, const QRectF &rect, int rows, int
|
|||||||
qDeleteAll (list_rectangles_);
|
qDeleteAll (list_rectangles_);
|
||||||
list_rectangles_.clear();
|
list_rectangles_.clear();
|
||||||
|
|
||||||
qreal sum = 0;
|
qreal sum = 0;
|
||||||
for (int i = 0; i < 7; i++ )
|
for (int i = 0; i < 7; i++ )
|
||||||
sum += colWidths[i];
|
sum += colWidths[i];
|
||||||
if ( sum < 0.99 || sum > 1.01 ) {
|
if ( sum < 0.99 || sum > 1.01 ) {
|
||||||
qDebug() << "Invalid input: Column widths do not sum to 1";
|
qDebug() << "Invalid input: Column widths do not sum to 1";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal tablesSpacing = rect.height() * 0.02;
|
qreal tablesSpacing = rect.height() * 0.02;
|
||||||
qreal tableWidth = (rect.width() - tablesSpacing*(tables+1) ) / tables;
|
qreal tableWidth = (rect.width() - tablesSpacing*(tables+1) ) / tables;
|
||||||
qreal rowHeight = (rect.height() - 2*tablesSpacing) / rows;
|
qreal rowHeight = (rect.height() - 2*tablesSpacing) / rows;
|
||||||
int cols = 7;//colWidths.size();
|
int cols = 7;//colWidths.size();
|
||||||
@@ -264,13 +264,13 @@ void DiagramFolioList::fillHeader(QPainter *qp, const QRectF &row_RectF) {
|
|||||||
QString authorTranslatable(QObject::tr("Auteur"));
|
QString authorTranslatable(QObject::tr("Auteur"));
|
||||||
QString titleTranslatable(QObject::tr("Titre"));
|
QString titleTranslatable(QObject::tr("Titre"));
|
||||||
QString folioTranslatable(QObject::tr("Folio"));
|
QString folioTranslatable(QObject::tr("Folio"));
|
||||||
QString plantTranslatable(QObject::tr("Installation"));
|
QString plantTranslatable(QObject::tr("Installation"));
|
||||||
QString locTranslatable(QObject::tr("Localisation"));
|
QString locTranslatable(QObject::tr("Localisation"));
|
||||||
QString indexrevTranslatable(QObject::tr("Rev"));
|
QString indexrevTranslatable(QObject::tr("Rev"));
|
||||||
QString dateTranslatable(QObject::tr("Date"));
|
QString dateTranslatable(QObject::tr("Date"));
|
||||||
|
|
||||||
qp->save();
|
qp->save();
|
||||||
qp->setFont(QETApp::diagramTextsFont(13));
|
qp->setFont(QETApp::diagramTextsFont(13));
|
||||||
fillRow(qp, row_RectF, authorTranslatable, titleTranslatable, folioTranslatable, plantTranslatable, locTranslatable, indexrevTranslatable, dateTranslatable);
|
fillRow(qp, row_RectF, authorTranslatable, titleTranslatable, folioTranslatable, plantTranslatable, locTranslatable, indexrevTranslatable, dateTranslatable);
|
||||||
qp->restore();
|
qp->restore();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -741,7 +741,7 @@ bool QETElementEditor::checkElement()
|
|||||||
if (errors.size())
|
if (errors.size())
|
||||||
dialog_message += QString (tr(" et"));
|
dialog_message += QString (tr(" et"));
|
||||||
|
|
||||||
dialog_message += QString (tr(" %n avertissement(s)", "warnings", warnings.size()));
|
dialog_message += QString (tr(" %n avertissement(s)", "warnings", warnings.size()));
|
||||||
}
|
}
|
||||||
dialog_message += " :";
|
dialog_message += " :";
|
||||||
|
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ void ElementPropertiesEditorWidget::updateTree()
|
|||||||
*/
|
*/
|
||||||
void ElementPropertiesEditorWidget::populateTree()
|
void ElementPropertiesEditorWidget::populateTree()
|
||||||
{
|
{
|
||||||
QStringList keys{"label", "plant", "comment", "description", "designation", "manufacturer", "manufacturer-reference", "supplier", "quantity", "unity", "machine-manufacturer-reference"};
|
QStringList keys{"label", "plant", "comment", "description", "designation", "manufacturer", "manufacturer-reference", "supplier", "quantity", "unity", "machine-manufacturer-reference"};
|
||||||
|
|
||||||
for(const QString& key : keys)
|
for(const QString& key : keys)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ ExportElementTextPattern::ExportElementTextPattern(Element *elmt) :
|
|||||||
{
|
{
|
||||||
bool r = QMessageBox::question(parentWidget(),
|
bool r = QMessageBox::question(parentWidget(),
|
||||||
QObject::tr("Configuration de textes"),
|
QObject::tr("Configuration de textes"),
|
||||||
QObject::tr("Une configuration de textes nommée << %1 >> existe déjà.\n"
|
QObject::tr("Une configuration de textes nommée << %1 >> existe déjà.\n"
|
||||||
"Voulez-vous la remplacer ?").arg(m_name));
|
"Voulez-vous la remplacer ?").arg(m_name));
|
||||||
|
|
||||||
if(r == false)
|
if(r == false)
|
||||||
|
|||||||
@@ -107,14 +107,14 @@ QString nomenclature::getNomenclature()
|
|||||||
""+ QObject::tr("P001") +"\n"; //:Don't translate this text! //ID for function
|
""+ QObject::tr("P001") +"\n"; //:Don't translate this text! //ID for function
|
||||||
data += QObject::tr("Position du folio") +";"
|
data += QObject::tr("Position du folio") +";"
|
||||||
""+ QObject::tr("Titre de folio") +";"
|
""+ QObject::tr("Titre de folio") +";"
|
||||||
""+ QObject::tr("Numéro de folio") +";"
|
""+ QObject::tr("Numéro de folio") +";"
|
||||||
""+ QObject::tr("Désignation qet") +";"
|
""+ QObject::tr("Désignation qet") +";"
|
||||||
""+ QObject::tr("Position") +";"
|
""+ QObject::tr("Position") +";"
|
||||||
""+ QObject::tr("Label") +";"
|
""+ QObject::tr("Label") +";"
|
||||||
""+ QObject::tr("Formule du label") +";"
|
""+ QObject::tr("Formule du label") +";"
|
||||||
""+ QObject::tr("Désignation") +";"
|
""+ QObject::tr("Désignation") +";"
|
||||||
""+ QObject::tr("Description") +";"
|
""+ QObject::tr("Description") +";"
|
||||||
""+ QObject::tr("Installation") +";"
|
""+ QObject::tr("Installation") +";"
|
||||||
""+ QObject::tr("Commentaire") +";"
|
""+ QObject::tr("Commentaire") +";"
|
||||||
""+ QObject::tr("Fabricant") +";"
|
""+ QObject::tr("Fabricant") +";"
|
||||||
""+ QObject::tr("Numéro de commande") +";"
|
""+ QObject::tr("Numéro de commande") +";"
|
||||||
@@ -176,11 +176,11 @@ QString nomenclature::getElementInfo(Element *elmt) {
|
|||||||
info += autonum::AssignVariables::formulaToLabel(elmt_info["formula"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
info += autonum::AssignVariables::formulaToLabel(elmt_info["formula"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
||||||
info += autonum::AssignVariables::formulaToLabel(elmt_info["designation"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
info += autonum::AssignVariables::formulaToLabel(elmt_info["designation"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
||||||
info += autonum::AssignVariables::formulaToLabel(elmt_info["description"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
info += autonum::AssignVariables::formulaToLabel(elmt_info["description"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
||||||
info += autonum::AssignVariables::formulaToLabel(elmt_info["plant"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
info += autonum::AssignVariables::formulaToLabel(elmt_info["plant"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
||||||
info += autonum::AssignVariables::formulaToLabel(elmt_info["comment"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
info += autonum::AssignVariables::formulaToLabel(elmt_info["comment"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
||||||
info += autonum::AssignVariables::formulaToLabel(elmt_info["manufacturer"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
info += autonum::AssignVariables::formulaToLabel(elmt_info["manufacturer"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
||||||
info += autonum::AssignVariables::formulaToLabel(elmt_info["manufacturer-reference"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
info += autonum::AssignVariables::formulaToLabel(elmt_info["manufacturer-reference"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
||||||
info += autonum::AssignVariables::formulaToLabel(elmt_info["supplier"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
info += autonum::AssignVariables::formulaToLabel(elmt_info["supplier"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
||||||
info += autonum::AssignVariables::formulaToLabel(elmt_info["quantity"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
info += autonum::AssignVariables::formulaToLabel(elmt_info["quantity"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
||||||
info += autonum::AssignVariables::formulaToLabel(elmt_info["unity"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
info += autonum::AssignVariables::formulaToLabel(elmt_info["unity"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
||||||
info += autonum::AssignVariables::formulaToLabel(elmt_info["auxiliary1"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
info += autonum::AssignVariables::formulaToLabel(elmt_info["auxiliary1"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ QStringList QETApp::elementInfoKeys()
|
|||||||
QStringList info_list;
|
QStringList info_list;
|
||||||
info_list << "formula"
|
info_list << "formula"
|
||||||
<< "label"
|
<< "label"
|
||||||
<< "plant"
|
<< "plant"
|
||||||
<< "location"
|
<< "location"
|
||||||
|
|
||||||
<< "comment"
|
<< "comment"
|
||||||
@@ -308,7 +308,7 @@ QStringList QETApp::elementInfoKeys()
|
|||||||
<< "manufacturer"
|
<< "manufacturer"
|
||||||
<< "manufacturer-reference"
|
<< "manufacturer-reference"
|
||||||
<< "machine-manufacturer-reference"
|
<< "machine-manufacturer-reference"
|
||||||
<< "supplier"
|
<< "supplier"
|
||||||
<< "quantity"
|
<< "quantity"
|
||||||
<< "unity";
|
<< "unity";
|
||||||
return info_list;
|
return info_list;
|
||||||
@@ -323,9 +323,9 @@ QStringList QETApp::elementInfoKeys()
|
|||||||
*/
|
*/
|
||||||
QString QETApp::elementTranslatedInfoKey(const QString &info)
|
QString QETApp::elementTranslatedInfoKey(const QString &info)
|
||||||
{
|
{
|
||||||
if (info == "formula") return tr("Formule du label");
|
if (info == "formula") return tr("Formule du label");
|
||||||
else if (info == "label") return tr("Label");
|
else if (info == "label") return tr("Label");
|
||||||
else if (info == "plant") return tr("Installation");
|
else if (info == "plant") return tr("Installation");
|
||||||
else if (info == "location") return tr("Localisation");
|
else if (info == "location") return tr("Localisation");
|
||||||
|
|
||||||
else if (info == "comment") return tr("Commentaire");
|
else if (info == "comment") return tr("Commentaire");
|
||||||
@@ -339,7 +339,7 @@ QString QETApp::elementTranslatedInfoKey(const QString &info)
|
|||||||
else if (info == "manufacturer") return tr("Fabricant");
|
else if (info == "manufacturer") return tr("Fabricant");
|
||||||
else if (info == "manufacturer-reference") return tr("Numéro de commande");
|
else if (info == "manufacturer-reference") return tr("Numéro de commande");
|
||||||
else if (info == "machine-manufacturer-reference") return tr("Numéro interne");
|
else if (info == "machine-manufacturer-reference") return tr("Numéro interne");
|
||||||
else if (info == "supplier") return tr("Fournisseur");
|
else if (info == "supplier") return tr("Fournisseur");
|
||||||
else if (info == "quantity") return tr("Quantité");
|
else if (info == "quantity") return tr("Quantité");
|
||||||
else if (info == "unity") return tr("Unité");
|
else if (info == "unity") return tr("Unité");
|
||||||
|
|
||||||
@@ -359,13 +359,13 @@ QString QETApp::elementInfoToVar(const QString &info)
|
|||||||
{
|
{
|
||||||
if (info == "formula") return QString("%{formula}");
|
if (info == "formula") return QString("%{formula}");
|
||||||
else if (info == "label") return QString("%{label}");
|
else if (info == "label") return QString("%{label}");
|
||||||
else if (info == "plant") return QString("%{plant}");
|
else if (info == "plant") return QString("%{plant}");
|
||||||
else if (info == "comment") return QString("%{comment}");
|
else if (info == "comment") return QString("%{comment}");
|
||||||
else if (info == "description") return QString("%{description}");
|
else if (info == "description") return QString("%{description}");
|
||||||
else if (info == "designation") return QString("%{designation}");
|
else if (info == "designation") return QString("%{designation}");
|
||||||
else if (info == "manufacturer") return QString("%{manufacturer}");
|
else if (info == "manufacturer") return QString("%{manufacturer}");
|
||||||
else if (info == "manufacturer-reference") return QString("%{manufacturer-reference}");
|
else if (info == "manufacturer-reference") return QString("%{manufacturer-reference}");
|
||||||
else if (info == "supplier") return QString("%{supplier}");
|
else if (info == "supplier") return QString("%{supplier}");
|
||||||
else if (info == "quantity") return QString("%{quantity}");
|
else if (info == "quantity") return QString("%{quantity}");
|
||||||
else if (info == "unity") return QString("%{unity}");
|
else if (info == "unity") return QString("%{unity}");
|
||||||
else if (info == "auxiliary1") return QString("%{auxiliary1}");
|
else if (info == "auxiliary1") return QString("%{auxiliary1}");
|
||||||
@@ -493,17 +493,17 @@ QString QETApp::customElementsDir()
|
|||||||
{
|
{
|
||||||
if (m_user_custom_elements_dir.isEmpty())
|
if (m_user_custom_elements_dir.isEmpty())
|
||||||
{
|
{
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
QString path = settings.value("elements-collections/custom-collection-path", "default").toString();
|
QString path = settings.value("elements-collections/custom-collection-path", "default").toString();
|
||||||
if (path != "default" && !path.isEmpty())
|
if (path != "default" && !path.isEmpty())
|
||||||
{
|
{
|
||||||
QDir dir(path);
|
QDir dir(path);
|
||||||
if (dir.exists())
|
if (dir.exists())
|
||||||
{
|
{
|
||||||
m_user_custom_elements_dir = path;
|
m_user_custom_elements_dir = path;
|
||||||
return m_user_custom_elements_dir;
|
return m_user_custom_elements_dir;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_user_custom_elements_dir = "default";
|
m_user_custom_elements_dir = "default";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -355,7 +355,7 @@ void QETDiagramEditor::setUpActions()
|
|||||||
});
|
});
|
||||||
|
|
||||||
//Edit current project properties
|
//Edit current project properties
|
||||||
m_project_edit_properties = new QAction(QET::Icons::ProjectProperties, tr("Propriétés du projet"), this);
|
m_project_edit_properties = new QAction(QET::Icons::ProjectProperties, tr("Propriétés du projet"), this);
|
||||||
connect(m_project_edit_properties, &QAction::triggered, [this]() {
|
connect(m_project_edit_properties, &QAction::triggered, [this]() {
|
||||||
editProjectProperties(currentProjectView());
|
editProjectProperties(currentProjectView());
|
||||||
});
|
});
|
||||||
@@ -384,7 +384,7 @@ void QETDiagramEditor::setUpActions()
|
|||||||
});
|
});
|
||||||
|
|
||||||
//Add folio list to current project
|
//Add folio list to current project
|
||||||
m_project_folio_list = new QAction(QET::Icons::TableOfContent, tr("Ajouter un sommaire"), this);
|
m_project_folio_list = new QAction(QET::Icons::TableOfContent, tr("Ajouter un sommaire"), this);
|
||||||
connect(m_project_folio_list, &QAction::triggered, [this]() {
|
connect(m_project_folio_list, &QAction::triggered, [this]() {
|
||||||
if (ProjectView *current_project = currentProjectView()) {
|
if (ProjectView *current_project = currentProjectView()) {
|
||||||
current_project->addNewDiagramFolioList();
|
current_project->addNewDiagramFolioList();
|
||||||
@@ -399,7 +399,7 @@ void QETDiagramEditor::setUpActions()
|
|||||||
});
|
});
|
||||||
|
|
||||||
//Lauch the plugin of terminal generator
|
//Lauch the plugin of terminal generator
|
||||||
m_project_terminalBloc = new QAction(QET::Icons::TerminalStrip, tr("Lancer le plugin de création de borniers"), this);
|
m_project_terminalBloc = new QAction(QET::Icons::TerminalStrip, tr("Lancer le plugin de création de borniers"), this);
|
||||||
connect(m_project_terminalBloc, &QAction::triggered, this, &QETDiagramEditor::generateTerminalBlock);
|
connect(m_project_terminalBloc, &QAction::triggered, this, &QETDiagramEditor::generateTerminalBlock);
|
||||||
|
|
||||||
//MDI view style
|
//MDI view style
|
||||||
@@ -513,12 +513,12 @@ void QETDiagramEditor::setUpActions()
|
|||||||
connect(&m_row_column_actions_group, &QActionGroup::triggered, this, &QETDiagramEditor::rowColumnGroupTriggered);
|
connect(&m_row_column_actions_group, &QActionGroup::triggered, this, &QETDiagramEditor::rowColumnGroupTriggered);
|
||||||
|
|
||||||
//Selections Actions (related to a selected item)
|
//Selections Actions (related to a selected item)
|
||||||
m_delete_selection = m_selection_actions_group.addAction( QET::Icons::EditDelete, tr("Supprimer") );
|
m_delete_selection = m_selection_actions_group.addAction( QET::Icons::EditDelete, tr("Supprimer") );
|
||||||
m_rotate_selection = m_selection_actions_group.addAction( QET::Icons::TransformRotate, tr("Pivoter") );
|
m_rotate_selection = m_selection_actions_group.addAction( QET::Icons::TransformRotate, tr("Pivoter") );
|
||||||
m_rotate_texts = m_selection_actions_group.addAction( QET::Icons::ObjectRotateRight, tr("Orienter les textes") );
|
m_rotate_texts = m_selection_actions_group.addAction( QET::Icons::ObjectRotateRight, tr("Orienter les textes") );
|
||||||
m_find_element = m_selection_actions_group.addAction( QET::Icons::ZoomDraw, tr("Retrouver dans le panel") );
|
m_find_element = m_selection_actions_group.addAction( QET::Icons::ZoomDraw, tr("Retrouver dans le panel") );
|
||||||
m_edit_selection = m_selection_actions_group.addAction( QET::Icons::ElementEdit, tr("Éditer l'item sélectionné") );
|
m_edit_selection = m_selection_actions_group.addAction( QET::Icons::ElementEdit, tr("Éditer l'item sélectionné") );
|
||||||
m_group_selected_texts = m_selection_actions_group.addAction(QET::Icons::textGroup, tr("Grouper les textes sélectionnés"));
|
m_group_selected_texts = m_selection_actions_group.addAction(QET::Icons::textGroup, tr("Grouper les textes sélectionnés"));
|
||||||
|
|
||||||
m_delete_selection->setShortcut(QKeySequence::Delete);
|
m_delete_selection->setShortcut(QKeySequence::Delete);
|
||||||
m_rotate_selection->setShortcut(QKeySequence( tr("Space")));
|
m_rotate_selection->setShortcut(QKeySequence( tr("Space")));
|
||||||
@@ -540,9 +540,9 @@ void QETDiagramEditor::setUpActions()
|
|||||||
connect(&m_selection_actions_group, &QActionGroup::triggered, this, &QETDiagramEditor::selectionGroupTriggered);
|
connect(&m_selection_actions_group, &QActionGroup::triggered, this, &QETDiagramEditor::selectionGroupTriggered);
|
||||||
|
|
||||||
//Select Action
|
//Select Action
|
||||||
QAction *select_all = m_select_actions_group.addAction( QET::Icons::EditSelectAll, tr("Tout sélectionner") );
|
QAction *select_all = m_select_actions_group.addAction( QET::Icons::EditSelectAll, tr("Tout sélectionner") );
|
||||||
QAction *select_nothing = m_select_actions_group.addAction( QET::Icons::EditSelectNone, tr("Désélectionner tout") );
|
QAction *select_nothing = m_select_actions_group.addAction( QET::Icons::EditSelectNone, tr("Désélectionner tout") );
|
||||||
QAction *select_invert = m_select_actions_group.addAction( QET::Icons::EditSelectInvert, tr("Inverser la sélection") );
|
QAction *select_invert = m_select_actions_group.addAction( QET::Icons::EditSelectInvert, tr("Inverser la sélection") );
|
||||||
|
|
||||||
select_all ->setShortcut(QKeySequence::SelectAll);
|
select_all ->setShortcut(QKeySequence::SelectAll);
|
||||||
select_nothing->setShortcut(QKeySequence::Deselect);
|
select_nothing->setShortcut(QKeySequence::Deselect);
|
||||||
@@ -614,7 +614,7 @@ void QETDiagramEditor::setUpActions()
|
|||||||
this->currentDiagramView()->diagram()->changeZValue(action->data().value<QET::DepthOption>());
|
this->currentDiagramView()->diagram()->changeZValue(action->data().value<QET::DepthOption>());
|
||||||
});
|
});
|
||||||
|
|
||||||
m_find = new QAction(tr("Chercher/remplacer"), this);
|
m_find = new QAction(tr("Chercher/remplacer"), this);
|
||||||
m_find->setShortcut(QKeySequence::Find);
|
m_find->setShortcut(QKeySequence::Find);
|
||||||
connect(m_find, &QAction::triggered, [this]() {
|
connect(m_find, &QAction::triggered, [this]() {
|
||||||
this->m_search_and_replace_widget.setHidden(!m_search_and_replace_widget.isHidden());
|
this->m_search_and_replace_widget.setHidden(!m_search_and_replace_widget.isHidden());
|
||||||
@@ -746,7 +746,7 @@ void QETDiagramEditor::setUpMenu() {
|
|||||||
|
|
||||||
|
|
||||||
// menu Affichage
|
// menu Affichage
|
||||||
QMenu *projects_view_mode = menu_affichage -> addMenu(QET::Icons::ConfigureToolbars, tr("Afficher les projets"));
|
QMenu *projects_view_mode = menu_affichage -> addMenu(QET::Icons::ConfigureToolbars, tr("Afficher les projets"));
|
||||||
projects_view_mode -> setTearOffEnabled(true);
|
projects_view_mode -> setTearOffEnabled(true);
|
||||||
projects_view_mode -> addAction(m_windowed_view_mode);
|
projects_view_mode -> addAction(m_windowed_view_mode);
|
||||||
projects_view_mode -> addAction(m_tabbed_view_mode);
|
projects_view_mode -> addAction(m_tabbed_view_mode);
|
||||||
|
|||||||
@@ -437,11 +437,11 @@ QString TitleBlockTemplateCellWidget::defaultVariablesString() const {
|
|||||||
"<li>%{date} : date du folio</li>"
|
"<li>%{date} : date du folio</li>"
|
||||||
"<li>%{title} : titre du folio</li>"
|
"<li>%{title} : titre du folio</li>"
|
||||||
"<li>%{filename} : nom de fichier du projet</li>"
|
"<li>%{filename} : nom de fichier du projet</li>"
|
||||||
"<li>%{plant} : nom de l'installation (=) dans laquelle se trouve le folio</li>"
|
"<li>%{plant} : nom de l'installation (=) dans laquelle se trouve le folio</li>"
|
||||||
"<li>%{locmach} : nom de la localisation (+) dans laquelle se trouve le folio</li>"
|
"<li>%{locmach} : nom de la localisation (+) dans laquelle se trouve le folio</li>"
|
||||||
"<li>%{indexrev} : indice de révision du folio</li>"
|
"<li>%{indexrev} : indice de révision du folio</li>"
|
||||||
"<li>%{version} : version du logiciel</li>"
|
"<li>%{version} : version du logiciel</li>"
|
||||||
"<li>%{folio} : numéro du folio</li>"
|
"<li>%{folio} : numéro du folio</li>"
|
||||||
"<li>%{folio-id} : position du folio dans le projet</li>"
|
"<li>%{folio-id} : position du folio dans le projet</li>"
|
||||||
"<li>%{folio-total} : nombre total de folios dans le projet</li>"
|
"<li>%{folio-total} : nombre total de folios dans le projet</li>"
|
||||||
"<li>%{projecttitle} : titre du projet</li>"
|
"<li>%{projecttitle} : titre du projet</li>"
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ bool TitleBlockProperties::operator==(const TitleBlockProperties &ip) {
|
|||||||
ip.author == author &&\
|
ip.author == author &&\
|
||||||
ip.date == date &&\
|
ip.date == date &&\
|
||||||
ip.filename == filename &&\
|
ip.filename == filename &&\
|
||||||
ip.plant == plant &&\
|
ip.plant == plant &&\
|
||||||
ip.locmach == locmach &&\
|
ip.locmach == locmach &&\
|
||||||
ip.indexrev == indexrev &&\
|
ip.indexrev == indexrev &&\
|
||||||
ip.version == version &&\
|
ip.version == version &&\
|
||||||
@@ -77,7 +77,7 @@ void TitleBlockProperties::toXml(QDomElement &e) const {
|
|||||||
e.setAttribute("author", author);
|
e.setAttribute("author", author);
|
||||||
e.setAttribute("title", title);
|
e.setAttribute("title", title);
|
||||||
e.setAttribute("filename", filename);
|
e.setAttribute("filename", filename);
|
||||||
e.setAttribute("plant", plant);
|
e.setAttribute("plant", plant);
|
||||||
e.setAttribute("locmach", locmach);
|
e.setAttribute("locmach", locmach);
|
||||||
e.setAttribute("indexrev",indexrev);
|
e.setAttribute("indexrev",indexrev);
|
||||||
e.setAttribute("version", version);
|
e.setAttribute("version", version);
|
||||||
@@ -107,10 +107,10 @@ void TitleBlockProperties::fromXml(const QDomElement &e) {
|
|||||||
if (e.hasAttribute("author")) author = e.attribute("author");
|
if (e.hasAttribute("author")) author = e.attribute("author");
|
||||||
if (e.hasAttribute("title")) title = e.attribute("title");
|
if (e.hasAttribute("title")) title = e.attribute("title");
|
||||||
if (e.hasAttribute("filename")) filename = e.attribute("filename");
|
if (e.hasAttribute("filename")) filename = e.attribute("filename");
|
||||||
if (e.hasAttribute("plant")) plant = e.attribute("plant");
|
if (e.hasAttribute("plant")) plant = e.attribute("plant");
|
||||||
if (e.hasAttribute("locmach")) locmach = e.attribute("locmach");
|
if (e.hasAttribute("locmach")) locmach = e.attribute("locmach");
|
||||||
if (e.hasAttribute("indexrev")) indexrev = e.attribute("indexrev");
|
if (e.hasAttribute("indexrev")) indexrev = e.attribute("indexrev");
|
||||||
if (e.hasAttribute("version")) version = e.attribute("version");
|
if (e.hasAttribute("version")) version = e.attribute("version");
|
||||||
if (e.hasAttribute("folio")) folio = e.attribute("folio");
|
if (e.hasAttribute("folio")) folio = e.attribute("folio");
|
||||||
if (e.hasAttribute("auto_page_num")) auto_page_num = e.attribute("auto_page_num");
|
if (e.hasAttribute("auto_page_num")) auto_page_num = e.attribute("auto_page_num");
|
||||||
if (e.hasAttribute("date")) setDateFromString(e.attribute("date"));
|
if (e.hasAttribute("date")) setDateFromString(e.attribute("date"));
|
||||||
@@ -140,7 +140,7 @@ void TitleBlockProperties::toSettings(QSettings &settings, const QString &prefix
|
|||||||
settings.setValue(prefix + "title", title);
|
settings.setValue(prefix + "title", title);
|
||||||
settings.setValue(prefix + "author", author);
|
settings.setValue(prefix + "author", author);
|
||||||
settings.setValue(prefix + "filename", filename);
|
settings.setValue(prefix + "filename", filename);
|
||||||
settings.setValue(prefix + "plant", plant);
|
settings.setValue(prefix + "plant", plant);
|
||||||
settings.setValue(prefix + "locmach", locmach);
|
settings.setValue(prefix + "locmach", locmach);
|
||||||
settings.setValue(prefix + "indexrev", indexrev);
|
settings.setValue(prefix + "indexrev", indexrev);
|
||||||
settings.setValue(prefix + "version", version);
|
settings.setValue(prefix + "version", version);
|
||||||
@@ -162,7 +162,7 @@ void TitleBlockProperties::fromSettings(QSettings &settings, const QString &pref
|
|||||||
title = settings.value(prefix + "title").toString();
|
title = settings.value(prefix + "title").toString();
|
||||||
author = settings.value(prefix + "author").toString();
|
author = settings.value(prefix + "author").toString();
|
||||||
filename = settings.value(prefix + "filename").toString();
|
filename = settings.value(prefix + "filename").toString();
|
||||||
plant = settings.value(prefix + "plant").toString();
|
plant = settings.value(prefix + "plant").toString();
|
||||||
locmach = settings.value(prefix + "locmach").toString();
|
locmach = settings.value(prefix + "locmach").toString();
|
||||||
indexrev = settings.value(prefix + "indexrev").toString();
|
indexrev = settings.value(prefix + "indexrev").toString();
|
||||||
version = settings.value(prefix + "version").toString();
|
version = settings.value(prefix + "version").toString();
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class TitleBlockProperties {
|
|||||||
QString author; ///< Author of the diagram/folio (displayed by the default template)
|
QString author; ///< Author of the diagram/folio (displayed by the default template)
|
||||||
QDate date; ///< Date (displayed by the default template)
|
QDate date; ///< Date (displayed by the default template)
|
||||||
QString filename; ///< Filename (displayed by the default template)
|
QString filename; ///< Filename (displayed by the default template)
|
||||||
QString plant; ///< Plant (displayed by the default template)
|
QString plant; ///< Plant (displayed by the default template)
|
||||||
QString locmach; ///< Location(displayed by the default template)
|
QString locmach; ///< Location(displayed by the default template)
|
||||||
QString indexrev; ///< Revision Index (displayed by the default template)
|
QString indexrev; ///< Revision Index (displayed by the default template)
|
||||||
QString version; ///< Version (displayed by the default template)
|
QString version; ///< Version (displayed by the default template)
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(const TitleBlockPropertie
|
|||||||
ui(new Ui::TitleBlockPropertiesWidget)
|
ui(new Ui::TitleBlockPropertiesWidget)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
initDialog(current_date, project);
|
initDialog(current_date, project);
|
||||||
setProperties(titleblock);
|
setProperties(titleblock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -53,7 +53,7 @@ TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(TitleBlockTemplatesCollec
|
|||||||
ui(new Ui::TitleBlockPropertiesWidget)
|
ui(new Ui::TitleBlockPropertiesWidget)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
initDialog(current_date,project);
|
initDialog(current_date,project);
|
||||||
addCollection(tbt_collection);
|
addCollection(tbt_collection);
|
||||||
updateTemplateList();
|
updateTemplateList();
|
||||||
setProperties(titleblock);
|
setProperties(titleblock);
|
||||||
@@ -96,7 +96,7 @@ void TitleBlockPropertiesWidget::setProperties(const TitleBlockProperties &prope
|
|||||||
ui -> m_title_le -> setText (properties.title);
|
ui -> m_title_le -> setText (properties.title);
|
||||||
ui -> m_author_le -> setText (properties.author);
|
ui -> m_author_le -> setText (properties.author);
|
||||||
ui -> m_file_le -> setText (properties.filename);
|
ui -> m_file_le -> setText (properties.filename);
|
||||||
ui -> m_plant -> setText (properties.plant);
|
ui -> m_plant -> setText (properties.plant);
|
||||||
ui -> m_loc -> setText (properties.locmach);
|
ui -> m_loc -> setText (properties.locmach);
|
||||||
ui -> m_indice -> setText (properties.indexrev);
|
ui -> m_indice -> setText (properties.indexrev);
|
||||||
ui -> m_folio_le -> setText (properties.folio);
|
ui -> m_folio_le -> setText (properties.folio);
|
||||||
@@ -154,7 +154,7 @@ TitleBlockProperties TitleBlockPropertiesWidget::properties() const {
|
|||||||
prop.title = ui -> m_title_le -> text();
|
prop.title = ui -> m_title_le -> text();
|
||||||
prop.author = ui -> m_author_le -> text();
|
prop.author = ui -> m_author_le -> text();
|
||||||
prop.filename = ui -> m_file_le -> text();
|
prop.filename = ui -> m_file_le -> text();
|
||||||
prop.plant = ui -> m_plant -> text();
|
prop.plant = ui -> m_plant -> text();
|
||||||
prop.locmach = ui -> m_loc -> text();
|
prop.locmach = ui -> m_loc -> text();
|
||||||
prop.indexrev = ui -> m_indice -> text();
|
prop.indexrev = ui -> m_indice -> text();
|
||||||
prop.folio = ui -> m_folio_le -> text();
|
prop.folio = ui -> m_folio_le -> text();
|
||||||
@@ -181,7 +181,7 @@ TitleBlockProperties TitleBlockPropertiesWidget::properties() const {
|
|||||||
|
|
||||||
prop.context = m_dcw -> context();
|
prop.context = m_dcw -> context();
|
||||||
|
|
||||||
prop.auto_page_num = ui->auto_page_cb->currentText();
|
prop.auto_page_num = ui->auto_page_cb->currentText();
|
||||||
|
|
||||||
return prop;
|
return prop;
|
||||||
}
|
}
|
||||||
@@ -195,7 +195,7 @@ TitleBlockProperties TitleBlockPropertiesWidget::propertiesAutoNum(QString autoN
|
|||||||
prop.title = ui -> m_title_le -> text();
|
prop.title = ui -> m_title_le -> text();
|
||||||
prop.author = ui -> m_author_le -> text();
|
prop.author = ui -> m_author_le -> text();
|
||||||
prop.filename = ui -> m_file_le -> text();
|
prop.filename = ui -> m_file_le -> text();
|
||||||
prop.plant = ui -> m_plant -> text();
|
prop.plant = ui -> m_plant -> text();
|
||||||
prop.locmach = ui -> m_loc -> text();
|
prop.locmach = ui -> m_loc -> text();
|
||||||
prop.indexrev = ui -> m_indice -> text();
|
prop.indexrev = ui -> m_indice -> text();
|
||||||
prop.folio = "%autonum";
|
prop.folio = "%autonum";
|
||||||
@@ -294,7 +294,7 @@ void TitleBlockPropertiesWidget::initDialog(const bool ¤t_date, QETProjec
|
|||||||
ui -> m_current_date_rb -> setVisible(current_date);
|
ui -> m_current_date_rb -> setVisible(current_date);
|
||||||
|
|
||||||
m_tbt_edit = new QAction(tr("Éditer ce modèle", "menu entry"), this);
|
m_tbt_edit = new QAction(tr("Éditer ce modèle", "menu entry"), this);
|
||||||
m_tbt_duplicate = new QAction(tr("Dupliquer et éditer ce modèle", "menu entry"), this);
|
m_tbt_duplicate = new QAction(tr("Dupliquer et éditer ce modèle", "menu entry"), this);
|
||||||
|
|
||||||
connect(m_tbt_edit, SIGNAL(triggered()), this, SLOT(editCurrentTitleBlockTemplate()));
|
connect(m_tbt_edit, SIGNAL(triggered()), this, SLOT(editCurrentTitleBlockTemplate()));
|
||||||
connect(m_tbt_duplicate, SIGNAL(triggered()), this, SLOT(duplicateCurrentTitleBlockTemplate()));
|
connect(m_tbt_duplicate, SIGNAL(triggered()), this, SLOT(duplicateCurrentTitleBlockTemplate()));
|
||||||
@@ -429,7 +429,7 @@ void TitleBlockPropertiesWidget::on_m_date_now_pb_clicked() {
|
|||||||
void TitleBlockPropertiesWidget::on_m_edit_autofolionum_pb_clicked() {
|
void TitleBlockPropertiesWidget::on_m_edit_autofolionum_pb_clicked() {
|
||||||
emit openAutoNumFolioEditor(ui->auto_page_cb->currentText());
|
emit openAutoNumFolioEditor(ui->auto_page_cb->currentText());
|
||||||
if (ui->auto_page_cb->currentText()!=tr("Créer un Folio Numérotation Auto"))
|
if (ui->auto_page_cb->currentText()!=tr("Créer un Folio Numérotation Auto"))
|
||||||
{
|
{
|
||||||
//still to implement: load current auto folio num settings
|
//still to implement: load current auto folio num settings
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user