[qet] qet/qet: [5178] Minor |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 5178
Author: scorpio810
Date: 2017-12-12 19:05:22 +0100 (Tue, 12 Dec 2017)
Log Message:
-----------
Minor
Modified Paths:
--------------
trunk/sources/configpages.cpp
trunk/sources/qetapp.cpp
trunk/sources/qetgraphicsitem/element.cpp
Modified: trunk/sources/configpages.cpp
===================================================================
--- trunk/sources/configpages.cpp 2017-12-12 15:46:11 UTC (rev 5177)
+++ trunk/sources/configpages.cpp 2017-12-12 18:05:22 UTC (rev 5178)
@@ -254,13 +254,12 @@
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);
- QString fontInfos = settings.value("diagramitemfont").toString() + " " +
+ QString fontInfos = settings.value("diagramitemfont").toString() + " " +
settings.value("diagramitemsize").toString() + " (" +
- settings.value("diagramitemweight").toString() + ", " +
- settings.value("diagramitemfont").toString() + ")";
- font_label = new QLabel(tr("Police des champs de texte"));
- fontButton = new QPushButton(fontInfos);
- fontButton->setMinimumHeight(28);
+ settings.value("diagramitemstyle").toString() + ")";
+ font_label = new QLabel(tr("Police des champs de texte"));
+ fontButton = new QPushButton(fontInfos);
+ fontButton->setMinimumHeight(28);
elements_management_ = new QGroupBox(tr("Gestion des éléments"), this);
highlight_integrated_elements_ = new QCheckBox(tr("Mettre en valeur dans le panel les éléments fraîchement intégrés", "configuration option"));
@@ -297,8 +296,8 @@
appearance_ -> setLayout(appearance_layout);
QVBoxLayout *projects_view_mode_layout = new QVBoxLayout;
- QHBoxLayout *font_view_layout = new QHBoxLayout;
- projects_view_mode_layout -> addWidget(windowed_mode_);
+ QHBoxLayout *font_view_layout = new QHBoxLayout;
+ projects_view_mode_layout -> addWidget(windowed_mode_);
projects_view_mode_layout -> addWidget(tabbed_mode_);
projects_view_mode_layout -> addWidget(m_zoom_out_beyond_folio);
projects_view_mode_layout -> addWidget(use_trackpad_);
@@ -305,12 +304,12 @@
projects_view_mode_layout -> addWidget(save_label_paste_);
projects_view_mode_layout -> addWidget(folio_panel_);
projects_view_mode_layout -> addWidget(terminal_exportlist_);
- font_view_layout->addWidget(font_label, 1);
- font_view_layout->addWidget(fontButton, 0);
- projects_view_mode_layout-> addLayout(font_view_layout);
- projects_view_mode_ -> setLayout(projects_view_mode_layout);
+ font_view_layout->addWidget(font_label, 1);
+ font_view_layout->addWidget(fontButton, 0);
+ projects_view_mode_layout-> addLayout(font_view_layout);
+ projects_view_mode_ -> setLayout(projects_view_mode_layout);
- connect(fontButton, SIGNAL(clicked()), this, SLOT(setFont()));
+ connect(fontButton, SIGNAL(clicked()), this, SLOT(setFont()));
QVBoxLayout *elements_management_layout = new QVBoxLayout();
@@ -418,7 +417,7 @@
lang_combo_box->addItem(QET::Icons::nl, tr("Pays-Bas"), "nl");
lang_combo_box->addItem(QET::Icons::be, tr("Belgique-Flemish"), "be");
- //set current index to the lang found in setting file
+ //set current index to the lang found in setting file
//if lang doesn't exist set to system
for (int i=0; i<lang_combo_box->count(); i++) {
if (lang_combo_box->itemData(i).toString() == settings.value("lang").toString()) {
@@ -538,7 +537,7 @@
void GeneralConfigurationPage::setFont()
{
bool ok;
- QSettings settings;
+ QSettings settings;
QFont font = QFontDialog::getFont(&ok, QFont(), this);
if (ok) {
settings.setValue("diagramitemfont", font.family());
@@ -545,10 +544,9 @@
settings.setValue("diagramitemsize", font.pointSize());
settings.setValue("diagramitemweight", font.weight());
settings.setValue("diagramitemstyle", font.styleName());
- QString fontInfos = settings.value("diagramitemfont").toString() + " " +
+ QString fontInfos = settings.value("diagramitemfont").toString() + " " +
settings.value("diagramitemsize").toString() + " (" +
- settings.value("diagramitemweight").toString() + ", " +
- settings.value("diagramitemfont").toString() + ")";
+ settings.value("diagramitemstyle").toString() + ")";
fontButton->setText(fontInfos);
}
}
Modified: trunk/sources/qetapp.cpp
===================================================================
--- trunk/sources/qetapp.cpp 2017-12-12 15:46:11 UTC (rev 5177)
+++ trunk/sources/qetapp.cpp 2017-12-12 18:05:22 UTC (rev 5178)
@@ -792,7 +792,7 @@
QString diagram_texts_item_family = settings.value("diagramitemfont", "Sans Serif").toString();
qreal diagram_texts_item_size = settings.value("diagramitemsize", 9.0).toDouble();
qreal diagram_texts_item_weight = settings.value("diagramitemweight").toDouble();
- QString diagram_texts_item_style = settings.value("diagramitemsstyle", "normal").toString();
+ QString diagram_texts_item_style = settings.value("diagramitemstyle", "normal").toString();
if (size != -1.0) {
diagram_texts_item_size = size;
Modified: trunk/sources/qetgraphicsitem/element.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/element.cpp 2017-12-12 15:46:11 UTC (rev 5177)
+++ trunk/sources/qetgraphicsitem/element.cpp 2017-12-12 18:05:22 UTC (rev 5178)
@@ -488,16 +488,16 @@
for(DynamicElementTextItem *deti : m_dynamic_text_list)
delete deti;
m_dynamic_text_list.clear();
-
+
//************************//
//***Dynamic texts item***//
//************************//
- for (QDomElement qde : QET::findInDomElement(e, "dynamic_texts", DynamicElementTextItem::xmlTaggName()))
- {
- DynamicElementTextItem *deti = new DynamicElementTextItem(this);
- addDynamicTextItem(deti);
- deti->fromXml(qde);
- }
+ for(QDomElement qde : QET::findInDomElement(e, "dynamic_texts", DynamicElementTextItem::xmlTaggName()))
+ {
+ DynamicElementTextItem *deti = new DynamicElementTextItem(this);
+ addDynamicTextItem(deti);
+ deti->fromXml(qde);
+ }
//************************//
@@ -626,7 +626,7 @@
}
}
}
-
+
return(true);
}
@@ -658,7 +658,7 @@
QDomElement seq = m_autoNum_seq.toXml(document);
if (seq.hasChildNodes())
element.appendChild(seq);
-
+
// position, selection et orientation
element.setAttribute("x", QString("%1").arg(pos().x()));
element.setAttribute("y", QString("%1").arg(pos().y()));
@@ -674,7 +674,7 @@
}
id_terminal = max_id_t + 1;
}
-
+
// enregistrement des bornes de l'appareil
QDomElement xml_terminals = document.createElement("terminals");
// pour chaque enfant de l'element
@@ -686,7 +686,7 @@
xml_terminals.appendChild(terminal);
}
element.appendChild(xml_terminals);
-
+
// enregistrement des champ de texte de l'appareil
QDomElement inputs = document.createElement("inputs");
foreach(ElementTextItem *eti, texts()) {
@@ -706,21 +706,21 @@
element.appendChild(links_uuids);
}
- //save information of this element
+ //save information of this element
if (! m_element_informations.keys().isEmpty()) {
QDomElement infos = document.createElement("elementInformations");
m_element_informations.toXml(infos, "elementInformation");
element.appendChild(infos);
}
-
- //Dynamic texts
- QDomElement dyn_text = document.createElement("dynamic_texts");
- for (DynamicElementTextItem *deti : m_dynamic_text_list)
- dyn_text.appendChild(deti->toXml(document));
+
+ //Dynamic texts
+ QDomElement dyn_text = document.createElement("dynamic_texts");
+ for(DynamicElementTextItem *deti : m_dynamic_text_list)
+ dyn_text.appendChild(deti->toXml(document));
QDomElement texts_group = document.createElement("texts_group");
- //Dynamic texts owned by groups
+ //Dynamic texts owned by groups
for(ElementTextItemGroup *group : m_texts_group)
{
//temporarily remove the texts from group to get the pos relative to element and not group.
@@ -735,7 +735,7 @@
group->removeFromGroup(deti);
//Save the texts to xml
- for (DynamicElementTextItem *deti : deti_list)
+ for(DynamicElementTextItem *deti : deti_list)
dyn_text.appendChild(deti->toXml(document));
//Re add texts to group
@@ -754,7 +754,7 @@
//Append the texts group to element
element.appendChild(texts_group);
- return(element);
+ return(element);
}
/**
@@ -765,18 +765,18 @@
*/
void Element::addDynamicTextItem(DynamicElementTextItem *deti)
{
- if (deti && !m_dynamic_text_list.contains(deti))
+ if (deti && !m_dynamic_text_list.contains(deti))
{
- m_dynamic_text_list.append(deti);
+ m_dynamic_text_list.append(deti);
deti->setParentItem(this);
emit textAdded(deti);
}
- else
- {
- DynamicElementTextItem *text = new DynamicElementTextItem(this);
- m_dynamic_text_list.append(text);
+ else
+ {
+ DynamicElementTextItem *text = new DynamicElementTextItem(this);
+ m_dynamic_text_list.append(text);
emit textAdded(text);
- }
+ }
}
/**
@@ -787,9 +787,9 @@
*/
void Element::removeDynamicTextItem(DynamicElementTextItem *deti)
{
- if (m_dynamic_text_list.contains(deti))
+ if (m_dynamic_text_list.contains(deti))
{
- m_dynamic_text_list.removeOne(deti);
+ m_dynamic_text_list.removeOne(deti);
deti->setParentItem(nullptr);
emit textRemoved(deti);
return;