mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-22 17:50:52 +01:00
Minor fix : folio-report information 'tension_protocol' isn't displayed
When a folio report have a text item witch must display the information 'tension protocol' the text is empty. Replace the string 'tension/protocol' by 'tension_protocol' in QETInformation namespace. Move the static QStrings of the namespace QETInformation from qetinformation.cpp to qetinformation.h to be use everywhere in the code.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Copyright 2006-2020 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "dynamicelementtextitem.h"
|
||||
#include "qet.h"
|
||||
#include "element.h"
|
||||
#include "qetapp.h"
|
||||
#include "diagram.h"
|
||||
@@ -25,6 +24,7 @@
|
||||
#include "conductor.h"
|
||||
#include "elementtextitemgroup.h"
|
||||
#include "crossrefitem.h"
|
||||
#include "qetinformation.h"
|
||||
|
||||
#include <QDomDocument>
|
||||
#include <QDomElement>
|
||||
@@ -1153,13 +1153,13 @@ void DynamicElementTextItem::conductorPropertiesChanged()
|
||||
{
|
||||
if(m_text_from == ElementInfo)
|
||||
{
|
||||
if(m_info_name == "function")
|
||||
if(m_info_name == QETInformation::COND_FUNCTION)
|
||||
setPlainText(m_watched_conductor? m_watched_conductor.data()->properties().m_function : "");
|
||||
else if (m_info_name == "tension_protocol")
|
||||
else if (m_info_name == QETInformation::COND_TENSION_PROTOCOL)
|
||||
setPlainText(m_watched_conductor? m_watched_conductor.data()->properties().m_tension_protocol : "");
|
||||
else if (m_info_name == "conductor_color")
|
||||
else if (m_info_name == QETInformation::COND_COLOR)
|
||||
setPlainText(m_watched_conductor? m_watched_conductor.data()->properties().m_wire_color : "");
|
||||
else if (m_info_name == "conductor_section")
|
||||
else if (m_info_name == QETInformation::COND_SECTION)
|
||||
setPlainText(m_watched_conductor? m_watched_conductor.data()->properties().m_wire_section : "");
|
||||
}
|
||||
else if (m_text_from == CompositeText) {
|
||||
|
||||
@@ -20,63 +20,6 @@
|
||||
#include <QHash>
|
||||
#include "qetinformation.h"
|
||||
|
||||
/** Default information related to element **/
|
||||
static QString ELMT_LABEL = "label";
|
||||
static QString ELMT_FORMULA = "formula";
|
||||
static QString ELMT_COMMENT = "comment";
|
||||
static QString ELMT_FUNCTION = "function";
|
||||
static QString ELMT_AUX1 = "auxiliary1";
|
||||
static QString ELMT_AUX2 = "auxiliary2";
|
||||
static QString ELMT_DESCRIPTION = "description";
|
||||
static QString ELMT_DESIGNATION = "designation";
|
||||
static QString ELMT_MANUFACTURER = "manufacturer";
|
||||
static QString ELMT_MANUFACTURER_REF = "manufacturer_reference";
|
||||
static QString ELMT_MACHINE_MANUFACTURER_REF = "machine_manufacturer_reference";
|
||||
static QString ELMT_SUPPLIER = "supplier";
|
||||
static QString ELMT_QUANTITY = "quantity";
|
||||
static QString ELMT_UNITY = "unity";
|
||||
static QString ELMT_PLANT = "plant";
|
||||
static QString ELMT_LOCATION = "location";
|
||||
|
||||
/** Default information related to conductor **/
|
||||
static QString COND_FUNCTION = "function";
|
||||
static QString COND_TENSION_PROTOCOL = "tension/protocol";
|
||||
static QString COND_COLOR = "conductor_color";
|
||||
static QString COND_SECTION = "conductor_section";
|
||||
static QString COND_FORMULA = "formula";
|
||||
static QString COND_TEXT = "text";
|
||||
|
||||
/** Default information related to diagram **/
|
||||
static QString DIA_AUTHOR = "author";
|
||||
static QString DIA_DATE = "date";
|
||||
static QString DIA_DISPLAY_FOLIO = "display_folio";
|
||||
static QString DIA_FILENAME = "filename";
|
||||
static QString DIA_FOLIO = "folio";
|
||||
static QString DIA_INDEX_REV = "indexrev";
|
||||
static QString DIA_LOCMACH = "locmach";
|
||||
static QString DIA_PLANT = "plant";
|
||||
static QString DIA_POS = "pos";
|
||||
static QString DIA_TITLE = "title";
|
||||
static QString DIA_FOLIO_ID = "folio-id";
|
||||
static QString DIA_PREVIOUS_FOLIO_NUM = "previous-folio-num";
|
||||
static QString DIA_NEXT_FOLIO_NUM = "next-folio-num";
|
||||
|
||||
/** Default information related to project **/
|
||||
static QString PROJECT_FOLIO_TOTAL = "folio-total";
|
||||
static QString PROJECT_TITLE = "projecttitle";
|
||||
static QString PROJECT_PATH = "projectpath";
|
||||
static QString PROJECT_FILE_NAME = "projectfilename";
|
||||
static QString PROJECT_SAVE_DATE = "saveddate";
|
||||
static QString PROJECT_SAVE_DATE_EU = "saveddate-eu";
|
||||
static QString PROJECT_SAVE_DATE_US = "saveddate-us";
|
||||
static QString PROJECT_SAVE_TIME = "savedtime";
|
||||
static QString PROJECT_SAVED_FILE_NAME = "savedfilename";
|
||||
static QString PROJECT_SAVED_FILE_PATH = "savedfilepath";
|
||||
|
||||
|
||||
/** Default information related to QElectroTech **/
|
||||
static QString QET_VERSION = "version";
|
||||
|
||||
/**
|
||||
@brief QETInformation::titleblockInfoKeys
|
||||
@return all available key for use with a titleblock
|
||||
|
||||
@@ -32,6 +32,67 @@
|
||||
*/
|
||||
namespace QETInformation
|
||||
{
|
||||
/** Default information related to element **/
|
||||
static QString ELMT_LABEL = "label";
|
||||
static QString ELMT_FORMULA = "formula";
|
||||
static QString ELMT_COMMENT = "comment";
|
||||
static QString ELMT_FUNCTION = "function";
|
||||
static QString ELMT_AUX1 = "auxiliary1";
|
||||
static QString ELMT_AUX2 = "auxiliary2";
|
||||
static QString ELMT_DESCRIPTION = "description";
|
||||
static QString ELMT_DESIGNATION = "designation";
|
||||
static QString ELMT_MANUFACTURER = "manufacturer";
|
||||
static QString ELMT_MANUFACTURER_REF = "manufacturer_reference";
|
||||
static QString ELMT_MACHINE_MANUFACTURER_REF = "machine_manufacturer_reference";
|
||||
static QString ELMT_SUPPLIER = "supplier";
|
||||
static QString ELMT_QUANTITY = "quantity";
|
||||
static QString ELMT_UNITY = "unity";
|
||||
static QString ELMT_PLANT = "plant";
|
||||
static QString ELMT_LOCATION = "location";
|
||||
|
||||
/** Default information related to conductor **/
|
||||
static QString COND_FUNCTION = "function";
|
||||
static QString COND_TENSION_PROTOCOL = "tension_protocol";
|
||||
static QString COND_COLOR = "conductor_color";
|
||||
static QString COND_SECTION = "conductor_section";
|
||||
static QString COND_FORMULA = "formula";
|
||||
static QString COND_TEXT = "text";
|
||||
|
||||
/** Default information related to diagram **/
|
||||
static QString DIA_AUTHOR = "author";
|
||||
static QString DIA_DATE = "date";
|
||||
static QString DIA_DISPLAY_FOLIO = "display_folio";
|
||||
static QString DIA_FILENAME = "filename";
|
||||
static QString DIA_FOLIO = "folio";
|
||||
static QString DIA_INDEX_REV = "indexrev";
|
||||
static QString DIA_LOCMACH = "locmach";
|
||||
static QString DIA_PLANT = "plant";
|
||||
static QString DIA_POS = "pos";
|
||||
static QString DIA_TITLE = "title";
|
||||
static QString DIA_FOLIO_ID = "folio-id";
|
||||
static QString DIA_PREVIOUS_FOLIO_NUM = "previous-folio-num";
|
||||
static QString DIA_NEXT_FOLIO_NUM = "next-folio-num";
|
||||
|
||||
/** Default information related to project **/
|
||||
static QString PROJECT_FOLIO_TOTAL = "folio-total";
|
||||
static QString PROJECT_TITLE = "projecttitle";
|
||||
static QString PROJECT_PATH = "projectpath";
|
||||
static QString PROJECT_FILE_NAME = "projectfilename";
|
||||
static QString PROJECT_SAVE_DATE = "saveddate";
|
||||
static QString PROJECT_SAVE_DATE_EU = "saveddate-eu";
|
||||
static QString PROJECT_SAVE_DATE_US = "saveddate-us";
|
||||
static QString PROJECT_SAVE_TIME = "savedtime";
|
||||
static QString PROJECT_SAVED_FILE_NAME = "savedfilename";
|
||||
static QString PROJECT_SAVED_FILE_PATH = "savedfilepath";
|
||||
|
||||
|
||||
/** Default information related to QElectroTech **/
|
||||
static QString QET_VERSION = "version";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QStringList titleblockInfoKeys();
|
||||
QString titleblockInfoKeysToVar(const QString &info);
|
||||
QHash <QString, QString> titleblockTranslatedKeyHashVar();
|
||||
|
||||
Reference in New Issue
Block a user