ui/EditSupplier.ui

Tue, 15 Feb 2022 21:21:12 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Tue, 15 Feb 2022 21:21:12 +0100
changeset 11
c9cdc15d3caf
parent 10
8aa2bd9ba9e8
child 21
15e5879df8dc
permissions
-rw-r--r--

The Supplier editor saves changes and inserts new suppliers. It sends a signal to InventorySuppliers when done (always for now). Refresh the table still doesn't work. Added a missing iconn in the Inventory menus dropdown.

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <author>Michiel Broek</author>
 <class>EditSupplier</class>
 <widget class="QDialog" name="EditSupplier">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>1024</width>
    <height>560</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>Dialog</string>
  </property>
  <layout class="QVBoxLayout" name="verticalLayout">
   <item>
    <widget class="QWidget" name="widget" native="true">
     <layout class="QFormLayout" name="formLayout">
      <item row="0" column="0">
       <widget class="QLabel" name="nameLabel">
        <property name="text">
         <string>Name</string>
        </property>
       </widget>
      </item>
      <item row="0" column="1">
       <widget class="QLineEdit" name="nameEdit">
        <property name="maxLength">
         <number>128</number>
        </property>
        <property name="placeholderText">
         <string>Supplier name</string>
        </property>
       </widget>
      </item>
      <item row="1" column="0">
       <widget class="QLabel" name="addressLabel">
        <property name="text">
         <string>Address</string>
        </property>
       </widget>
      </item>
      <item row="1" column="1">
       <widget class="QLineEdit" name="addressEdit">
        <property name="toolTip">
         <string>The street and housenumber</string>
        </property>
        <property name="maxLength">
         <number>128</number>
        </property>
        <property name="placeholderText">
         <string>Address</string>
        </property>
       </widget>
      </item>
      <item row="2" column="0">
       <widget class="QLabel" name="cityLabel">
        <property name="text">
         <string>City</string>
        </property>
       </widget>
      </item>
      <item row="2" column="1">
       <widget class="QLineEdit" name="cityEdit">
        <property name="maxLength">
         <number>123</number>
        </property>
        <property name="placeholderText">
         <string>City</string>
        </property>
       </widget>
      </item>
      <item row="3" column="0">
       <widget class="QLabel" name="zipLabel">
        <property name="text">
         <string>Zip code</string>
        </property>
       </widget>
      </item>
      <item row="3" column="1">
       <widget class="QLineEdit" name="zipEdit">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="maxLength">
         <number>16</number>
        </property>
        <property name="placeholderText">
         <string>Zip code</string>
        </property>
       </widget>
      </item>
      <item row="4" column="0">
       <widget class="QLabel" name="countryLabel">
        <property name="text">
         <string>Country</string>
        </property>
       </widget>
      </item>
      <item row="4" column="1">
       <widget class="QLineEdit" name="countryEdit">
        <property name="maxLength">
         <number>128</number>
        </property>
        <property name="placeholderText">
         <string>Country</string>
        </property>
       </widget>
      </item>
      <item row="5" column="0">
       <widget class="QLabel" name="webLabel">
        <property name="text">
         <string>Website</string>
        </property>
       </widget>
      </item>
      <item row="5" column="1">
       <widget class="QLineEdit" name="webEdit">
        <property name="maxLength">
         <number>128</number>
        </property>
        <property name="placeholderText">
         <string>https://www.supplier.com</string>
        </property>
       </widget>
      </item>
      <item row="6" column="0">
       <widget class="QLabel" name="emailLabel">
        <property name="text">
         <string>Email</string>
        </property>
       </widget>
      </item>
      <item row="6" column="1">
       <widget class="QLineEdit" name="emailEdit">
        <property name="maxLength">
         <number>128</number>
        </property>
        <property name="placeholderText">
         <string>sales@supplier.com</string>
        </property>
       </widget>
      </item>
      <item row="7" column="0">
       <widget class="QLabel" name="phoneLabel">
        <property name="text">
         <string>Phone</string>
        </property>
       </widget>
      </item>
      <item row="7" column="1">
       <widget class="QLineEdit" name="phoneEdit">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="maxLength">
         <number>16</number>
        </property>
        <property name="placeholderText">
         <string>+31 123 45678</string>
        </property>
       </widget>
      </item>
      <item row="8" column="0">
       <widget class="QLabel" name="notesLabel">
        <property name="text">
         <string>Notes</string>
        </property>
       </widget>
      </item>
      <item row="8" column="1">
       <widget class="QPlainTextEdit" name="notesEdit">
        <property name="horizontalScrollBarPolicy">
         <enum>Qt::ScrollBarAlwaysOff</enum>
        </property>
        <property name="placeholderText">
         <string>Notes about this supplier</string>
        </property>
       </widget>
      </item>
     </layout>
    </widget>
   </item>
   <item>
    <widget class="QDialogButtonBox" name="buttonBox">
     <property name="orientation">
      <enum>Qt::Horizontal</enum>
     </property>
     <property name="standardButtons">
      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
     </property>
     <property name="centerButtons">
      <bool>true</bool>
     </property>
    </widget>
   </item>
  </layout>
 </widget>
 <tabstops>
  <tabstop>nameEdit</tabstop>
  <tabstop>addressEdit</tabstop>
  <tabstop>cityEdit</tabstop>
  <tabstop>zipEdit</tabstop>
  <tabstop>countryEdit</tabstop>
  <tabstop>webEdit</tabstop>
  <tabstop>emailEdit</tabstop>
  <tabstop>phoneEdit</tabstop>
  <tabstop>notesEdit</tabstop>
 </tabstops>
 <resources/>
 <connections>
  <connection>
   <sender>buttonBox</sender>
   <signal>accepted()</signal>
   <receiver>EditSupplier</receiver>
   <slot>onOKButtonClicked()</slot>
   <hints>
    <hint type="sourcelabel">
     <x>248</x>
     <y>254</y>
    </hint>
    <hint type="destinationlabel">
     <x>157</x>
     <y>274</y>
    </hint>
   </hints>
  </connection>
  <connection>
   <sender>buttonBox</sender>
   <signal>rejected()</signal>
   <receiver>EditSupplier</receiver>
   <slot>onCancelButtonClicked()</slot>
   <hints>
    <hint type="sourcelabel">
     <x>316</x>
     <y>260</y>
    </hint>
    <hint type="destinationlabel">
     <x>286</x>
     <y>274</y>
    </hint>
   </hints>
  </connection>
 </connections>
</ui>

mercurial