From 99f1a0e83abe4fa8ddb7d36d6e60df4210d6854d Mon Sep 17 00:00:00 2001 From: dfochi Date: Fri, 20 May 2016 20:22:44 +0000 Subject: [PATCH] Reverted commit due to change in lang/qet_en.ts git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4492 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/projectconfigpages.cpp | 4 +- sources/properties/xrefproperties.cpp | 10 ---- sources/properties/xrefproperties.h | 9 ---- sources/qetgraphicsitem/crossrefitem.cpp | 10 +--- sources/ui/titleblockpropertieswidget.ui | 38 +++++++-------- sources/ui/xrefpropertieswidget.cpp | 10 ---- sources/ui/xrefpropertieswidget.ui | 59 +++++------------------- 7 files changed, 30 insertions(+), 110 deletions(-) diff --git a/sources/projectconfigpages.cpp b/sources/projectconfigpages.cpp index 29a9c7125..3544143a4 100644 --- a/sources/projectconfigpages.cpp +++ b/sources/projectconfigpages.cpp @@ -331,7 +331,7 @@ void ProjectAutoNumConfigPage::initLayout() { //Auto Numbering Tab tab_widget->addTab(autoNumbering_tab_widget,tr ("Folio Auto Numbering")); - tab_widget->resize(455,590); + tab_widget->resize(440,590); } /** @@ -514,7 +514,7 @@ void ProjectAutoNumConfigPage::tabChanged(int i){ tab_widget->resize(470,tab_widget->height()); } else { - tab_widget->resize(455,tab_widget->height()); + tab_widget->resize(440,tab_widget->height()); } } } diff --git a/sources/properties/xrefproperties.cpp b/sources/properties/xrefproperties.cpp index 4630404f7..6c054d663 100644 --- a/sources/properties/xrefproperties.cpp +++ b/sources/properties/xrefproperties.cpp @@ -27,7 +27,6 @@ XRefProperties::XRefProperties() m_show_power_ctc = true; m_display = Cross; m_snap_to = Bottom; - m_view_mode = Index; m_prefix_keys << "power" << "delay" << "switch"; } @@ -41,8 +40,6 @@ void XRefProperties::toSettings(QSettings &settings, const QString prefix) const settings.setValue(prefix + "showpowerctc", m_show_power_ctc); QString display = m_display == Cross? "cross" : "contacts"; settings.setValue(prefix + "displayhas", display); - QString view_mode = m_view_mode == Index? "index" : "foliolabel"; - settings.setValue(prefix + "viewmode", view_mode); QString snap = m_snap_to == Bottom? "bottom" : "label"; settings.setValue(prefix + "snapto", snap); foreach (QString key, m_prefix.keys()) { @@ -60,8 +57,6 @@ void XRefProperties::fromSettings(const QSettings &settings, const QString prefi m_show_power_ctc = settings.value(prefix + "showpowerctc", false).toBool(); QString display = settings.value(prefix + "displayhas", "cross").toString(); display == "cross"? m_display = Cross : m_display = Contacts; - QString view_mode = settings.value(prefix + "viewmode", "index").toString(); - view_mode == "index"? m_view_mode = Index : m_view_mode = FolioLabel; QString snap = settings.value(prefix + "snapto", "label").toString(); snap == "bottom"? m_snap_to = Bottom : m_snap_to = Label; foreach (QString key, m_prefix_keys) { @@ -78,8 +73,6 @@ void XRefProperties::toXml(QDomElement &xml_element) const { xml_element.setAttribute("showpowerctc", m_show_power_ctc? "true" : "false"); QString display = m_display == Cross? "cross" : "contacts"; xml_element.setAttribute("displayhas", display); - QString view_mode = m_view_mode == Index? "index" : "foliolabel"; - xml_element.setAttribute("viewmode", view_mode); QString snap = m_snap_to == Bottom? "bottom" : "label"; xml_element.setAttribute("snapto", snap); foreach (QString key, m_prefix.keys()) { @@ -96,8 +89,6 @@ void XRefProperties::fromXml(const QDomElement &xml_element) { m_show_power_ctc = xml_element.attribute("showpowerctc") == "true"; QString display = xml_element.attribute("displayhas", "cross"); display == "cross"? m_display = Cross : m_display = Contacts; - QString view_mode = xml_element.attribute("viewmode", "index"); - view_mode == "index"? m_view_mode = Index : m_view_mode = FolioLabel; QString snap = xml_element.attribute("snapto", "label"); snap == "bottom"? m_snap_to = Bottom : m_snap_to = Label; foreach (QString key, m_prefix_keys) { @@ -134,7 +125,6 @@ QHash XRefProperties::defaultProperties() bool XRefProperties::operator ==(const XRefProperties &xrp) const{ return (m_show_power_ctc == xrp.m_show_power_ctc && m_display == xrp.m_display && - m_view_mode == xrp.m_view_mode && m_snap_to == xrp.m_snap_to && m_prefix == xrp.m_prefix); } diff --git a/sources/properties/xrefproperties.h b/sources/properties/xrefproperties.h index 51a3b7e05..2ea0ae982 100644 --- a/sources/properties/xrefproperties.h +++ b/sources/properties/xrefproperties.h @@ -35,11 +35,6 @@ class XRefProperties : public PropertiesInterface Contacts }; - enum ViewMode { - Index, - FolioLabel - }; - enum SnapTo { Bottom, Label @@ -61,9 +56,6 @@ class XRefProperties : public PropertiesInterface void setDisplayHas (const DisplayHas dh) {m_display = dh;} DisplayHas displayHas () const {return m_display;} - void setViewMode (const ViewMode vm) {m_view_mode = vm;} - ViewMode viewMode () const {return m_view_mode;} - void setSnapTo (const SnapTo st) {m_snap_to = st;} SnapTo snapTo () const {return m_snap_to;} @@ -73,7 +65,6 @@ class XRefProperties : public PropertiesInterface private: bool m_show_power_ctc; DisplayHas m_display; - ViewMode m_view_mode; SnapTo m_snap_to; QHash m_prefix; QStringList m_prefix_keys; diff --git a/sources/qetgraphicsitem/crossrefitem.cpp b/sources/qetgraphicsitem/crossrefitem.cpp index 204ceaa21..e5dae493a 100644 --- a/sources/qetgraphicsitem/crossrefitem.cpp +++ b/sources/qetgraphicsitem/crossrefitem.cpp @@ -89,16 +89,8 @@ QPainterPath CrossRefItem::shape() const{ * if @add_prefix is true, prefix (for power and delay contact) is added to the poistion text. */ QString CrossRefItem::elementPositionText(const Element *elmt, const bool &add_prefix) const{ - QString txt; - XRefProperties::ViewMode vw = m_properties.viewMode(); - if (vw == XRefProperties::Index) - { - txt += QString::number(elmt->diagram()->folioIndex() + 1); - } - else if (vw == XRefProperties::FolioLabel){ - txt += elmt->diagram()->border_and_titleblock.folio(); - } + txt += QString::number(elmt->diagram()->folioIndex() + 1); txt += "-"; txt += elmt->diagram()->convertPosition(elmt -> scenePos()).toString(); if (add_prefix) { diff --git a/sources/ui/titleblockpropertieswidget.ui b/sources/ui/titleblockpropertieswidget.ui index f0016aaac..2a3f53d0b 100644 --- a/sources/ui/titleblockpropertieswidget.ui +++ b/sources/ui/titleblockpropertieswidget.ui @@ -289,7 +289,7 @@ - + 0 0 @@ -299,7 +299,7 @@ - + 0 0 @@ -323,12 +323,6 @@ - - - 0 - 0 - - Page Num: @@ -350,23 +344,23 @@ Vous pouvez définir ici vos propres associations noms/valeurs pour que le cartouche en tienne compte. Exemple : associer le nom "volta" et la valeur "1745" remplacera %{volta} par 1745 dans le cartouche. - - - true - - - - - - - - + + + true + + + + - - - + + + + + + + diff --git a/sources/ui/xrefpropertieswidget.cpp b/sources/ui/xrefpropertieswidget.cpp index 45a655366..f3b6f0d87 100644 --- a/sources/ui/xrefpropertieswidget.cpp +++ b/sources/ui/xrefpropertieswidget.cpp @@ -110,8 +110,6 @@ void XRefPropertiesWidget::saveProperties(int index) { if (ui->m_display_has_cross_rb->isChecked()) xrp.setDisplayHas(XRefProperties::Cross); else if (ui->m_display_has_contacts_rb->isChecked()) xrp.setDisplayHas(XRefProperties::Contacts); - if (ui->m_display_folio_index_rb->isChecked()) xrp.setViewMode (XRefProperties::Index); - else if (ui->m_display_folio_label_rb->isChecked()) xrp.setViewMode (XRefProperties::FolioLabel); if (ui->m_snap_to_cb->itemData(ui->m_snap_to_cb->currentIndex()).toString() == "bottom") xrp.setSnapTo(XRefProperties::Bottom); else xrp.setSnapTo(XRefProperties::Label); @@ -139,14 +137,6 @@ void XRefPropertiesWidget::updateDisplay() { ui->m_display_has_contacts_rb->setChecked(true); } - XRefProperties::ViewMode vw = xrp.viewMode(); - if (vw == XRefProperties::Index) { - ui->m_display_folio_index_rb->setChecked(true); - } - else if (vw == XRefProperties::FolioLabel) { - ui->m_display_folio_label_rb->setChecked(true); - } - if (xrp.snapTo() == XRefProperties::Bottom) ui->m_snap_to_cb->setCurrentIndex(ui->m_snap_to_cb->findData("bottom")); else ui->m_snap_to_cb->setCurrentIndex(ui->m_snap_to_cb->findData("label")); diff --git a/sources/ui/xrefpropertieswidget.ui b/sources/ui/xrefpropertieswidget.ui index b44b756e8..08bb4c8b1 100644 --- a/sources/ui/xrefpropertieswidget.ui +++ b/sources/ui/xrefpropertieswidget.ui @@ -49,56 +49,19 @@ - + - - - - - Afficher en contacts - - - - - - - Afficher en croix - - - - - - - - - - - - - View Mode + + + Afficher en croix + + + + + + + Afficher en contacts - - - - - View Folio Label - - - true - - - - - - - View Folio Index - - - true - - - -