QElectroTech  0.8-dev
replaceconductordialog.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2020 The QElectroTech Team
3  This file is part of QElectroTech.
4 
5  QElectroTech is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 2 of the License, or
8  (at your option) any later version.
9 
10  QElectroTech is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef REPLACECONDUCTORDIALOG_H
19 #define REPLACECONDUCTORDIALOG_H
20 
21 #include "conductorproperties.h"
22 
23 #include <QDialog>
24 
25 namespace Ui {
27 }
28 
33 class ReplaceConductorDialog : public QDialog
34 {
35  Q_OBJECT
36 
37  public:
38  explicit ReplaceConductorDialog(
40  QWidget *parent = 0);
42  void updatePreview(bool b=true);
45 
46  private:
47  void initWidget();
48  void setColorButton(const QColor &color);
49  void setColorButton2(const QColor &color);
50 
51  private slots:
58  void on_m_earth_cb_toggled(bool checked);
59  void on_m_neutral_cb_toggled(bool checked);
61  void on_m_color_pb_clicked();
63 
64  private:
65  Ui::ReplaceConductorDialog *ui;
67 };
68 
69 #endif // REPLACECONDUCTORDIALOG_H
ConductorProperties::m_show_text
bool m_show_text
Definition: conductorproperties.h:103
ConductorProperties::Multi
@ Multi
Definition: conductorproperties.h:79
SingleLineProperties::isPen
bool isPen() const
Definition: conductorproperties.cpp:55
ReplaceConductorDialog::m_properties
ConductorProperties m_properties
Definition: replaceconductordialog.h:66
ReplaceConductorDialog::on_m_erase_text_cb_clicked
void on_m_erase_text_cb_clicked()
Definition: replaceconductordialog.cpp:260
ConductorProperties::color
QColor color
Definition: conductorproperties.h:85
SingleLineProperties::phasesCount
unsigned short int phasesCount()
Definition: conductorproperties.cpp:46
ConductorProperties::style
Qt::PenStyle style
Definition: conductorproperties.h:110
ReplaceConductorDialog
The ReplaceConductorDialog class A Qdialog to edit a conductor properties, use for the search and rep...
Definition: replaceconductordialog.h:34
SingleLineProperties::is_pen
bool is_pen
Protective Earth Neutral: visually merge neutral and ground.
Definition: conductorproperties.h:50
SearchAndReplaceWorker::eraseText
static QString eraseText()
Definition: searchandreplaceworker.h:72
ReplaceConductorDialog::on_m_erase_m_wire_color_cb_clicked
void on_m_erase_m_wire_color_cb_clicked()
Definition: replaceconductordialog.cpp:286
ReplaceConductorDialog::initWidget
void initWidget()
Definition: replaceconductordialog.cpp:193
ReplaceConductorDialog::on_m_earth_cb_toggled
void on_m_earth_cb_toggled(bool checked)
Definition: replaceconductordialog.cpp:304
ConductorProperties::verti_rotate_text
double verti_rotate_text
Definition: conductorproperties.h:100
ReplaceConductorDialog::ReplaceConductorDialog
ReplaceConductorDialog(const ConductorProperties &properties, QWidget *parent=0)
ReplaceConductorDialog::ReplaceConductorDialog.
Definition: replaceconductordialog.cpp:32
ConductorProperties::m_dash_size
int m_dash_size
Definition: conductorproperties.h:97
ReplaceConductorDialog::updatePreview
void updatePreview(bool b=true)
ReplaceConductorDialog::updatePreview Update the preview for single line.
Definition: replaceconductordialog.cpp:55
SingleLineProperties::setPhasesCount
void setPhasesCount(int)
Definition: conductorproperties.cpp:41
ConductorProperties::type
ConductorType type
Definition: conductorproperties.h:83
sarw
SearchAndReplaceWorker sarw
Definition: replaceconductordialog.cpp:25
ConductorProperties::text_size
int text_size
Definition: conductorproperties.h:96
ReplaceConductorDialog::on_m_update_preview_pb_clicked
void on_m_update_preview_pb_clicked()
Definition: replaceconductordialog.cpp:322
ReplaceConductorDialog::on_m_color_pb_clicked
void on_m_color_pb_clicked()
Definition: replaceconductordialog.cpp:326
ConductorProperties::singleLineProperties
SingleLineProperties singleLineProperties
Definition: conductorproperties.h:112
replaceconductordialog.h
ReplaceConductorDialog::ui
Ui::ReplaceConductorDialog * ui
Definition: replaceconductordialog.h:65
ReplaceConductorDialog::setColorButton
void setColorButton(const QColor &color)
Definition: replaceconductordialog.cpp:229
ConductorProperties::m_vertical_alignment
Qt::Alignment m_vertical_alignment
Definition: conductorproperties.h:108
SingleLineProperties::draw
void draw(QPainter *, QET::ConductorSegmentType, const QRectF &)
Definition: conductorproperties.cpp:65
ConductorProperties::m_function
QString m_function
Definition: conductorproperties.h:90
conductorproperties.h
ConductorProperties::horiz_rotate_text
double horiz_rotate_text
Definition: conductorproperties.h:101
SearchAndReplaceWorker
The SearchAndReplaceWorker class This class is the worker use to change properties when use the searc...
Definition: searchandreplaceworker.h:52
ConductorProperties::m_horizontal_alignment
Qt::Alignment m_horizontal_alignment
Definition: conductorproperties.h:107
ReplaceConductorDialog::properties
ConductorProperties properties() const
ReplaceConductorDialog::properties.
Definition: replaceconductordialog.cpp:134
Ui
Definition: autonumberingdockwidget.h:25
ConductorProperties::m_color_2
QColor m_color_2
Definition: conductorproperties.h:86
ConductorProperties::cond_size
double cond_size
Definition: conductorproperties.h:99
ReplaceConductorDialog::on_m_color_2_pb_clicked
void on_m_color_2_pb_clicked()
Definition: replaceconductordialog.cpp:334
ConductorProperties::m_formula
QString m_formula
Definition: conductorproperties.h:94
ReplaceConductorDialog::on_m_erase_m_wire_section_cb_clicked
void on_m_erase_m_wire_section_cb_clicked()
Definition: replaceconductordialog.cpp:295
SingleLineProperties::hasNeutral
bool hasNeutral
Whether the singleline conductor should display the neutral symbol.
Definition: conductorproperties.h:48
ConductorProperties
The ConductorProperties class This class represents the functional properties of a particular conduct...
Definition: conductorproperties.h:68
ConductorProperties::Single
@ Single
Definition: conductorproperties.h:79
searchandreplaceworker.h
ReplaceConductorDialog::~ReplaceConductorDialog
~ReplaceConductorDialog()
Definition: replaceconductordialog.cpp:43
ReplaceConductorDialog::on_m_neutral_cb_toggled
void on_m_neutral_cb_toggled(bool checked)
Definition: replaceconductordialog.cpp:313
ReplaceConductorDialog::setColorButton2
void setColorButton2(const QColor &color)
Definition: replaceconductordialog.cpp:239
QET::Horizontal
@ Horizontal
Horizontal segment.
Definition: qet.h:89
ConductorProperties::m_bicolor
bool m_bicolor
Definition: conductorproperties.h:105
ReplaceConductorDialog::setProperties
void setProperties(const ConductorProperties &properties)
Definition: replaceconductordialog.cpp:75
ReplaceConductorDialog::on_m_erase_function_cb_clicked
void on_m_erase_function_cb_clicked()
Definition: replaceconductordialog.cpp:268
ConductorProperties::m_wire_color
QString m_wire_color
Definition: conductorproperties.h:92
ConductorProperties::text
QString text
Definition: conductorproperties.h:89
ReplaceConductorDialog::on_m_erase_tension_protocol_cb_clicked
void on_m_erase_tension_protocol_cb_clicked()
Definition: replaceconductordialog.cpp:276
SingleLineProperties::hasGround
bool hasGround
Whether the singleline conductor should display the ground symbol.
Definition: conductorproperties.h:46
ConductorProperties::m_tension_protocol
QString m_tension_protocol
Definition: conductorproperties.h:91
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
ReplaceConductorDialog::on_m_erase_formula_cb_clicked
void on_m_erase_formula_cb_clicked()
Definition: replaceconductordialog.cpp:252
ConductorProperties::m_wire_section
QString m_wire_section
Definition: conductorproperties.h:93
SearchAndReplaceWorker::setupLineEdit
static void setupLineEdit(QLineEdit *l, QCheckBox *cb, QString str)
SearchAndReplaceWorker::setupLineEdit With search and replace, when the variable to edit is a text,...
Definition: searchandreplaceworker.cpp:371