mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
chore : Add message box for advise use hpdi round factor is unsafe
Add a message box to advise user that use a hdpi round factor can cause strange render according to : 1 - the selected value 2 - the dpi of the screen 3 - Edit the project on another computer and/or screen who don't have the same parameters as point 1 and 2.
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
#include "../../qeticons.h"
|
#include "../../qeticons.h"
|
||||||
#include "ui_generalconfigurationpage.h"
|
#include "ui_generalconfigurationpage.h"
|
||||||
#include "../../utils/qetsettings.h"
|
#include "../../utils/qetsettings.h"
|
||||||
|
#include "../../qetmessagebox.h"
|
||||||
|
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QFontDialog>
|
#include <QFontDialog>
|
||||||
@@ -560,3 +561,29 @@ void GeneralConfigurationPage::on_ElementEditor_Grid_PointSize_min_sb_valueChang
|
|||||||
{
|
{
|
||||||
ui->ElementEditor_Grid_PointSize_max_sb->setMinimum(std::max(1, value));
|
ui->ElementEditor_Grid_PointSize_max_sb->setMinimum(std::max(1, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GeneralConfigurationPage::on_m_hdpi_round_cb_clicked(bool checked)
|
||||||
|
{
|
||||||
|
if (checked) {
|
||||||
|
if (QMessageBox::Cancel == QET::QetMessageBox::warning(
|
||||||
|
this,
|
||||||
|
tr("Fonctionnalité expérimental"),
|
||||||
|
tr("AVERTISSEMENT :\n"
|
||||||
|
"Toutes valeurs autre que ‘Pas d’arrondi’ peut causer des erreurs de rendu "
|
||||||
|
"du projet en fonction de :\n\n"
|
||||||
|
"1 - la valeur sélectionnée \n"
|
||||||
|
"2 - du dpi de l'écran \n"
|
||||||
|
"3 - Modifier le projet sur un autre ordinateur et/ou écran n'ayant pas les mêmes paramètres des points 1 et 2."),
|
||||||
|
QMessageBox::StandardButton::Cancel|QMessageBox::StandardButton::Ok,
|
||||||
|
QMessageBox::StandardButton::Cancel
|
||||||
|
)) {
|
||||||
|
ui->m_hdpi_round_cb->blockSignals(true);
|
||||||
|
ui->m_hdpi_round_cb->setChecked(false);
|
||||||
|
ui->m_hdpi_round_cb->blockSignals(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ui->m_hdpi_round_label->setEnabled(checked);
|
||||||
|
ui->m_hdpi_round_policy_cb->setEnabled(checked);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ class GeneralConfigurationPage : public ConfigPage
|
|||||||
void on_DiagramEditor_Grid_PointSize_min_sb_valueChanged(int value);
|
void on_DiagramEditor_Grid_PointSize_min_sb_valueChanged(int value);
|
||||||
void on_ElementEditor_Grid_PointSize_min_sb_valueChanged(int value);
|
void on_ElementEditor_Grid_PointSize_min_sb_valueChanged(int value);
|
||||||
|
|
||||||
|
void on_m_hdpi_round_cb_clicked(bool checked);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void fillLang();
|
void fillLang();
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>935</width>
|
<width>955</width>
|
||||||
<height>556</height>
|
<height>556</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab_3">
|
<widget class="QWidget" name="tab_3">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="m_hdpi_round_policy_widget" native="true">
|
<widget class="QWidget" name="m_hdpi_round_policy_widget" native="true">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,1">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
@@ -96,14 +96,28 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QCheckBox" name="m_hdpi_round_cb">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="m_hdpi_round_label">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Méthode de mise à l'echelle des écrans à haute densité de pixels (hdpi) (appliqué au prochain lancement de QElectroTech) :</string>
|
<string>Méthode de mise à l'echelle des écrans à haute densité de pixels (hdpi) (appliqué au prochain lancement de QElectroTech) :</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="m_hdpi_round_policy_cb"/>
|
<widget class="QComboBox" name="m_hdpi_round_policy_cb">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
Reference in New Issue
Block a user