mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-21 03:39:58 +01:00
correct more indentations / whitespace
This commit is contained in:
@@ -34,7 +34,7 @@ EllipseEditor::EllipseEditor(QETElementEditor *editor, PartEllipse *part, QWidge
|
||||
ui(new Ui::EllipseEditor),
|
||||
m_part(part)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(this);
|
||||
m_style = new StyleEditor(editor);
|
||||
ui->m_main_layout->insertWidget(0, m_style);
|
||||
updateForm();
|
||||
|
||||
@@ -33,7 +33,7 @@ class StyleEditor;
|
||||
*/
|
||||
class EllipseEditor : public ElementItemEditor
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit EllipseEditor (QETElementEditor *editor, PartEllipse *part = nullptr, QWidget *parent = nullptr);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "../elementitemeditor.h"
|
||||
|
||||
namespace Ui {
|
||||
class LineEditor;
|
||||
class LineEditor;
|
||||
}
|
||||
|
||||
class PartLine;
|
||||
@@ -33,11 +33,11 @@ class StyleEditor;
|
||||
*/
|
||||
class LineEditor : public ElementItemEditor
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit LineEditor(QETElementEditor *editor, PartLine *part = nullptr, QWidget *parent = nullptr);
|
||||
~LineEditor() override;
|
||||
public:
|
||||
explicit LineEditor(QETElementEditor *editor, PartLine *part = nullptr, QWidget *parent = nullptr);
|
||||
~LineEditor() override;
|
||||
|
||||
bool setPart(CustomElementPart *part) override;
|
||||
bool setParts(QList <CustomElementPart *> parts) override;
|
||||
|
||||
@@ -106,7 +106,7 @@ void QETElementEditor::contextMenu(QPoint p, QList<QAction *> actions)
|
||||
menu.addAction(ui->m_delete_action);
|
||||
menu.addAction(ui->m_cut_action);
|
||||
menu.addAction(ui->m_copy_action);
|
||||
menu.addAction((ui->m_rotate_action));
|
||||
menu.addAction((ui->m_rotate_action));
|
||||
menu.addSeparator();
|
||||
menu.addAction(ui->m_paste_action);
|
||||
menu.addAction(ui->m_paste_in_area_action);
|
||||
@@ -1026,10 +1026,10 @@ void QETElementEditor::setupActions()
|
||||
depth_toolbar -> addActions(m_depth_action_group -> actions());
|
||||
addToolBar(Qt::TopToolBarArea, depth_toolbar);
|
||||
|
||||
//Rotate action
|
||||
//Rotate action
|
||||
connect(ui->m_rotate_action, &QAction::triggered, [this]() {this -> elementScene() -> undoStack().push(new RotateElementsCommand(this->elementScene()));});
|
||||
|
||||
//Zoom action
|
||||
//Zoom action
|
||||
ui->m_zoom_in_action -> setShortcut(QKeySequence::ZoomIn);
|
||||
ui->m_zoom_out_action -> setShortcut(QKeySequence::ZoomOut);
|
||||
ui->m_zoom_fit_best_action -> setShortcut(QKeySequence(tr("Ctrl+9")));
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
QElectroTech is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
QElectroTech is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "terminaleditor.h"
|
||||
#include "ui_terminaleditor.h"
|
||||
@@ -114,9 +114,9 @@ CustomElementPart *TerminalEditor::currentPart() const
|
||||
*/
|
||||
void TerminalEditor::init()
|
||||
{
|
||||
ui->m_orientation_cb->addItem(QET::Icons::North, tr("Nord"), Qet::North);
|
||||
ui->m_orientation_cb->addItem(QET::Icons::East, tr("Est"), Qet::East);
|
||||
ui->m_orientation_cb->addItem(QET::Icons::South, tr("Sud"), Qet::South);
|
||||
ui->m_orientation_cb->addItem(QET::Icons::North, tr("Nord"), Qet::North);
|
||||
ui->m_orientation_cb->addItem(QET::Icons::East, tr("Est"), Qet::East);
|
||||
ui->m_orientation_cb->addItem(QET::Icons::South, tr("Sud"), Qet::South);
|
||||
ui->m_orientation_cb->addItem(QET::Icons::West, tr("Ouest"), Qet::West);
|
||||
|
||||
ui->m_type_cb->addItem(tr("Générique"), TerminalData::Generic);
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
QElectroTech is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
QElectroTech is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef TERMINALEDITOR_H
|
||||
#define TERMINALEDITOR_H
|
||||
@@ -33,18 +33,18 @@ class PartTerminal;
|
||||
*/
|
||||
class TerminalEditor : public ElementItemEditor
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
public:
|
||||
TerminalEditor(QETElementEditor *editor, QWidget *parent = nullptr);
|
||||
~TerminalEditor() override;
|
||||
|
||||
void updateForm() override;
|
||||
void updateForm() override;
|
||||
bool setPart(CustomElementPart *new_part) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
QList<CustomElementPart *> currentParts() const override {return QList<CustomElementPart *>();}
|
||||
|
||||
private:
|
||||
private:
|
||||
void init();
|
||||
void posEdited();
|
||||
void orientationEdited();
|
||||
@@ -53,8 +53,8 @@ class TerminalEditor : public ElementItemEditor
|
||||
void activeConnections(bool active);
|
||||
void activeChangeConnections(bool active);
|
||||
|
||||
private:
|
||||
Ui::TerminalEditor *ui;
|
||||
private:
|
||||
Ui::TerminalEditor *ui;
|
||||
QVector<QMetaObject::Connection> m_editor_connections,
|
||||
m_change_connections;
|
||||
PartTerminal *m_part = nullptr;
|
||||
|
||||
@@ -295,83 +295,83 @@ void TextEditor::setUpWidget(QWidget *parent)
|
||||
setWindowTitle(tr("Form"));
|
||||
resize(378, 133);
|
||||
QGridLayout *gridLayout = new QGridLayout(parent);
|
||||
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
|
||||
m_y_sb = new QSpinBox(parent);
|
||||
m_y_sb->setObjectName(QString::fromUtf8("m_y_sb"));
|
||||
m_y_sb->setMinimum(-10000);
|
||||
m_y_sb->setMaximum(10000);
|
||||
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
|
||||
m_y_sb = new QSpinBox(parent);
|
||||
m_y_sb->setObjectName(QString::fromUtf8("m_y_sb"));
|
||||
m_y_sb->setMinimum(-10000);
|
||||
m_y_sb->setMaximum(10000);
|
||||
|
||||
gridLayout->addWidget(m_y_sb, 1, 3, 1, 1);
|
||||
gridLayout->addWidget(m_y_sb, 1, 3, 1, 1);
|
||||
|
||||
QLabel*label_2 = new QLabel(tr("Y :"),parent);
|
||||
QLabel*label_2 = new QLabel(tr("Y :"),parent);
|
||||
|
||||
gridLayout->addWidget(label_2, 1, 2, 1, 1);
|
||||
gridLayout->addWidget(label_2, 1, 2, 1, 1);
|
||||
|
||||
QLabel*label_4 = new QLabel(tr("Police :"),parent);
|
||||
QLabel*label_4 = new QLabel(tr("Police :"),parent);
|
||||
|
||||
gridLayout->addWidget(label_4, 2, 0, 1, 1);
|
||||
gridLayout->addWidget(label_4, 2, 0, 1, 1);
|
||||
|
||||
m_rotation_sb = new QSpinBox(parent);
|
||||
m_rotation_sb->setSuffix(tr("\302\260"));
|
||||
m_rotation_sb->setWrapping(true);
|
||||
m_rotation_sb->setMaximum(360);
|
||||
m_rotation_sb = new QSpinBox(parent);
|
||||
m_rotation_sb->setSuffix(tr("\302\260"));
|
||||
m_rotation_sb->setWrapping(true);
|
||||
m_rotation_sb->setMaximum(360);
|
||||
|
||||
gridLayout->addWidget(m_rotation_sb, 1, 5, 1, 1);
|
||||
gridLayout->addWidget(m_rotation_sb, 1, 5, 1, 1);
|
||||
|
||||
QLabel *label_3 = new QLabel(tr("Rotation :"),parent);
|
||||
QLabel *label_3 = new QLabel(tr("Rotation :"),parent);
|
||||
|
||||
gridLayout->addWidget(label_3, 1, 4, 1, 1);
|
||||
gridLayout->addWidget(label_3, 1, 4, 1, 1);
|
||||
|
||||
m_x_sb = new QSpinBox(parent);
|
||||
m_x_sb->setObjectName(QString::fromUtf8("m_x_sb"));
|
||||
m_x_sb->setMinimum(-10000);
|
||||
m_x_sb->setMaximum(10000);
|
||||
m_x_sb = new QSpinBox(parent);
|
||||
m_x_sb->setObjectName(QString::fromUtf8("m_x_sb"));
|
||||
m_x_sb->setMinimum(-10000);
|
||||
m_x_sb->setMaximum(10000);
|
||||
|
||||
gridLayout->addWidget(m_x_sb, 1, 1, 1, 1);
|
||||
gridLayout->addWidget(m_x_sb, 1, 1, 1, 1);
|
||||
|
||||
QLabel *label = new QLabel(tr("X :"),parent);
|
||||
QLabel *label = new QLabel(tr("X :"),parent);
|
||||
|
||||
gridLayout->addWidget(label, 1, 0, 1, 1);
|
||||
gridLayout->addWidget(label, 1, 0, 1, 1);
|
||||
|
||||
m_size_sb = new QSpinBox(parent);
|
||||
m_size_sb->setObjectName(QString::fromUtf8("m_size_sb"));
|
||||
m_size_sb = new QSpinBox(parent);
|
||||
m_size_sb->setObjectName(QString::fromUtf8("m_size_sb"));
|
||||
|
||||
gridLayout->addWidget(m_size_sb, 2, 1, 1, 1);
|
||||
gridLayout->addWidget(m_size_sb, 2, 1, 1, 1);
|
||||
|
||||
m_line_edit = new QLineEdit(parent);
|
||||
m_line_edit->setObjectName(QString::fromUtf8("m_line_edit"));
|
||||
m_line_edit->setClearButtonEnabled(true);
|
||||
m_line_edit->setPlaceholderText(tr("Entrer votre texte ici"));
|
||||
m_line_edit = new QLineEdit(parent);
|
||||
m_line_edit->setObjectName(QString::fromUtf8("m_line_edit"));
|
||||
m_line_edit->setClearButtonEnabled(true);
|
||||
m_line_edit->setPlaceholderText(tr("Entrer votre texte ici"));
|
||||
|
||||
gridLayout->addWidget(m_line_edit, 0, 0, 1, 6);
|
||||
gridLayout->addWidget(m_line_edit, 0, 0, 1, 6);
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#else
|
||||
m_color_pb = new KColorButton(parent);
|
||||
m_color_pb->setObjectName(QString::fromUtf8("m_color_pb"));
|
||||
m_color_pb = new KColorButton(parent);
|
||||
m_color_pb->setObjectName(QString::fromUtf8("m_color_pb"));
|
||||
|
||||
connect(
|
||||
m_color_pb,
|
||||
&KColorButton::changed,
|
||||
this,
|
||||
&TextEditor::on_m_color_pb_changed);
|
||||
connect(
|
||||
m_color_pb,
|
||||
&KColorButton::changed,
|
||||
this,
|
||||
&TextEditor::on_m_color_pb_changed);
|
||||
|
||||
gridLayout->addWidget(m_color_pb, 2, 5, 1, 1);
|
||||
#endif
|
||||
QLabel *label_5 = new QLabel(parent);
|
||||
label_5->setObjectName(QString::fromUtf8("label_5"));
|
||||
gridLayout->addWidget(m_color_pb, 2, 5, 1, 1);
|
||||
#endif
|
||||
QLabel *label_5 = new QLabel(parent);
|
||||
label_5->setObjectName(QString::fromUtf8("label_5"));
|
||||
|
||||
gridLayout->addWidget(label_5, 2, 4, 1, 1);
|
||||
gridLayout->addWidget(label_5, 2, 4, 1, 1);
|
||||
|
||||
m_font_pb = new QPushButton(tr("Couleur :"),parent);
|
||||
connect(m_font_pb,
|
||||
&QPushButton::pressed,
|
||||
this,
|
||||
&TextEditor::on_m_font_pb_clicked);
|
||||
m_font_pb = new QPushButton(tr("Couleur :"),parent);
|
||||
connect(m_font_pb,
|
||||
&QPushButton::pressed,
|
||||
this,
|
||||
&TextEditor::on_m_font_pb_clicked);
|
||||
|
||||
gridLayout->addWidget(m_font_pb, 2, 2, 1, 2);
|
||||
gridLayout->addWidget(m_font_pb, 2, 2, 1, 2);
|
||||
|
||||
QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||
QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||
|
||||
gridLayout->addItem(verticalSpacer, 3, 2, 1, 1);
|
||||
setLayout(gridLayout);
|
||||
gridLayout->addItem(verticalSpacer, 3, 2, 1, 1);
|
||||
setLayout(gridLayout);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user