19 #include "ui_replacefoliowidget.h" 23 #include <QDialogButtonBox> 48 prop.
title =
ui->m_title_le ->text();
49 prop.
author =
ui->m_author_le->text();
51 prop.
plant =
ui->m_plant ->text();
54 prop.
folio =
ui->m_folio_le ->text();
56 if (
ui->m_unchanged_date->isChecked()) {
60 if (
ui->m_no_date_rb->isChecked()) {
64 else if (
ui->m_fixed_date_rb->isChecked()) {
65 prop.
date =
ui->m_date_edit->date();
89 ui->m_date_now_pb->setDisabled(
true);
90 ui->m_date_edit ->setDisabled(
true);
91 ui->m_date_edit ->setDate(QDate::currentDate());
95 ui -> m_fixed_date_rb ->setChecked(
true);
99 if (properties.
date.isNull()) {
100 ui->m_unchanged_date->setChecked(
true);
103 ui->m_no_date_rb->setChecked(
true);
107 ui->m_fixed_date_rb->setChecked(
true);
108 ui->m_date_edit->setDate(properties.
date);
119 QVBoxLayout *layout =
new QVBoxLayout(
this);
123 connect(
m_button_box, &QDialogButtonBox::clicked, [
this](QAbstractButton *button_)
149 ui->m_title_le->setDisabled(
ui->m_title_cb->isChecked());
154 ui->m_author_le->setDisabled(
ui->m_author_cb->isChecked());
159 ui->m_file_le->setDisabled(
ui->m_file_cb->isChecked());
164 ui->m_folio_le->setDisabled(
ui->m_folio_cb->isChecked());
169 ui->m_plant->setDisabled(
ui->m_plant_cb->isChecked());
174 ui->m_loc->setDisabled(
ui->m_loc_cb->isChecked());
179 ui->m_indice->setDisabled(
ui->m_indice_cb->isChecked());
QString locmach
Location(displayed by the default template)
QString plant
Plant (displayed by the default template)
ReplaceFolioWidget * m_widget
void setTitleBlockProperties(const TitleBlockProperties &properties)
ReplaceFolioDialog::setTitleBlockProperties.
QDate date
Date (displayed by the default template)
QString filename
Filename (displayed by the default template)
static QString eraseText()
DiagramContext context
Container for the additional, user-defined fields.
ReplaceFolioDialog(QWidget *parent=nullptr)
DiagramContext context() const
DiagramContextWidget::context.
TitleBlockProperties titleBlockProperties() const
ReplaceFolioDialog::titleBlockProperties.
DateManagement useDate
Wheter to use the date attribute.
QString author
Author of the diagram/folio (displayed by the default template)
void setContext(const DiagramContext &context)
DiagramContextWidget::setContext Load the content from into this widget.
QDialogButtonBox * m_button_box
static void setupLineEdit(QLineEdit *l, QCheckBox *cb, QString str)
SearchAndReplaceWorker::setupLineEdit With search and replace, when the variable to edit is a text...
The SearchAndReplaceWorker class This class is the worker use to change properties when use the searc...
QString indexrev
Revision Index (displayed by the default template)
QString folio
Folio information (displayed by the default template)
QString title
Folio title (displayed by the default template)