19 #include "ui_conductorpropertieswidget.h" 77 if (index != -1)
ui -> m_line_style_cb -> setCurrentIndex(index);
116 properties_.
color =
ui -> m_color_kpb->color();
117 properties_.
m_bicolor =
ui->m_color_2_gb->isChecked();
118 properties_.
m_color_2 =
ui->m_color_2_kpb->color();
120 properties_.
style =
ui -> m_line_style_cb->itemData(
ui->m_line_style_cb->currentIndex()).value<QPen>().style();
122 properties_.
text =
ui -> m_text_le -> text();
125 properties_.
text_size =
ui -> m_text_size_sb -> value();
126 properties_.
cond_size =
ui -> m_cond_size_sb -> value();
127 properties_.
m_show_text =
ui -> m_show_text_cb -> isChecked();
149 if (
event->type() == QEvent::WindowActivate) {
150 ui -> m_formula_le -> setFocus();
152 return(QWidget::event(
event));
161 this->setDisabled(
ro);
169 ui->m_autonum_layout->addWidget(widget);
177 ui -> m_one_text_per_folio_cb -> setHidden(hide);
185 ui->m_show_text_cb->setDisabled(disable==
true?
true :
false);
195 ui->m_autonum_label->setHidden(hide);
196 ui->m_available_autonum_cb->setHidden(hide);
197 ui->m_edit_autonum_pb->setHidden(hide);
202 return ui->m_available_autonum_cb;
207 return ui->m_edit_autonum_pb;
219 ui -> m_line_style_cb -> addItem(
tr(
"Trait plein",
"conductor style: solid line"), QPen(Qt::SolidLine));
220 ui -> m_line_style_cb -> addItem(
tr(
"Trait en pointillés",
"conductor style: dashed line"), QPen(Qt::DashLine));
221 ui -> m_line_style_cb -> addItem(
tr(
"Traits et points",
"conductor style: dashed and dotted line"), QPen(Qt::DashDotLine));
223 ui -> m_update_preview_pb -> setHidden(
true);
225 connect(
ui->m_multiwires_gb, &QGroupBox::toggled, [
this](
bool toggle) {this->ui->m_singlewire_gb->setChecked(!toggle);});
226 connect(
ui->m_singlewire_gb, &QGroupBox::toggled, [
this](
bool toggle) {this->ui->m_multiwires_gb->setChecked(!toggle);});
227 connect(
ui->m_formula_le, &QLineEdit::textChanged, [
this](QString text) {this->ui->m_text_le->setEnabled(text.isEmpty());});
228 ui->m_multiwires_gb->setChecked(
true);
229 ui->m_singlewire_gb->setChecked(
true);
240 ui -> m_multiwires_gb -> setChecked(
true);
243 ui -> m_singlewire_gb -> setChecked(
true);
246 ui -> m_multiwires_gb -> setChecked(
true);
258 const QRect pixmap_rect(0, 0, 96, 96);
259 QPixmap pixmap(pixmap_rect.width(), pixmap_rect.height());
261 painter.begin(&pixmap);
262 painter.eraseRect(pixmap_rect);
263 painter.drawRect(pixmap_rect.adjusted(0,0,-1,-1));
264 painter.drawLine(QLineF(0, pixmap_rect.height() / 2, pixmap_rect.width(), pixmap_rect.height() / 2));
270 ui -> m_preview_label -> setPixmap(pixmap);
279 if (checked &&
ui -> m_neutral_cb -> isChecked())
280 ui -> m_pen_cb -> setEnabled(
true);
281 else ui -> m_pen_cb -> setDisabled(
true);
290 if (checked &&
ui -> m_earth_cb -> isChecked())
291 ui -> m_pen_cb -> setEnabled(
true);
292 else ui -> m_pen_cb -> setDisabled(
true);
static QTextOrientationSpinBoxWidget * createTextOrientationSpinBoxWidget()
bool hasGround
Whether the singleline conductor should display the ground symbol.
Qt::Alignment m_vertical_alignment
unsigned short int phasesCount()
bool m_one_text_per_folio
SingleLineProperties singleLineProperties
Qt::Alignment m_horizontal_alignment
bool hasNeutral
Whether the singleline conductor should display the neutral symbol.
ConductorType
The ConductorType enum Represents the kind of a particular conductor: Single: singleline symbols...
QString m_tension_protocol
bool is_pen
Protective Earth Neutral: visually merge neutral and ground.
void draw(QPainter *, QET::ConductorSegmentType, const QRectF &)