mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-01 00:49:58 +01:00
correct more indentations / whitespace
This commit is contained in:
@@ -64,17 +64,17 @@ void AboutQETDialog::setAbout()
|
||||
tr(" Les développeurs de QElectroTech", "about tab, developers line") +
|
||||
"<br><br>"
|
||||
"<a href=\"https://qelectrotech.org/\">https://qelectrotech.org/</a>"
|
||||
"<br><br>" +
|
||||
"The program is provided AS IS with NO WARRANTY OF ANY KIND,"
|
||||
"<br>"
|
||||
" INCLUDING THE WARRANTY OF DESIGN, "
|
||||
"<br>"
|
||||
"MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.";
|
||||
"<br>"
|
||||
"<br><br>" +
|
||||
"The program is provided AS IS with NO WARRANTY OF ANY KIND,"
|
||||
"<br>"
|
||||
" INCLUDING THE WARRANTY OF DESIGN, "
|
||||
"<br>"
|
||||
"MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.";
|
||||
"<br>"
|
||||
"<br><br>" +
|
||||
tr("Contact : <a href=\"mailto:qet@lists.tuxfamily.org\">qet@lists.tuxfamily.org</a>", "about tab, contact line");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ui->m_about_label->setText(str);
|
||||
}
|
||||
@@ -91,7 +91,7 @@ void AboutQETDialog::setAuthors()
|
||||
addAuthor(ui->m_author_label, "Ronny Desmedt", "r.desmedt@live.be", tr("Convertisseur DXF"));
|
||||
addAuthor(ui->m_author_label, "Raul Roda", "raulroda8@gmail.com", tr("Plugin Bornier"));
|
||||
addAuthor(ui->m_author_label, "Abhishek Bansal", "abhishek@qelectrotech.org", tr("Développement"));
|
||||
addAuthor(ui->m_author_label, "Simon De Backer", "debacker@qelectrotech.org", tr("Développement"));
|
||||
addAuthor(ui->m_author_label, "Simon De Backer", "debacker@qelectrotech.org", tr("Développement"));
|
||||
addAuthor(ui->m_author_label, "David Varley", "David.Varley@cborn.com", tr("Développement"));
|
||||
addAuthor(ui->m_author_label, "Damian Caceres", "damiancaceresmoreno@yahoo.es", tr("Développement"));
|
||||
addAuthor(ui->m_author_label, "Martin Marmsoler", "martin.marmsoler@gmail.com", tr("Développement"));
|
||||
@@ -166,7 +166,7 @@ void AboutQETDialog::setContributors()
|
||||
void AboutQETDialog::setVersion()
|
||||
{
|
||||
QString str = "<span style=\"font-weight:bold;font-size:16pt;\">QElectroTech V "
|
||||
+ QetVersion::displayedVersion()
|
||||
+ QetVersion::displayedVersion()
|
||||
+ "</span>";
|
||||
ui->m_version_label->setText(str + MachineInfo::instance()->compilation_info());
|
||||
}
|
||||
|
||||
@@ -122,12 +122,12 @@ GeneralConfigurationPage::GeneralConfigurationPage(QWidget *parent) :
|
||||
|
||||
ui->m_highlight_integrated_elements->setChecked(settings.value("diagrameditor/highlight-integrated-elements", true).toBool());
|
||||
ui->m_default_elements_info->setPlainText(settings.value("elementeditor/default-informations", "").toString());
|
||||
/*
|
||||
Nombre maximum de primitives affichees par la "liste des parties"
|
||||
Au-dela, un petit message est affiche, indiquant que ce nombre a ete depasse
|
||||
et que la liste ne sera donc pas mise a jour.
|
||||
*/
|
||||
ui->MaxPartsElementEditorList_sb->setValue(settings.value("elementeditor/max-parts-element-editor-list", 200).toInt());
|
||||
/*
|
||||
Nombre maximum de primitives affichees par la "liste des parties"
|
||||
Au-dela, un petit message est affiche, indiquant que ce nombre a ete depasse
|
||||
et que la liste ne sera donc pas mise a jour.
|
||||
*/
|
||||
ui->MaxPartsElementEditorList_sb->setValue(settings.value("elementeditor/max-parts-element-editor-list", 200).toInt());
|
||||
|
||||
QString path = settings.value("elements-collections/common-collection-path", "default").toString();
|
||||
if (path != "default")
|
||||
@@ -209,7 +209,7 @@ void GeneralConfigurationPage::applyConf()
|
||||
|
||||
//ELEMENT EDITOR
|
||||
settings.setValue("elementeditor/default-informations", ui->m_default_elements_info->toPlainText());
|
||||
settings.setValue("elementeditor/max-parts-element-editor-list", ui->MaxPartsElementEditorList_sb->value());
|
||||
settings.setValue("elementeditor/max-parts-element-editor-list", ui->MaxPartsElementEditorList_sb->value());
|
||||
|
||||
//DIAGRAM VIEW
|
||||
settings.setValue("diagramview/gestures", ui->m_use_gesture_trackpad->isChecked());
|
||||
@@ -223,7 +223,7 @@ void GeneralConfigurationPage::applyConf()
|
||||
//NOMENCLATURE
|
||||
settings.setValue("nomenclature/terminal-exportlist",ui->m_export_terminal->isChecked());
|
||||
|
||||
|
||||
|
||||
//DIAGRAM EDITOR
|
||||
QString view_mode = ui->m_use_tab_mode_rb->isChecked() ? "tabbed" : "windowed";
|
||||
settings.setValue("diagrameditor/viewmode", view_mode) ;
|
||||
@@ -520,11 +520,11 @@ void GeneralConfigurationPage::on_m_indi_text_font_pb_clicked()
|
||||
|
||||
void GeneralConfigurationPage::on_MaxPartsElementEditorList_sb_valueChanged(int value)
|
||||
{
|
||||
if (value > 500) {
|
||||
ui->MaxPartsElementEditorList_sb->setToolTip(tr("To high values might lead to crashes of the application."));
|
||||
ui->MaxPartsElementEditorList_sb->setStyleSheet("background-color: orange");
|
||||
} else {
|
||||
ui->MaxPartsElementEditorList_sb->setToolTip("");
|
||||
ui->MaxPartsElementEditorList_sb->setStyleSheet("");
|
||||
}
|
||||
if (value > 500) {
|
||||
ui->MaxPartsElementEditorList_sb->setToolTip(tr("To high values might lead to crashes of the application."));
|
||||
ui->MaxPartsElementEditorList_sb->setStyleSheet("background-color: orange");
|
||||
} else {
|
||||
ui->MaxPartsElementEditorList_sb->setToolTip("");
|
||||
ui->MaxPartsElementEditorList_sb->setStyleSheet("");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
@@ -47,7 +47,7 @@ class GeneralConfigurationPage : public ConfigPage
|
||||
void on_m_company_tbt_path_cb_currentIndexChanged(int index);
|
||||
void on_m_custom_tbt_path_cb_currentIndexChanged(int index);
|
||||
void on_m_indi_text_font_pb_clicked();
|
||||
void on_MaxPartsElementEditorList_sb_valueChanged(int value);
|
||||
void on_MaxPartsElementEditorList_sb_valueChanged(int value);
|
||||
|
||||
private:
|
||||
void fillLang();
|
||||
|
||||
@@ -296,7 +296,7 @@ void LinkSingleElementWidget::buildTree()
|
||||
QStringList search_list;
|
||||
QStringList str_list;
|
||||
|
||||
if (!elmt->conductors().isEmpty())
|
||||
if (!elmt->conductors().isEmpty())
|
||||
{
|
||||
ConductorProperties cp = elmt->conductors().first()->properties();
|
||||
str_list << cp.text;
|
||||
@@ -316,7 +316,7 @@ void LinkSingleElementWidget::buildTree()
|
||||
search_list << str_list.last();
|
||||
}
|
||||
else
|
||||
str_list << "" << "" << "" << "" << "";
|
||||
str_list << "" << "" << "" << "" << "";
|
||||
|
||||
if (Diagram *diag = elmt->diagram())
|
||||
{
|
||||
|
||||
@@ -36,13 +36,13 @@ ProjectPropertiesDialog::ProjectPropertiesDialog(QETProject *project, QWidget *p
|
||||
m_properties_dialog -> setWindowTitle(QObject::tr("Propriétés du projet", "window title"));
|
||||
m_properties_dialog -> addPage(new ProjectMainConfigPage(project));
|
||||
|
||||
NewDiagramPage *newDiagramPage = new NewDiagramPage(project,parent,this);
|
||||
NewDiagramPage *newDiagramPage = new NewDiagramPage(project,parent,this);
|
||||
m_properties_dialog -> addPage(newDiagramPage);
|
||||
|
||||
ProjectAutoNumConfigPage *projectAutoNumConfigPage = new ProjectAutoNumConfigPage (project);
|
||||
ProjectAutoNumConfigPage *projectAutoNumConfigPage = new ProjectAutoNumConfigPage (project);
|
||||
m_properties_dialog -> addPage(projectAutoNumConfigPage);
|
||||
|
||||
m_properties_dialog->addPage(new TerminalStripProjectConfigPage { project, parent });
|
||||
m_properties_dialog->addPage(new TerminalStripProjectConfigPage { project, parent });
|
||||
|
||||
connect(projectAutoNumConfigPage,SIGNAL(setAutoNum(QString)),newDiagramPage,SLOT(setFolioAutonum(QString)));
|
||||
connect(projectAutoNumConfigPage,SIGNAL(saveCurrentTbp()),newDiagramPage,SLOT(saveCurrentTbp()));
|
||||
|
||||
@@ -32,8 +32,8 @@ class ProjectPropertiesDialog : public QObject {
|
||||
enum Page {
|
||||
Main = 0,
|
||||
Diagram = 1,
|
||||
Autonum = 2,
|
||||
TerminalStrip = 3
|
||||
Autonum = 2,
|
||||
TerminalStrip = 3
|
||||
};
|
||||
|
||||
ProjectPropertiesDialog(QETProject *project, QWidget *parent = nullptr);
|
||||
|
||||
@@ -64,8 +64,8 @@ ShapeGraphicsItemPropertiesWidget::~ShapeGraphicsItemPropertiesWidget()
|
||||
*/
|
||||
void ShapeGraphicsItemPropertiesWidget::setItem(QetShapeItem *shape)
|
||||
{
|
||||
if (m_shape != shape) {
|
||||
clearEditConnection();
|
||||
if (m_shape != shape) {
|
||||
clearEditConnection();
|
||||
}
|
||||
if (!shape) {
|
||||
return;
|
||||
@@ -75,7 +75,7 @@ void ShapeGraphicsItemPropertiesWidget::setItem(QetShapeItem *shape)
|
||||
ui->m_close_polygon->setVisible(m_shape->shapeType() == QetShapeItem::Polygon);
|
||||
ui->m_filling_gb->setHidden(m_shape->shapeType() == QetShapeItem::Line);
|
||||
|
||||
updateUi();
|
||||
updateUi();
|
||||
setUpEditConnection();
|
||||
}
|
||||
|
||||
@@ -86,11 +86,11 @@ void ShapeGraphicsItemPropertiesWidget::setItem(QetShapeItem *shape)
|
||||
*/
|
||||
void ShapeGraphicsItemPropertiesWidget::setItems(QList<QetShapeItem *> shapes_list)
|
||||
{
|
||||
clearEditConnection();
|
||||
clearEditConnection();
|
||||
m_shapes_list.clear();
|
||||
m_shape = nullptr;
|
||||
|
||||
if (shapes_list.isEmpty()) {
|
||||
if (shapes_list.isEmpty()) {
|
||||
updateUi();
|
||||
}
|
||||
else if (shapes_list.size() == 1)
|
||||
@@ -357,7 +357,7 @@ void ShapeGraphicsItemPropertiesWidget::updateUi()
|
||||
|
||||
//Disconnect every connections of editor widgets
|
||||
//to avoid an unwanted edition (QSpinBox emit valueChanged no matter if changer by user or by program)
|
||||
clearEditConnection();
|
||||
clearEditConnection();
|
||||
|
||||
if (m_shape)
|
||||
{
|
||||
@@ -455,8 +455,8 @@ bool ShapeGraphicsItemPropertiesWidget::setLiveEdit(bool live_edit)
|
||||
|
||||
if (m_live_edit) {
|
||||
setUpEditConnection();
|
||||
} else {
|
||||
clearEditConnection();
|
||||
} else {
|
||||
clearEditConnection();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -468,46 +468,46 @@ bool ShapeGraphicsItemPropertiesWidget::setLiveEdit(bool live_edit)
|
||||
*/
|
||||
void ShapeGraphicsItemPropertiesWidget::setUpEditConnection()
|
||||
{
|
||||
clearEditConnection();
|
||||
clearEditConnection();
|
||||
|
||||
if (m_shape || !m_shapes_list.isEmpty())
|
||||
{
|
||||
m_edit_connection << connect (ui->m_style_cb, QOverload<int>::of(&QComboBox::activated),
|
||||
this, &ShapeGraphicsItemPropertiesWidget::apply);
|
||||
m_edit_connection << connect (ui->m_style_cb, QOverload<int>::of(&QComboBox::activated),
|
||||
this, &ShapeGraphicsItemPropertiesWidget::apply);
|
||||
|
||||
m_edit_connection << connect (ui->m_size_dsb, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
|
||||
this, &ShapeGraphicsItemPropertiesWidget::apply);
|
||||
m_edit_connection << connect (ui->m_size_dsb, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
|
||||
this, &ShapeGraphicsItemPropertiesWidget::apply);
|
||||
|
||||
m_edit_connection << connect (ui->m_color_kpb, &KColorButton::changed,
|
||||
this, &ShapeGraphicsItemPropertiesWidget::apply);
|
||||
m_edit_connection << connect (ui->m_color_kpb, &KColorButton::changed,
|
||||
this, &ShapeGraphicsItemPropertiesWidget::apply);
|
||||
|
||||
m_edit_connection << connect (ui->m_brush_style_cb, QOverload<int>::of(&QComboBox::activated),
|
||||
this, &ShapeGraphicsItemPropertiesWidget::apply);
|
||||
m_edit_connection << connect (ui->m_brush_style_cb, QOverload<int>::of(&QComboBox::activated),
|
||||
this, &ShapeGraphicsItemPropertiesWidget::apply);
|
||||
|
||||
m_edit_connection << connect (ui->m_brush_color_kpb, &KColorButton::changed,
|
||||
this, &ShapeGraphicsItemPropertiesWidget::apply);
|
||||
m_edit_connection << connect (ui->m_brush_color_kpb, &KColorButton::changed,
|
||||
this, &ShapeGraphicsItemPropertiesWidget::apply);
|
||||
|
||||
m_edit_connection << connect (ui->m_close_polygon, &QCheckBox::clicked,
|
||||
this, &ShapeGraphicsItemPropertiesWidget::apply);
|
||||
m_edit_connection << connect (ui->m_close_polygon, &QCheckBox::clicked,
|
||||
this, &ShapeGraphicsItemPropertiesWidget::apply);
|
||||
|
||||
m_edit_connection << connect (m_shape, &QetShapeItem::penChanged,
|
||||
this, &ShapeGraphicsItemPropertiesWidget::updateUi);
|
||||
m_edit_connection << connect (m_shape, &QetShapeItem::penChanged,
|
||||
this, &ShapeGraphicsItemPropertiesWidget::updateUi);
|
||||
|
||||
m_edit_connection << connect (m_shape, &QetShapeItem::closeChanged,
|
||||
this, &ShapeGraphicsItemPropertiesWidget::updateUi);
|
||||
m_edit_connection << connect (m_shape, &QetShapeItem::closeChanged,
|
||||
this, &ShapeGraphicsItemPropertiesWidget::updateUi);
|
||||
|
||||
m_edit_connection << connect (m_shape, &QetShapeItem::brushChanged,
|
||||
this, &ShapeGraphicsItemPropertiesWidget::updateUi);
|
||||
m_edit_connection << connect (m_shape, &QetShapeItem::brushChanged,
|
||||
this, &ShapeGraphicsItemPropertiesWidget::updateUi);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ShapeGraphicsItemPropertiesWidget::clearEditConnection()
|
||||
{
|
||||
for (const auto &c : qAsConst(m_edit_connection)) {
|
||||
disconnect(c);
|
||||
}
|
||||
m_edit_connection.clear();
|
||||
for (const auto &c : qAsConst(m_edit_connection)) {
|
||||
disconnect(c);
|
||||
}
|
||||
m_edit_connection.clear();
|
||||
}
|
||||
|
||||
void ShapeGraphicsItemPropertiesWidget::on_m_lock_pos_cb_clicked()
|
||||
|
||||
@@ -53,12 +53,12 @@ class ShapeGraphicsItemPropertiesWidget : public PropertiesEditorWidget
|
||||
|
||||
private:
|
||||
void setUpEditConnection();
|
||||
void clearEditConnection();
|
||||
void clearEditConnection();
|
||||
|
||||
private slots:
|
||||
void on_m_lock_pos_cb_clicked();
|
||||
|
||||
private:
|
||||
private:
|
||||
Ui::ShapeGraphicsItemPropertiesWidget *ui;
|
||||
QetShapeItem *m_shape;
|
||||
QList <QPointer<QetShapeItem>> m_shapes_list;
|
||||
|
||||
Reference in New Issue
Block a user