mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-14 20:33:05 +02:00
Improve some widget and layout
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4922 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
parent
ce7f1cb3ad
commit
edd18042ec
@ -27,17 +27,16 @@
|
||||
#include <QScrollArea>
|
||||
|
||||
/**
|
||||
Constructeur
|
||||
@param parent The parent of the dialog QWidget
|
||||
* @brief AboutQET::AboutQET
|
||||
* @param parent
|
||||
*/
|
||||
AboutQET::AboutQET(QWidget *parent) : QDialog(parent) {
|
||||
// Title, size, behavior ...
|
||||
AboutQET::AboutQET(QWidget *parent) :
|
||||
QDialog(parent)
|
||||
{
|
||||
setWindowTitle(tr("À propos de QElectrotech", "window title"));
|
||||
setFixedSize (690, 610);
|
||||
setModal(true);
|
||||
|
||||
// Three tabs
|
||||
QTabWidget *tabs = new QTabWidget(this);
|
||||
QTabWidget *tabs = new QTabWidget();
|
||||
tabs -> addTab(aboutTab(), tr("À &propos", "tab title"));
|
||||
tabs -> addTab(authorsTab(), tr("A&uteurs", "tab title"));
|
||||
tabs -> addTab(translatorsTab(), tr("&Traducteurs", "tab title"));
|
||||
@ -45,30 +44,13 @@ AboutQET::AboutQET(QWidget *parent) : QDialog(parent) {
|
||||
tabs -> addTab(titleTab(), tr("&Version", "tab title"));
|
||||
tabs -> addTab(licenseTab(), tr("&Accord de licence", "tab title"));
|
||||
|
||||
|
||||
|
||||
// All in a vertical arrangement
|
||||
QVBoxLayout *vlayout = new QVBoxLayout();
|
||||
vlayout -> addWidget(tabs);
|
||||
setLayout(vlayout);
|
||||
|
||||
QScrollArea *scrollArea = new QScrollArea(this);
|
||||
scrollArea->setWidgetResizable(true);
|
||||
scrollArea->setFixedSize (690, 610);
|
||||
scrollArea->setWidget(tabs);
|
||||
|
||||
// A button to close the dialog box
|
||||
QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Close);
|
||||
connect(buttons, SIGNAL(accepted()), this, SLOT(accept()));
|
||||
connect(buttons, SIGNAL(rejected()), this, SLOT(accept()));
|
||||
|
||||
QHBoxLayout *hlayout = new QHBoxLayout();
|
||||
vlayout -> addStretch();
|
||||
QVBoxLayout *vlayout = new QVBoxLayout(this);
|
||||
vlayout->addWidget(tabs);
|
||||
vlayout->addWidget(buttons);
|
||||
setLayout(hlayout);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -50,7 +50,8 @@ NewDiagramPage::NewDiagramPage(QETProject *project, QWidget *parent, ProjectProp
|
||||
if (m_project) c << m_project->embeddedTitleBlockTemplatesCollection();
|
||||
ipw = new TitleBlockPropertiesWidget(c, TitleBlockProperties::defaultProperties(), true, project, parent);
|
||||
// default conductor properties
|
||||
cpw = new ConductorPropertiesWidget(ConductorProperties::defaultProperties());
|
||||
m_cpw = new ConductorPropertiesWidget(ConductorProperties::defaultProperties());
|
||||
m_cpw->setHiddenAvailableAutonum(true);
|
||||
// default propertie of report label
|
||||
rpw = new ReportPropertieWidget(ReportProperties::defaultProperties());
|
||||
// default properties of xref
|
||||
@ -59,7 +60,7 @@ NewDiagramPage::NewDiagramPage(QETProject *project, QWidget *parent, ProjectProp
|
||||
//If there is a project, we edit his properties
|
||||
if (m_project) {
|
||||
bpw -> setProperties (m_project -> defaultBorderProperties());
|
||||
cpw -> setProperties (m_project -> defaultConductorProperties());
|
||||
m_cpw -> setProperties (m_project -> defaultConductorProperties());
|
||||
ipw -> setProperties (m_project -> defaultTitleBlockProperties());
|
||||
rpw -> setReportProperties (m_project -> defaultReportProperties());
|
||||
xrefpw -> setProperties (m_project -> defaultXRefProperties());
|
||||
@ -76,7 +77,7 @@ NewDiagramPage::NewDiagramPage(QETProject *project, QWidget *parent, ProjectProp
|
||||
diagram_layout -> addWidget(ipw);
|
||||
|
||||
tab_widget -> addTab (diagram_widget, tr("Folio"));
|
||||
tab_widget -> addTab (cpw, tr("Conducteur"));
|
||||
tab_widget -> addTab (m_cpw, tr("Conducteur"));
|
||||
tab_widget -> addTab (rpw, tr("Reports de folio"));
|
||||
tab_widget -> addTab (xrefpw, tr("Références croisées"));
|
||||
|
||||
@ -116,9 +117,9 @@ void NewDiagramPage::applyConf() {
|
||||
modified_project = true;
|
||||
}
|
||||
|
||||
ConductorProperties new_conductor_prop = cpw -> properties();
|
||||
ConductorProperties new_conductor_prop = m_cpw -> properties();
|
||||
if (m_project -> defaultConductorProperties() != new_conductor_prop) {
|
||||
m_project -> setDefaultConductorProperties(cpw -> properties());
|
||||
m_project -> setDefaultConductorProperties(m_cpw -> properties());
|
||||
modified_project = true;
|
||||
}
|
||||
|
||||
@ -148,7 +149,7 @@ void NewDiagramPage::applyConf() {
|
||||
ipw-> properties().toSettings(settings, "diagrameditor/default");
|
||||
|
||||
// proprietes par defaut des conducteurs
|
||||
cpw -> properties().toSettings(settings, "diagrameditor/defaultconductor");
|
||||
m_cpw -> properties().toSettings(settings, "diagrameditor/defaultconductor");
|
||||
|
||||
// default report propertie
|
||||
rpw->toSettings(settings, "diagrameditor/defaultreport");
|
||||
|
@ -61,7 +61,7 @@ public slots:
|
||||
QETProject *m_project; ///< Project to edit propertie
|
||||
BorderPropertiesWidget *bpw; ///< Widget to edit default diagram dimensions
|
||||
TitleBlockPropertiesWidget *ipw; ///< Widget to edit default title block properties
|
||||
ConductorPropertiesWidget *cpw; ///< Widget to edit default conductor properties
|
||||
ConductorPropertiesWidget *m_cpw; ///< Widget to edit default conductor properties
|
||||
ReportPropertieWidget *rpw; ///< Widget to edit default report label
|
||||
XRefPropertiesWidget *xrefpw; ///< Widget to edit default xref properties
|
||||
TitleBlockProperties savedTbp; ///< Used to save current TBP and retrieve later
|
||||
|
@ -33,36 +33,8 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Lignes :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Colonnes :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="m_rows_count_sp"/>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QCheckBox" name="m_display_rows_cb">
|
||||
<property name="text">
|
||||
<string>Afficher les en-têtes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QCheckBox" name="m_display_columns_cb">
|
||||
<property name="text">
|
||||
<string>Afficher les en-têtes</string>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="m_colums_count_sp"/>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QSpinBox" name="m_columns_width_sp">
|
||||
@ -77,8 +49,49 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="m_colums_count_sp"/>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Lignes :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QCheckBox" name="m_display_rows_cb">
|
||||
<property name="text">
|
||||
<string>Afficher les en-têtes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="m_rows_count_sp"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Colonnes :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QCheckBox" name="m_display_columns_cb">
|
||||
<property name="text">
|
||||
<string>Afficher les en-têtes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<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>
|
||||
|
@ -36,6 +36,7 @@ ConductorPropertiesDialog::ConductorPropertiesDialog(Conductor *conductor, QWidg
|
||||
ui->setupUi(this);
|
||||
m_cpw = new ConductorPropertiesWidget(conductor->properties());
|
||||
m_cpw -> setHiddenOneTextPerFolio(true);
|
||||
m_cpw->setHiddenAvailableAutonum(true);
|
||||
if (conductor -> diagram() -> defaultConductorProperties.m_one_text_per_folio == true &&
|
||||
conductor -> relatedPotentialConductors().size()) {
|
||||
m_cpw->setDisabledShowText();
|
||||
|
@ -173,6 +173,28 @@ void ConductorPropertiesWidget::setDisabledShowText(const bool &disable) {
|
||||
ui->m_show_text_cb->setDisabled(disable==true? true : false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ConductorPropertiesWidget::setHiddenAvailableAutonum
|
||||
* Hide the label, combo box and push button of available autonum
|
||||
* @param hide
|
||||
*/
|
||||
void ConductorPropertiesWidget::setHiddenAvailableAutonum(const bool &hide)
|
||||
{
|
||||
ui->m_autonum_label->setHidden(hide);
|
||||
ui->m_available_autonum_cb->setHidden(hide);
|
||||
ui->m_edit_autonum_pb->setHidden(hide);
|
||||
}
|
||||
|
||||
QComboBox *ConductorPropertiesWidget::autonumComboBox() const
|
||||
{
|
||||
return ui->m_available_autonum_cb;
|
||||
}
|
||||
|
||||
QPushButton *ConductorPropertiesWidget::editAutonumPushButton() const
|
||||
{
|
||||
return ui->m_edit_autonum_pb;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ConductorPropertiesWidget::initWidget
|
||||
*/
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include <QWidget>
|
||||
#include "conductorproperties.h"
|
||||
class QTextOrientationSpinBoxWidget;
|
||||
class QComboBox;
|
||||
class QPushButton;
|
||||
|
||||
namespace Ui {
|
||||
class ConductorPropertiesWidget;
|
||||
@ -43,6 +45,9 @@ class ConductorPropertiesWidget : public QWidget
|
||||
void addAutonumWidget (QWidget *widget);
|
||||
void setHiddenOneTextPerFolio (const bool &hide);
|
||||
void setDisabledShowText (const bool &disable = true);
|
||||
void setHiddenAvailableAutonum (const bool &hide);
|
||||
QComboBox *autonumComboBox() const;
|
||||
QPushButton *editAutonumPushButton() const;
|
||||
|
||||
private:
|
||||
void initWidget();
|
||||
|
@ -37,7 +37,7 @@
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<layout class="QGridLayout" name="gridLayout_3" rowstretch="0,0,0,0,0,0,0">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
@ -45,14 +45,44 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="m_function_le">
|
||||
<property name="clearButtonEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="m_tension_protocol_le">
|
||||
<property name="clearButtonEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QCheckBox" name="m_show_text_cb">
|
||||
<property name="toolTip">
|
||||
<string>Texte visible</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="3">
|
||||
<widget class="QCheckBox" name="m_one_text_per_folio_cb">
|
||||
<property name="toolTip">
|
||||
<string>activer l'option un texte par potentiel</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Afficher un texte de potentiel par folio. </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="m_text_size_sb">
|
||||
<property name="toolTip">
|
||||
<string>Taille du texte</string>
|
||||
@ -74,20 +104,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLineEdit" name="m_tension_protocol_le">
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="m_formula_le"/>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="m_text_le">
|
||||
<property name="toolTip">
|
||||
<string>Texte</string>
|
||||
</property>
|
||||
<property name="clearButtonEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Tension / Protocole :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
@ -95,36 +124,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Fonction :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLineEdit" name="m_text_le">
|
||||
<property name="toolTip">
|
||||
<string>Texte</string>
|
||||
</property>
|
||||
<property name="clearButtonEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QCheckBox" name="m_show_text_cb">
|
||||
<property name="toolTip">
|
||||
<string>Texte visible</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
@ -132,25 +138,42 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLineEdit" name="m_formula_le"/>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Tension / Protocole :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="m_autonum_label">
|
||||
<property name="text">
|
||||
<string>Autonumérotation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="m_autonum_layout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="m_one_text_per_folio_cb">
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="m_available_autonum_cb"/>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="m_edit_autonum_pb">
|
||||
<property name="toolTip">
|
||||
<string>activer l'option un texte par potentiel</string>
|
||||
<string>éditer les numérotations</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Afficher un texte de potentiel par folio. </string>
|
||||
<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>
|
||||
<layout class="QVBoxLayout" name="m_autonum_layout"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="m_text_angle_gl">
|
||||
<item row="1" column="0">
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "titleblockpropertieswidget.h"
|
||||
#include "conductorpropertieswidget.h"
|
||||
#include "diagramcommands.h"
|
||||
#include "autonumselectorwidget.h"
|
||||
#include "projectpropertiesdialog.h"
|
||||
#include "diagram.h"
|
||||
|
||||
@ -62,34 +61,38 @@ DiagramPropertiesDialog::DiagramPropertiesDialog(Diagram *diagram, QWidget *pare
|
||||
|
||||
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
|
||||
//titleblock_infos->setMinimumSize(590,480); //Minimum Size needed for correct display
|
||||
|
||||
//Conductor widget
|
||||
ConductorPropertiesWidget *cpw = new ConductorPropertiesWidget(conductors, this);
|
||||
cpw -> setReadOnly(diagram_is_read_only);
|
||||
m_cpw = new ConductorPropertiesWidget(conductors, this);
|
||||
m_cpw -> setReadOnly(diagram_is_read_only);
|
||||
|
||||
//Conductor autonum
|
||||
m_asw = new AutonumSelectorWidget(diagram -> project() -> conductorAutoNum().keys(), this);
|
||||
m_asw -> setCurrentItem(diagram -> conductorsAutonumName());
|
||||
connect (m_asw, SIGNAL(openAutonumEditor()), this, SLOT(editAutonum()));
|
||||
cpw->addAutonumWidget(m_asw);
|
||||
QComboBox *autonum_combobox = m_cpw->autonumComboBox();
|
||||
autonum_combobox->addItems(diagram->project()->conductorAutoNum().keys());
|
||||
autonum_combobox->setCurrentIndex(autonum_combobox->findText(diagram->conductorsAutonumName()));
|
||||
|
||||
connect(m_cpw->editAutonumPushButton(), &QPushButton::clicked, this, &DiagramPropertiesDialog::editAutonum);
|
||||
|
||||
// Buttons
|
||||
QDialogButtonBox boutons(diagram_is_read_only ? QDialogButtonBox::Ok : QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||
connect(&boutons, SIGNAL(accepted()), this, SLOT(accept()));
|
||||
connect(&boutons, SIGNAL(rejected()), this, SLOT(reject()));
|
||||
//Layout
|
||||
QGridLayout glayout(this);
|
||||
glayout.addWidget(border_infos,0,0);
|
||||
glayout.addWidget(titleblock_infos, 1, 0);
|
||||
glayout.addWidget(cpw, 0, 1, 0, 1, Qt::AlignTop);
|
||||
glayout.addWidget(&boutons, 2, 1);
|
||||
|
||||
QGridLayout *glayout = new QGridLayout;
|
||||
glayout->addWidget(border_infos,0,0);
|
||||
glayout->addWidget(titleblock_infos, 1, 0);
|
||||
glayout->addWidget(m_cpw, 0, 1, 0, 1);
|
||||
|
||||
QVBoxLayout vlayout(this);
|
||||
vlayout.addLayout(glayout);
|
||||
vlayout.addWidget(&boutons);
|
||||
|
||||
// if dialog is accepted
|
||||
if (this -> exec() == QDialog::Accepted && !diagram_is_read_only) {
|
||||
if (this -> exec() == QDialog::Accepted && !diagram_is_read_only)
|
||||
{
|
||||
TitleBlockProperties new_titleblock = titleblock_infos -> properties();
|
||||
BorderProperties new_border = border_infos -> properties();
|
||||
ConductorProperties new_conductors = cpw -> properties();
|
||||
ConductorProperties new_conductors = m_cpw -> properties();
|
||||
|
||||
// Title block have change
|
||||
if (new_titleblock != titleblock) {
|
||||
@ -108,8 +111,9 @@ DiagramPropertiesDialog::DiagramPropertiesDialog(Diagram *diagram, QWidget *pare
|
||||
}
|
||||
|
||||
// Conductor autonum name
|
||||
if (m_asw -> text() != diagram -> conductorsAutonumName()) {
|
||||
diagram -> setConductorsAutonumName (m_asw -> text());
|
||||
if (autonum_combobox->currentText() != diagram->conductorsAutonumName())
|
||||
{
|
||||
diagram->setConductorsAutonumName (autonum_combobox->currentText());
|
||||
diagram->project()->conductorAutoNumChanged();
|
||||
}
|
||||
}
|
||||
@ -129,11 +133,13 @@ void DiagramPropertiesDialog::diagramPropertiesDialog(Diagram *diagram, QWidget
|
||||
* @brief DiagramPropertiesDialog::editAutonum
|
||||
* Open conductor autonum editor
|
||||
*/
|
||||
void DiagramPropertiesDialog::editAutonum() {
|
||||
void DiagramPropertiesDialog::editAutonum()
|
||||
{
|
||||
ProjectPropertiesDialog ppd (m_diagram->project(), this);
|
||||
ppd.setCurrentPage(ProjectPropertiesDialog::Autonum);
|
||||
ppd.exec();
|
||||
m_asw -> setItems (m_diagram -> project() -> conductorAutoNum().keys());
|
||||
m_cpw->autonumComboBox()->clear();
|
||||
m_cpw->autonumComboBox()->addItems(m_diagram->project()->conductorAutoNum().keys());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "qdialog.h"
|
||||
|
||||
class Diagram;
|
||||
class AutonumSelectorWidget;
|
||||
class ConductorPropertiesWidget;
|
||||
|
||||
/**
|
||||
* @brief The DiagramPropertiesDialog class
|
||||
@ -41,7 +41,7 @@ class DiagramPropertiesDialog : public QDialog {
|
||||
|
||||
private:
|
||||
Diagram *m_diagram;
|
||||
AutonumSelectorWidget *m_asw;
|
||||
ConductorPropertiesWidget *m_cpw;
|
||||
};
|
||||
|
||||
#endif // DIAGRAMPROPERTIESDIALOG_H
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>572</width>
|
||||
<height>590</height>
|
||||
<width>654</width>
|
||||
<height>611</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -26,27 +26,6 @@
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents_1">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>538</width>
|
||||
<height>608</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="m_tbt_gb">
|
||||
<property name="title">
|
||||
@ -60,7 +39,7 @@
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="m_tbt_hlayout" stretch="0,1,0">
|
||||
<layout class="QHBoxLayout" name="m_tbt_hlayout" stretch="0,1,0,0">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
@ -74,6 +53,23 @@
|
||||
<item>
|
||||
<widget class="QComboBox" name="m_tbt_cb"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="m_display_at_cb">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Affiche le cartouche en bas (horizontalement) ou à droite (verticalement) du folio.</p></body></html></string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>en bas</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>à droite </string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_tbt_pb">
|
||||
<property name="text">
|
||||
@ -170,10 +166,10 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QLabel" name="label">
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Afficher :</string>
|
||||
<string>Auteur :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -184,13 +180,6 @@
|
||||
</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="8" column="3">
|
||||
<widget class="QLineEdit" name="m_loc">
|
||||
<property name="toolTip">
|
||||
@ -295,7 +284,11 @@
|
||||
<item row="5" column="3">
|
||||
<widget class="QLineEdit" name="m_folio_le">
|
||||
<property name="toolTip">
|
||||
<string>Disponible en tant que %folio pour les modèles de cartouches</string>
|
||||
<string>Disponible en tant que %folio pour les modèles de cartouches
|
||||
Les variables suivantes sont utilisables :
|
||||
- %id : numéro du folio courant dans le projet
|
||||
- %total : nombre total de folios dans le projet
|
||||
- %autonum : Folio Auto Numeration</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -319,39 +312,10 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="3">
|
||||
<widget class="QComboBox" name="m_display_at_cb">
|
||||
<item row="9" column="3">
|
||||
<widget class="QLineEdit" name="m_indice">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Affiche le cartouche en bas (horizontalement) ou à droite (verticalement) du folio.</p></body></html></string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>en bas</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>à droite </string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="3">
|
||||
<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>
|
||||
<string>Disponible en tant que %indexrev pour les modèles de cartouches</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -369,15 +333,21 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="3">
|
||||
<widget class="QLineEdit" name="m_indice">
|
||||
<property name="toolTip">
|
||||
<string>Disponible en tant que %indexrev pour les modèles de cartouches</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<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 class="QWidget" name="tab_2">
|
||||
@ -409,10 +379,6 @@ associer le nom "volta" et la valeur "1745" remplacera %{vol
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../qelectrotech.qrc"/>
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user