30 #include <QFontDialog> 32 #include <QSizePolicy> 52 QList <TitleBlockTemplatesCollection *> c;
66 bpw -> setProperties (
m_project -> defaultBorderProperties());
67 m_cpw -> setProperties (
m_project -> defaultConductorProperties());
68 ipw -> setProperties (
m_project -> defaultTitleBlockProperties());
69 rpw -> setReportProperties (
m_project -> defaultReportProperties());
76 QTabWidget *tab_widget =
new QTabWidget(
this);
77 QWidget *diagram_widget =
new QWidget();
78 QVBoxLayout *diagram_layout =
new QVBoxLayout(diagram_widget);
80 diagram_layout -> addWidget(
bpw);
81 diagram_layout -> addWidget(
ipw);
82 tab_widget->setMinimumSize(800, 650);
84 tab_widget -> addTab (diagram_widget,
tr(
"Folio"));
85 tab_widget -> addTab (
m_cpw,
tr(
"Conducteur"));
86 tab_widget -> addTab (
rpw,
tr(
"Reports de folio"));
87 tab_widget -> addTab (
xrefpw,
tr(
"Références croisées"));
89 QVBoxLayout *vlayout1 =
new QVBoxLayout();
90 vlayout1->addWidget(tab_widget);
111 bool modified_project =
false;
114 if (
m_project -> defaultBorderProperties() != new_border_prop) {
115 m_project -> setDefaultBorderProperties(
bpw -> properties());
116 modified_project =
true;
120 if (
m_project -> defaultTitleBlockProperties() != new_tbt_prop) {
121 m_project -> setDefaultTitleBlockProperties(
ipw -> properties());
122 modified_project =
true;
126 if (
m_project -> defaultConductorProperties() != new_conductor_prop) {
127 m_project -> setDefaultConductorProperties(
m_cpw -> properties());
128 modified_project =
true;
132 if (
m_project -> defaultReportProperties() != new_report_prop) {
133 m_project -> setDefaultReportProperties(new_report_prop);
134 modified_project =
true;
137 QHash<QString, XRefProperties> new_xref_properties =
xrefpw -> properties();
138 if (
m_project -> defaultXRefProperties() != new_xref_properties) {
139 m_project -> setDefaultXRefProperties(new_xref_properties);
140 modified_project =
true;
143 if (modified_project) {
144 m_project -> setModified(modified_project);
151 bpw -> properties().toSettings(settings,
"diagrameditor/default");
154 ipw-> properties().toSettings(settings,
"diagrameditor/default");
157 m_cpw -> properties().toSettings(settings,
"diagrameditor/defaultconductor");
163 QHash <QString, XRefProperties> hash_xrp =
xrefpw -> properties();
164 foreach (QString key, hash_xrp.keys()) {
166 QString str(
"diagrameditor/defaultxref");
187 if (
m_project)
return(
tr(
"Nouveau folio",
"configuration page title"));
188 return(
tr(
"Nouveau projet",
"configuration page title"));
239 QVBoxLayout *vlayout1 =
new QVBoxLayout();
242 vlayout1 -> addWidget(
title);
244 QFrame *horiz_line =
new QFrame();
245 horiz_line -> setFrameShape(QFrame::HLine);
246 vlayout1 -> addWidget(horiz_line);
247 vlayout1 -> addWidget(
epw);
248 vlayout1 -> addStretch();
264 epw -> exportProperties().toSettings(settings,
"export/default");
274 return(
tr(
"Export",
"configuration page title"));
284 epw -> setPrintingMode(
true);
287 QVBoxLayout *vlayout1 =
new QVBoxLayout();
290 vlayout1 -> addWidget(
title);
292 QFrame *horiz_line =
new QFrame();
293 horiz_line -> setFrameShape(QFrame::HLine);
294 vlayout1 -> addWidget(horiz_line);
295 vlayout1 -> addWidget(
epw);
296 vlayout1 -> addStretch();
312 QString prefix =
"print/default";
315 epw -> exportProperties().toSettings(settings, prefix);
318 settings.remove(prefix +
"path");
319 settings.remove(prefix +
"format");
320 settings.remove(prefix +
"area");
330 return(
tr(
"Impression",
"configuration page title"));
static TitleBlockTemplatesFilesCollection * commonTitleBlockTemplatesCollection()
~ExportConfigPage() override
Destructeur.
static ConductorProperties defaultProperties()
ConductorProperties::defaultProperties.
The ProjectPropertiesDialog class this class builds a dialog to edit whole properties of a project...
ExportPropertiesWidget * epw
The XRefProperties class this class store properties used by XrefItem.
QString title() const override
NewDiagramPage::title.
TitleBlockProperties savedTbp
Used to save current TBP and retrieve later.
ProjectPropertiesDialog * ppd_
BorderPropertiesWidget * bpw
Widget to edit default diagram dimensions.
QString title() const override
QString title() const override
TitleBlockPropertiesWidget * ipw
Widget to edit default title block properties.
static QHash< QString, XRefProperties > defaultProperties()
XRefProperties::defaultProperties.
QIcon icon() const override
NewDiagramPage::icon.
static TitleBlockTemplatesFilesCollection * customTitleBlockTemplatesCollection()
void exec()
ProjectPropertiesDialog::exec execute this dialog.
ExportPropertiesWidget * epw
void changeToAutoFolioTab()
NewDiagramPage::changeToAutoFolioTab Set the current tab to Autonum.
void loadSavedTbp()
NewDiagramPage::loadSavedTbp Retrieve saved auto folio num.
static ExportProperties defaultExportProperties()
ExportProperties::defaultProperties.
void setFolioAutonum(QString)
NewDiagramPage::setFolioAutonum Set temporary TBP to use in auto folio num.
~PrintConfigPage() override
Destructeur.
QETProject * m_project
Project to edit propertie.
void toSettings(QSettings &settings, const QString=QString()) const override
XRefProperties::toSettings Save to settings.
void applyConf() override
PrintConfigPage::applyConf Apply the config of this page.
static ExportProperties defaultPrintProperties()
ExportProperties::defaultPrintProperties.
static BorderProperties defaultProperties()
BorderProperties::defaultProperties.
ExportConfigPage(QWidget *=nullptr)
PrintConfigPage(QWidget *=nullptr)
XRefPropertiesWidget * xrefpw
Widget to edit default xref properties.
ConductorPropertiesWidget * m_cpw
Widget to edit default conductor properties.
ReportPropertieWidget * rpw
Widget to edit default report label.
~NewDiagramPage() override
NewDiagramPage::~NewDiagramPage.
void applyConf() override
NewDiagramPage::applyConf Apply conf for this page. If there is a project, save in the project...
void setCurrentPage(ProjectPropertiesDialog::Page)
ProjectPropertiesDialog::setCurrentPage Change the current displayed page by p.
void applyConf() override
void saveCurrentTbp()
NewDiagramPage::saveCurrentTbp Save current TBP to retrieve after auto folio num. ...
QIcon icon() const override
TitleBlockTemplatesProjectCollection * embeddedTitleBlockTemplatesCollection()
QIcon icon() const override
static QString defaultProperties()
ReportProperties::defaultProperties.
static TitleBlockProperties defaultProperties()
TitleBlockProperties::defaultProperties Return the default properties stored in the setting file...
void changeToFolio()
ProjectPropertiesDialog::changeToFolio Change the current displayed tab to folio tab.
NewDiagramPage(QETProject *project=nullptr, QWidget *=nullptr, ProjectPropertiesDialog *teste=nullptr)
NewDiagramPage::NewDiagramPage Default constructor.