[qet] qet/qet: [5754] Minor : update gui layout.

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 5754
Author:   blacksun
Date:     2019-03-04 09:55:06 +0100 (Mon, 04 Mar 2019)
Log Message:
-----------
Minor : update gui layout.
Fix : change grid step doesn't applyed

Modified Paths:
--------------
    trunk/sources/diagram.cpp
    trunk/sources/ui/configpage/generalconfigurationpage.h
    trunk/sources/ui/configpage/generalconfigurationpage.ui

Modified: trunk/sources/diagram.cpp
===================================================================
--- trunk/sources/diagram.cpp	2019-03-03 20:56:58 UTC (rev 5753)
+++ trunk/sources/diagram.cpp	2019-03-04 08:55:06 UTC (rev 5754)
@@ -154,8 +154,8 @@
 
 			//If user allow zoom out beyond of folio, we draw grid outside of border.
 		QSettings settings;
-		int xGrid = settings.value("DiagramEditor_xGrid_sb", Diagram::xGrid).toInt();
-		int yGrid = settings.value("DiagramEditor_yGrid_sb", Diagram::yGrid).toInt();
+		int xGrid = settings.value("diagrameditor/Xgrid", Diagram::xGrid).toInt();
+		int yGrid = settings.value("diagrameditor/Ygrid", Diagram::yGrid).toInt();
 		QRectF rect = settings.value("diagrameditor/zoom-out-beyond-of-folio", false).toBool() ?
 						  r :
 						  border_and_titleblock.insideBorderRect().intersected(r);
@@ -285,10 +285,10 @@
 void Diagram::keyPressEvent(QKeyEvent *event)
 {
 	QSettings settings;
-	int xKeyGrid = settings.value("DiagramEditor_xKeyGrid_sb", Diagram::xKeyGrid).toInt();
-	int yKeyGrid = settings.value("DiagramEditor_yKeyGrid_sb", Diagram::yKeyGrid).toInt();
-    int xKeyGridFine = settings.value("DiagramEditor_xKeyGridFine_sb", Diagram::xKeyGridFine).toInt();
-    int yKeyGridFine = settings.value("DiagramEditor_yKeyGridFine_sb", Diagram::yKeyGridFine).toInt();
+	int xKeyGrid = settings.value("diagrameditor/key_Xgrid", Diagram::xKeyGrid).toInt();
+	int yKeyGrid = settings.value("diagrameditor/key_Ygrid", Diagram::yKeyGrid).toInt();
+	int xKeyGridFine = settings.value("iagrameditor/key_fine_Xgrid", Diagram::xKeyGridFine).toInt();
+	int yKeyGridFine = settings.value("diagrameditor/key_fine_Ygrid", Diagram::yKeyGridFine).toInt();
 	event->setAccepted(false);
 	
 	if (m_event_interface) {

Modified: trunk/sources/ui/configpage/generalconfigurationpage.h
===================================================================
--- trunk/sources/ui/configpage/generalconfigurationpage.h	2019-03-03 20:56:58 UTC (rev 5753)
+++ trunk/sources/ui/configpage/generalconfigurationpage.h	2019-03-04 08:55:06 UTC (rev 5754)
@@ -1,4 +1,4 @@
-/*
+/*
 	Copyright 2006-2019 The QElectroTech Team
 	This file is part of QElectroTech.
 	
@@ -30,8 +30,8 @@
 	Q_OBJECT
 	
 	public:
-		explicit GeneralConfigurationPage(QWidget *parent = 0);
-		~GeneralConfigurationPage();
+		explicit GeneralConfigurationPage(QWidget *parent = nullptr);
+		~GeneralConfigurationPage() override;
 	
 		virtual void applyConf() override;
 		virtual QString title() const override;
@@ -50,7 +50,7 @@
 		
 		
 		
-		private:
+	private:
 		void fillLang();
 	
 	private:

Modified: trunk/sources/ui/configpage/generalconfigurationpage.ui
===================================================================
--- trunk/sources/ui/configpage/generalconfigurationpage.ui	2019-03-03 20:56:58 UTC (rev 5753)
+++ trunk/sources/ui/configpage/generalconfigurationpage.ui	2019-03-04 08:55:06 UTC (rev 5754)
@@ -6,40 +6,16 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>998</width>
-    <height>500</height>
+    <width>893</width>
+    <height>481</height>
    </rect>
   </property>
-  <property name="sizePolicy">
-   <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
-    <horstretch>0</horstretch>
-    <verstretch>0</verstretch>
-   </sizepolicy>
-  </property>
-  <property name="minimumSize">
-   <size>
-    <width>0</width>
-    <height>500</height>
-   </size>
-  </property>
   <property name="windowTitle">
    <string>Form</string>
   </property>
-  <layout class="QVBoxLayout" name="verticalLayout_3">
-   <item>
+  <layout class="QGridLayout" name="gridLayout_5">
+   <item row="0" column="0">
     <widget class="QTabWidget" name="tabWidget">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Fixed" vsizetype="Expanding">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="minimumSize">
-      <size>
-       <width>980</width>
-       <height>500</height>
-      </size>
-     </property>
      <property name="currentIndex">
       <number>0</number>
      </property>
@@ -474,16 +450,21 @@
          <property name="title">
           <string>Grille : 1 - 30</string>
          </property>
-         <layout class="QGridLayout" name="gridLayout_5">
-          <item row="0" column="0">
-           <widget class="QLabel" name="Label_Diagram_xGrid">
-            <property name="text">
-             <string>DiagramEditor xGrid</string>
+         <property name="flat">
+          <bool>false</bool>
+         </property>
+         <property name="checkable">
+          <bool>false</bool>
+         </property>
+         <layout class="QGridLayout" name="gridLayout_6">
+          <item row="0" column="2">
+           <widget class="QSpinBox" name="DiagramEditor_xGrid_sb">
+            <property name="minimumSize">
+             <size>
+              <width>80</width>
+              <height>0</height>
+             </size>
             </property>
-           </widget>
-          </item>
-          <item row="0" column="1">
-           <widget class="QSpinBox" name="DiagramEditor_xGrid_sb">
             <property name="minimum">
              <number>1</number>
             </property>
@@ -498,8 +479,28 @@
             </property>
            </widget>
           </item>
-          <item row="1" column="1">
+          <item row="1" column="0">
+           <widget class="QLabel" name="Label_Diagram_yGrid">
+            <property name="text">
+             <string>DiagramEditor yGrid</string>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="0">
+           <widget class="QLabel" name="Label_Grid_Tip">
+            <property name="text">
+             <string>La Grille doite etre active pour pouvoir voir les modifications.</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="2">
            <widget class="QSpinBox" name="DiagramEditor_yGrid_sb">
+            <property name="minimumSize">
+             <size>
+              <width>80</width>
+              <height>0</height>
+             </size>
+            </property>
             <property name="minimum">
              <number>1</number>
             </property>
@@ -511,22 +512,15 @@
             </property>
            </widget>
           </item>
-          <item row="1" column="0">
-           <widget class="QLabel" name="Label_Diagram_yGrid">
+          <item row="0" column="0">
+           <widget class="QLabel" name="Label_Diagram_xGrid">
             <property name="text">
-             <string>DiagramEditor yGrid</string>
+             <string>DiagramEditor xGrid</string>
             </property>
            </widget>
           </item>
-          <item row="2" column="0" colspan="2">
-           <widget class="QLabel" name="Label_Grid_Tip">
-            <property name="text">
-             <string>La Grille doite etre active pour pouvoir voir les modifications.</string>
-            </property>
-           </widget>
-          </item>
-          <item row="0" column="2">
-           <spacer name="horizontalSpacer_4">
+          <item row="0" column="1">
+           <spacer name="horizontalSpacer_6">
             <property name="orientation">
              <enum>Qt::Horizontal</enum>
             </property>
@@ -547,22 +541,14 @@
           <string>Déplacement au clavier : 1 - 30</string>
          </property>
          <layout class="QGridLayout" name="gridLayout_10">
-          <item row="0" column="0">
-           <widget class="QLabel" name="Label_Diagram_Key_xGrid">
-            <property name="text">
-             <string>DiagramEditor (touche :   gauche / droite)  xGrid</string>
+          <item row="0" column="2">
+           <widget class="QSpinBox" name="DiagramEditor_xKeyGrid_sb">
+            <property name="minimumSize">
+             <size>
+              <width>80</width>
+              <height>0</height>
+             </size>
             </property>
-           </widget>
-          </item>
-          <item row="1" column="0">
-           <widget class="QLabel" name="Label_Diagram_Key_yGrid">
-            <property name="text">
-             <string>DiagramEditor (touche :   haut / bas)  yGrid</string>
-            </property>
-           </widget>
-          </item>
-          <item row="0" column="1">
-           <widget class="QSpinBox" name="DiagramEditor_xKeyGrid_sb">
             <property name="minimum">
              <number>1</number>
             </property>
@@ -577,8 +563,14 @@
             </property>
            </widget>
           </item>
-          <item row="1" column="1">
+          <item row="1" column="2">
            <widget class="QSpinBox" name="DiagramEditor_yKeyGrid_sb">
+            <property name="minimumSize">
+             <size>
+              <width>80</width>
+              <height>0</height>
+             </size>
+            </property>
             <property name="minimum">
              <number>1</number>
             </property>
@@ -593,7 +585,21 @@
             </property>
            </widget>
           </item>
-          <item row="0" column="2">
+          <item row="0" column="0">
+           <widget class="QLabel" name="Label_Diagram_Key_xGrid">
+            <property name="text">
+             <string>DiagramEditor (touche :   gauche / droite)  xGrid</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="0">
+           <widget class="QLabel" name="Label_Diagram_Key_yGrid">
+            <property name="text">
+             <string>DiagramEditor (touche :   haut / bas)  yGrid</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="1">
            <spacer name="horizontalSpacer_5">
             <property name="orientation">
              <enum>Qt::Horizontal</enum>
@@ -622,8 +628,14 @@
             </property>
            </widget>
           </item>
-          <item row="0" column="2">
-           <widget class="QSpinBox" name="DiagramEditor_xKeyGridFine_sb">
+          <item row="1" column="3">
+           <widget class="QSpinBox" name="DiagramEditor_yKeyGridFine_sb">
+            <property name="minimumSize">
+             <size>
+              <width>80</width>
+              <height>0</height>
+             </size>
+            </property>
             <property name="minimum">
              <number>1</number>
             </property>
@@ -645,8 +657,14 @@
             </property>
            </widget>
           </item>
-          <item row="1" column="2">
-           <widget class="QSpinBox" name="DiagramEditor_yKeyGridFine_sb">
+          <item row="0" column="3">
+           <widget class="QSpinBox" name="DiagramEditor_xKeyGridFine_sb">
+            <property name="minimumSize">
+             <size>
+              <width>80</width>
+              <height>0</height>
+             </size>
+            </property>
             <property name="minimum">
              <number>1</number>
             </property>
@@ -661,8 +679,8 @@
             </property>
            </widget>
           </item>
-          <item row="0" column="3">
-           <spacer name="horizontalSpacer_6">
+          <item row="0" column="2">
+           <spacer name="horizontalSpacer_4">
             <property name="orientation">
              <enum>Qt::Horizontal</enum>
             </property>


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/