mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-06-06 10:03:13 +02:00
Compare commits
4 Commits
4ca0bbf682
...
2c1b840f9c
| Author | SHA1 | Date | |
|---|---|---|---|
| 2c1b840f9c | |||
| 2d89d70682 | |||
| 7747223dfa | |||
| ae5e188866 |
@@ -16,10 +16,12 @@
|
|||||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "terminalstriplayoutpattern.h"
|
#include "terminalstriplayoutpattern.h"
|
||||||
|
#include "../../../utils/qetutils.h"
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
TerminalStripLayoutPattern::TerminalStripLayoutPattern()
|
TerminalStripLayoutPattern::TerminalStripLayoutPattern()
|
||||||
{
|
{
|
||||||
|
m_font.setPixelSize(15);
|
||||||
updateHeaderTextOption();
|
updateHeaderTextOption();
|
||||||
updateTerminalsTextOption();
|
updateTerminalsTextOption();
|
||||||
}
|
}
|
||||||
@@ -39,18 +41,27 @@ QTextOption TerminalStripLayoutPattern::headerTextOption() const {
|
|||||||
return m_header_text_option;
|
return m_header_text_option;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TerminalStripLayoutPattern::setTerminalsTextAlignment(const QVector<Qt::Alignment> &alignment)
|
QFont TerminalStripLayoutPattern::font() const {
|
||||||
|
return m_font;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TerminalStripLayoutPattern::setFont(const QFont &font) {
|
||||||
|
m_font = font;
|
||||||
|
QETUtils::pixelSizedFont(m_font);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TerminalStripLayoutPattern::setTerminalsTextAlignment(const Qt::Alignment &alignment)
|
||||||
{
|
{
|
||||||
m_terminals_text_alignment = alignment;
|
m_terminals_text_alignment = alignment;
|
||||||
updateTerminalsTextOption();
|
updateTerminalsTextOption();
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<Qt::Alignment> TerminalStripLayoutPattern::terminalsTextAlignment() const
|
Qt::Alignment TerminalStripLayoutPattern::terminalsTextAlignment() const
|
||||||
{
|
{
|
||||||
return m_terminals_text_alignment;
|
return m_terminals_text_alignment;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<QTextOption> TerminalStripLayoutPattern::terminalsTextOption() const
|
QTextOption TerminalStripLayoutPattern::terminalsTextOption() const
|
||||||
{
|
{
|
||||||
return m_terminals_text_option;
|
return m_terminals_text_option;
|
||||||
}
|
}
|
||||||
@@ -63,16 +74,6 @@ void TerminalStripLayoutPattern::updateHeaderTextOption()
|
|||||||
|
|
||||||
void TerminalStripLayoutPattern::updateTerminalsTextOption()
|
void TerminalStripLayoutPattern::updateTerminalsTextOption()
|
||||||
{
|
{
|
||||||
if (m_terminals_text_option.size() ==
|
m_terminals_text_option.setAlignment(m_terminals_text_alignment);
|
||||||
m_terminals_text_alignment.size())
|
m_terminals_text_option.setWrapMode(QTextOption::WordWrap);
|
||||||
{
|
|
||||||
for (auto i = 0 ; i<m_terminals_text_option.size() ; ++i)
|
|
||||||
{
|
|
||||||
m_terminals_text_option[i].setAlignment(m_terminals_text_alignment.at(i));
|
|
||||||
m_terminals_text_option[i].setWrapMode(QTextOption::WordWrap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
qDebug() << "TerminalStripLayoutPattern::updateTerminalsTextOption() : Wrong vector size";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#ifndef TERMINALSTRIPLAYOUTPATTERN_H
|
#ifndef TERMINALSTRIPLAYOUTPATTERN_H
|
||||||
#define TERMINALSTRIPLAYOUTPATTERN_H
|
#define TERMINALSTRIPLAYOUTPATTERN_H
|
||||||
|
|
||||||
|
#include <QFont>
|
||||||
#include <QRect>
|
#include <QRect>
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
#include <QTextOption>
|
#include <QTextOption>
|
||||||
@@ -52,6 +53,10 @@ class TerminalStripLayoutPattern
|
|||||||
//Spacer between the header and the terminals
|
//Spacer between the header and the terminals
|
||||||
QRect m_spacer_rect{0, 50, 10, 90};
|
QRect m_spacer_rect{0, 50, 10, 90};
|
||||||
|
|
||||||
|
//Font
|
||||||
|
QFont font() const;
|
||||||
|
void setFont (const QFont &font);
|
||||||
|
|
||||||
//Terminals
|
//Terminals
|
||||||
QVector<QRect> m_terminal_rect
|
QVector<QRect> m_terminal_rect
|
||||||
{
|
{
|
||||||
@@ -61,24 +66,13 @@ class TerminalStripLayoutPattern
|
|||||||
QRect{0, 30, 20, 130}
|
QRect{0, 30, 20, 130}
|
||||||
};
|
};
|
||||||
|
|
||||||
void setTerminalsTextAlignment(const QVector<Qt::Alignment> &alignment);
|
//Terminal text
|
||||||
QVector<Qt::Alignment> terminalsTextAlignment() const;
|
void setTerminalsTextAlignment(const Qt::Alignment &alignment);
|
||||||
QVector<QTextOption> terminalsTextOption() const;
|
Qt::Alignment terminalsTextAlignment() const;
|
||||||
|
QTextOption terminalsTextOption() const;
|
||||||
QVector<QRect> m_terminals_text_rect
|
int m_terminals_text_height{50};
|
||||||
{
|
int m_terminals_text_y{35};
|
||||||
QRect{0,35,20,50},
|
Qt::Orientation m_terminals_text_orientation {Qt::Vertical};
|
||||||
QRect{0,35,20,50},
|
|
||||||
QRect{0,35,20,50},
|
|
||||||
QRect{0,35,20,50}
|
|
||||||
};
|
|
||||||
QVector<Qt::Orientation> m_terminals_text_orientation
|
|
||||||
{
|
|
||||||
Qt::Vertical,
|
|
||||||
Qt::Vertical,
|
|
||||||
Qt::Vertical,
|
|
||||||
Qt::Vertical
|
|
||||||
};
|
|
||||||
|
|
||||||
int m_bridge_point_d{5};
|
int m_bridge_point_d{5};
|
||||||
QVector<int> m_bridge_point_y_offset{50,70,90,110};
|
QVector<int> m_bridge_point_y_offset{50,70,90,110};
|
||||||
@@ -91,23 +85,12 @@ class TerminalStripLayoutPattern
|
|||||||
void updateTerminalsTextOption();
|
void updateTerminalsTextOption();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
QFont m_font;
|
||||||
Qt::Alignment m_header_text_alignment{Qt::AlignCenter};
|
Qt::Alignment m_header_text_alignment{Qt::AlignCenter};
|
||||||
QTextOption m_header_text_option;
|
QTextOption m_header_text_option;
|
||||||
|
|
||||||
QVector<Qt::Alignment> m_terminals_text_alignment
|
Qt::Alignment m_terminals_text_alignment {Qt::AlignRight | Qt::AlignVCenter};
|
||||||
{
|
QTextOption m_terminals_text_option{QTextOption()};
|
||||||
Qt::AlignRight | Qt::AlignVCenter,
|
|
||||||
Qt::AlignRight | Qt::AlignVCenter,
|
|
||||||
Qt::AlignRight | Qt::AlignVCenter,
|
|
||||||
Qt::AlignRight | Qt::AlignVCenter
|
|
||||||
};
|
|
||||||
QVector<QTextOption> m_terminals_text_option
|
|
||||||
{
|
|
||||||
QTextOption(),
|
|
||||||
QTextOption(),
|
|
||||||
QTextOption(),
|
|
||||||
QTextOption()
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TERMINALSTRIPLAYOUTPATTERN_H
|
#endif // TERMINALSTRIPLAYOUTPATTERN_H
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ void TerminalStripDrawer::paint(QPainter *painter)
|
|||||||
auto brush_ = painter->brush();
|
auto brush_ = painter->brush();
|
||||||
brush_.setColor(Qt::white);
|
brush_.setColor(Qt::white);
|
||||||
|
|
||||||
|
painter->setFont(m_pattern->font());
|
||||||
|
|
||||||
painter->setPen(pen_);
|
painter->setPen(pen_);
|
||||||
painter->setBrush(brush_);
|
painter->setBrush(brush_);
|
||||||
|
|
||||||
@@ -103,9 +105,10 @@ void TerminalStripDrawer::paint(QPainter *painter)
|
|||||||
|
|
||||||
|
|
||||||
//Draw terminals
|
//Draw terminals
|
||||||
const auto terminals_text_rect{m_pattern->m_terminals_text_rect};
|
|
||||||
const auto terminals_text_orientation{m_pattern->m_terminals_text_orientation};
|
const auto terminals_text_orientation{m_pattern->m_terminals_text_orientation};
|
||||||
const auto terminals_text_option{m_pattern->terminalsTextOption()};
|
const auto terminals_text_option{m_pattern->terminalsTextOption()};
|
||||||
|
const auto terminals_text_height{m_pattern->m_terminals_text_height};
|
||||||
|
const auto terminals_text_y{m_pattern->m_terminals_text_y};
|
||||||
QRect terminal_rect;
|
QRect terminal_rect;
|
||||||
|
|
||||||
QHash<QUuid, QVector<QPointF>> bridges_anchor_points;
|
QHash<QUuid, QVector<QPointF>> bridges_anchor_points;
|
||||||
@@ -158,22 +161,18 @@ void TerminalStripDrawer::paint(QPainter *painter)
|
|||||||
|
|
||||||
//Draw text
|
//Draw text
|
||||||
painter->save();
|
painter->save();
|
||||||
if (terminals_text_orientation[index_] == Qt::Horizontal)
|
text_rect.setRect(0, terminals_text_y, terminal_rect.width(), terminals_text_height);
|
||||||
|
if (terminals_text_orientation == Qt::Vertical)
|
||||||
{
|
{
|
||||||
text_rect = terminals_text_rect[index_];
|
painter->translate(text_rect.bottomLeft());
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
const auto rect_{terminals_text_rect[index_]};
|
|
||||||
painter->translate(rect_.bottomLeft());
|
|
||||||
painter->rotate(270);
|
painter->rotate(270);
|
||||||
text_rect.setRect(0, 0, rect_.height(), terminal_rect.width());
|
text_rect.setRect(0, 0, text_rect.height(), text_rect.width());
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto shared_real_terminal{real_terminal_vector[i]};
|
const auto shared_real_terminal{real_terminal_vector[i]};
|
||||||
painter->drawText(text_rect,
|
painter->drawText(text_rect,
|
||||||
shared_real_terminal ? shared_real_terminal->label() : QLatin1String(),
|
shared_real_terminal ? shared_real_terminal->label() : QLatin1String(),
|
||||||
terminals_text_option[index_]);
|
terminals_text_option);
|
||||||
|
|
||||||
if (m_preview_draw)
|
if (m_preview_draw)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
#include <QFontDialog>
|
||||||
|
|
||||||
#include "terminalstriplayouteditor.h"
|
#include "terminalstriplayouteditor.h"
|
||||||
#include "ui_terminalstriplayouteditor.h"
|
#include "ui_terminalstriplayouteditor.h"
|
||||||
#include "../GraphicsItem/properties/terminalstriplayoutpattern.h"
|
#include "../GraphicsItem/properties/terminalstriplayoutpattern.h"
|
||||||
@@ -54,8 +56,6 @@ void TerminalStripLayoutEditor::valueEdited()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//auto *data_ = m_layout.data();
|
|
||||||
|
|
||||||
m_layout.data()->m_header_rect.setRect(0,
|
m_layout.data()->m_header_rect.setRect(0,
|
||||||
ui->m_y_header_sb->value(),
|
ui->m_y_header_sb->value(),
|
||||||
ui->m_width_header_sb->value(),
|
ui->m_width_header_sb->value(),
|
||||||
@@ -91,6 +91,10 @@ void TerminalStripLayoutEditor::valueEdited()
|
|||||||
m_layout.data()->m_bridge_point_y_offset[2] = ui->m_bridge_point_2_sb->value();
|
m_layout.data()->m_bridge_point_y_offset[2] = ui->m_bridge_point_2_sb->value();
|
||||||
m_layout.data()->m_bridge_point_y_offset[3] = ui->m_bridge_point_3_sb->value();
|
m_layout.data()->m_bridge_point_y_offset[3] = ui->m_bridge_point_3_sb->value();
|
||||||
|
|
||||||
|
auto font_ = ui->m_font_cb->currentFont();
|
||||||
|
font_.setPixelSize(ui->m_font_size_sb->value());
|
||||||
|
m_layout->setFont(font_);
|
||||||
|
|
||||||
m_layout.data()->m_header_text_orientation = ui->m_header_text_orientation_cb->currentIndex() == 0 ?
|
m_layout.data()->m_header_text_orientation = ui->m_header_text_orientation_cb->currentIndex() == 0 ?
|
||||||
Qt::Horizontal :
|
Qt::Horizontal :
|
||||||
Qt::Vertical;
|
Qt::Vertical;
|
||||||
@@ -104,34 +108,25 @@ void TerminalStripLayoutEditor::valueEdited()
|
|||||||
m_layout.data()->setHeaderTextAlignment(Qt::AlignRight | Qt::AlignVCenter); break;
|
m_layout.data()->setHeaderTextAlignment(Qt::AlignRight | Qt::AlignVCenter); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_layout.data()->m_terminals_text_orientation[0] = ui->m_terminal_text_orientation_cb->currentIndex() == 0 ?
|
m_layout.data()->m_terminals_text_orientation = ui->m_terminal_text_orientation_cb->currentIndex() == 0 ?
|
||||||
Qt::Horizontal :
|
Qt::Horizontal :
|
||||||
Qt::Vertical;
|
Qt::Vertical;
|
||||||
|
|
||||||
switch (ui->m_terminal_text_alignment_cb->currentIndex()) {
|
switch (ui->m_terminal_text_alignment_cb->currentIndex()) {
|
||||||
case 0:
|
case 0:
|
||||||
m_layout.data()->setTerminalsTextAlignment(
|
m_layout.data()->setTerminalsTextAlignment(Qt::Alignment {Qt::AlignLeft | Qt::AlignVCenter});
|
||||||
QVector<Qt::Alignment> { Qt::AlignLeft | Qt::AlignVCenter,
|
|
||||||
Qt::AlignLeft | Qt::AlignVCenter,
|
|
||||||
Qt::AlignLeft | Qt::AlignVCenter,
|
|
||||||
Qt::AlignLeft | Qt::AlignVCenter });
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
m_layout.data()->setTerminalsTextAlignment(
|
m_layout.data()->setTerminalsTextAlignment(Qt::Alignment { Qt::AlignHCenter | Qt::AlignVCenter});
|
||||||
QVector<Qt::Alignment> { Qt::AlignHCenter | Qt::AlignVCenter,
|
|
||||||
Qt::AlignHCenter | Qt::AlignVCenter,
|
|
||||||
Qt::AlignHCenter | Qt::AlignVCenter,
|
|
||||||
Qt::AlignHCenter | Qt::AlignVCenter });
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
m_layout.data()->setTerminalsTextAlignment(
|
m_layout.data()->setTerminalsTextAlignment(Qt::Alignment { Qt::AlignRight | Qt::AlignVCenter});
|
||||||
QVector<Qt::Alignment> { Qt::AlignRight | Qt::AlignVCenter,
|
|
||||||
Qt::AlignRight | Qt::AlignVCenter,
|
|
||||||
Qt::AlignRight | Qt::AlignVCenter,
|
|
||||||
Qt::AlignRight | Qt::AlignVCenter });
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_layout.data()->m_terminals_text_y = ui->m_terminal_text_y_sb->value();
|
||||||
|
m_layout.data()->m_terminals_text_height = ui->m_terminal_text_height_sb->value();
|
||||||
|
|
||||||
updateUi();
|
updateUi();
|
||||||
m_preview_strip_item.update();
|
m_preview_strip_item.update();
|
||||||
}
|
}
|
||||||
@@ -180,13 +175,17 @@ void TerminalStripLayoutEditor::updateUi()
|
|||||||
ui->m_bridge_point_2_sb->setValue(bridge_point[2]);
|
ui->m_bridge_point_2_sb->setValue(bridge_point[2]);
|
||||||
ui->m_bridge_point_3_sb->setValue(bridge_point[3]);
|
ui->m_bridge_point_3_sb->setValue(bridge_point[3]);
|
||||||
|
|
||||||
|
const auto font = m_layout->font();
|
||||||
|
ui->m_font_size_sb->setValue(font.pixelSize());
|
||||||
|
ui->m_font_cb->setCurrentFont(font);
|
||||||
|
|
||||||
if (data->m_header_text_orientation == Qt::Horizontal) {
|
if (data->m_header_text_orientation == Qt::Horizontal) {
|
||||||
ui->m_header_text_orientation_cb->setCurrentIndex(0);
|
ui->m_header_text_orientation_cb->setCurrentIndex(0);
|
||||||
} else {
|
} else {
|
||||||
ui->m_header_text_orientation_cb->setCurrentIndex(1);
|
ui->m_header_text_orientation_cb->setCurrentIndex(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data->m_terminals_text_orientation[0] == Qt::Horizontal) {
|
if (data->m_terminals_text_orientation == Qt::Horizontal) {
|
||||||
ui->m_terminal_text_orientation_cb->setCurrentIndex(0);
|
ui->m_terminal_text_orientation_cb->setCurrentIndex(0);
|
||||||
} else {
|
} else {
|
||||||
ui->m_terminal_text_orientation_cb->setCurrentIndex(1);
|
ui->m_terminal_text_orientation_cb->setCurrentIndex(1);
|
||||||
@@ -201,7 +200,7 @@ void TerminalStripLayoutEditor::updateUi()
|
|||||||
ui->m_header_text_alignment_cb->setCurrentIndex(2);
|
ui->m_header_text_alignment_cb->setCurrentIndex(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto terminal_alignment = data->terminalsTextAlignment().at(0);
|
const auto terminal_alignment = data->terminalsTextAlignment();
|
||||||
if (terminal_alignment &Qt::AlignLeft) {
|
if (terminal_alignment &Qt::AlignLeft) {
|
||||||
ui->m_terminal_text_alignment_cb->setCurrentIndex(0);
|
ui->m_terminal_text_alignment_cb->setCurrentIndex(0);
|
||||||
} else if (terminal_alignment &Qt::AlignHCenter) {
|
} else if (terminal_alignment &Qt::AlignHCenter) {
|
||||||
@@ -210,6 +209,9 @@ void TerminalStripLayoutEditor::updateUi()
|
|||||||
ui->m_terminal_text_alignment_cb->setCurrentIndex(2);
|
ui->m_terminal_text_alignment_cb->setCurrentIndex(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ui->m_terminal_text_y_sb->setValue(data->m_terminals_text_y);
|
||||||
|
ui->m_terminal_text_height_sb->setValue(data->m_terminals_text_height);
|
||||||
|
|
||||||
m_ui_updating = false;
|
m_ui_updating = false;
|
||||||
updatePreview();
|
updatePreview();
|
||||||
}
|
}
|
||||||
@@ -225,4 +227,3 @@ void TerminalStripLayoutEditor::on_m_display_preview_help_clicked(bool checked)
|
|||||||
m_preview_strip_item.m_drawer.setPreviewDraw(checked);
|
m_preview_strip_item.m_drawer.setPreviewDraw(checked);
|
||||||
m_preview_strip_item.update();
|
m_preview_strip_item.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ class TerminalStripLayoutEditor : public QWidget
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void valueEdited();
|
void valueEdited();
|
||||||
|
|
||||||
void on_m_display_preview_help_clicked(bool checked);
|
void on_m_display_preview_help_clicked(bool checked);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>767</width>
|
<width>683</width>
|
||||||
<height>544</height>
|
<height>589</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -15,57 +15,26 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="sizeConstraint">
|
<property name="sizeConstraint">
|
||||||
<enum>QLayout::SetMaximumSize</enum>
|
<enum>QLayout::SizeConstraint::SetMaximumSize</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="4" column="0">
|
<item row="4" column="2">
|
||||||
<widget class="QLabel" name="label_7">
|
<widget class="QSpinBox" name="m_width_terminal_0_sb">
|
||||||
<property name="text">
|
<property name="maximum">
|
||||||
<string>Borne niveau 0 :</string>
|
<number>1000</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="6" column="3">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QSpinBox" name="m_height_terminal_2_sb">
|
||||||
<property name="text">
|
<property name="maximum">
|
||||||
<string>En tête :</string>
|
<number>1000</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="4">
|
<item row="3" column="0" colspan="4">
|
||||||
<widget class="Line" name="line">
|
<widget class="Line" name="line">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="12" column="0" colspan="5">
|
|
||||||
<widget class="QGraphicsView" name="m_graphics_view"/>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="4">
|
|
||||||
<widget class="QLabel" name="label_18">
|
|
||||||
<property name="text">
|
|
||||||
<string>Point de pont</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<widget class="QSpinBox" name="m_y_terminal_1_sb">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>1000</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="0" colspan="5">
|
|
||||||
<widget class="Line" name="line_5">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="3">
|
|
||||||
<widget class="QSpinBox" name="m_height_spacer_sb">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>1000</number>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -76,15 +45,43 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="4">
|
<item row="7" column="4">
|
||||||
<widget class="QCheckBox" name="m_display_preview_help">
|
<widget class="QSpinBox" name="m_bridge_point_3_sb">
|
||||||
<property name="text">
|
<property name="maximum">
|
||||||
<string>Afficher l'aide</string>
|
<number>1000</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="5" column="3">
|
||||||
<widget class="QSpinBox" name="m_width_header_sb">
|
<widget class="QSpinBox" name="m_height_terminal_1_sb">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>Borne niveau 0 :</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="2">
|
||||||
|
<widget class="QSpinBox" name="m_width_terminal_3_sb">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="4">
|
||||||
|
<widget class="QSpinBox" name="m_bridge_point_2_sb">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="2">
|
||||||
|
<widget class="QSpinBox" name="m_width_terminal_1_sb">
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>1000</number>
|
<number>1000</number>
|
||||||
</property>
|
</property>
|
||||||
@@ -97,22 +94,39 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="4">
|
<item row="14" column="0" colspan="5">
|
||||||
<widget class="QSpinBox" name="m_bridge_point_1_sb">
|
<widget class="QGraphicsView" name="m_graphics_view"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="3">
|
||||||
|
<widget class="QSpinBox" name="m_height_spacer_sb">
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>1000</number>
|
<number>1000</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="7" column="0">
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_10">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Largeur</string>
|
<string>Borne niveau 3 :</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="3">
|
<item row="6" column="0">
|
||||||
<widget class="QSpinBox" name="m_height_terminal_2_sb">
|
<widget class="QLabel" name="label_9">
|
||||||
|
<property name="text">
|
||||||
|
<string>Borne niveau 2 :</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QSpinBox" name="m_width_spacer_sb">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="3">
|
||||||
|
<widget class="QSpinBox" name="m_height_terminal_0_sb">
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>1000</number>
|
<number>1000</number>
|
||||||
</property>
|
</property>
|
||||||
@@ -125,17 +139,48 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="3">
|
<item row="13" column="4">
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="QCheckBox" name="m_display_preview_help">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Hauteur</string>
|
<string>Afficher l'aide</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="0">
|
<item row="0" column="2">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Prévisualisation :</string>
|
<string>Largeur</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="4">
|
||||||
|
<widget class="QSpinBox" name="m_bridge_point_1_sb">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>Espace :</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="0" colspan="5">
|
||||||
|
<widget class="Line" name="line_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="4">
|
||||||
|
<widget class="QSpinBox" name="m_bridge_point_0_sb">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -146,35 +191,14 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="1">
|
<item row="5" column="0">
|
||||||
<widget class="QSpinBox" name="m_y_terminal_3_sb">
|
<widget class="QLabel" name="label_8">
|
||||||
<property name="maximum">
|
<property name="text">
|
||||||
<number>1000</number>
|
<string>Borne niveau 1 :</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="10" column="0" colspan="5">
|
||||||
<widget class="QSpinBox" name="m_y_terminal_0_sb">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>1000</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="2">
|
|
||||||
<widget class="QSpinBox" name="m_width_spacer_sb">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>1000</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="2">
|
|
||||||
<widget class="QSpinBox" name="m_width_terminal_2_sb">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>1000</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="0" colspan="5">
|
|
||||||
<widget class="QWidget" name="widget" native="true">
|
<widget class="QWidget" name="widget" native="true">
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
@@ -189,26 +213,28 @@
|
|||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="1" column="3">
|
<item row="8" column="4">
|
||||||
<widget class="QComboBox" name="m_terminal_text_alignment_cb">
|
<widget class="QLabel" name="label_19">
|
||||||
|
<property name="text">
|
||||||
|
<string>Longueur maximal du texte de borne</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="3">
|
||||||
|
<widget class="QComboBox" name="m_header_text_orientation_cb">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Gauche</string>
|
<string>Horizontal</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Centre</string>
|
<string>Vertical</string>
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Droite</string>
|
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="3">
|
<item row="6" column="3">
|
||||||
<widget class="QComboBox" name="m_header_text_alignment_cb">
|
<widget class="QComboBox" name="m_header_text_alignment_cb">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -227,21 +253,7 @@
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="5" column="5">
|
||||||
<widget class="QLabel" name="label_15">
|
|
||||||
<property name="text">
|
|
||||||
<string>Alignement du texte d'en tête :</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QLabel" name="label_17">
|
|
||||||
<property name="text">
|
|
||||||
<string>Alignement du texte de borne :</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QComboBox" name="m_terminal_text_orientation_cb">
|
<widget class="QComboBox" name="m_terminal_text_orientation_cb">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -255,37 +267,152 @@
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="5" column="2">
|
||||||
<widget class="QComboBox" name="m_header_text_orientation_cb">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Horizontal</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Vertical</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_16">
|
|
||||||
<property name="text">
|
|
||||||
<string>Orientation du texte de borne :</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_14">
|
<widget class="QLabel" name="label_14">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Orientation du texte d'en tête :</string>
|
<string>Orientation du texte d'en tête :</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="6" column="2">
|
||||||
|
<widget class="QLabel" name="label_15">
|
||||||
|
<property name="text">
|
||||||
|
<string>Alignement du texte d'en tête :</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="4">
|
||||||
|
<widget class="QLabel" name="label_13">
|
||||||
|
<property name="text">
|
||||||
|
<string>Origine vertical du texte de borne :</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2" colspan="4">
|
||||||
|
<widget class="QWidget" name="widget_2" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_11">
|
||||||
|
<property name="text">
|
||||||
|
<string>Police :</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFontComboBox" name="m_font_cb"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_12">
|
||||||
|
<property name="text">
|
||||||
|
<string>Taille :</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="m_font_size_sb">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="6" column="5">
|
||||||
|
<widget class="QComboBox" name="m_terminal_text_alignment_cb">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Gauche</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Centre</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Droite</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="5">
|
||||||
|
<widget class="QSpinBox" name="m_terminal_text_height_sb">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>30</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="4">
|
||||||
|
<widget class="QLabel" name="label_16">
|
||||||
|
<property name="text">
|
||||||
|
<string>Orientation du texte de borne :</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="5">
|
||||||
|
<widget class="QSpinBox" name="m_terminal_text_y_sb"/>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="4">
|
||||||
|
<widget class="QLabel" name="label_17">
|
||||||
|
<property name="text">
|
||||||
|
<string>Alignement du texte de borne :</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="2">
|
||||||
|
<widget class="QSpinBox" name="m_width_terminal_2_sb">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QSpinBox" name="m_width_header_sb">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>En tête :</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="1" column="3">
|
<item row="1" column="3">
|
||||||
<widget class="QSpinBox" name="m_height_header_sb">
|
<widget class="QSpinBox" name="m_height_header_sb">
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
@@ -293,34 +420,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0">
|
|
||||||
<widget class="QLabel" name="label_9">
|
|
||||||
<property name="text">
|
|
||||||
<string>Borne niveau 2 :</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="2">
|
|
||||||
<widget class="QSpinBox" name="m_width_terminal_0_sb">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>1000</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_6">
|
|
||||||
<property name="text">
|
|
||||||
<string>Espace :</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="2">
|
|
||||||
<widget class="QSpinBox" name="m_width_terminal_3_sb">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>1000</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="1">
|
<item row="6" column="1">
|
||||||
<widget class="QSpinBox" name="m_y_terminal_2_sb">
|
<widget class="QSpinBox" name="m_y_terminal_2_sb">
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
@@ -328,66 +427,52 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="4">
|
<item row="9" column="0" colspan="5">
|
||||||
<widget class="QSpinBox" name="m_bridge_point_2_sb">
|
<widget class="Line" name="line_5">
|
||||||
<property name="maximum">
|
|
||||||
<number>1000</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="4">
|
|
||||||
<widget class="QSpinBox" name="m_bridge_point_3_sb">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>1000</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="2">
|
|
||||||
<widget class="QSpinBox" name="m_width_terminal_1_sb">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>1000</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="3">
|
|
||||||
<widget class="QSpinBox" name="m_height_terminal_0_sb">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>1000</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="3">
|
|
||||||
<widget class="QSpinBox" name="m_height_terminal_1_sb">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>1000</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="0">
|
|
||||||
<widget class="QLabel" name="label_10">
|
|
||||||
<property name="text">
|
|
||||||
<string>Borne niveau 3 :</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="4">
|
|
||||||
<widget class="QSpinBox" name="m_bridge_point_0_sb">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>1000</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QLabel" name="label_8">
|
|
||||||
<property name="text">
|
|
||||||
<string>Borne niveau 1 :</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="10" column="0" colspan="5">
|
|
||||||
<widget class="Line" name="line_2">
|
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1">
|
||||||
|
<widget class="QSpinBox" name="m_y_terminal_3_sb">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QSpinBox" name="m_y_terminal_1_sb">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>Hauteur</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="4">
|
||||||
|
<widget class="QLabel" name="label_18">
|
||||||
|
<property name="text">
|
||||||
|
<string>Point de pont</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QSpinBox" name="m_y_terminal_0_sb">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>1000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="13" column="0">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Prévisualisation :</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -811,6 +896,70 @@
|
|||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>m_font_cb</sender>
|
||||||
|
<signal>currentFontChanged(QFont)</signal>
|
||||||
|
<receiver>TerminalStripLayoutEditor</receiver>
|
||||||
|
<slot>valueEdited()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>245</x>
|
||||||
|
<y>276</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>445</x>
|
||||||
|
<y>277</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>m_font_size_sb</sender>
|
||||||
|
<signal>valueChanged(int)</signal>
|
||||||
|
<receiver>TerminalStripLayoutEditor</receiver>
|
||||||
|
<slot>valueEdited()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>507</x>
|
||||||
|
<y>277</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>445</x>
|
||||||
|
<y>277</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>m_terminal_text_y_sb</sender>
|
||||||
|
<signal>valueChanged(int)</signal>
|
||||||
|
<receiver>TerminalStripLayoutEditor</receiver>
|
||||||
|
<slot>valueEdited()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>207</x>
|
||||||
|
<y>383</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>445</x>
|
||||||
|
<y>277</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>m_terminal_text_height_sb</sender>
|
||||||
|
<signal>valueChanged(int)</signal>
|
||||||
|
<receiver>TerminalStripLayoutEditor</receiver>
|
||||||
|
<slot>valueEdited()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>430</x>
|
||||||
|
<y>383</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>445</x>
|
||||||
|
<y>277</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
</connections>
|
</connections>
|
||||||
<slots>
|
<slots>
|
||||||
<slot>valueEdited()</slot>
|
<slot>valueEdited()</slot>
|
||||||
|
|||||||
@@ -132,3 +132,21 @@ bool QETUtils::sortBeginIntString(const QString &str_a, const QString &str_b)
|
|||||||
return str_a<str_b;
|
return str_a<str_b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief QETUtils::pixelSizedFont
|
||||||
|
* Set the font size to pixelSize instead of pointSize (if needed).
|
||||||
|
* The font used to draw diagram must be pixel sized instead of point sized (default by Qt)
|
||||||
|
* then no matter the screen dpi used, the text in diagram keep the same size.
|
||||||
|
* For more information see @link https://qelectrotech.org/forum/viewtopic.php?pid=6267#p6267 @endlink
|
||||||
|
* @param font
|
||||||
|
*/
|
||||||
|
void QETUtils::pixelSizedFont(QFont &font)
|
||||||
|
{
|
||||||
|
if (font.pixelSize() > -1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto px = font.pointSizeF()/72 * QFontMetrics{font}.fontDpi();
|
||||||
|
font.setPixelSize(qRound(px));
|
||||||
|
}
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ namespace QETUtils
|
|||||||
QString marginsToString(const QMargins &margins);
|
QString marginsToString(const QMargins &margins);
|
||||||
QMargins marginsFromString(const QString &string);
|
QMargins marginsFromString(const QString &string);
|
||||||
qreal graphicsHandlerSize(QGraphicsItem *item);
|
qreal graphicsHandlerSize(QGraphicsItem *item);
|
||||||
|
void pixelSizedFont (QFont &font);
|
||||||
|
|
||||||
bool sortBeginIntString(const QString &str_a, const QString &str_b);
|
bool sortBeginIntString(const QString &str_a, const QString &str_b);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user