Add new fild and titleblock "Function group"

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5622 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2018-11-30 23:53:13 +00:00
parent 01414974a0
commit ee91337d75
26 changed files with 200 additions and 49 deletions

View File

@@ -319,18 +319,18 @@ void PotentialSelectorDialog::on_buttonBox_accepted()
}
//Check if formula of the new potential have incompatible variable with folio report
QRegularExpression rx ("%sequf_|%seqtf_|%seqhf_|%id|%F|%M|%LM");
QRegularExpression rx ("%sequf_|%seqtf_|%seqhf_|%id|%F|%M|%FG|%LM");
foreach(ConductorProperties cp, m_properties_list)
{
if (cp.m_formula.contains(rx))
{
QStringList forbidden_str;
forbidden_str << "%sequf_" << "%seqtf_" << "%seqhf_" << "%id" << "%F" << "%M" << "%LM";
forbidden_str << "%sequf_" << "%seqtf_" << "%seqhf_" << "%id" << "%F" << "%M" << "%FG" << "%LM";
QString text(tr("La formule du nouveau potentiel contient des variables incompatibles avec les reports de folio.\n"
"Veuillez saisir une formule compatible pour ce potentiel.\n"
"Les variables suivantes sont incompatibles :\n"
"%sequf_ %seqtf_ %seqhf_ %id %F %M %LM"));
"%sequf_ %seqtf_ %seqhf_ %id %F %M %FG %LM"));
FormulaAssistantDialog fag(this);
fag.setForbiddenVariables(forbidden_str);
fag.setText(text);

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
<height>421</height>
</rect>
</property>
<property name="windowTitle">
@@ -32,14 +32,7 @@
<item>
<widget class="QLabel" name="label_">
<property name="text">
<string>Vous pouvez définir un label personnalisé pour les reports de folio.
Créer votre propre texte en vous aidant des variables suivantes :
%f : le numéro de folio
%F: le label de folio
%M: Machine
%LM: Location
%l : le numéro de ligne
%c : le numéro de colonne</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Vous pouvez définir un label personnalisé pour les reports de folio.&lt;/p&gt;&lt;p&gt;Créer votre propre texte en vous aidant des variables suivantes :&lt;/p&gt;&lt;p&gt;%f : le numéro de folio &lt;/p&gt;&lt;p&gt;%F: le label de folio&lt;/p&gt;&lt;p&gt;%M: Machine &lt;/p&gt;&lt;p&gt;%FG: Groupe fonctionnel&lt;/p&gt;&lt;p&gt;%LM: Location&lt;/p&gt;&lt;p&gt;%l : le numéro de ligne&lt;/p&gt;&lt;p&gt;%c : le numéro de colonne&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="scaledContents">
<bool>false</bool>

View File

@@ -97,6 +97,7 @@ void TitleBlockPropertiesWidget::setProperties(const TitleBlockProperties &prope
ui -> m_author_le -> setText (properties.author);
ui -> m_file_le -> setText (properties.filename);
ui -> m_mach -> setText (properties.machine);
ui -> m_group_f -> setText (properties.funcgroup);
ui -> m_loc -> setText (properties.locmach);
ui -> m_indice -> setText (properties.indexrev);
ui -> m_folio_le -> setText (properties.folio);
@@ -155,7 +156,8 @@ TitleBlockProperties TitleBlockPropertiesWidget::properties() const {
prop.author = ui -> m_author_le -> text();
prop.filename = ui -> m_file_le -> text();
prop.machine = ui -> m_mach -> text();
prop.locmach = ui -> m_loc -> text();
prop.funcgroup = ui -> m_group_f -> text();
prop.locmach = ui -> m_loc -> text();
prop.indexrev = ui -> m_indice -> text();
prop.folio = ui -> m_folio_le -> text();
prop.display_at = ui -> m_display_at_cb -> currentIndex() == 0 ? Qt::BottomEdge : Qt::RightEdge;
@@ -196,6 +198,7 @@ TitleBlockProperties TitleBlockPropertiesWidget::propertiesAutoNum(QString autoN
prop.author = ui -> m_author_le -> text();
prop.filename = ui -> m_file_le -> text();
prop.machine = ui -> m_mach -> text();
prop.funcgroup = ui -> m_group_f -> text();
prop.locmach = ui -> m_loc -> text();
prop.indexrev = ui -> m_indice -> text();
prop.folio = "%autonum";

View File

@@ -84,7 +84,7 @@
</property>
<item>
<property name="text">
<string notr="true"> </string>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="../../qelectrotech.qrc">
@@ -93,7 +93,7 @@
</item>
<item>
<property name="text">
<string notr="true"> </string>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="../../qelectrotech.qrc">
@@ -220,7 +220,7 @@
<item row="9" column="1">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Indice Rev</string>
<string>Indice Rev:</string>
</property>
</widget>
</item>
@@ -373,10 +373,20 @@ Les variables suivantes sont utilisables :
<item row="8" column="1">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Localisation</string>
<string>Localisation:</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLabel" name="label">
<property name="text">
<string>Groupe fonctionnel:</string>
</property>
</widget>
</item>
<item row="7" column="3">
<widget class="QLineEdit" name="m_group_f"/>
</item>
</layout>
</item>
<item>

View File

@@ -2,6 +2,14 @@
<ui version="4.0">
<class>XRefPropertiesWidget</class>
<widget class="QWidget" name="XRefPropertiesWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>459</width>
<height>662</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
@@ -187,6 +195,7 @@
%l : le numéro de ligne
%c : le numéro de colonne
%M: Installation
%FG: Groupe fonctionnel
%LM: Localisation </string>
</property>
</widget>