Skip to content

Commit

Permalink
license textbox
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahZarei committed May 17, 2020
1 parent 9540f20 commit bc5d0dc
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 36 deletions.
Binary file modified database.db
Binary file not shown.
4 changes: 4 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def __init__(self):
self.ui.btnSetting6.clicked.connect(self.stackExitApp)
self.ui.btnSetting4.clicked.connect(self.stackAddOpetator)
self.ui.btnSetting7.clicked.connect(self.stackHelp)
self.ui.btnSetting8.clicked.connect(self.stackLicense)
try:
self.ui.btnMotorOn.clicked.connect(self.motor.on)
self.ui.btnMotorOff.clicked.connect(self.motor.off)
Expand Down Expand Up @@ -527,6 +528,9 @@ def stackHelp(self):
self.ui.StackSetting.setCurrentWidget(self.ui.pageSettingHelp)
self.ui.lbl_version.setText(DEVICE_VERSION.format(self.deviceVersion))
self.ui.lbl_version.show()

def stackLicense(self):
self.ui.StackSetting.setCurrentWidget(self.ui.pageSettingLicense)

def stackCharity(self):
self.ui.Stack.setCurrentWidget(self.ui.pageCharity)
Expand Down
132 changes: 96 additions & 36 deletions main.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1908,6 +1908,38 @@ color: rgb(0, 0, 0);</string>
</item>
</layout>
</widget>
<widget class="QWidget" name="pageSettingLicense">
<layout class="QVBoxLayout" name="verticalLayout_25">
<property name="bottomMargin">
<number>200</number>
</property>
<item alignment="Qt::AlignHCenter|Qt::AlignTop">
<widget class="QLabel" name="lblLicense">
<property name="styleSheet">
<string notr="true">font: 22pt &quot;IRANSans&quot;;
font: 22pt &quot;IRANSansFaNum&quot;;
color: #000000;</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter|Qt::AlignTop">
<widget class="QLineEdit" name="tbLicense">
<property name="styleSheet">
<string notr="true">background-color: #ffffff;
padding: 3px;
border: 2px solid #28a745;
border-radius: 6px;
font: 26pt &quot;IRANSansFaNum&quot;;
color:#000000;
</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
Expand Down Expand Up @@ -1935,13 +1967,13 @@ color: rgb(0, 0, 0);</string>
<rect>
<x>0</x>
<y>0</y>
<width>524</width>
<height>436</height>
<width>531</width>
<height>542</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="1">
<widget class="QPushButton" name="btnSetting1">
<item row="3" column="1">
<widget class="QPushButton" name="btnSetting8">
<property name="minimumSize">
<size>
<width>250</width>
Expand All @@ -1964,34 +1996,40 @@ border-style: inset;
}</string>
</property>
<property name="text">
<string>حالت دستگاه</string>
<string>لایسنس</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QPushButton" name="btnSettingStart">
<item row="2" column="3">
<widget class="QPushButton" name="btnSetting5">
<property name="minimumSize">
<size>
<width>250</width>
<height>100</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: #003cbd;
<string notr="true">QPushButton{
background-color: #28a745;
color: rgb(255, 255, 255);
font: 24pt &quot;IRANSans&quot;;
padding: 3px;
border: none;
border-radius: 6px;
outline-style: none;</string>
outline-style: none;
}
QPushButton:pressed {
background-color: #145222;
border-style: inset;
}</string>
</property>
<property name="text">
<string>شروع برنامه</string>
<string>نوار نقاله</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="btnSetting2">
<item row="0" column="1">
<widget class="QPushButton" name="btnSetting1">
<property name="minimumSize">
<size>
<width>250</width>
Expand All @@ -2014,12 +2052,34 @@ border-style: inset;
}</string>
</property>
<property name="text">
<string>موتور</string>
<string>حالت دستگاه</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="btnSetting6">
<item row="0" column="3">
<widget class="QPushButton" name="btnSettingStart">
<property name="minimumSize">
<size>
<width>250</width>
<height>100</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: #003cbd;
color: rgb(255, 255, 255);
font: 24pt &quot;IRANSans&quot;;
padding: 3px;
border: none;
border-radius: 6px;
outline-style: none;</string>
</property>
<property name="text">
<string>شروع برنامه</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="btnSetting4">
<property name="minimumSize">
<size>
<width>250</width>
Expand All @@ -2028,7 +2088,7 @@ border-style: inset;
</property>
<property name="styleSheet">
<string notr="true">QPushButton{
background-color: #FF0022;
background-color: #28a745;
color: rgb(255, 255, 255);
font: 24pt &quot;IRANSans&quot;;
padding: 3px;
Expand All @@ -2037,17 +2097,17 @@ border-radius: 6px;
outline-style: none;
}
QPushButton:pressed {
background-color: #800011;
background-color: #145222;
border-style: inset;
}</string>
</property>
<property name="text">
<string>خروج از برنامه</string>
<string>افزودن اپراتور</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="btnSetting3">
<item row="1" column="1">
<widget class="QPushButton" name="btnSetting2">
<property name="minimumSize">
<size>
<width>250</width>
Expand All @@ -2070,12 +2130,12 @@ border-style: inset;
}</string>
</property>
<property name="text">
<string>سنسور</string>
<string>موتور</string>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QPushButton" name="btnSetting7">
<item row="4" column="3">
<widget class="QPushButton" name="btnSetting6">
<property name="minimumSize">
<size>
<width>250</width>
Expand All @@ -2084,7 +2144,7 @@ border-style: inset;
</property>
<property name="styleSheet">
<string notr="true">QPushButton{
background-color: #28a745;
background-color: #FF0022;
color: rgb(255, 255, 255);
font: 24pt &quot;IRANSans&quot;;
padding: 3px;
Expand All @@ -2093,17 +2153,17 @@ border-radius: 6px;
outline-style: none;
}
QPushButton:pressed {
background-color: #145222;
background-color: #800011;
border-style: inset;
}</string>
</property>
<property name="text">
<string>راهنمای برنامه</string>
<string>خروج از برنامه</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QPushButton" name="btnSetting5">
<item row="1" column="3">
<widget class="QPushButton" name="btnSetting3">
<property name="minimumSize">
<size>
<width>250</width>
Expand All @@ -2126,12 +2186,12 @@ border-style: inset;
}</string>
</property>
<property name="text">
<string>نوار نقاله</string>
<string>سنسور</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="btnSetting4">
<item row="3" column="3">
<widget class="QPushButton" name="btnSetting7">
<property name="minimumSize">
<size>
<width>250</width>
Expand All @@ -2154,7 +2214,7 @@ border-style: inset;
}</string>
</property>
<property name="text">
<string>افزودن اپراتور</string>
<string>راهنمای برنامه</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -2519,8 +2579,8 @@ border-style: inset;
<rect>
<x>0</x>
<y>0</y>
<width>381</width>
<height>16</height>
<width>398</width>
<height>28</height>
</rect>
</property>
<property name="maximumSize">
Expand Down Expand Up @@ -3073,8 +3133,8 @@ border-style: inset;
<rect>
<x>0</x>
<y>0</y>
<width>381</width>
<height>16</height>
<width>398</width>
<height>28</height>
</rect>
</property>
</widget>
Expand Down

0 comments on commit bc5d0dc

Please sign in to comment.