Reverting previous commit and going back to revision 4475.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4477 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
dfochi
2016-05-13 13:48:36 +00:00
parent fa4714b95d
commit f077361856
31 changed files with 850 additions and 2000 deletions

View File

@@ -55,14 +55,12 @@ DiagramPropertiesDialog::DiagramPropertiesDialog(Diagram *diagram, QWidget *pare
//Title block widget
TitleBlockPropertiesWidget *titleblock_infos;
if (QETProject *parent_project = diagram -> project()) {
titleblock_infos = new TitleBlockPropertiesWidget(parent_project -> embeddedTitleBlockTemplatesCollection(), titleblock, false, diagram->project(), this);
titleblock_infos = new TitleBlockPropertiesWidget(parent_project -> embeddedTitleBlockTemplatesCollection(), titleblock, false, this);
connect(titleblock_infos, SIGNAL(editTitleBlockTemplate(QString, bool)), diagram->views().first(), SIGNAL(editTitleBlockTemplate(QString, bool)));
}
else
titleblock_infos = new TitleBlockPropertiesWidget(titleblock, false, diagram->project(), this);
titleblock_infos = new TitleBlockPropertiesWidget(titleblock, false, this);
titleblock_infos -> setReadOnly(diagram_is_read_only);
connect(titleblock_infos,SIGNAL(openAutoNumFolioEditor(QString)),this,SLOT(editAutoFolioNum()));
titleblock_infos->setMinimumSize(590,480); //Minimum Size needed for correct display
//Conductor widget
ConductorPropertiesWidget *cpw = new ConductorPropertiesWidget(conductors, this);
@@ -126,7 +124,7 @@ void DiagramPropertiesDialog::diagramPropertiesDialog(Diagram *diagram, QWidget
/**
* @brief DiagramPropertiesDialog::editAutonum
* Open conductor autonum editor
* Open the autonum editor
*/
void DiagramPropertiesDialog::editAutonum() {
ProjectPropertiesDialog ppd (m_diagram->project(), this);
@@ -134,14 +132,3 @@ void DiagramPropertiesDialog::editAutonum() {
ppd.exec();
m_asw -> setItems (m_diagram -> project() -> conductorAutoNum().keys());
}
/**
* @brief DiagramPropertiesDialog::editAutonum
* Open folio autonum editor
*/
void DiagramPropertiesDialog::editAutoFolioNum () {
ProjectPropertiesDialog ppd (m_diagram->project(), this);
ppd.setCurrentPage(ProjectPropertiesDialog::Autonum);
ppd.changeToFolio();
ppd.exec();
}

View File

@@ -37,7 +37,6 @@ class DiagramPropertiesDialog : public QDialog {
public slots:
void editAutonum ();
void editAutoFolioNum ();
private:
Diagram *m_diagram;

View File

@@ -1,218 +0,0 @@
/*
Copyright 2006-2015 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "folioautonumbering.h"
#include "ui_folioautonumbering.h"
#include <QMessageBox>
#include <QPushButton>
#include <QtWidgets>
#include "qdebug.h"
#include "qetproject.h"
#include "diagram.h"
/**
* Constructor
*/
FolioAutonumberingW::FolioAutonumberingW(QETProject *project, QWidget *parent) :
QWidget(parent),
project_(project),
ui(new Ui::FolioAutonumberingW)
{
ui->setupUi(this);
applyEnable(false);
ui->m_from_cb->setEnabled(false);
ui->m_new_tabs_sb->setEnabled(false);
ui->m_to_cb->setEnabled(false);
}
/**
* Destructor
*/
FolioAutonumberingW::~FolioAutonumberingW()
{
delete ui;
}
/**
* @brief FolioAutonumberingW::setContext
* construct autonums in the comboBox selected in the @autonum_chooser QcomboBox
*/
void FolioAutonumberingW::setContext(QList <QString> autonums) {
foreach (QString str, autonums) { ui->m_autonums_cb->addItem(str);}
}
/**
* @brief FolioAutonumberingW::autoNumSelected
* returns the current autonum selected
*/
QString FolioAutonumberingW::autoNumSelected(){
return ui->m_autonums_cb->currentText();
}
/**
* @brief FolioAutonumberingW::fromFolio
* returns the current "From Folio" index
*/
int FolioAutonumberingW::fromFolio(){
return ui->m_from_cb->currentIndex()-1;
}
/**
* @brief FolioAutonumberingW::toFolio
* returns the current "To Folio" index
*/
int FolioAutonumberingW::toFolio(){
return ui->m_to_cb->currentIndex()+this->fromFolio()+1;
}
/**
* @brief FolioAutonumberingW::newFoliosNumber
* returns the number of folios to create
*/
int FolioAutonumberingW::newFoliosNumber(){
return ui->m_new_tabs_sb->value();
}
/**
* @brief FolioAutonumberingW::updateFolioList
* update Folio List in From and To ComboBox
*/
void FolioAutonumberingW::updateFolioList(){
ui -> m_from_cb->clear();
ui -> m_to_cb->clear();
if (newFolios){
this -> on_m_create_new_tabs_rb_clicked();
} else {
this -> on_m_autonumber_tabs_rb_clicked();
}
}
/**
* @brief FolioAutonumberingW::on_m_create_new_tabs_rb_clicked
* Enable New Tabs SpinBox
*/
void FolioAutonumberingW::on_m_create_new_tabs_rb_clicked() {
ui->m_from_cb->setEnabled(false);
ui->m_to_cb->setEnabled(false);
ui->m_new_tabs_sb->setEnabled(true);
applyEnable();
newFolios = true;
}
/**
* @brief FolioAutonumberingW::on_m_autonumber_tabs_rb_clicked
* Enable From ComboBox, fill From ComboBox
*/
void FolioAutonumberingW::on_m_autonumber_tabs_rb_clicked() {
ui->m_new_tabs_sb->setEnabled(false);
ui->m_from_cb->setEnabled(true);
ui->m_to_cb->setEnabled(true);
if (ui->m_from_cb->count()<=0){
ui->m_from_cb->clear();
ui->m_from_cb->addItem("");
foreach (Diagram *diagram, project_->diagrams()){
ui->m_from_cb->addItem(diagram->title());
}
}
applyEnable();
newFolios = false;
}
/**
* @brief FolioAutonumberingW::on_m_new_tabs_sb_valueChanged
* Enable Apply if any new folio is to be created
*/
void FolioAutonumberingW::on_m_new_tabs_sb_valueChanged(){
if (ui->m_new_tabs_sb->value()>0) applyEnable(true);
else applyEnable(false);
}
/**
* @brief FolioAutonumberingW::on_m_from_cb_currentIndexChanged
* Enable To ComboBox
*/
void FolioAutonumberingW::on_m_from_cb_currentIndexChanged(){
int index = ui->m_from_cb->currentIndex();
ui->m_to_cb->clear();
if (index > 0){
ui->m_to_cb->setEnabled(true);
for (int i=index;i<project_->diagrams().size();i++)
ui->m_to_cb->addItem(project_->diagrams().at(i)->title());
applyEnable(true);
}
else{
applyEnable();
}
}
/**
* @brief SelectAutonumW::on_buttonBox_clicked
* Action on @buttonBox clicked
*/
void FolioAutonumberingW::on_buttonBox_clicked(QAbstractButton *button) {
//transform button to int
int answer = ui -> buttonBox -> buttonRole(button);
switch (answer) {
//help dialog - not implemented yet -
case QDialogButtonBox::HelpRole:
break;
/*QMessageBox::information (this, tr("Folio Autonumbering", "title window"),
tr("C'est ici que vous pouvez définir la manière dont sera numéroté les nouveaux conducteurs.\n"
"-Une numérotation est composée d'une variable minimum.\n"
"-Vous pouvez ajouter ou supprimer une variable de numérotation par le biais des boutons - et +.\n"
"-Une variable de numérotation comprant: un type, une valeur et une incrémentation.\n"
"\n-les types \"Chiffre 1\", \"Chiffre 01\" et \"Chiffre 001\", représente un type numérique définie dans le champs \"Valeur\", "
"qui s'incrémente à chaque nouveau conducteur de la valeur du champ \"Incrémentation\".\n"
"-\"Chiffre 01\" et \"Chiffre 001\", sont respectivement représenté sur le schéma par deux et trois digits minimum.\n"
"Si le chiffre définie dans le champs Valeur posséde moins de digits que le type choisit,"
"celui-ci sera précédé par un ou deux 0 afin de respecter son type.\n"
"\n-Le type \"Texte\", représente un texte fixe.\nLe champs \"Incrémentation\" n'est pas utilisé.\n"
"\n-Le type \"N° folio\" représente le n° du folio en cours.\nLes autres champs ne sont pas utilisés.",
"help dialog about the autonumerotation")); */
case QDialogButtonBox::ApplyRole:
applyEnable(true);
emit applyPressed();
updateFolioList();
break;
}
}
/**
* @brief SelectAutonumW::applyEnable
* enable/disable the apply button
*/
void FolioAutonumberingW::applyEnable(bool b) {
if (b){
bool valid = true;
if (ui->m_create_new_tabs_rb->isChecked()){
if (ui->m_new_tabs_sb->value()==0) valid = false;
ui->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(valid);
}
else{
if (ui->m_to_cb->currentText()=="") valid = false;
ui->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(valid);
}
}
else{
ui -> buttonBox -> button(QDialogButtonBox::Apply) -> setEnabled(b);
}
}

View File

@@ -1,72 +0,0 @@
/*
Copyright 2006-2015 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FOLIOAUTONUMBERING_H
#define FOLIOAUTONUMBERING_H
#include <QWidget>
#include "numerotationcontext.h"
class NumPartEditorW;
class QAbstractButton;
class QETProject;
namespace Ui {
class FolioAutonumberingW;
}
class FolioAutonumberingW : public QWidget
{
Q_OBJECT
//METHODS
public:
explicit FolioAutonumberingW(QETProject *project, QWidget *parent = 0);
~FolioAutonumberingW();
void setContext (QList <QString> autonums);
NumerotationContext toNumContext() const;
QString autoNumSelected();
int newFoliosNumber();
bool newFolios;
int fromFolio();
int toFolio();
// SIGNALS
signals:
void applyPressed();
void m_autonumber_tabs_rb_clicked();
//SLOTS
private slots:
void on_m_create_new_tabs_rb_clicked();
void on_m_autonumber_tabs_rb_clicked();
void on_m_new_tabs_sb_valueChanged();
void on_buttonBox_clicked(QAbstractButton *);
void on_m_from_cb_currentIndexChanged();
void applyEnable (bool = true);
//ATTRIBUTES
private:
QETProject *project_;
Ui::FolioAutonumberingW *ui;
QList <NumPartEditorW *> num_part_list_;
NumerotationContext m_context;
void updateFolioList();
};
#endif // FOLIOAUTONUMBERING_H

View File

@@ -1,295 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FolioAutonumberingW</class>
<widget class="QWidget" name="FolioAutonumberingW">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>467</width>
<height>550</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>460</width>
<height>0</height>
</size>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>50</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>450</width>
<height>253</height>
</size>
</property>
<property name="sizeIncrement">
<size>
<width>0</width>
<height>50</height>
</size>
</property>
<property name="mouseTracking">
<bool>false</bool>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAsNeeded</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContents</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>448</width>
<height>497</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>430</width>
<height>250</height>
</size>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<item row="2" column="1" colspan="2">
<widget class="QGroupBox" name="Options">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Numbering Options</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="1">
<widget class="QComboBox" name="m_to_cb">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>New Tabs</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="m_from_cb">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="m_new_tabs_sb">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>999</number>
</property>
<property name="displayIntegerBase">
<number>10</number>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>To</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>From</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QGroupBox" name="Select">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Select:</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QRadioButton" name="m_create_new_tabs_rb">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Create New Tabs</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="m_autonumber_tabs_rb">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Autonumber Selected Tabs</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Folio Auto Numbering:</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QComboBox" name="m_autonums_cb">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Apply|QDialogButtonBox::Help|QDialogButtonBox::Reset</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -28,18 +28,11 @@
* @param parent : parent widget of this dialog
*/
ProjectPropertiesDialog::ProjectPropertiesDialog(QETProject *project, QWidget *parent) {
NewDiagramPage *newDiagramPage = new NewDiagramPage(project,parent,this);
ProjectAutoNumConfigPage *projectAutoNumConfigPage = new ProjectAutoNumConfigPage (project);
m_properties_dialog = new ConfigDialog (parent);
m_properties_dialog -> setWindowTitle(QObject::tr("Propriétés du projet", "window title"));
m_properties_dialog -> addPage(new ProjectMainConfigPage (project));
m_properties_dialog -> addPage(newDiagramPage);
m_properties_dialog -> addPage(projectAutoNumConfigPage);
connect(projectAutoNumConfigPage,SIGNAL(setAutoNum(QString)),newDiagramPage,SLOT(setFolioAutonum(QString)));
connect(projectAutoNumConfigPage,SIGNAL(saveCurrentTbp()),newDiagramPage,SLOT(saveCurrentTbp()));
connect(projectAutoNumConfigPage,SIGNAL(loadSavedTbp()),newDiagramPage,SLOT(loadSavedTbp()));
m_properties_dialog->setMinimumHeight(690);
m_properties_dialog -> addPage(new NewDiagramPage (project));
m_properties_dialog -> addPage(new ProjectAutoNumConfigPage (project));
}
/**
@@ -65,12 +58,3 @@ void ProjectPropertiesDialog::exec() {
void ProjectPropertiesDialog::setCurrentPage(ProjectPropertiesDialog::Page p) {
m_properties_dialog -> setCurrentPage(static_cast <int> (p));
}
/**
* @brief ProjectPropertiesDialog::changeToFolio
* Change the current displayed tab to folio tab.
*/
void ProjectPropertiesDialog::changeToFolio() {
ProjectAutoNumConfigPage *autoNumPage = static_cast <ProjectAutoNumConfigPage*>(m_properties_dialog->pages.at(2));
autoNumPage->changeToTab(1);
}

View File

@@ -17,7 +17,6 @@
*/
#ifndef PROJECTPROPERTIESDIALOG_H
#define PROJECTPROPERTIESDIALOG_H
#include <QtCore>
class QETProject;
class QWidget;
@@ -27,7 +26,8 @@ class ConfigDialog;
* @brief The ProjectPropertiesDialog class
* this class builds a dialog to edit whole properties of a project
*/
class ProjectPropertiesDialog : public QObject {
class ProjectPropertiesDialog
{
public:
enum Page {
Main = 0,
@@ -39,7 +39,6 @@ class ProjectPropertiesDialog : public QObject {
~ProjectPropertiesDialog();
void exec();
void setCurrentPage(ProjectPropertiesDialog::Page);
void changeToFolio();
private:
ConfigDialog *m_properties_dialog;

View File

@@ -6,289 +6,183 @@
<rect>
<x>0</x>
<y>0</y>
<width>466</width>
<height>506</height>
<width>432</width>
<height>273</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<widget class="QGroupBox" name="definition_groupe">
<property name="title">
<string>Définition</string>
</property>
<property name="minimumSize">
<size>
<width>430</width>
<height>455</height>
</size>
</property>
<property name="sizeIncrement">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="mouseTracking">
<bool>false</bool>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAsNeeded</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContents</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>460</width>
<height>453</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>460</width>
<height>450</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<item>
<widget class="QGroupBox" name="definition_groupe">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Définition</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="remove_button">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Supprimer une variable de numérotation&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../qelectrotech.qrc">
<normaloff>:/ico/22x22/list-remove.png</normaloff>:/ico/22x22/list-remove.png</iconset>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="add_button">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Ajouter une variable de numérotation&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../qelectrotech.qrc">
<normaloff>:/ico/22x22/list-add.png</normaloff>:/ico/22x22/list-add.png</iconset>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="m_previous_pb">
<property name="toolTip">
<string>Précédent</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../qelectrotech.qrc">
<normaloff>:/ico/16x16/arrow-left.png</normaloff>:/ico/16x16/arrow-left.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="m_next_pb">
<property name="toolTip">
<string>Suivant</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../qelectrotech.qrc">
<normaloff>:/ico/16x16/arrow-right.png</normaloff>:/ico/16x16/arrow-right.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="editor_layout">
<property name="spacing">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="label_layout">
<property name="spacing">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
<widget class="QLabel" name="type_label">
<property name="text">
<string>Type</string>
</property>
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="remove_button">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Supprimer une variable de numérotation&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../qelectrotech.qrc">
<normaloff>:/ico/22x22/list-remove.png</normaloff>:/ico/22x22/list-remove.png</iconset>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="add_button">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Ajouter une variable de numérotation&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../qelectrotech.qrc">
<normaloff>:/ico/22x22/list-add.png</normaloff>:/ico/22x22/list-add.png</iconset>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="m_previous_pb">
<property name="toolTip">
<string>Précédent</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../qelectrotech.qrc">
<normaloff>:/ico/16x16/arrow-left.png</normaloff>:/ico/16x16/arrow-left.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="m_next_pb">
<property name="toolTip">
<string>Suivant</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../qelectrotech.qrc">
<normaloff>:/ico/16x16/arrow-right.png</normaloff>:/ico/16x16/arrow-right.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="editor_layout" stretch="0">
<property name="spacing">
<number>0</number>
<widget class="QLabel" name="value_label">
<property name="text">
<string>Valeur</string>
</property>
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<item>
<layout class="QHBoxLayout" name="label_layout" stretch="0,0,0">
<property name="spacing">
<number>0</number>
</property>
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QLabel" name="type_label">
<property name="text">
<string>Type</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="value_label">
<property name="text">
<string>Valeur</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="increase_label">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Incrémentation</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
<widget class="QLabel" name="increase_label">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
<property name="text">
<string>Incrémentation</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>30</height>
</size>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</spacer>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Apply|QDialogButtonBox::Help|QDialogButtonBox::Reset</set>
</property>

View File

@@ -29,13 +29,13 @@
* @param current_date if true, display the radio button "current date"
* @param parent parent widget
*/
TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(const TitleBlockProperties &titleblock, bool current_date, QETProject *project, QWidget *parent) :
TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(const TitleBlockProperties &titleblock, bool current_date, QWidget *parent) :
QWidget(parent),
ui(new Ui::TitleBlockPropertiesWidget)
{
ui->setupUi(this);
initDialog(current_date, project);
setProperties(titleblock);
initDialog(current_date);
setProperties(titleblock);
}
/**
@@ -46,12 +46,12 @@ TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(const TitleBlockPropertie
* @param current_date if true, display the radio button "current date"
* @param parent parent widget
*/
TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(TitleBlockTemplatesCollection *tbt_collection, const TitleBlockProperties &titleblock, bool current_date, QETProject *project, QWidget *parent) :
TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(TitleBlockTemplatesCollection *tbt_collection, const TitleBlockProperties &titleblock, bool current_date, QWidget *parent) :
QWidget(parent),
ui(new Ui::TitleBlockPropertiesWidget)
{
ui->setupUi(this);
initDialog(current_date,project);
initDialog(current_date);
addCollection(tbt_collection);
updateTemplateList();
setProperties(titleblock);
@@ -65,12 +65,12 @@ TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(TitleBlockTemplatesCollec
* @param current_date if true, display the radio button "current date"
* @param parent parent widget
*/
TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(QList<TitleBlockTemplatesCollection *> tbt_collection, const TitleBlockProperties &titleblock, bool current_date, QETProject *project, QWidget *parent) :
TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(QList<TitleBlockTemplatesCollection *> tbt_collection, const TitleBlockProperties &titleblock, bool current_date, QWidget *parent) :
QWidget(parent),
ui(new Ui::TitleBlockPropertiesWidget)
{
ui->setupUi(this);
initDialog(current_date,project);
initDialog(current_date);
foreach (TitleBlockTemplatesCollection *c, tbt_collection)
addCollection(c);
updateTemplateList();
@@ -96,7 +96,6 @@ void TitleBlockPropertiesWidget::setProperties(const TitleBlockProperties &prope
ui -> m_file_le -> setText (properties.filename);
ui -> m_folio_le -> setText (properties.folio);
ui -> m_display_at_cb -> setCurrentIndex(properties.display_at == Qt::BottomEdge ? 0 : 1);
ui->auto_page_cb->setCurrentText(properties.auto_page_num);
//About date
ui -> m_date_now_pb -> setDisabled(true);
@@ -173,46 +172,6 @@ TitleBlockProperties TitleBlockPropertiesWidget::properties() const {
prop.context = m_dcw -> context();
prop.auto_page_num = ui->auto_page_cb->currentText();
return prop;
}
/**
* @brief TitleBlockPropertiesWidget::properties
* @return return properties to enable folio autonum
*/
TitleBlockProperties TitleBlockPropertiesWidget::propertiesAutoNum(QString autoNum) const {
TitleBlockProperties prop;
prop.title = ui -> m_title_le -> text();
prop.author = ui -> m_author_le -> text();
prop.filename = ui -> m_file_le -> text();
prop.folio = "%autonum";
prop.display_at = ui -> m_display_at_cb -> currentIndex() == 0 ? Qt::BottomEdge : Qt::RightEdge;
if (ui->m_no_date_rb->isChecked()) {
prop.useDate = TitleBlockProperties::UseDateValue;
prop.date = QDate();
}
else if (ui -> m_fixed_date_rb -> isChecked()) {
prop.useDate = TitleBlockProperties::UseDateValue;
prop.date = ui->m_date_edit->date();
}
else if (ui->m_current_date_rb->isVisible() && ui->m_current_date_rb->isChecked()) {
prop.useDate = TitleBlockProperties::CurrentDate;
prop.date = QDate::currentDate();
}
if (!currentTitleBlockTemplateName().isEmpty())
{
prop.template_name = currentTitleBlockTemplateName();
prop.collection = m_map_index_to_collection_type.at(ui->m_tbt_cb->currentIndex());
}
prop.context = m_dcw -> context();
prop.auto_page_num = autoNum;
return prop;
}
@@ -261,7 +220,7 @@ void TitleBlockPropertiesWidget::addCollection(TitleBlockTemplatesCollection *tb
* Init this dialog
* @param current_date true for display current date radio button
*/
void TitleBlockPropertiesWidget::initDialog(const bool &current_date, QETProject *project) {
void TitleBlockPropertiesWidget::initDialog(const bool &current_date) {
m_dcw = new DiagramContextWidget();
ui -> m_tab2_vlayout -> addWidget(m_dcw);
@@ -280,19 +239,6 @@ void TitleBlockPropertiesWidget::initDialog(const bool &current_date, QETProjec
ui -> m_tbt_pb -> setMenu(m_tbt_menu);
connect(ui->m_tbt_cb, SIGNAL(currentIndexChanged(int)), this, SLOT(changeCurrentTitleBlockTemplate(int)));
if (project!= NULL){
keys_2 = project -> folioAutoNum().keys();
foreach (QString str, keys_2) { ui -> auto_page_cb -> addItem(str); }
if (ui->auto_page_cb->currentText()==NULL)
ui->auto_page_cb->addItem("Create an Auto Folio Numbering");
}
else{
ui->auto_page_cb->hide();
ui->m_edit_autofolionum_pb->hide();
ui->label_9->hide();
}
}
/**
@@ -396,15 +342,3 @@ void TitleBlockPropertiesWidget::changeCurrentTitleBlockTemplate(int index)
void TitleBlockPropertiesWidget::on_m_date_now_pb_clicked() {
ui -> m_date_edit -> setDate(QDate::currentDate());
}
/**
* @brief TitleBlockPropertiesWidget::on_m_edit_autofolionum_pb_clicked
* Open Auto Folio Num dialog
*/
void TitleBlockPropertiesWidget::on_m_edit_autofolionum_pb_clicked() {
emit openAutoNumFolioEditor(ui->auto_page_cb->currentText());
if (ui->auto_page_cb->currentText()!="Create an Auto Folio Numbering")
{
//still to implement: load current auto folio num settings
}
}

View File

@@ -18,15 +18,11 @@
#ifndef TITLEBLOCKPROPERTIESWIDGET_H
#define TITLEBLOCKPROPERTIESWIDGET_H
#include "qetproject.h"
#include <QWidget>
#include "titleblockproperties.h"
#include "diagramcontextwidget.h"
#include "qet.h"
#include "numerotationcontext.h"
class NumerotationContext;
class QETProject;
class QMenu;
class TitleBlockTemplatesCollection;
@@ -39,15 +35,13 @@ class TitleBlockPropertiesWidget : public QWidget
Q_OBJECT
public:
explicit TitleBlockPropertiesWidget(const TitleBlockProperties &titleblock = TitleBlockProperties(), bool current_date = false, QETProject *project = NULL, QWidget *parent = 0);
explicit TitleBlockPropertiesWidget(TitleBlockTemplatesCollection *tbt_collection, const TitleBlockProperties &titleblock = TitleBlockProperties(), bool current_date = false, QETProject *project = NULL, QWidget *parent = 0);
explicit TitleBlockPropertiesWidget(QList <TitleBlockTemplatesCollection *> tbt_collection, const TitleBlockProperties &titleblock = TitleBlockProperties(), bool current_date = false, QETProject *project = NULL, QWidget *parent = 0);
explicit TitleBlockPropertiesWidget(const TitleBlockProperties &titleblock = TitleBlockProperties(), bool current_date = false, QWidget *parent = 0);
explicit TitleBlockPropertiesWidget(TitleBlockTemplatesCollection *tbt_collection, const TitleBlockProperties &titleblock = TitleBlockProperties(), bool current_date = false, QWidget *parent = 0);
explicit TitleBlockPropertiesWidget(QList <TitleBlockTemplatesCollection *> tbt_collection, const TitleBlockProperties &titleblock = TitleBlockProperties(), bool current_date = false, QWidget *parent = 0);
~TitleBlockPropertiesWidget();
void setProperties(const TitleBlockProperties &properties);
TitleBlockProperties properties() const;
TitleBlockProperties propertiesAutoNum(QString autoNum) const;
void setPropertiesWithAutoNum(const TitleBlockProperties &properties, QString autoNum);
void setTitleBlockTemplatesVisible(const bool &visible);
void setReadOnly (const bool &ro);
@@ -55,7 +49,7 @@ class TitleBlockPropertiesWidget : public QWidget
private:
void addCollection (TitleBlockTemplatesCollection *tbt_collection);
QString currentTitleBlockTemplateName () const;
void initDialog(const bool &current_date, QETProject *project);
void initDialog(const bool &current_date);
int getIndexFor (const QString &tbt_name, const QET::QetCollection collection) const;
private slots:
@@ -64,12 +58,9 @@ class TitleBlockPropertiesWidget : public QWidget
void updateTemplateList();
void changeCurrentTitleBlockTemplate(int);
void on_m_date_now_pb_clicked();
void on_m_edit_autofolionum_pb_clicked();
signals:
void editTitleBlockTemplate(const QString &, bool);
void set_auto_page_num() const;
void openAutoNumFolioEditor (QString);
private:
Ui::TitleBlockPropertiesWidget *ui;
@@ -78,7 +69,6 @@ class TitleBlockPropertiesWidget : public QWidget
QMenu *m_tbt_menu;
QList <TitleBlockTemplatesCollection *> m_tbt_collection_list;
QList <QET::QetCollection> m_map_index_to_collection_type;
QList <QString> keys_2;
};
#endif // TITLEBLOCKPROPERTIESWIDGET_H

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>572</width>
<height>590</height>
<width>530</width>
<height>452</height>
</rect>
</property>
<property name="sizePolicy">
@@ -33,316 +33,256 @@
<number>9</number>
</property>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
<widget class="QGroupBox" name="m_tbt_gb">
<property name="title">
<string>Informations des cartouches</string>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents_1">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>552</width>
<height>570</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QGroupBox" name="m_tbt_gb">
<property name="title">
<string>Informations des cartouches</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="checkable">
<bool>false</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="m_tbt_hlayout" stretch="0,1,0">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QLabel" name="m_tbt_label">
<property name="text">
<string>Modèle :</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="m_tbt_cb"/>
</item>
<item>
<widget class="QPushButton" name="m_tbt_pb">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../qelectrotech.qrc">
<normaloff>:/ico/16x16/label.png</normaloff>:/ico/16x16/label.png</iconset>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tabPosition">
<enum>QTabWidget::South</enum>
</property>
<property name="tabShape">
<enum>QTabWidget::Rounded</enum>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<property name="elideMode">
<enum>Qt::ElideNone</enum>
</property>
<property name="usesScrollButtons">
<bool>true</bool>
</property>
<property name="tabsClosable">
<bool>false</bool>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Principales</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="m_tbt_hlayout" stretch="0,1,0">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QLabel" name="m_tbt_label">
<property name="text">
<string>Modèle :</string>
<layout class="QGridLayout" name="gridLayout_4">
<item row="5" column="2">
<widget class="QLineEdit" name="m_folio_le">
<property name="toolTip">
<string>Disponible en tant que %folio pour les modèles de cartouches</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="m_tbt_cb"/>
</item>
<item>
<widget class="QPushButton" name="m_tbt_pb">
<item row="2" column="1">
<widget class="QLabel" name="label_3">
<property name="text">
<string/>
<string>Auteur :</string>
</property>
<property name="icon">
<iconset resource="../../qelectrotech.qrc">
<normaloff>:/ico/16x16/label.png</normaloff>:/ico/16x16/label.png</iconset>
</widget>
</item>
<item row="7" column="1">
<widget class="QLabel" name="label">
<property name="text">
<string>Afficher :</string>
</property>
<property name="flat">
</widget>
</item>
<item row="6" column="2">
<widget class="QLabel" name="label_7">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string>Les variables suivantes sont utilisables dans le champ Folio :
- %id : numéro du folio courant dans le projet
- %total : nombre total de folios dans le projet</string>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="3" column="2">
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,1,0">
<item row="0" column="0">
<widget class="QRadioButton" name="m_no_date_rb">
<property name="text">
<string>Pas de date</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="m_current_date_rb">
<property name="text">
<string>Date courante</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="m_date_now_pb">
<property name="toolTip">
<string>Appliquer la date actuelle</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../qelectrotech.qrc">
<normaloff>:/ico/22x22/start.png</normaloff>:/ico/22x22/start.png</iconset>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDateEdit" name="m_date_edit">
<property name="toolTip">
<string>Disponible en tant que %date pour les modèles de cartouches</string>
</property>
<property name="frame">
<bool>true</bool>
</property>
<property name="calendarPopup">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="m_fixed_date_rb">
<property name="text">
<string>Date fixe :</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Date :</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Fichier :</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLineEdit" name="m_title_le">
<property name="toolTip">
<string>Disponible en tant que %title pour les modèles de cartouches</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Titre :</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLineEdit" name="m_author_le">
<property name="toolTip">
<string>Disponible en tant que %author pour les modèles de cartouches</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Folio :</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QLineEdit" name="m_file_le">
<property name="toolTip">
<string>Disponible en tant que %filename pour les modèles de cartouches</string>
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QComboBox" name="m_display_at_cb">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Affiche le cartouche en bas (horizontalement) ou à droite (verticalement) du folio.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<item>
<property name="text">
<string>en bas</string>
</property>
</item>
<item>
<property name="text">
<string>à droite (expérimental)</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Personnalisées</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tabPosition">
<enum>QTabWidget::South</enum>
</property>
<property name="tabShape">
<enum>QTabWidget::Rounded</enum>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<property name="elideMode">
<enum>Qt::ElideNone</enum>
</property>
<property name="usesScrollButtons">
<bool>true</bool>
</property>
<property name="tabsClosable">
<bool>false</bool>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Principales</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QGridLayout" name="gridLayout_4">
<item row="4" column="1">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Fichier :</string>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QLabel" name="label_7">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string>Les variables suivantes sont utilisables dans le champ Folio :
- %id : numéro du folio courant dans le projet
- %total : nombre total de folios dans le projet
- %autonum : Folio Auto Numeration</string>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Date :</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Folio :</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Titre :</string>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QLineEdit" name="m_folio_le">
<property name="toolTip">
<string>Disponible en tant que %folio pour les modèles de cartouches</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLineEdit" name="m_title_le">
<property name="toolTip">
<string>Disponible en tant que %title pour les modèles de cartouches</string>
</property>
</widget>
</item>
<item row="8" column="2">
<widget class="QComboBox" name="m_display_at_cb">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Affiche le cartouche en bas (horizontalement) ou à droite (verticalement) du folio.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<item>
<property name="text">
<string>en bas</string>
</property>
</item>
<item>
<property name="text">
<string>à droite (expérimental)</string>
</property>
</item>
</widget>
</item>
<item row="4" column="2">
<widget class="QLineEdit" name="m_file_le">
<property name="toolTip">
<string>Disponible en tant que %filename pour les modèles de cartouches</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Auteur :</string>
</property>
</widget>
</item>
<item row="3" column="2">
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,1,0">
<item row="0" column="0">
<widget class="QRadioButton" name="m_no_date_rb">
<property name="text">
<string>Pas de date</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="m_current_date_rb">
<property name="text">
<string>Date courante</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="m_date_now_pb">
<property name="toolTip">
<string>Appliquer la date actuelle</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../qelectrotech.qrc">
<normaloff>:/ico/22x22/start.png</normaloff>:/ico/22x22/start.png</iconset>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDateEdit" name="m_date_edit">
<property name="toolTip">
<string>Disponible en tant que %date pour les modèles de cartouches</string>
</property>
<property name="frame">
<bool>true</bool>
</property>
<property name="calendarPopup">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="m_fixed_date_rb">
<property name="text">
<string>Date fixe :</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="2">
<widget class="QLineEdit" name="m_author_le">
<property name="toolTip">
<string>Disponible en tant que %author pour les modèles de cartouches</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLabel" name="label">
<property name="text">
<string>Afficher :</string>
</property>
</widget>
</item>
<item row="7" column="2">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QComboBox" name="auto_page_cb">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="m_edit_autofolionum_pb">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../qelectrotech.qrc">
<normaloff>:/ico/16x16/configure.png</normaloff>:/ico/16x16/configure.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item row="7" column="1">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Page Num:</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Personnalisées</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QVBoxLayout" name="m_tab2_vlayout">
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<string>Vous pouvez définir ici vos propres associations noms/valeurs pour que le cartouche en tienne compte. Exemple :
<layout class="QVBoxLayout" name="m_tab2_vlayout">
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<string>Vous pouvez définir ici vos propres associations noms/valeurs pour que le cartouche en tienne compte. Exemple :
associer le nom &quot;volta&quot; et la valeur &quot;1745&quot; remplacera %{volta} par 1745 dans le cartouche.</string>
</property>
<property name="wordWrap">
@@ -360,10 +300,6 @@ associer le nom &quot;volta&quot; et la valeur &quot;1745&quot; remplacera %{vol
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../../qelectrotech.qrc"/>