[qet] [4685] Add new option for export or not terminal elements in nomenclature |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 4685
Author: scorpio810
Date: 2016-09-04 17:19:36 +0200 (Sun, 04 Sep 2016)
Log Message:
-----------
Add new option for export or not terminal elements in nomenclature
Modified Paths:
--------------
trunk/sources/configpages.cpp
trunk/sources/configpages.h
trunk/sources/nomenclature.cpp
Modified: trunk/sources/configpages.cpp
===================================================================
--- trunk/sources/configpages.cpp 2016-09-03 18:39:15 UTC (rev 4684)
+++ trunk/sources/configpages.cpp 2016-09-04 15:19:36 UTC (rev 4685)
@@ -236,6 +236,7 @@
bool save_label_paste = settings.value("diagramcommands/save-label", true).toBool();
bool panel_folio = settings.value("genericpanel/folio", true).toBool();
bool highlight_integrated_elements = settings.value("diagrameditor/highlight-integrated-elements", true).toBool();
+ bool terminal_exportlist = settings.value("nomenclature-exportlist", true).toBool();
QString default_element_informations = settings.value("elementeditor/default-informations", "").toString();
appearance_ = new QGroupBox(tr("Apparence"), this);
@@ -246,6 +247,7 @@
use_trackpad_ = new QCheckBox(tr("Utiliser les gestes du pavé tactile"), projects_view_mode_);
save_label_paste_ = new QCheckBox(tr("Ne pas conserver les labels des éléments lors des copier coller"), projects_view_mode_);
folio_panel_ = new QCheckBox(tr("Utiliser les labels de folio à la place de leurs ID"), projects_view_mode_);
+ terminal_exportlist_ = new QCheckBox(tr("Exporter les bornes dans la nomenclature"), projects_view_mode_);
m_zoom_out_beyond_folio = new QCheckBox(tr("Autoriser le dézoom au delà du folio"), this);
elements_management_ = new QGroupBox(tr("Gestion des éléments"), this);
@@ -265,6 +267,7 @@
use_trackpad_ -> setChecked(use_trackpad);
save_label_paste_ -> setChecked(save_label_paste);
folio_panel_ ->setChecked(panel_folio);
+ terminal_exportlist_ ->setChecked(terminal_exportlist);
if (tabbed) {
tabbed_mode_ -> setChecked(true);
@@ -288,6 +291,7 @@
projects_view_mode_layout -> addWidget(use_trackpad_);
projects_view_mode_layout -> addWidget(save_label_paste_);
projects_view_mode_layout -> addWidget(folio_panel_);
+ projects_view_mode_layout -> addWidget(terminal_exportlist_);
projects_view_mode_ -> setLayout(projects_view_mode_layout);
@@ -354,6 +358,7 @@
settings.setValue("diagramcommands/save-label", save_label_paste_ -> isChecked());
settings.setValue("diagrameditor/zoom-out-beyond-of-folio", m_zoom_out_beyond_folio->isChecked());
settings.setValue("genericpanel/folio",folio_panel_->isChecked());
+ settings.setValue("nomenclature/terminal-exportlist",terminal_exportlist_->isChecked());
}
/// @return l'icone de cette page
Modified: trunk/sources/configpages.h
===================================================================
--- trunk/sources/configpages.h 2016-09-03 18:39:15 UTC (rev 4684)
+++ trunk/sources/configpages.h 2016-09-04 15:19:36 UTC (rev 4685)
@@ -99,6 +99,7 @@
QCheckBox *use_trackpad_;
QCheckBox *save_label_paste_;
QCheckBox *folio_panel_;
+ QCheckBox *terminal_exportlist_;
QGroupBox *projects_view_mode_;
QRadioButton *windowed_mode_;
QRadioButton *tabbed_mode_;
Modified: trunk/sources/nomenclature.cpp
===================================================================
--- trunk/sources/nomenclature.cpp 2016-09-03 18:39:15 UTC (rev 4684)
+++ trunk/sources/nomenclature.cpp 2016-09-04 15:19:36 UTC (rev 4685)
@@ -101,14 +101,24 @@
if(m_list_diagram.isEmpty()) return data;
- foreach (Diagram *d, m_list_diagram) {
- //Get only simple, master and unlinked slave element.
- ElementProvider ep(d);
- QList <Element *> list_elements;
- list_elements << ep.find(Element::Simple | Element::Master | Element::Terminale);
- list_elements << ep.freeElement(Element::Slave);
-
- foreach (Element *elmt, list_elements) {
+ foreach (Diagram *d, m_list_diagram) {
+ //Get only simple, master and unlinked slave element.
+ ElementProvider ep(d);
+ QSettings settings;
+ QList <Element *> list_elements;
+
+ if (settings.value("nomenclature/terminal-exportlist", true).toBool()){
+ list_elements << ep.find(Element::Simple | Element::Master | Element::Terminale);
+
+ }else{
+
+ list_elements << ep.find(Element::Simple | Element::Master);
+
+ }
+
+ list_elements << ep.freeElement(Element::Slave);
+
+ foreach (Element *elmt, list_elements) {
data += getElementInfo(elmt);
}
}