[
  {
    "path": "Chapter01/callCheckBox1.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog\r\nfrom PyQt5.QtWidgets import QApplication, QWidget, QPushButton\r\nfrom PyQt5.QtCore import pyqtSlot\r\nfrom demoCheckBox1 import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.checkBoxCheese.stateChanged.connect(self.dispAmount)\r\n        self.ui.checkBoxOlives.stateChanged.connect(self.dispAmount)\r\n        self.ui.checkBoxSausages.stateChanged.connect(self.dispAmount)\r\n        self.show()\r\n\r\n    @pyqtSlot()\r\n    def dispAmount(self):\r\n        amount=10\r\n        if self.ui.checkBoxCheese.isChecked()==True:\r\n            amount=amount+1\r\n        if self.ui.checkBoxOlives.isChecked()==True:\r\n            amount=amount+1\r\n        if self.ui.checkBoxSausages.isChecked()==True:\r\n            amount=amount+2\r\n        self.ui.labelAmount.setText(\"Total amount for pizza is \"+str(amount))\r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter01/callCheckBox2.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog\r\nfrom PyQt5.QtWidgets import QApplication, QWidget, QPushButton\r\nfrom PyQt5.QtCore import pyqtSlot\r\nfrom demoCheckBox2 import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.checkBoxChoclateAlmond.stateChanged.connect(self.dispAmount)\r\n        self.ui.checkBoxChoclateChips.stateChanged.connect(self.dispAmount)\r\n        self.ui.checkBoxCookieDough.stateChanged.connect(self.dispAmount)\r\n        self.ui.checkBoxRockyRoad.stateChanged.connect(self.dispAmount)\r\n        self.ui.checkBoxCoffee.stateChanged.connect(self.dispAmount)\r\n        self.ui.checkBoxSoda.stateChanged.connect(self.dispAmount)\r\n        self.ui.checkBoxTea.stateChanged.connect(self.dispAmount)\r\n\r\n        self.show()\r\n\r\n    @pyqtSlot()\r\n    def dispAmount(self):\r\n        amount=0\r\n        if self.ui.checkBoxChoclateAlmond.isChecked()==True:\r\n            amount=amount+3\r\n        if self.ui.checkBoxChoclateChips.isChecked()==True:\r\n            amount=amount+4\r\n        if self.ui.checkBoxCookieDough.isChecked()==True:\r\n            amount=amount+2\r\n        if self.ui.checkBoxRockyRoad.isChecked()==True:\r\n            amount=amount+5\r\n        if self.ui.checkBoxCoffee.isChecked()==True:\r\n            amount=amount+2\r\n        if self.ui.checkBoxSoda.isChecked()==True:\r\n            amount=amount+3\r\n        if self.ui.checkBoxTea.isChecked()==True:\r\n            amount=amount+1\r\n        self.ui.labelAmount.setText(\"Total amount is $\"+str(amount))\r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter01/callLineEdit.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoLineEdit import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.ButtonClickMe.clicked.connect(self.dispmessage)\r\n        self.show()\r\n\r\n    def dispmessage(self):\r\n        self.ui.labelResponse.setText(\"Hello \"+self.ui.lineEditName.text())\r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter01/callRadioButton1.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoRadioButton1 import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.radioButtonFirstClass.toggled.connect(self.dispFare)\r\n        self.ui.radioButtonBusinessClass.toggled.connect(self.dispFare)\r\n        self.ui.radioButtonEconomyClass.toggled.connect(self.dispFare)\r\n        self.show()\r\n\r\n    def dispFare(self):\r\n        fare=0\r\n        if self.ui.radioButtonFirstClass.isChecked()==True:\r\n            fare=150\r\n        if self.ui.radioButtonBusinessClass.isChecked()==True:\r\n            fare=125\r\n        if self.ui.radioButtonEconomyClass.isChecked()==True:\r\n            fare=100\r\n        self.ui.labelFare.setText(\"Air Fare is \"+str(fare))\r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter01/callRadioButton2.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoRadioButton2 import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.radioButtonMedium.toggled.connect(self.dispSelected)\r\n        self.ui.radioButtonLarge.toggled.connect(self.dispSelected)\r\n        self.ui.radioButtonXL.toggled.connect(self.dispSelected)\r\n        self.ui.radioButtonXXL.toggled.connect(self.dispSelected)\r\n        self.ui.radioButtonDebitCard.toggled.connect(self.dispSelected)\r\n        self.ui.radioButtonNetBanking.toggled.connect(self.dispSelected)\r\n        self.ui.radioButtonCashOnDelivery.toggled.connect(self.dispSelected)\r\n        self.show()\r\n\r\n    def dispSelected(self):\r\n        selected1=\"\";\r\n        selected2=\"\"\r\n        if self.ui.radioButtonMedium.isChecked()==True:\r\n            selected1=\"Medium\"\r\n        if self.ui.radioButtonLarge.isChecked()==True:\r\n            selected1=\"Large\"\r\n        if self.ui.radioButtonXL.isChecked()==True:\r\n            selected1=\"Extra Large\"\r\n        if self.ui.radioButtonXXL.isChecked()==True:\r\n            selected1=\"Extra Extra Large\"\r\n        if self.ui.radioButtonDebitCard.isChecked()==True:\r\n            selected2=\"Debit/Credit Card\"\r\n        if self.ui.radioButtonNetBanking.isChecked()==True:\r\n            selected2=\"NetBanking\"\r\n        if self.ui.radioButtonCashOnDelivery.isChecked()==True:\r\n            selected2=\"Cash On Delivery\"\r\n        self.ui.labelSelected.setText(\"Chosen shirt size is \"+selected1+\" and payment method as \" + selected2)\r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter01/demoCheckBox1.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoCheckBox1.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(503, 272)\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(130, 0, 221, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.label_2 = QtWidgets.QLabel(Dialog)\r\n        self.label_2.setGeometry(QtCore.QRect(20, 50, 251, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.label_2.setFont(font)\r\n        self.label_2.setObjectName(\"label_2\")\r\n        self.checkBoxCheese = QtWidgets.QCheckBox(Dialog)\r\n        self.checkBoxCheese.setGeometry(QtCore.QRect(270, 60, 191, 17))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.checkBoxCheese.setFont(font)\r\n        self.checkBoxCheese.setObjectName(\"checkBoxCheese\")\r\n        self.checkBoxOlives = QtWidgets.QCheckBox(Dialog)\r\n        self.checkBoxOlives.setGeometry(QtCore.QRect(270, 90, 241, 21))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.checkBoxOlives.setFont(font)\r\n        self.checkBoxOlives.setObjectName(\"checkBoxOlives\")\r\n        self.checkBoxSausages = QtWidgets.QCheckBox(Dialog)\r\n        self.checkBoxSausages.setGeometry(QtCore.QRect(270, 120, 231, 17))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.checkBoxSausages.setFont(font)\r\n        self.checkBoxSausages.setObjectName(\"checkBoxSausages\")\r\n        self.labelAmount = QtWidgets.QLabel(Dialog)\r\n        self.labelAmount.setGeometry(QtCore.QRect(50, 190, 371, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.labelAmount.setFont(font)\r\n        self.labelAmount.setObjectName(\"labelAmount\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Regular Pizza   $10\"))\r\n        self.label_2.setText(_translate(\"Dialog\", \"Select your extra toppings\"))\r\n        self.checkBoxCheese.setText(_translate(\"Dialog\", \"Extra Cheese   $1\"))\r\n        self.checkBoxOlives.setText(_translate(\"Dialog\", \"Extra Olives $1\"))\r\n        self.checkBoxSausages.setText(_translate(\"Dialog\", \"Extra Sausages $2\"))\r\n        self.labelAmount.setText(_translate(\"Dialog\", \"TextLabel\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter01/demoCheckBox2.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoCheckbox2.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(646, 537)\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(250, 0, 71, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.label_2 = QtWidgets.QLabel(Dialog)\r\n        self.label_2.setGeometry(QtCore.QRect(20, 80, 181, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.label_2.setFont(font)\r\n        self.label_2.setObjectName(\"label_2\")\r\n        self.labelDrinks = QtWidgets.QLabel(Dialog)\r\n        self.labelDrinks.setGeometry(QtCore.QRect(40, 290, 151, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.labelDrinks.setFont(font)\r\n        self.labelDrinks.setObjectName(\"labelDrinks\")\r\n        self.groupBoxIceCreams = QtWidgets.QGroupBox(Dialog)\r\n        self.groupBoxIceCreams.setGeometry(QtCore.QRect(230, 60, 241, 181))\r\n        self.groupBoxIceCreams.setCheckable(True)\r\n        self.groupBoxIceCreams.setObjectName(\"groupBoxIceCreams\")\r\n        self.layoutWidget = QtWidgets.QWidget(self.groupBoxIceCreams)\r\n        self.layoutWidget.setGeometry(QtCore.QRect(10, 30, 221, 62))\r\n        self.layoutWidget.setObjectName(\"layoutWidget\")\r\n        self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.layoutWidget)\r\n        self.verticalLayout_3.setContentsMargins(0, 0, 0, 0)\r\n        self.verticalLayout_3.setObjectName(\"verticalLayout_3\")\r\n        self.checkBoxChoclateChips = QtWidgets.QCheckBox(self.layoutWidget)\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.checkBoxChoclateChips.setFont(font)\r\n        self.checkBoxChoclateChips.setObjectName(\"checkBoxChoclateChips\")\r\n        self.verticalLayout_3.addWidget(self.checkBoxChoclateChips)\r\n        self.checkBoxCookieDough = QtWidgets.QCheckBox(self.layoutWidget)\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.checkBoxCookieDough.setFont(font)\r\n        self.checkBoxCookieDough.setObjectName(\"checkBoxCookieDough\")\r\n        self.verticalLayout_3.addWidget(self.checkBoxCookieDough)\r\n        self.layoutWidget1 = QtWidgets.QWidget(self.groupBoxIceCreams)\r\n        self.layoutWidget1.setGeometry(QtCore.QRect(10, 100, 213, 62))\r\n        self.layoutWidget1.setObjectName(\"layoutWidget1\")\r\n        self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.layoutWidget1)\r\n        self.verticalLayout_4.setContentsMargins(0, 0, 0, 0)\r\n        self.verticalLayout_4.setObjectName(\"verticalLayout_4\")\r\n        self.checkBoxChoclateAlmond = QtWidgets.QCheckBox(self.layoutWidget1)\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.checkBoxChoclateAlmond.setFont(font)\r\n        self.checkBoxChoclateAlmond.setObjectName(\"checkBoxChoclateAlmond\")\r\n        self.verticalLayout_4.addWidget(self.checkBoxChoclateAlmond)\r\n        self.checkBoxRockyRoad = QtWidgets.QCheckBox(self.layoutWidget1)\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.checkBoxRockyRoad.setFont(font)\r\n        self.checkBoxRockyRoad.setObjectName(\"checkBoxRockyRoad\")\r\n        self.verticalLayout_4.addWidget(self.checkBoxRockyRoad)\r\n        self.groupBoxDrinks = QtWidgets.QGroupBox(Dialog)\r\n        self.groupBoxDrinks.setGeometry(QtCore.QRect(230, 280, 181, 151))\r\n        self.groupBoxDrinks.setCheckable(True)\r\n        self.groupBoxDrinks.setObjectName(\"groupBoxDrinks\")\r\n        self.layoutWidget2 = QtWidgets.QWidget(self.groupBoxDrinks)\r\n        self.layoutWidget2.setGeometry(QtCore.QRect(10, 30, 110, 95))\r\n        self.layoutWidget2.setObjectName(\"layoutWidget2\")\r\n        self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget2)\r\n        self.verticalLayout.setContentsMargins(0, 0, 0, 0)\r\n        self.verticalLayout.setObjectName(\"verticalLayout\")\r\n        self.checkBoxCoffee = QtWidgets.QCheckBox(self.layoutWidget2)\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.checkBoxCoffee.setFont(font)\r\n        self.checkBoxCoffee.setObjectName(\"checkBoxCoffee\")\r\n        self.verticalLayout.addWidget(self.checkBoxCoffee)\r\n        self.checkBoxSoda = QtWidgets.QCheckBox(self.layoutWidget2)\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.checkBoxSoda.setFont(font)\r\n        self.checkBoxSoda.setObjectName(\"checkBoxSoda\")\r\n        self.verticalLayout.addWidget(self.checkBoxSoda)\r\n        self.checkBoxTea = QtWidgets.QCheckBox(self.layoutWidget2)\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.checkBoxTea.setFont(font)\r\n        self.checkBoxTea.setObjectName(\"checkBoxTea\")\r\n        self.verticalLayout.addWidget(self.checkBoxTea)\r\n        self.labelAmount = QtWidgets.QLabel(Dialog)\r\n        self.labelAmount.setGeometry(QtCore.QRect(60, 450, 541, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.labelAmount.setFont(font)\r\n        self.labelAmount.setText(\"\")\r\n        self.labelAmount.setObjectName(\"labelAmount\")\r\n        self.groupBoxIceCreams.raise_()\r\n        self.groupBoxDrinks.raise_()\r\n        self.label.raise_()\r\n        self.label_2.raise_()\r\n        self.labelDrinks.raise_()\r\n        self.labelAmount.raise_()\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Menu\"))\r\n        self.label_2.setText(_translate(\"Dialog\", \"Select your IceCream\"))\r\n        self.labelDrinks.setText(_translate(\"Dialog\", \"Select your drink\"))\r\n        self.groupBoxIceCreams.setTitle(_translate(\"Dialog\", \"IceCreams\"))\r\n        self.checkBoxChoclateChips.setText(_translate(\"Dialog\", \"Mint Choclate Chips $4\"))\r\n        self.checkBoxCookieDough.setText(_translate(\"Dialog\", \"Cookie Dough $2\"))\r\n        self.checkBoxChoclateAlmond.setText(_translate(\"Dialog\", \"Chocolate Almond   $3\"))\r\n        self.checkBoxRockyRoad.setText(_translate(\"Dialog\", \"Rocky Road $5\"))\r\n        self.groupBoxDrinks.setTitle(_translate(\"Dialog\", \"Drinks\"))\r\n        self.checkBoxCoffee.setText(_translate(\"Dialog\", \"Coffee $2\"))\r\n        self.checkBoxSoda.setText(_translate(\"Dialog\", \"Soda $3\"))\r\n        self.checkBoxTea.setText(_translate(\"Dialog\", \"Tea $1\"))\r\n\r\n"
  },
  {
    "path": "Chapter01/demoCheckbox1.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>503</width>\r\n    <height>272</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>130</x>\r\n     <y>0</y>\r\n     <width>221</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Regular Pizza   $10</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_2\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>50</y>\r\n     <width>251</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Select your extra toppings</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QCheckBox\" name=\"checkBoxCheese\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>270</x>\r\n     <y>60</y>\r\n     <width>191</width>\r\n     <height>17</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Extra Cheese   $1</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QCheckBox\" name=\"checkBoxOlives\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>270</x>\r\n     <y>90</y>\r\n     <width>241</width>\r\n     <height>21</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Extra Olives $1</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QCheckBox\" name=\"checkBoxSausages\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>270</x>\r\n     <y>120</y>\r\n     <width>231</width>\r\n     <height>17</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Extra Sausages $2</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"labelAmount\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>50</x>\r\n     <y>190</y>\r\n     <width>371</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>TextLabel</string>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter01/demoCheckbox2.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>646</width>\r\n    <height>537</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>250</x>\r\n     <y>0</y>\r\n     <width>71</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Menu</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_2\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>80</y>\r\n     <width>181</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Select your IceCream</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"labelDrinks\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>40</x>\r\n     <y>290</y>\r\n     <width>151</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Select your drink</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QGroupBox\" name=\"groupBoxIceCreams\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>230</x>\r\n     <y>60</y>\r\n     <width>241</width>\r\n     <height>181</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"title\">\r\n    <string>IceCreams</string>\r\n   </property>\r\n   <property name=\"checkable\">\r\n    <bool>true</bool>\r\n   </property>\r\n   <widget class=\"QWidget\" name=\"layoutWidget\">\r\n    <property name=\"geometry\">\r\n     <rect>\r\n      <x>10</x>\r\n      <y>30</y>\r\n      <width>221</width>\r\n      <height>62</height>\r\n     </rect>\r\n    </property>\r\n    <layout class=\"QVBoxLayout\" name=\"verticalLayout_3\">\r\n     <item>\r\n      <widget class=\"QCheckBox\" name=\"checkBoxChoclateChips\">\r\n       <property name=\"font\">\r\n        <font>\r\n         <pointsize>14</pointsize>\r\n        </font>\r\n       </property>\r\n       <property name=\"text\">\r\n        <string>Mint Choclate Chips $4</string>\r\n       </property>\r\n      </widget>\r\n     </item>\r\n     <item>\r\n      <widget class=\"QCheckBox\" name=\"checkBoxCookieDough\">\r\n       <property name=\"font\">\r\n        <font>\r\n         <pointsize>14</pointsize>\r\n        </font>\r\n       </property>\r\n       <property name=\"text\">\r\n        <string>Cookie Dough $2</string>\r\n       </property>\r\n      </widget>\r\n     </item>\r\n    </layout>\r\n   </widget>\r\n   <widget class=\"QWidget\" name=\"layoutWidget\">\r\n    <property name=\"geometry\">\r\n     <rect>\r\n      <x>10</x>\r\n      <y>100</y>\r\n      <width>213</width>\r\n      <height>62</height>\r\n     </rect>\r\n    </property>\r\n    <layout class=\"QVBoxLayout\" name=\"verticalLayout_4\">\r\n     <item>\r\n      <widget class=\"QCheckBox\" name=\"checkBoxChoclateAlmond\">\r\n       <property name=\"font\">\r\n        <font>\r\n         <pointsize>14</pointsize>\r\n        </font>\r\n       </property>\r\n       <property name=\"text\">\r\n        <string>Chocolate Almond   $3</string>\r\n       </property>\r\n      </widget>\r\n     </item>\r\n     <item>\r\n      <widget class=\"QCheckBox\" name=\"checkBoxRockyRoad\">\r\n       <property name=\"font\">\r\n        <font>\r\n         <pointsize>14</pointsize>\r\n        </font>\r\n       </property>\r\n       <property name=\"text\">\r\n        <string>Rocky Road $5</string>\r\n       </property>\r\n      </widget>\r\n     </item>\r\n    </layout>\r\n   </widget>\r\n  </widget>\r\n  <widget class=\"QGroupBox\" name=\"groupBoxDrinks\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>230</x>\r\n     <y>280</y>\r\n     <width>181</width>\r\n     <height>151</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"title\">\r\n    <string>Drinks</string>\r\n   </property>\r\n   <property name=\"checkable\">\r\n    <bool>true</bool>\r\n   </property>\r\n   <widget class=\"QWidget\" name=\"layoutWidget\">\r\n    <property name=\"geometry\">\r\n     <rect>\r\n      <x>10</x>\r\n      <y>30</y>\r\n      <width>110</width>\r\n      <height>95</height>\r\n     </rect>\r\n    </property>\r\n    <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\r\n     <item>\r\n      <widget class=\"QCheckBox\" name=\"checkBoxCoffee\">\r\n       <property name=\"font\">\r\n        <font>\r\n         <pointsize>14</pointsize>\r\n        </font>\r\n       </property>\r\n       <property name=\"text\">\r\n        <string>Coffee $2</string>\r\n       </property>\r\n      </widget>\r\n     </item>\r\n     <item>\r\n      <widget class=\"QCheckBox\" name=\"checkBoxSoda\">\r\n       <property name=\"font\">\r\n        <font>\r\n         <pointsize>14</pointsize>\r\n        </font>\r\n       </property>\r\n       <property name=\"text\">\r\n        <string>Soda $3</string>\r\n       </property>\r\n      </widget>\r\n     </item>\r\n     <item>\r\n      <widget class=\"QCheckBox\" name=\"checkBoxTea\">\r\n       <property name=\"font\">\r\n        <font>\r\n         <pointsize>14</pointsize>\r\n        </font>\r\n       </property>\r\n       <property name=\"text\">\r\n        <string>Tea $1</string>\r\n       </property>\r\n      </widget>\r\n     </item>\r\n    </layout>\r\n   </widget>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"labelAmount\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>60</x>\r\n     <y>450</y>\r\n     <width>541</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string/>\r\n   </property>\r\n  </widget>\r\n  <zorder>groupBoxIceCreams</zorder>\r\n  <zorder>groupBoxDrinks</zorder>\r\n  <zorder>label</zorder>\r\n  <zorder>label_2</zorder>\r\n  <zorder>labelDrinks</zorder>\r\n  <zorder>labelAmount</zorder>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter01/demoLineEdit.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoLineEdit.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(379, 195)\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(6, 40, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.labelResponse = QtWidgets.QLabel(Dialog)\r\n        self.labelResponse.setGeometry(QtCore.QRect(40, 90, 271, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.labelResponse.setFont(font)\r\n        self.labelResponse.setObjectName(\"labelResponse\")\r\n        self.lineEditName = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditName.setGeometry(QtCore.QRect(140, 40, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditName.setFont(font)\r\n        self.lineEditName.setObjectName(\"lineEditName\")\r\n        self.ButtonClickMe = QtWidgets.QPushButton(Dialog)\r\n        self.ButtonClickMe.setGeometry(QtCore.QRect(160, 130, 101, 23))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.ButtonClickMe.setFont(font)\r\n        self.ButtonClickMe.setObjectName(\"ButtonClickMe\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Enter your name\"))\r\n        self.labelResponse.setText(_translate(\"Dialog\", \"TextLabel\"))\r\n        self.ButtonClickMe.setText(_translate(\"Dialog\", \"Click\"))\r\n\r\n"
  },
  {
    "path": "Chapter01/demoLineEdit.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>379</width>\r\n    <height>195</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>6</x>\r\n     <y>40</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Enter your name</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"labelResponse\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>40</x>\r\n     <y>90</y>\r\n     <width>271</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>TextLabel</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditName\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>40</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"ButtonClickMe\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>160</x>\r\n     <y>130</y>\r\n     <width>101</width>\r\n     <height>23</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Click</string>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter01/demoRadioButton1.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoRadioButton1.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(470, 290)\r\n        self.radioButtonBusinessClass = QtWidgets.QRadioButton(Dialog)\r\n        self.radioButtonBusinessClass.setGeometry(QtCore.QRect(30, 130, 251, 17))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.radioButtonBusinessClass.setFont(font)\r\n        self.radioButtonBusinessClass.setObjectName(\"radioButtonBusinessClass\")\r\n        self.radioButtonEconomyClass = QtWidgets.QRadioButton(Dialog)\r\n        self.radioButtonEconomyClass.setGeometry(QtCore.QRect(30, 180, 221, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.radioButtonEconomyClass.setFont(font)\r\n        self.radioButtonEconomyClass.setObjectName(\"radioButtonEconomyClass\")\r\n        self.radioButtonFirstClass = QtWidgets.QRadioButton(Dialog)\r\n        self.radioButtonFirstClass.setGeometry(QtCore.QRect(30, 80, 201, 17))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.radioButtonFirstClass.setFont(font)\r\n        self.radioButtonFirstClass.setObjectName(\"radioButtonFirstClass\")\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(80, 10, 261, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.labelFare = QtWidgets.QLabel(Dialog)\r\n        self.labelFare.setGeometry(QtCore.QRect(40, 245, 391, 21))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.labelFare.setFont(font)\r\n        self.labelFare.setText(\"\")\r\n        self.labelFare.setObjectName(\"labelFare\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.radioButtonBusinessClass.setText(_translate(\"Dialog\", \"Business Class $125\"))\r\n        self.radioButtonEconomyClass.setText(_translate(\"Dialog\", \"Economy Class $100\"))\r\n        self.radioButtonFirstClass.setText(_translate(\"Dialog\", \"First Class   $150\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Choose the flight type\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter01/demoRadioButton1.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>470</width>\r\n    <height>290</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QRadioButton\" name=\"radioButtonBusinessClass\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>30</x>\r\n     <y>130</y>\r\n     <width>251</width>\r\n     <height>17</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Business Class $125</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QRadioButton\" name=\"radioButtonEconomyClass\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>30</x>\r\n     <y>180</y>\r\n     <width>221</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Economy Class $100</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QRadioButton\" name=\"radioButtonFirstClass\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>30</x>\r\n     <y>80</y>\r\n     <width>201</width>\r\n     <height>17</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>First Class   $150</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>80</x>\r\n     <y>10</y>\r\n     <width>261</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Choose the flight type</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"labelFare\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>40</x>\r\n     <y>245</y>\r\n     <width>391</width>\r\n     <height>21</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string/>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter01/demoRadioButton2.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoRadioButton2.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(730, 452)\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(100, 10, 221, 21))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.label_2 = QtWidgets.QLabel(Dialog)\r\n        self.label_2.setGeometry(QtCore.QRect(100, 210, 261, 41))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.label_2.setFont(font)\r\n        self.label_2.setObjectName(\"label_2\")\r\n        self.labelSelected = QtWidgets.QLabel(Dialog)\r\n        self.labelSelected.setGeometry(QtCore.QRect(20, 380, 691, 41))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.labelSelected.setFont(font)\r\n        self.labelSelected.setText(\"\")\r\n        self.labelSelected.setObjectName(\"labelSelected\")\r\n        self.layoutWidget = QtWidgets.QWidget(Dialog)\r\n        self.layoutWidget.setGeometry(QtCore.QRect(100, 50, 56, 128))\r\n        self.layoutWidget.setObjectName(\"layoutWidget\")\r\n        self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget)\r\n        self.verticalLayout.setContentsMargins(0, 0, 0, 0)\r\n        self.verticalLayout.setObjectName(\"verticalLayout\")\r\n        self.radioButtonMedium = QtWidgets.QRadioButton(self.layoutWidget)\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.radioButtonMedium.setFont(font)\r\n        self.radioButtonMedium.setObjectName(\"radioButtonMedium\")\r\n        self.verticalLayout.addWidget(self.radioButtonMedium)\r\n        self.radioButtonLarge = QtWidgets.QRadioButton(self.layoutWidget)\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.radioButtonLarge.setFont(font)\r\n        self.radioButtonLarge.setObjectName(\"radioButtonLarge\")\r\n        self.verticalLayout.addWidget(self.radioButtonLarge)\r\n        self.radioButtonXL = QtWidgets.QRadioButton(self.layoutWidget)\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.radioButtonXL.setFont(font)\r\n        self.radioButtonXL.setObjectName(\"radioButtonXL\")\r\n        self.verticalLayout.addWidget(self.radioButtonXL)\r\n        self.radioButtonXXL = QtWidgets.QRadioButton(self.layoutWidget)\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.radioButtonXXL.setFont(font)\r\n        self.radioButtonXXL.setObjectName(\"radioButtonXXL\")\r\n        self.verticalLayout.addWidget(self.radioButtonXXL)\r\n        self.layoutWidget1 = QtWidgets.QWidget(Dialog)\r\n        self.layoutWidget1.setGeometry(QtCore.QRect(100, 260, 170, 95))\r\n        self.layoutWidget1.setObjectName(\"layoutWidget1\")\r\n        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.layoutWidget1)\r\n        self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)\r\n        self.verticalLayout_2.setObjectName(\"verticalLayout_2\")\r\n        self.radioButtonDebitCard = QtWidgets.QRadioButton(self.layoutWidget1)\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.radioButtonDebitCard.setFont(font)\r\n        self.radioButtonDebitCard.setObjectName(\"radioButtonDebitCard\")\r\n        self.verticalLayout_2.addWidget(self.radioButtonDebitCard)\r\n        self.radioButtonNetBanking = QtWidgets.QRadioButton(self.layoutWidget1)\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.radioButtonNetBanking.setFont(font)\r\n        self.radioButtonNetBanking.setObjectName(\"radioButtonNetBanking\")\r\n        self.verticalLayout_2.addWidget(self.radioButtonNetBanking)\r\n        self.radioButtonCashOnDelivery = QtWidgets.QRadioButton(self.layoutWidget1)\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.radioButtonCashOnDelivery.setFont(font)\r\n        self.radioButtonCashOnDelivery.setObjectName(\"radioButtonCashOnDelivery\")\r\n        self.verticalLayout_2.addWidget(self.radioButtonCashOnDelivery)\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Choose your Shirt Size\"))\r\n        self.label_2.setText(_translate(\"Dialog\", \"Choose your payment method\"))\r\n        self.radioButtonMedium.setText(_translate(\"Dialog\", \"M\"))\r\n        self.radioButtonLarge.setText(_translate(\"Dialog\", \"L\"))\r\n        self.radioButtonXL.setText(_translate(\"Dialog\", \"XL\"))\r\n        self.radioButtonXXL.setText(_translate(\"Dialog\", \"XXL\"))\r\n        self.radioButtonDebitCard.setText(_translate(\"Dialog\", \"Debit/Credit Card\"))\r\n        self.radioButtonNetBanking.setText(_translate(\"Dialog\", \"NetBanking\"))\r\n        self.radioButtonCashOnDelivery.setText(_translate(\"Dialog\", \"Cash On Delivery\"))\r\n\r\n"
  },
  {
    "path": "Chapter01/demoRadioButton2.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>730</width>\r\n    <height>452</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>100</x>\r\n     <y>10</y>\r\n     <width>221</width>\r\n     <height>21</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Choose your Shirt Size</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_2\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>100</x>\r\n     <y>210</y>\r\n     <width>261</width>\r\n     <height>41</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Choose your payment method</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"labelSelected\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>380</y>\r\n     <width>691</width>\r\n     <height>41</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string/>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QWidget\" name=\"layoutWidget\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>100</x>\r\n     <y>50</y>\r\n     <width>56</width>\r\n     <height>128</height>\r\n    </rect>\r\n   </property>\r\n   <layout class=\"QVBoxLayout\" name=\"verticalLayout\">\r\n    <item>\r\n     <widget class=\"QRadioButton\" name=\"radioButtonMedium\">\r\n      <property name=\"font\">\r\n       <font>\r\n        <pointsize>14</pointsize>\r\n       </font>\r\n      </property>\r\n      <property name=\"text\">\r\n       <string>M</string>\r\n      </property>\r\n     </widget>\r\n    </item>\r\n    <item>\r\n     <widget class=\"QRadioButton\" name=\"radioButtonLarge\">\r\n      <property name=\"font\">\r\n       <font>\r\n        <pointsize>14</pointsize>\r\n       </font>\r\n      </property>\r\n      <property name=\"text\">\r\n       <string>L</string>\r\n      </property>\r\n     </widget>\r\n    </item>\r\n    <item>\r\n     <widget class=\"QRadioButton\" name=\"radioButtonXL\">\r\n      <property name=\"font\">\r\n       <font>\r\n        <pointsize>14</pointsize>\r\n       </font>\r\n      </property>\r\n      <property name=\"text\">\r\n       <string>XL</string>\r\n      </property>\r\n     </widget>\r\n    </item>\r\n    <item>\r\n     <widget class=\"QRadioButton\" name=\"radioButtonXXL\">\r\n      <property name=\"font\">\r\n       <font>\r\n        <pointsize>14</pointsize>\r\n       </font>\r\n      </property>\r\n      <property name=\"text\">\r\n       <string>XXL</string>\r\n      </property>\r\n     </widget>\r\n    </item>\r\n   </layout>\r\n  </widget>\r\n  <widget class=\"QWidget\" name=\"layoutWidget\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>100</x>\r\n     <y>260</y>\r\n     <width>170</width>\r\n     <height>95</height>\r\n    </rect>\r\n   </property>\r\n   <layout class=\"QVBoxLayout\" name=\"verticalLayout_2\">\r\n    <item>\r\n     <widget class=\"QRadioButton\" name=\"radioButtonDebitCard\">\r\n      <property name=\"font\">\r\n       <font>\r\n        <pointsize>14</pointsize>\r\n       </font>\r\n      </property>\r\n      <property name=\"text\">\r\n       <string>Debit/Credit Card</string>\r\n      </property>\r\n     </widget>\r\n    </item>\r\n    <item>\r\n     <widget class=\"QRadioButton\" name=\"radioButtonNetBanking\">\r\n      <property name=\"font\">\r\n       <font>\r\n        <pointsize>14</pointsize>\r\n       </font>\r\n      </property>\r\n      <property name=\"text\">\r\n       <string>NetBanking</string>\r\n      </property>\r\n     </widget>\r\n    </item>\r\n    <item>\r\n     <widget class=\"QRadioButton\" name=\"radioButtonCashOnDelivery\">\r\n      <property name=\"font\">\r\n       <font>\r\n        <pointsize>14</pointsize>\r\n       </font>\r\n      </property>\r\n      <property name=\"text\">\r\n       <string>Cash On Delivery</string>\r\n      </property>\r\n     </widget>\r\n    </item>\r\n   </layout>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter02/callCalculator.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoCalculator import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.pushButtonPlus.clicked.connect(self.addtwonum)\r\n        self.ui.pushButtonSubtract.clicked.connect(self.subtracttwonum)\r\n        self.ui.pushButtonMultiply.clicked.connect(self.multiplytwonum)\r\n        self.ui.pushButtonDivide.clicked.connect(self.dividetwonum)\r\n        self.show()\r\n\r\n    def addtwonum(self):\r\n        if len(self.ui.lineEditFirstNumber.text())!=0:\r\n            a=int(self.ui.lineEditFirstNumber.text())\r\n        else:\r\n            a=0\r\n        if len(self.ui.lineEditSecondNumber.text())!=0:\r\n            b=int(self.ui.lineEditSecondNumber.text())\r\n        else:\r\n            b=0\r\n        sum=a+b\r\n        self.ui.labelResult.setText(\"Addition: \" +str(sum))\r\n\r\n    def subtracttwonum(self):\r\n        if len(self.ui.lineEditFirstNumber.text())!=0:\r\n            a=int(self.ui.lineEditFirstNumber.text())\r\n        else:\r\n            a=0\r\n        if len(self.ui.lineEditSecondNumber.text())!=0:\r\n            b=int(self.ui.lineEditSecondNumber.text())\r\n        else:\r\n            b=0\r\n        diff=a-b\r\n        self.ui.labelResult.setText(\"Substraction: \" +str(diff))\r\n        \r\n    def multiplytwonum(self):\r\n        if len(self.ui.lineEditFirstNumber.text())!=0:\r\n            a=int(self.ui.lineEditFirstNumber.text())\r\n        else:\r\n            a=0\r\n        if len(self.ui.lineEditSecondNumber.text())!=0:\r\n            b=int(self.ui.lineEditSecondNumber.text())\r\n        else:\r\n            b=0\r\n        mult=a*b\r\n        self.ui.labelResult.setText(\"Multiplication: \" +str(mult))\r\n        \r\n    def dividetwonum(self):\r\n        if len(self.ui.lineEditFirstNumber.text())!=0:\r\n            a=int(self.ui.lineEditFirstNumber.text())\r\n        else:\r\n            a=0\r\n        if len(self.ui.lineEditSecondNumber.text())!=0:\r\n            b=int(self.ui.lineEditSecondNumber.text())\r\n        else:\r\n            b=0\r\n        division=a/b\r\n        self.ui.labelResult.setText(\"Division: \" +str(round(division,2)))\r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter02/callComboBox.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoComboBox import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.comboBoxAccountType.currentIndexChanged.connect(self.dispAccountType)\r\n        self.show()\r\n\r\n    def dispAccountType(self):\r\n        self.ui.labelAccountType.setText(\"You have selected \"+self.ui.comboBoxAccountType.itemText(self.ui.comboBoxAccountType.currentIndex()))\r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter02/callFontComboBox.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoFontComboBox import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        myFont=QtGui.QFont(self.ui.fontComboBox.itemText(self.ui.fontComboBox.currentIndex()),15)\r\n        self.ui.textEdit.setFont(myFont)\r\n        self.ui.fontComboBox.currentFontChanged.connect(self.changeFont)\r\n        self.show()\r\n\r\n    def changeFont(self):\r\n        myFont=QtGui.QFont(self.ui.fontComboBox.itemText(self.ui.fontComboBox.currentIndex()),15)\r\n        self.ui.textEdit.setFont(myFont)\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter02/callListWidget1.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoListWidget1 import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.listWidgetDiagnosis.itemClicked.connect(self.dispSelectedTest)\r\n        self.show()\r\n\r\n    def dispSelectedTest(self):\r\n        self.ui.labelTest.setText(\"You have selected \"+self.ui.listWidgetDiagnosis.currentItem().text())\r\n         \r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter02/callListWidget2.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoListWidget2 import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.listWidgetDiagnosis.itemSelectionChanged.connect(self.dispSelectedTest)\r\n        self.show()\r\n\r\n    def dispSelectedTest(self):\r\n        self.ui.listWidgetSelectedTests.clear()\r\n        items = self.ui.listWidgetDiagnosis.selectedItems()\r\n        x=[]\r\n        for i in list(items):\r\n            self.ui.listWidgetSelectedTests.addItem(i.text())\r\n            x.append(str(i.text()))\r\n        \r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter02/callListWidget3.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoListWidget3 import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.pushButtonAdd.clicked.connect(self.addlist)\r\n        self.show()\r\n\r\n    def addlist(self):\r\n        self.ui.listWidgetSelectedItems.addItem(self.ui.lineEditFoodItem.text())\r\n        self.ui.lineEditFoodItem.setText('')\r\n        self.ui.lineEditFoodItem.setFocus()\r\n        \r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter02/callListWidgetOp.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication, QInputDialog, QListWidgetItem\r\n\r\nfrom demoListWidgetOp import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.listWidget.addItem('Ice Cream')\r\n        self.ui.listWidget.addItem('Soda')\r\n        self.ui.listWidget.addItem('Coffee')\r\n        self.ui.listWidget.addItem('Chocolate')\r\n        self.ui.pushButtonAdd.clicked.connect(self.addlist)\r\n        self.ui.pushButtonEdit.clicked.connect(self.editlist)\r\n        self.ui.pushButtonDelete.clicked.connect(self.delitem)\r\n        self.ui.pushButtonDeleteAll.clicked.connect(self.delallitems)\r\n        self.show()\r\n\r\n    def addlist(self):\r\n        self.ui.listWidget.addItem(self.ui.lineEdit.text())\r\n        self.ui.lineEdit.setText('')\r\n        self.ui.lineEdit.setFocus()\r\n        \r\n    def editlist(self):\r\n        row=self.ui.listWidget.currentRow()\r\n        newtext, ok=QInputDialog.getText(self, \"Enter new text\", \"Enter new text\")\r\n        if ok and (len(newtext) !=0):\r\n            self.ui.listWidget.takeItem(self.ui.listWidget.currentRow())\r\n            self.ui.listWidget.insertItem(row,QListWidgetItem(newtext))\r\n        \r\n    def delitem(self):\r\n        self.ui.listWidget.takeItem(self.ui.listWidget.currentRow())\r\n       \r\n    def delallitems(self):\r\n        self.ui.listWidget.clear()\r\n\r\n        \r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter02/callProgressBar.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoProgressBar import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.pushButtonStart.clicked.connect(self.updateBar)\r\n        self.show()\r\n\r\n    def updateBar(self):\r\n        x = 0\r\n        while x < 100:\r\n            x += 0.0001\r\n            self.ui.progressBar.setValue(x)\r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter02/callScrollBar.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoScrollBar import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.horizontalScrollBarSugarLevel.valueChanged.connect(self.scrollhorizontal)\r\n        self.ui.verticalScrollBarPulseRate.valueChanged.connect(self.scrollvertical)\r\n        self.ui.horizontalSliderBloodPressure.valueChanged.connect(self.sliderhorizontal)\r\n        self.ui.verticalSliderCholestrolLevel.valueChanged.connect(self.slidervertical)\r\n        self.show()\r\n\r\n    def scrollhorizontal(self,value):    \r\n        self.ui.lineEditResult.setText(\"Sugar Level : \"+str(value))\r\n\r\n    def scrollvertical(self, value):    \r\n        self.ui.lineEditResult.setText(\"Pulse Rate : \"+str(value))\r\n\r\n    def sliderhorizontal(self, value):    \r\n        self.ui.lineEditResult.setText(\"Blood Pressure : \"+str(value))\r\n        \r\n    def slidervertical(self, value):    \r\n        self.ui.lineEditResult.setText(\"Cholestrol Level : \"+str(value))\r\n      \r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter02/calldemoSignalSlot1.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoSignalSlot1 import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.show()\r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter02/calldemoSpinner.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoSpinBox import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.spinBoxBookQty.editingFinished.connect(self.result1)\r\n        self.ui.doubleSpinBoxSugarWeight.editingFinished.connect(self.result2)\r\n        self.show()\r\n\r\n    def result1(self):\r\n        if len(self.ui.lineEditBookPrice.text())!=0:\r\n            bookPrice=int(self.ui.lineEditBookPrice.text())\r\n        else:\r\n            bookPrice=0\r\n        totalBookAmount=self.ui.spinBoxBookQty.value() * bookPrice\r\n        self.ui.lineEditBookAmount.setText(str(totalBookAmount))\r\n        \r\n    def result2(self):\r\n        if len(self.ui.lineEditSugarPrice.text())!=0:\r\n            sugarPrice=float(self.ui.lineEditSugarPrice.text())\r\n        else:\r\n            sugarPrice=0\r\n        totalSugarAmount=self.ui.doubleSpinBoxSugarWeight.value() * sugarPrice\r\n        self.ui.lineEditSugarAmount.setText(str(round(totalSugarAmount,2)))\r\n        totalBookAmount=int(self.ui.lineEditBookAmount.text())\r\n        totalAmount=totalBookAmount+totalSugarAmount\r\n        self.ui.labelTotalAmount.setText(str(round(totalAmount,2)))     \r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter02/demoCalculator.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoCalculator.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(427, 269)\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(10, 30, 161, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.label_2 = QtWidgets.QLabel(Dialog)\r\n        self.label_2.setGeometry(QtCore.QRect(10, 80, 151, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.label_2.setFont(font)\r\n        self.label_2.setObjectName(\"label_2\")\r\n        self.lineEditFirstNumber = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditFirstNumber.setGeometry(QtCore.QRect(180, 30, 181, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.lineEditFirstNumber.setFont(font)\r\n        self.lineEditFirstNumber.setObjectName(\"lineEditFirstNumber\")\r\n        self.lineEditSecondNumber = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditSecondNumber.setGeometry(QtCore.QRect(180, 80, 181, 21))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.lineEditSecondNumber.setFont(font)\r\n        self.lineEditSecondNumber.setObjectName(\"lineEditSecondNumber\")\r\n        self.pushButtonPlus = QtWidgets.QPushButton(Dialog)\r\n        self.pushButtonPlus.setGeometry(QtCore.QRect(20, 150, 71, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.pushButtonPlus.setFont(font)\r\n        self.pushButtonPlus.setObjectName(\"pushButtonPlus\")\r\n        self.pushButtonSubtract = QtWidgets.QPushButton(Dialog)\r\n        self.pushButtonSubtract.setGeometry(QtCore.QRect(120, 150, 75, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.pushButtonSubtract.setFont(font)\r\n        self.pushButtonSubtract.setObjectName(\"pushButtonSubtract\")\r\n        self.pushButtonMultiply = QtWidgets.QPushButton(Dialog)\r\n        self.pushButtonMultiply.setGeometry(QtCore.QRect(220, 150, 81, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.pushButtonMultiply.setFont(font)\r\n        self.pushButtonMultiply.setObjectName(\"pushButtonMultiply\")\r\n        self.pushButtonDivide = QtWidgets.QPushButton(Dialog)\r\n        self.pushButtonDivide.setGeometry(QtCore.QRect(330, 150, 75, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.pushButtonDivide.setFont(font)\r\n        self.pushButtonDivide.setObjectName(\"pushButtonDivide\")\r\n        self.labelResult = QtWidgets.QLabel(Dialog)\r\n        self.labelResult.setGeometry(QtCore.QRect(30, 210, 351, 16))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.labelResult.setFont(font)\r\n        self.labelResult.setText(\"\")\r\n        self.labelResult.setObjectName(\"labelResult\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Enter first number\"))\r\n        self.label_2.setText(_translate(\"Dialog\", \"Enter second number\"))\r\n        self.pushButtonPlus.setText(_translate(\"Dialog\", \"+\"))\r\n        self.pushButtonSubtract.setText(_translate(\"Dialog\", \"-\"))\r\n        self.pushButtonMultiply.setText(_translate(\"Dialog\", \"X\"))\r\n        self.pushButtonDivide.setText(_translate(\"Dialog\", \"/\"))\r\n\r\n"
  },
  {
    "path": "Chapter02/demoCalculator.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>427</width>\r\n    <height>269</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>10</x>\r\n     <y>30</y>\r\n     <width>161</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Enter first number</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_2\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>10</x>\r\n     <y>80</y>\r\n     <width>151</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Enter second number</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditFirstNumber\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>180</x>\r\n     <y>30</y>\r\n     <width>181</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditSecondNumber\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>180</x>\r\n     <y>80</y>\r\n     <width>181</width>\r\n     <height>21</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"pushButtonPlus\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>150</y>\r\n     <width>71</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>+</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"pushButtonSubtract\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>120</x>\r\n     <y>150</y>\r\n     <width>75</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>-</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"pushButtonMultiply\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>220</x>\r\n     <y>150</y>\r\n     <width>81</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>X</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"pushButtonDivide\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>330</x>\r\n     <y>150</y>\r\n     <width>75</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>/</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"labelResult\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>30</x>\r\n     <y>210</y>\r\n     <width>351</width>\r\n     <height>16</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string/>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter02/demoComboBox.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoComboBox.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(674, 200)\r\n        self.comboBoxAccountType = QtWidgets.QComboBox(Dialog)\r\n        self.comboBoxAccountType.setGeometry(QtCore.QRect(260, 40, 361, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.comboBoxAccountType.setFont(font)\r\n        self.comboBoxAccountType.setObjectName(\"comboBoxAccountType\")\r\n        self.comboBoxAccountType.addItem(\"\")\r\n        self.comboBoxAccountType.addItem(\"\")\r\n        self.comboBoxAccountType.addItem(\"\")\r\n        self.comboBoxAccountType.addItem(\"\")\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(20, 40, 231, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.labelAccountType = QtWidgets.QLabel(Dialog)\r\n        self.labelAccountType.setGeometry(QtCore.QRect(40, 110, 581, 41))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.labelAccountType.setFont(font)\r\n        self.labelAccountType.setText(\"\")\r\n        self.labelAccountType.setObjectName(\"labelAccountType\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.comboBoxAccountType.setItemText(0, _translate(\"Dialog\", \"Saving Account\"))\r\n        self.comboBoxAccountType.setItemText(1, _translate(\"Dialog\", \"Current Account\"))\r\n        self.comboBoxAccountType.setItemText(2, _translate(\"Dialog\", \"Recurring Deposit Account\"))\r\n        self.comboBoxAccountType.setItemText(3, _translate(\"Dialog\", \"Fixed Deposit Account\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Select your account type\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter02/demoComboBox.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>674</width>\r\n    <height>200</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QComboBox\" name=\"comboBoxAccountType\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>260</x>\r\n     <y>40</y>\r\n     <width>361</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <item>\r\n    <property name=\"text\">\r\n     <string>Saving Account</string>\r\n    </property>\r\n   </item>\r\n   <item>\r\n    <property name=\"text\">\r\n     <string>Current Account</string>\r\n    </property>\r\n   </item>\r\n   <item>\r\n    <property name=\"text\">\r\n     <string>Recurring Deposit Account</string>\r\n    </property>\r\n   </item>\r\n   <item>\r\n    <property name=\"text\">\r\n     <string>Fixed Deposit Account</string>\r\n    </property>\r\n   </item>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>40</y>\r\n     <width>231</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Select your account type</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"labelAccountType\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>40</x>\r\n     <y>110</y>\r\n     <width>581</width>\r\n     <height>41</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string/>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter02/demoFontComboBox.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoFontComboBox.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(560, 228)\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(20, 20, 231, 41))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.labelTextLine = QtWidgets.QLabel(Dialog)\r\n        self.labelTextLine.setGeometry(QtCore.QRect(20, 60, 161, 41))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.labelTextLine.setFont(font)\r\n        self.labelTextLine.setObjectName(\"labelTextLine\")\r\n        self.fontComboBox = QtWidgets.QFontComboBox(Dialog)\r\n        self.fontComboBox.setGeometry(QtCore.QRect(200, 20, 321, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.fontComboBox.setFont(font)\r\n        self.fontComboBox.setObjectName(\"fontComboBox\")\r\n        self.textEdit = QtWidgets.QTextEdit(Dialog)\r\n        self.textEdit.setGeometry(QtCore.QRect(200, 70, 321, 121))\r\n        self.textEdit.setObjectName(\"textEdit\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Select desired font\"))\r\n        self.labelTextLine.setText(_translate(\"Dialog\", \"Type some text\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter02/demoFontComboBox.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>552</width>\r\n    <height>228</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>20</y>\r\n     <width>231</width>\r\n     <height>41</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Select desired font</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"labelTextLine\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>60</y>\r\n     <width>161</width>\r\n     <height>41</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Type some text</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QFontComboBox\" name=\"fontComboBox\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>200</x>\r\n     <y>20</y>\r\n     <width>321</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QTextEdit\" name=\"textEdit\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>200</x>\r\n     <y>70</y>\r\n     <width>321</width>\r\n     <height>121</height>\r\n    </rect>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter02/demoListWidget1.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoListWidget1.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(686, 287)\r\n        self.listWidgetDiagnosis = QtWidgets.QListWidget(Dialog)\r\n        self.listWidgetDiagnosis.setGeometry(QtCore.QRect(280, 20, 351, 171))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.listWidgetDiagnosis.setFont(font)\r\n        self.listWidgetDiagnosis.setObjectName(\"listWidgetDiagnosis\")\r\n        item = QtWidgets.QListWidgetItem()\r\n        self.listWidgetDiagnosis.addItem(item)\r\n        item = QtWidgets.QListWidgetItem()\r\n        self.listWidgetDiagnosis.addItem(item)\r\n        item = QtWidgets.QListWidgetItem()\r\n        self.listWidgetDiagnosis.addItem(item)\r\n        item = QtWidgets.QListWidgetItem()\r\n        self.listWidgetDiagnosis.addItem(item)\r\n        item = QtWidgets.QListWidgetItem()\r\n        self.listWidgetDiagnosis.addItem(item)\r\n        self.labelTest = QtWidgets.QLabel(Dialog)\r\n        self.labelTest.setGeometry(QtCore.QRect(40, 230, 621, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.labelTest.setFont(font)\r\n        self.labelTest.setText(\"\")\r\n        self.labelTest.setObjectName(\"labelTest\")\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(30, 10, 241, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        __sortingEnabled = self.listWidgetDiagnosis.isSortingEnabled()\r\n        self.listWidgetDiagnosis.setSortingEnabled(False)\r\n        item = self.listWidgetDiagnosis.item(0)\r\n        item.setText(_translate(\"Dialog\", \"Urine Analaysis   $5\"))\r\n        item = self.listWidgetDiagnosis.item(1)\r\n        item.setText(_translate(\"Dialog\", \"Chest X Ray 100$\"))\r\n        item = self.listWidgetDiagnosis.item(2)\r\n        item.setText(_translate(\"Dialog\", \"Sugar Level test  $3\"))\r\n        item = self.listWidgetDiagnosis.item(3)\r\n        item.setText(_translate(\"Dialog\", \"Hemoglobin test  $7\"))\r\n        item = self.listWidgetDiagnosis.item(4)\r\n        item.setText(_translate(\"Dialog\", \"Thyroid Stimulating Harmone test   $10\"))\r\n        self.listWidgetDiagnosis.setSortingEnabled(__sortingEnabled)\r\n        self.label.setText(_translate(\"Dialog\", \"Choose the Diagnosis Tests\"))\r\n\r\n"
  },
  {
    "path": "Chapter02/demoListWidget1.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>686</width>\r\n    <height>287</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QListWidget\" name=\"listWidgetDiagnosis\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>280</x>\r\n     <y>20</y>\r\n     <width>351</width>\r\n     <height>171</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <item>\r\n    <property name=\"text\">\r\n     <string>Urine Analaysis   $5</string>\r\n    </property>\r\n   </item>\r\n   <item>\r\n    <property name=\"text\">\r\n     <string>Chest X Ray 100$</string>\r\n    </property>\r\n   </item>\r\n   <item>\r\n    <property name=\"text\">\r\n     <string>Sugar Level test  $3</string>\r\n    </property>\r\n   </item>\r\n   <item>\r\n    <property name=\"text\">\r\n     <string>Hemoglobin test  $7</string>\r\n    </property>\r\n   </item>\r\n   <item>\r\n    <property name=\"text\">\r\n     <string>Thyroid Stimulating Harmone test   $10</string>\r\n    </property>\r\n   </item>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"labelTest\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>40</x>\r\n     <y>230</y>\r\n     <width>621</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string/>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>30</x>\r\n     <y>10</y>\r\n     <width>241</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Choose the Diagnosis Tests</string>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter02/demoListWidget2.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoListWidget2.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(729, 412)\r\n        self.listWidgetDiagnosis = QtWidgets.QListWidget(Dialog)\r\n        self.listWidgetDiagnosis.setGeometry(QtCore.QRect(200, 20, 351, 171))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.listWidgetDiagnosis.setFont(font)\r\n        self.listWidgetDiagnosis.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)\r\n        self.listWidgetDiagnosis.setObjectName(\"listWidgetDiagnosis\")\r\n        item = QtWidgets.QListWidgetItem()\r\n        self.listWidgetDiagnosis.addItem(item)\r\n        item = QtWidgets.QListWidgetItem()\r\n        self.listWidgetDiagnosis.addItem(item)\r\n        item = QtWidgets.QListWidgetItem()\r\n        self.listWidgetDiagnosis.addItem(item)\r\n        item = QtWidgets.QListWidgetItem()\r\n        self.listWidgetDiagnosis.addItem(item)\r\n        item = QtWidgets.QListWidgetItem()\r\n        self.listWidgetDiagnosis.addItem(item)\r\n        self.labelTest = QtWidgets.QLabel(Dialog)\r\n        self.labelTest.setGeometry(QtCore.QRect(20, 230, 171, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.labelTest.setFont(font)\r\n        self.labelTest.setObjectName(\"labelTest\")\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(30, 10, 151, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.listWidgetSelectedTests = QtWidgets.QListWidget(Dialog)\r\n        self.listWidgetSelectedTests.setGeometry(QtCore.QRect(200, 220, 351, 192))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(14)\r\n        self.listWidgetSelectedTests.setFont(font)\r\n        self.listWidgetSelectedTests.setObjectName(\"listWidgetSelectedTests\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        __sortingEnabled = self.listWidgetDiagnosis.isSortingEnabled()\r\n        self.listWidgetDiagnosis.setSortingEnabled(False)\r\n        item = self.listWidgetDiagnosis.item(0)\r\n        item.setText(_translate(\"Dialog\", \"Urine Analaysis   $5\"))\r\n        item = self.listWidgetDiagnosis.item(1)\r\n        item.setText(_translate(\"Dialog\", \"Chest X Ray 100$\"))\r\n        item = self.listWidgetDiagnosis.item(2)\r\n        item.setText(_translate(\"Dialog\", \"Sugar Level test  $3\"))\r\n        item = self.listWidgetDiagnosis.item(3)\r\n        item.setText(_translate(\"Dialog\", \"Hemoglobin test  $7\"))\r\n        item = self.listWidgetDiagnosis.item(4)\r\n        item.setText(_translate(\"Dialog\", \"Thyroid Stimulating Harmone test   $10\"))\r\n        self.listWidgetDiagnosis.setSortingEnabled(__sortingEnabled)\r\n        self.labelTest.setText(_translate(\"Dialog\", \"Selected tests are\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Diagnosis Tests\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter02/demoListWidget2.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>729</width>\r\n    <height>412</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QListWidget\" name=\"listWidgetDiagnosis\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>200</x>\r\n     <y>20</y>\r\n     <width>351</width>\r\n     <height>171</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"selectionMode\">\r\n    <enum>QAbstractItemView::MultiSelection</enum>\r\n   </property>\r\n   <item>\r\n    <property name=\"text\">\r\n     <string>Urine Analaysis   $5</string>\r\n    </property>\r\n   </item>\r\n   <item>\r\n    <property name=\"text\">\r\n     <string>Chest X Ray 100$</string>\r\n    </property>\r\n   </item>\r\n   <item>\r\n    <property name=\"text\">\r\n     <string>Sugar Level test  $3</string>\r\n    </property>\r\n   </item>\r\n   <item>\r\n    <property name=\"text\">\r\n     <string>Hemoglobin test  $7</string>\r\n    </property>\r\n   </item>\r\n   <item>\r\n    <property name=\"text\">\r\n     <string>Thyroid Stimulating Harmone test   $10</string>\r\n    </property>\r\n   </item>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"labelTest\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>230</y>\r\n     <width>171</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Selected tests are</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>30</x>\r\n     <y>10</y>\r\n     <width>151</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Diagnosis Tests</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QListWidget\" name=\"listWidgetSelectedTests\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>200</x>\r\n     <y>220</y>\r\n     <width>351</width>\r\n     <height>192</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>14</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter02/demoListWidget3.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoListWidget3.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(734, 270)\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(20, 20, 191, 16))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.lineEditFoodItem = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditFoodItem.setGeometry(QtCore.QRect(210, 20, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.lineEditFoodItem.setFont(font)\r\n        self.lineEditFoodItem.setObjectName(\"lineEditFoodItem\")\r\n        self.pushButtonAdd = QtWidgets.QPushButton(Dialog)\r\n        self.pushButtonAdd.setGeometry(QtCore.QRect(110, 72, 111, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.pushButtonAdd.setFont(font)\r\n        self.pushButtonAdd.setObjectName(\"pushButtonAdd\")\r\n        self.listWidgetSelectedItems = QtWidgets.QListWidget(Dialog)\r\n        self.listWidgetSelectedItems.setGeometry(QtCore.QRect(430, 20, 256, 221))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.listWidgetSelectedItems.setFont(font)\r\n        self.listWidgetSelectedItems.setObjectName(\"listWidgetSelectedItems\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Your favourite food item\"))\r\n        self.pushButtonAdd.setText(_translate(\"Dialog\", \"Add to List\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter02/demoListWidget3.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>734</width>\r\n    <height>270</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>20</y>\r\n     <width>191</width>\r\n     <height>16</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Your favourite food item</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditFoodItem\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>210</x>\r\n     <y>20</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"pushButtonAdd\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>110</x>\r\n     <y>72</y>\r\n     <width>111</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Add to List</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QListWidget\" name=\"listWidgetSelectedItems\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>430</x>\r\n     <y>20</y>\r\n     <width>256</width>\r\n     <height>221</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter02/demoListWidgetOp.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoListWidgetOp.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(691, 260)\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(16, 30, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.lineEdit = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEdit.setGeometry(QtCore.QRect(130, 30, 191, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.lineEdit.setFont(font)\r\n        self.lineEdit.setObjectName(\"lineEdit\")\r\n        self.pushButtonAdd = QtWidgets.QPushButton(Dialog)\r\n        self.pushButtonAdd.setGeometry(QtCore.QRect(180, 80, 75, 23))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.pushButtonAdd.setFont(font)\r\n        self.pushButtonAdd.setObjectName(\"pushButtonAdd\")\r\n        self.listWidget = QtWidgets.QListWidget(Dialog)\r\n        self.listWidget.setGeometry(QtCore.QRect(380, 30, 256, 192))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.listWidget.setFont(font)\r\n        self.listWidget.setObjectName(\"listWidget\")\r\n        self.pushButtonDelete = QtWidgets.QPushButton(Dialog)\r\n        self.pushButtonDelete.setGeometry(QtCore.QRect(470, 230, 75, 23))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.pushButtonDelete.setFont(font)\r\n        self.pushButtonDelete.setObjectName(\"pushButtonDelete\")\r\n        self.pushButtonDeleteAll = QtWidgets.QPushButton(Dialog)\r\n        self.pushButtonDeleteAll.setGeometry(QtCore.QRect(560, 230, 75, 23))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.pushButtonDeleteAll.setFont(font)\r\n        self.pushButtonDeleteAll.setObjectName(\"pushButtonDeleteAll\")\r\n        self.pushButtonEdit = QtWidgets.QPushButton(Dialog)\r\n        self.pushButtonEdit.setGeometry(QtCore.QRect(380, 230, 75, 23))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.pushButtonEdit.setFont(font)\r\n        self.pushButtonEdit.setObjectName(\"pushButtonEdit\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Enter an item\"))\r\n        self.pushButtonAdd.setText(_translate(\"Dialog\", \"Add\"))\r\n        self.pushButtonDelete.setText(_translate(\"Dialog\", \"Delete\"))\r\n        self.pushButtonDeleteAll.setText(_translate(\"Dialog\", \"Delete All\"))\r\n        self.pushButtonEdit.setText(_translate(\"Dialog\", \"Edit\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter02/demoListWidgetOp.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>691</width>\r\n    <height>260</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>16</x>\r\n     <y>30</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Enter an item</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEdit\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>130</x>\r\n     <y>30</y>\r\n     <width>191</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"pushButtonAdd\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>180</x>\r\n     <y>80</y>\r\n     <width>75</width>\r\n     <height>23</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Add</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QListWidget\" name=\"listWidget\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>380</x>\r\n     <y>30</y>\r\n     <width>256</width>\r\n     <height>192</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"pushButtonDelete\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>470</x>\r\n     <y>230</y>\r\n     <width>75</width>\r\n     <height>23</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Delete</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"pushButtonDeleteAll\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>560</x>\r\n     <y>230</y>\r\n     <width>75</width>\r\n     <height>23</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Delete All</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"pushButtonEdit\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>380</x>\r\n     <y>230</y>\r\n     <width>75</width>\r\n     <height>23</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Edit</string>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter02/demoProgressBar.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoProgressBar.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(350, 153)\r\n        self.progressBar = QtWidgets.QProgressBar(Dialog)\r\n        self.progressBar.setGeometry(QtCore.QRect(40, 60, 281, 23))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.progressBar.setFont(font)\r\n        self.progressBar.setProperty(\"value\", 0)\r\n        self.progressBar.setObjectName(\"progressBar\")\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(80, 20, 181, 21))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.pushButtonStart = QtWidgets.QPushButton(Dialog)\r\n        self.pushButtonStart.setGeometry(QtCore.QRect(80, 110, 151, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.pushButtonStart.setFont(font)\r\n        self.pushButtonStart.setObjectName(\"pushButtonStart\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Downloading the file\"))\r\n        self.pushButtonStart.setText(_translate(\"Dialog\", \"Start Downloading\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter02/demoProgressBar.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>350</width>\r\n    <height>153</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QProgressBar\" name=\"progressBar\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>40</x>\r\n     <y>60</y>\r\n     <width>281</width>\r\n     <height>23</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"value\">\r\n    <number>0</number>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>80</x>\r\n     <y>20</y>\r\n     <width>181</width>\r\n     <height>21</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Downloading the file</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"pushButtonStart\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>80</x>\r\n     <y>110</y>\r\n     <width>151</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Start Downloading</string>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter02/demoScrollBar.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoScrollBar.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(538, 431)\r\n        self.horizontalScrollBarSugarLevel = QtWidgets.QScrollBar(Dialog)\r\n        self.horizontalScrollBarSugarLevel.setGeometry(QtCore.QRect(200, 30, 301, 21))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.horizontalScrollBarSugarLevel.setFont(font)\r\n        self.horizontalScrollBarSugarLevel.setOrientation(QtCore.Qt.Horizontal)\r\n        self.horizontalScrollBarSugarLevel.setObjectName(\"horizontalScrollBarSugarLevel\")\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(40, 30, 111, 21))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.label_2 = QtWidgets.QLabel(Dialog)\r\n        self.label_2.setGeometry(QtCore.QRect(40, 110, 141, 16))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.label_2.setFont(font)\r\n        self.label_2.setObjectName(\"label_2\")\r\n        self.verticalScrollBarPulseRate = QtWidgets.QScrollBar(Dialog)\r\n        self.verticalScrollBarPulseRate.setGeometry(QtCore.QRect(160, 110, 16, 160))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.verticalScrollBarPulseRate.setFont(font)\r\n        self.verticalScrollBarPulseRate.setOrientation(QtCore.Qt.Vertical)\r\n        self.verticalScrollBarPulseRate.setObjectName(\"verticalScrollBarPulseRate\")\r\n        self.label_3 = QtWidgets.QLabel(Dialog)\r\n        self.label_3.setGeometry(QtCore.QRect(40, 70, 151, 16))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.label_3.setFont(font)\r\n        self.label_3.setObjectName(\"label_3\")\r\n        self.horizontalSliderBloodPressure = QtWidgets.QSlider(Dialog)\r\n        self.horizontalSliderBloodPressure.setGeometry(QtCore.QRect(210, 70, 291, 22))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.horizontalSliderBloodPressure.setFont(font)\r\n        self.horizontalSliderBloodPressure.setOrientation(QtCore.Qt.Horizontal)\r\n        self.horizontalSliderBloodPressure.setObjectName(\"horizontalSliderBloodPressure\")\r\n        self.label_4 = QtWidgets.QLabel(Dialog)\r\n        self.label_4.setGeometry(QtCore.QRect(240, 110, 131, 16))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.label_4.setFont(font)\r\n        self.label_4.setObjectName(\"label_4\")\r\n        self.verticalSliderCholestrolLevel = QtWidgets.QSlider(Dialog)\r\n        self.verticalSliderCholestrolLevel.setGeometry(QtCore.QRect(410, 109, 22, 171))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.verticalSliderCholestrolLevel.setFont(font)\r\n        self.verticalSliderCholestrolLevel.setOrientation(QtCore.Qt.Vertical)\r\n        self.verticalSliderCholestrolLevel.setObjectName(\"verticalSliderCholestrolLevel\")\r\n        self.lineEditResult = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditResult.setGeometry(QtCore.QRect(60, 340, 391, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.lineEditResult.setFont(font)\r\n        self.lineEditResult.setObjectName(\"lineEditResult\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Sugar Level\"))\r\n        self.label_2.setText(_translate(\"Dialog\", \"Pulse rate\"))\r\n        self.label_3.setText(_translate(\"Dialog\", \"Blood Pressure\"))\r\n        self.label_4.setText(_translate(\"Dialog\", \"Cholestrol Level\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter02/demoScrollBar.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>538</width>\r\n    <height>431</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QScrollBar\" name=\"horizontalScrollBarSugarLevel\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>200</x>\r\n     <y>30</y>\r\n     <width>301</width>\r\n     <height>21</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"orientation\">\r\n    <enum>Qt::Horizontal</enum>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>40</x>\r\n     <y>30</y>\r\n     <width>111</width>\r\n     <height>21</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Sugar Level</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_2\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>40</x>\r\n     <y>110</y>\r\n     <width>141</width>\r\n     <height>16</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Pulse rate</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QScrollBar\" name=\"verticalScrollBarPulseRate\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>160</x>\r\n     <y>110</y>\r\n     <width>16</width>\r\n     <height>160</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"orientation\">\r\n    <enum>Qt::Vertical</enum>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_3\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>40</x>\r\n     <y>70</y>\r\n     <width>151</width>\r\n     <height>16</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Blood Pressure</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QSlider\" name=\"horizontalSliderBloodPressure\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>210</x>\r\n     <y>70</y>\r\n     <width>291</width>\r\n     <height>22</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"orientation\">\r\n    <enum>Qt::Horizontal</enum>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_4\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>240</x>\r\n     <y>110</y>\r\n     <width>131</width>\r\n     <height>16</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Cholestrol Level</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QSlider\" name=\"verticalSliderCholestrolLevel\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>410</x>\r\n     <y>109</y>\r\n     <width>22</width>\r\n     <height>171</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"orientation\">\r\n    <enum>Qt::Vertical</enum>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditResult\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>60</x>\r\n     <y>340</y>\r\n     <width>391</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter02/demoSignalSlot1.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoSignalSlot1.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(348, 453)\r\n        self.lineEdit = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEdit.setGeometry(QtCore.QRect(90, 50, 181, 20))\r\n        self.lineEdit.setObjectName(\"lineEdit\")\r\n        self.pushButton = QtWidgets.QPushButton(Dialog)\r\n        self.pushButton.setGeometry(QtCore.QRect(140, 160, 75, 23))\r\n        self.pushButton.setObjectName(\"pushButton\")\r\n        self.pushButton_2 = QtWidgets.QPushButton(Dialog)\r\n        self.pushButton_2.setGeometry(QtCore.QRect(140, 260, 75, 23))\r\n        self.pushButton_2.setObjectName(\"pushButton_2\")\r\n        self.lineEdit_2 = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEdit_2.setGeometry(QtCore.QRect(90, 390, 181, 20))\r\n        self.lineEdit_2.setObjectName(\"lineEdit_2\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        self.pushButton.pressed.connect(self.lineEdit.selectAll)\r\n        self.pushButton_2.clicked.connect(self.lineEdit_2.paste)\r\n        self.pushButton.released.connect(self.lineEdit.copy)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.pushButton.setText(_translate(\"Dialog\", \"Copy\"))\r\n        self.pushButton_2.setText(_translate(\"Dialog\", \"Paste\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter02/demoSignalSlot1.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>348</width>\r\n    <height>453</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QLineEdit\" name=\"lineEdit\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>90</x>\r\n     <y>50</y>\r\n     <width>181</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"pushButton\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>160</y>\r\n     <width>75</width>\r\n     <height>23</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Copy</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"pushButton_2\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>260</y>\r\n     <width>75</width>\r\n     <height>23</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Paste</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEdit_2\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>90</x>\r\n     <y>390</y>\r\n     <width>181</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections>\r\n  <connection>\r\n   <sender>pushButton</sender>\r\n   <signal>pressed()</signal>\r\n   <receiver>lineEdit</receiver>\r\n   <slot>selectAll()</slot>\r\n   <hints>\r\n    <hint type=\"sourcelabel\">\r\n     <x>175</x>\r\n     <y>181</y>\r\n    </hint>\r\n    <hint type=\"destinationlabel\">\r\n     <x>183</x>\r\n     <y>67</y>\r\n    </hint>\r\n   </hints>\r\n  </connection>\r\n  <connection>\r\n   <sender>pushButton_2</sender>\r\n   <signal>clicked()</signal>\r\n   <receiver>lineEdit_2</receiver>\r\n   <slot>paste()</slot>\r\n   <hints>\r\n    <hint type=\"sourcelabel\">\r\n     <x>174</x>\r\n     <y>277</y>\r\n    </hint>\r\n    <hint type=\"destinationlabel\">\r\n     <x>172</x>\r\n     <y>396</y>\r\n    </hint>\r\n   </hints>\r\n  </connection>\r\n  <connection>\r\n   <sender>pushButton</sender>\r\n   <signal>released()</signal>\r\n   <receiver>lineEdit</receiver>\r\n   <slot>copy()</slot>\r\n   <hints>\r\n    <hint type=\"sourcelabel\">\r\n     <x>150</x>\r\n     <y>169</y>\r\n    </hint>\r\n    <hint type=\"destinationlabel\">\r\n     <x>153</x>\r\n     <y>58</y>\r\n    </hint>\r\n   </hints>\r\n  </connection>\r\n </connections>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter02/demoSpinBox.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoSpinBox.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(580, 162)\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(16, 30, 81, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.lineEditBookPrice = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditBookPrice.setGeometry(QtCore.QRect(120, 30, 113, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.lineEditBookPrice.setFont(font)\r\n        self.lineEditBookPrice.setObjectName(\"lineEditBookPrice\")\r\n        self.spinBoxBookQty = QtWidgets.QSpinBox(Dialog)\r\n        self.spinBoxBookQty.setGeometry(QtCore.QRect(290, 30, 42, 22))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.spinBoxBookQty.setFont(font)\r\n        self.spinBoxBookQty.setObjectName(\"spinBoxBookQty\")\r\n        self.lineEditBookAmount = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditBookAmount.setGeometry(QtCore.QRect(390, 30, 113, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.lineEditBookAmount.setFont(font)\r\n        self.lineEditBookAmount.setObjectName(\"lineEditBookAmount\")\r\n        self.label_2 = QtWidgets.QLabel(Dialog)\r\n        self.label_2.setGeometry(QtCore.QRect(10, 70, 81, 21))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.label_2.setFont(font)\r\n        self.label_2.setObjectName(\"label_2\")\r\n        self.lineEditSugarPrice = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditSugarPrice.setGeometry(QtCore.QRect(120, 70, 113, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.lineEditSugarPrice.setFont(font)\r\n        self.lineEditSugarPrice.setObjectName(\"lineEditSugarPrice\")\r\n        self.doubleSpinBoxSugarWeight = QtWidgets.QDoubleSpinBox(Dialog)\r\n        self.doubleSpinBoxSugarWeight.setGeometry(QtCore.QRect(290, 70, 62, 22))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.doubleSpinBoxSugarWeight.setFont(font)\r\n        self.doubleSpinBoxSugarWeight.setObjectName(\"doubleSpinBoxSugarWeight\")\r\n        self.lineEditSugarAmount = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditSugarAmount.setGeometry(QtCore.QRect(390, 70, 113, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.lineEditSugarAmount.setFont(font)\r\n        self.lineEditSugarAmount.setObjectName(\"lineEditSugarAmount\")\r\n        self.labelTotalAmount = QtWidgets.QLabel(Dialog)\r\n        self.labelTotalAmount.setGeometry(QtCore.QRect(396, 120, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.labelTotalAmount.setFont(font)\r\n        self.labelTotalAmount.setObjectName(\"labelTotalAmount\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Book Price\"))\r\n        self.label_2.setText(_translate(\"Dialog\", \"Sugar Price\"))\r\n        self.labelTotalAmount.setText(_translate(\"Dialog\", \"TextLabel\"))\r\n\r\n"
  },
  {
    "path": "Chapter02/demoSpinBox.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>580</width>\r\n    <height>162</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>16</x>\r\n     <y>30</y>\r\n     <width>81</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Book Price</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditBookPrice\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>120</x>\r\n     <y>30</y>\r\n     <width>113</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QSpinBox\" name=\"spinBoxBookQty\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>290</x>\r\n     <y>30</y>\r\n     <width>42</width>\r\n     <height>22</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditBookAmount\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>390</x>\r\n     <y>30</y>\r\n     <width>113</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_2\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>10</x>\r\n     <y>70</y>\r\n     <width>81</width>\r\n     <height>21</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Sugar Price</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditSugarPrice\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>120</x>\r\n     <y>70</y>\r\n     <width>113</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QDoubleSpinBox\" name=\"doubleSpinBoxSugarWeight\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>290</x>\r\n     <y>70</y>\r\n     <width>62</width>\r\n     <height>22</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditSugarAmount\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>390</x>\r\n     <y>70</y>\r\n     <width>113</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"labelTotalAmount\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>396</x>\r\n     <y>120</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string/>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter03/DemoTableWidget.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>289</width>\r\n    <height>236</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QTableWidget\" name=\"tableWidget\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>30</x>\r\n     <y>20</y>\r\n     <width>221</width>\r\n     <height>191</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"rowCount\">\r\n    <number>4</number>\r\n   </property>\r\n   <property name=\"columnCount\">\r\n    <number>2</number>\r\n   </property>\r\n   <attribute name=\"horizontalHeaderMinimumSectionSize\">\r\n    <number>50</number>\r\n   </attribute>\r\n   <attribute name=\"horizontalHeaderStretchLastSection\">\r\n    <bool>false</bool>\r\n   </attribute>\r\n   <attribute name=\"verticalHeaderDefaultSectionSize\">\r\n    <number>40</number>\r\n   </attribute>\r\n   <attribute name=\"verticalHeaderStretchLastSection\">\r\n    <bool>false</bool>\r\n   </attribute>\r\n   <row/>\r\n   <row/>\r\n   <row/>\r\n   <row/>\r\n   <column/>\r\n   <column/>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter03/callCalendar.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoCalendar import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.calendarWidget.selectionChanged.connect(self.dispdate)\r\n        self.show()\r\n\r\n    def dispdate(self):\r\n        self.ui.dateEdit.setDisplayFormat('MMM d yyyy')\r\n        self.ui.dateEdit.setDate(self.ui.calendarWidget.selectedDate())\r\n\r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter03/callLCD.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoLCD import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        timer = QtCore.QTimer(self)\r\n        timer.timeout.connect(self.showlcd)\r\n        timer.start(1000)\r\n        self.showlcd()\r\n  \r\n    def showlcd(self):\r\n        time = QtCore.QTime.currentTime()\r\n        text = time.toString('hh:mm')\r\n        self.ui.lcdNumber.display(text)\r\n \r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter03/callTableWidget.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication,QTableWidgetItem\r\nfrom DemoTableWidget import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self,data):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.data=data\r\n        self.addcontent()\r\n\r\n    def addcontent(self):\r\n        row=0\r\n        for tup in self.data:\r\n            col=0\r\n            for item in tup:\r\n                oneitem=QTableWidgetItem(item)\r\n                self.ui.tableWidget.setItem(row, col, oneitem)\r\n                col+=1\r\n            row+=1\r\ndata=[]\r\ndata.append(('Suite', '40$'))\r\ndata.append(('Super Luxury', '30$'))\r\ndata.append(('Super Deluxe', '20$'))\r\ndata.append(('Ordinary', '10$'))\r\n\r\n                \r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm(data)\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter03/computeRoomRent.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom reservehotel import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.roomtypes=['Suite', 'Super Luxury', 'Super Deluxe', 'Ordinary']\r\n        self.addcontent()     \r\n        self.ui.pushButton.clicked.connect(self.computeRoomRent) \r\n        self.show()\r\n\r\n    def addcontent(self):\r\n        for i in self.roomtypes:\r\n          self.ui.comboBox.addItem(i)\r\n     \r\n    def computeRoomRent(self):\r\n        dateselected=self.ui.calendarWidget.selectedDate()\r\n        dateinstring=str(dateselected.toPyDate())\r\n        noOfDays=self.ui.spinBox.value()\r\n        chosenRoomType=self.ui.comboBox.itemText(self.ui.comboBox.currentIndex())\r\n        self.ui.Enteredinfo.setText('Date of reservation: '+dateinstring+ ', Number of days: '+ str(noOfDays) + ' \\nand Room type selected: '+ chosenRoomType)\r\n        roomRent=0\r\n        if chosenRoomType==\"Suite\":\r\n          roomRent=40\r\n        if chosenRoomType==\"Super Luxury\":\r\n          roomRent=30\r\n        if chosenRoomType==\"Super Deluxe\":\r\n          roomRent=20\r\n        if chosenRoomType==\"Ordinary\":\r\n          roomRent=10\r\n        total=roomRent*noOfDays\r\n        self.ui.RoomRentinfo.setText('Room Rent for single day for '+ chosenRoomType +' type is '+ str(roomRent)+ '$. \\nTotal room rent is '+ str(total)+ '$')  \r\n \r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter03/demoCalendar.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoCalendar.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(384, 300)\r\n        self.calendarWidget = QtWidgets.QCalendarWidget(Dialog)\r\n        self.calendarWidget.setGeometry(QtCore.QRect(40, 30, 312, 183))\r\n        self.calendarWidget.setObjectName(\"calendarWidget\")\r\n        self.dateEdit = QtWidgets.QDateEdit(Dialog)\r\n        self.dateEdit.setGeometry(QtCore.QRect(120, 250, 110, 22))\r\n        self.dateEdit.setObjectName(\"dateEdit\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter03/demoCalendar.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>384</width>\r\n    <height>300</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QCalendarWidget\" name=\"calendarWidget\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>40</x>\r\n     <y>30</y>\r\n     <width>312</width>\r\n     <height>183</height>\r\n    </rect>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QDateEdit\" name=\"dateEdit\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>120</x>\r\n     <y>250</y>\r\n     <width>110</width>\r\n     <height>22</height>\r\n    </rect>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter03/demoLCD.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoLCD.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(240, 135)\r\n        self.lcdNumber = QtWidgets.QLCDNumber(Dialog)\r\n        self.lcdNumber.setGeometry(QtCore.QRect(60, 40, 100, 40))\r\n        self.lcdNumber.setObjectName(\"lcdNumber\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter03/demoLCD.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>240</width>\r\n    <height>135</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QLCDNumber\" name=\"lcdNumber\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>60</x>\r\n     <y>40</y>\r\n     <width>100</width>\r\n     <height>40</height>\r\n    </rect>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter03/demoTabWidget.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoTabWidget.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(574, 300)\r\n        self.tabWidget = QtWidgets.QTabWidget(Dialog)\r\n        self.tabWidget.setGeometry(QtCore.QRect(10, 10, 481, 271))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.tabWidget.setFont(font)\r\n        self.tabWidget.setObjectName(\"tabWidget\")\r\n        self.tab = QtWidgets.QWidget()\r\n        self.tab.setObjectName(\"tab\")\r\n        self.checkBox = QtWidgets.QCheckBox(self.tab)\r\n        self.checkBox.setGeometry(QtCore.QRect(30, 30, 191, 17))\r\n        self.checkBox.setObjectName(\"checkBox\")\r\n        self.checkBox_2 = QtWidgets.QCheckBox(self.tab)\r\n        self.checkBox_2.setGeometry(QtCore.QRect(30, 70, 141, 17))\r\n        self.checkBox_2.setObjectName(\"checkBox_2\")\r\n        self.checkBox_3 = QtWidgets.QCheckBox(self.tab)\r\n        self.checkBox_3.setGeometry(QtCore.QRect(30, 110, 161, 17))\r\n        self.checkBox_3.setObjectName(\"checkBox_3\")\r\n        self.checkBox_4 = QtWidgets.QCheckBox(self.tab)\r\n        self.checkBox_4.setGeometry(QtCore.QRect(30, 150, 171, 17))\r\n        self.checkBox_4.setObjectName(\"checkBox_4\")\r\n        self.pushButton = QtWidgets.QPushButton(self.tab)\r\n        self.pushButton.setGeometry(QtCore.QRect(40, 190, 141, 23))\r\n        self.pushButton.setObjectName(\"pushButton\")\r\n        self.tabWidget.addTab(self.tab, \"\")\r\n        self.tab_2 = QtWidgets.QWidget()\r\n        self.tab_2.setObjectName(\"tab_2\")\r\n        self.radioButton = QtWidgets.QRadioButton(self.tab_2)\r\n        self.radioButton.setGeometry(QtCore.QRect(40, 30, 131, 17))\r\n        self.radioButton.setObjectName(\"radioButton\")\r\n        self.radioButton_2 = QtWidgets.QRadioButton(self.tab_2)\r\n        self.radioButton_2.setGeometry(QtCore.QRect(40, 80, 111, 17))\r\n        self.radioButton_2.setObjectName(\"radioButton_2\")\r\n        self.radioButton_3 = QtWidgets.QRadioButton(self.tab_2)\r\n        self.radioButton_3.setGeometry(QtCore.QRect(40, 130, 121, 21))\r\n        self.radioButton_3.setObjectName(\"radioButton_3\")\r\n        self.radioButton_4 = QtWidgets.QRadioButton(self.tab_2)\r\n        self.radioButton_4.setGeometry(QtCore.QRect(40, 180, 181, 21))\r\n        self.radioButton_4.setObjectName(\"radioButton_4\")\r\n        self.tabWidget.addTab(self.tab_2, \"\")\r\n        self.tab_3 = QtWidgets.QWidget()\r\n        self.tab_3.setObjectName(\"tab_3\")\r\n        self.lineEdit = QtWidgets.QLineEdit(self.tab_3)\r\n        self.lineEdit.setGeometry(QtCore.QRect(160, 10, 291, 20))\r\n        self.lineEdit.setObjectName(\"lineEdit\")\r\n        self.lineEdit_2 = QtWidgets.QLineEdit(self.tab_3)\r\n        self.lineEdit_2.setGeometry(QtCore.QRect(160, 50, 291, 20))\r\n        self.lineEdit_2.setObjectName(\"lineEdit_2\")\r\n        self.lineEdit_3 = QtWidgets.QLineEdit(self.tab_3)\r\n        self.lineEdit_3.setGeometry(QtCore.QRect(160, 90, 291, 20))\r\n        self.lineEdit_3.setObjectName(\"lineEdit_3\")\r\n        self.lineEdit_4 = QtWidgets.QLineEdit(self.tab_3)\r\n        self.lineEdit_4.setGeometry(QtCore.QRect(160, 130, 291, 20))\r\n        self.lineEdit_4.setObjectName(\"lineEdit_4\")\r\n        self.lineEdit_5 = QtWidgets.QLineEdit(self.tab_3)\r\n        self.lineEdit_5.setGeometry(QtCore.QRect(160, 170, 291, 20))\r\n        self.lineEdit_5.setObjectName(\"lineEdit_5\")\r\n        self.lineEdit_6 = QtWidgets.QLineEdit(self.tab_3)\r\n        self.lineEdit_6.setGeometry(QtCore.QRect(160, 210, 291, 20))\r\n        self.lineEdit_6.setObjectName(\"lineEdit_6\")\r\n        self.label = QtWidgets.QLabel(self.tab_3)\r\n        self.label.setGeometry(QtCore.QRect(10, 10, 91, 16))\r\n        self.label.setObjectName(\"label\")\r\n        self.label_2 = QtWidgets.QLabel(self.tab_3)\r\n        self.label_2.setGeometry(QtCore.QRect(10, 50, 71, 16))\r\n        self.label_2.setObjectName(\"label_2\")\r\n        self.label_3 = QtWidgets.QLabel(self.tab_3)\r\n        self.label_3.setGeometry(QtCore.QRect(10, 90, 47, 13))\r\n        self.label_3.setObjectName(\"label_3\")\r\n        self.label_4 = QtWidgets.QLabel(self.tab_3)\r\n        self.label_4.setGeometry(QtCore.QRect(10, 130, 71, 21))\r\n        self.label_4.setObjectName(\"label_4\")\r\n        self.label_5 = QtWidgets.QLabel(self.tab_3)\r\n        self.label_5.setGeometry(QtCore.QRect(10, 170, 71, 16))\r\n        self.label_5.setObjectName(\"label_5\")\r\n        self.label_6 = QtWidgets.QLabel(self.tab_3)\r\n        self.label_6.setGeometry(QtCore.QRect(10, 210, 121, 16))\r\n        self.label_6.setObjectName(\"label_6\")\r\n        self.tabWidget.addTab(self.tab_3, \"\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        self.tabWidget.setCurrentIndex(2)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.checkBox.setText(_translate(\"Dialog\", \"Cell Phone $150\"))\r\n        self.checkBox_2.setText(_translate(\"Dialog\", \"Laptop $500\"))\r\n        self.checkBox_3.setText(_translate(\"Dialog\", \"Camera $250\"))\r\n        self.checkBox_4.setText(_translate(\"Dialog\", \"Shoes $200\"))\r\n        self.pushButton.setText(_translate(\"Dialog\", \"Add to Cart\"))\r\n        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate(\"Dialog\", \"Products Listing\"))\r\n        self.radioButton.setText(_translate(\"Dialog\", \"Debit Card\"))\r\n        self.radioButton_2.setText(_translate(\"Dialog\", \"Credit Card\"))\r\n        self.radioButton_3.setText(_translate(\"Dialog\", \"Net Banking\"))\r\n        self.radioButton_4.setText(_translate(\"Dialog\", \"Cash On Delivery\"))\r\n        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate(\"Dialog\", \"Payment Method\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Address 1\"))\r\n        self.label_2.setText(_translate(\"Dialog\", \"Address 2\"))\r\n        self.label_3.setText(_translate(\"Dialog\", \"State\"))\r\n        self.label_4.setText(_translate(\"Dialog\", \"Country\"))\r\n        self.label_5.setText(_translate(\"Dialog\", \"Zip Code\"))\r\n        self.label_6.setText(_translate(\"Dialog\", \"Contact Number\"))\r\n        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate(\"Dialog\", \"Delivery Address\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter03/reservehotel.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'reservehotel.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(553, 556)\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(140, 10, 241, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(17)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.label_2 = QtWidgets.QLabel(Dialog)\r\n        self.label_2.setGeometry(QtCore.QRect(10, 60, 161, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.label_2.setFont(font)\r\n        self.label_2.setObjectName(\"label_2\")\r\n        self.label_3 = QtWidgets.QLabel(Dialog)\r\n        self.label_3.setGeometry(QtCore.QRect(10, 250, 161, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.label_3.setFont(font)\r\n        self.label_3.setObjectName(\"label_3\")\r\n        self.calendarWidget = QtWidgets.QCalendarWidget(Dialog)\r\n        self.calendarWidget.setGeometry(QtCore.QRect(210, 60, 312, 183))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.calendarWidget.setFont(font)\r\n        self.calendarWidget.setObjectName(\"calendarWidget\")\r\n        self.spinBox = QtWidgets.QSpinBox(Dialog)\r\n        self.spinBox.setGeometry(QtCore.QRect(210, 260, 42, 22))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.spinBox.setFont(font)\r\n        self.spinBox.setObjectName(\"spinBox\")\r\n        self.label_4 = QtWidgets.QLabel(Dialog)\r\n        self.label_4.setGeometry(QtCore.QRect(20, 300, 111, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.label_4.setFont(font)\r\n        self.label_4.setObjectName(\"label_4\")\r\n        self.comboBox = QtWidgets.QComboBox(Dialog)\r\n        self.comboBox.setGeometry(QtCore.QRect(210, 300, 211, 22))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.comboBox.setFont(font)\r\n        self.comboBox.setObjectName(\"comboBox\")\r\n        self.pushButton = QtWidgets.QPushButton(Dialog)\r\n        self.pushButton.setGeometry(QtCore.QRect(170, 350, 241, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.pushButton.setFont(font)\r\n        self.pushButton.setObjectName(\"pushButton\")\r\n        self.Enteredinfo = QtWidgets.QLabel(Dialog)\r\n        self.Enteredinfo.setGeometry(QtCore.QRect(20, 400, 501, 51))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.Enteredinfo.setFont(font)\r\n        self.Enteredinfo.setText(\"\")\r\n        self.Enteredinfo.setObjectName(\"Enteredinfo\")\r\n        self.RoomRentinfo = QtWidgets.QLabel(Dialog)\r\n        self.RoomRentinfo.setGeometry(QtCore.QRect(10, 480, 501, 51))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.RoomRentinfo.setFont(font)\r\n        self.RoomRentinfo.setText(\"\")\r\n        self.RoomRentinfo.setObjectName(\"RoomRentinfo\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Hotel Room Reservation\"))\r\n        self.label_2.setText(_translate(\"Dialog\", \"Date of Reservation\"))\r\n        self.label_3.setText(_translate(\"Dialog\", \"Number of days\"))\r\n        self.label_4.setText(_translate(\"Dialog\", \"Room type\"))\r\n        self.pushButton.setText(_translate(\"Dialog\", \"Caclulate Room Rent\"))\r\n\r\n"
  },
  {
    "path": "Chapter03/reservehotel.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>553</width>\r\n    <height>556</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>10</y>\r\n     <width>241</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>17</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Hotel Room Reservation</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_2\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>10</x>\r\n     <y>60</y>\r\n     <width>161</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Date of Reservation</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_3\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>10</x>\r\n     <y>250</y>\r\n     <width>161</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Number of days</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QCalendarWidget\" name=\"calendarWidget\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>210</x>\r\n     <y>60</y>\r\n     <width>312</width>\r\n     <height>183</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QSpinBox\" name=\"spinBox\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>210</x>\r\n     <y>260</y>\r\n     <width>42</width>\r\n     <height>22</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_4\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>300</y>\r\n     <width>111</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Room type</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QComboBox\" name=\"comboBox\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>210</x>\r\n     <y>300</y>\r\n     <width>211</width>\r\n     <height>22</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"pushButton\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>170</x>\r\n     <y>350</y>\r\n     <width>241</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Caclulate Room Rent</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"Enteredinfo\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>400</y>\r\n     <width>501</width>\r\n     <height>51</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string/>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"RoomRentinfo\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>10</x>\r\n     <y>480</y>\r\n     <width>501</width>\r\n     <height>51</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string/>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter04/LineEditClass.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoLineEdit.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(379, 195)\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(6, 40, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.labelResponse = QtWidgets.QLabel(Dialog)\r\n        self.labelResponse.setGeometry(QtCore.QRect(40, 90, 271, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.labelResponse.setFont(font)\r\n        self.labelResponse.setObjectName(\"labelResponse\")\r\n        self.lineEditName = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditName.setGeometry(QtCore.QRect(140, 40, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditName.setFont(font)\r\n        self.lineEditName.setObjectName(\"lineEditName\")\r\n        self.ButtonClickMe = QtWidgets.QPushButton(Dialog)\r\n        self.ButtonClickMe.setGeometry(QtCore.QRect(160, 130, 101, 23))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.ButtonClickMe.setFont(font)\r\n        self.ButtonClickMe.setObjectName(\"ButtonClickMe\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Enter your name\"))\r\n        self.labelResponse.setText(_translate(\"Dialog\", \"TextLabel\"))\r\n        self.ButtonClickMe.setText(_translate(\"Dialog\", \"Click\"))\r\n\r\n"
  },
  {
    "path": "Chapter04/LineEditClass.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>379</width>\r\n    <height>195</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>6</x>\r\n     <y>40</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Enter your name</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"labelResponse\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>40</x>\r\n     <y>90</y>\r\n     <width>271</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>TextLabel</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditName\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>40</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"ButtonClickMe\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>160</x>\r\n     <y>130</y>\r\n     <width>101</width>\r\n     <height>23</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Click</string>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter04/callLineEditClass.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom LineEditClass import *\r\n\r\nclass Student:\r\n    name = \"\"\r\n \r\n    def __init__(self, name):\r\n        self.name = name\r\n \r\n    def printName(self):\r\n        return self.name\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.ButtonClickMe.clicked.connect(self.dispmessage)\r\n        self.show()\r\n\r\n    def dispmessage(self):\r\n        studentObj=Student(self.ui.lineEditName.text())  \r\n        self.ui.labelResponse.setText(\"Hello \"+studentObj.printName())\r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter04/callMultilevelInheritance.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoMultilevelInheritance import *\r\n\r\nclass Student:\r\n    name = \"\"\r\n    code = \"\"\r\n \r\n    def __init__(self, code, name):\r\n        self.code = code\r\n        self.name = name\r\n\r\n    def getCode(self):\r\n        return self.code\r\n    \r\n    def getName(self):\r\n        return self.name\r\n\r\n\r\nclass Marks(Student):\r\n    historyMarks = 0\r\n    geographyMarks = 0\r\n \r\n    def __init__(self,  code, name, historyMarks, geographyMarks):\r\n        Student.__init__(self,code,name)\r\n        self.historyMarks = historyMarks\r\n        self.geographyMarks = geographyMarks\r\n        \r\n    def getHistoryMarks(self):\r\n        return self.historyMarks\r\n\r\n    def getGeographyMarks(self):\r\n        return self.geographyMarks\r\n\r\nclass Result(Marks):\r\n    totalMarks = 0\r\n    percentage = 0\r\n \r\n    def __init__(self,  code, name, historyMarks, geographyMarks):\r\n        Marks.__init__(self,  code, name, historyMarks, geographyMarks)\r\n        self.totalMarks = historyMarks + geographyMarks\r\n        self.percentage = (historyMarks + geographyMarks) / 200 * 100\r\n        \r\n    def getTotalMarks(self):\r\n        return self.totalMarks\r\n\r\n    def getPercentage(self):\r\n        return self.percentage\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.ButtonClickMe.clicked.connect(self.dispmessage)\r\n        self.show()\r\n\r\n    def dispmessage(self):\r\n        resultObj=Result(self.ui.lineEditCode.text(), self.ui.lineEditName.text(), int(self.ui.lineEditHistoryMarks.text()), int(self.ui.lineEditGeographyMarks.text()))\r\n        self.ui.lineEditTotal.setText(str(resultObj.getTotalMarks()))\r\n        self.ui.lineEditPercentage.setText(str(resultObj.getPercentage()))      \r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter04/callMultipleInheritance.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoMultipleInheritance import *\r\n\r\nclass Student:\r\n    name = \"\"\r\n    code = \"\"\r\n \r\n    def __init__(self, code, name):\r\n        self.code = code\r\n        self.name = name\r\n\r\n    def getCode(self):\r\n        return self.code\r\n    \r\n    def getName(self):\r\n        return self.name\r\n\r\n\r\nclass Marks:\r\n    historyMarks = 0\r\n    geographyMarks = 0\r\n \r\n    def __init__(self,  historyMarks, geographyMarks):\r\n        self.historyMarks = historyMarks\r\n        self.geographyMarks = geographyMarks\r\n        \r\n    def getHistoryMarks(self):\r\n        return self.historyMarks\r\n\r\n    def getGeographyMarks(self):\r\n        return self.geographyMarks\r\n\r\nclass Result(Student, Marks):\r\n    totalMarks = 0\r\n    percentage = 0\r\n \r\n    def __init__(self,  code, name, historyMarks, geographyMarks):\r\n        Student.__init__(self,  code, name)\r\n        Marks.__init__(self, historyMarks, geographyMarks)\r\n        self.totalMarks = historyMarks + geographyMarks\r\n        self.percentage = (historyMarks + geographyMarks) / 200 * 100\r\n        \r\n    def getTotalMarks(self):\r\n        return self.totalMarks\r\n\r\n    def getPercentage(self):\r\n        return self.percentage\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.ButtonClickMe.clicked.connect(self.dispmessage)\r\n        self.show()\r\n\r\n    def dispmessage(self):\r\n        resultObj=Result(self.ui.lineEditCode.text(), self.ui.lineEditName.text(), int(self.ui.lineEditHistoryMarks.text()), int(self.ui.lineEditGeographyMarks.text()))\r\n        self.ui.lineEditTotal.setText(str(resultObj.getTotalMarks()))\r\n        self.ui.lineEditPercentage.setText(str(resultObj.getPercentage()))      \r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter04/callSimpleInheritance.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoSimpleInheritance import *\r\n\r\nclass Student:\r\n    name = \"\"\r\n    code = \"\"\r\n \r\n    def __init__(self, code, name):\r\n        self.code = code\r\n        self.name = name\r\n\r\n    def getCode(self):\r\n        return self.code\r\n    \r\n    def getName(self):\r\n        return self.name\r\n\r\n\r\nclass Marks(Student):\r\n    historyMarks = 0\r\n    geographyMarks = 0\r\n \r\n    def __init__(self,  code, name, historyMarks, geographyMarks):\r\n        Student.__init__(self,code,name)\r\n        self.historyMarks = historyMarks\r\n        self.geographyMarks = geographyMarks\r\n        \r\n    def getHistoryMarks(self):\r\n        return self.historyMarks\r\n\r\n    def getGeographyMarks(self):\r\n        return self.geographyMarks\r\n    \r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.ButtonClickMe.clicked.connect(self.dispmessage)\r\n        self.show()\r\n\r\n    def dispmessage(self):\r\n        marksObj=Marks(self.ui.lineEditCode.text(), self.ui.lineEditName.text(), self.ui.lineEditHistoryMarks.text(), self.ui.lineEditGeographyMarks.text())  \r\n        self.ui.labelResponse.setText(\"Code: \"+marksObj.getCode()+\", Name:\"+marksObj.getName()+\"\\nHistory Marks:\"+marksObj.getHistoryMarks()+\", Geography Marks:\"+marksObj.getGeographyMarks())\r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter04/callStudentClass.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication\r\n\r\nfrom demoStudentClass import *\r\n\r\nclass Student:\r\n    name = \"\"\r\n    code = \"\"\r\n \r\n    def __init__(self, code, name):\r\n        self.code = code\r\n        self.name = name\r\n\r\n    def getCode(self):\r\n        return self.code\r\n    \r\n    def getName(self):\r\n        return self.name\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.ButtonClickMe.clicked.connect(self.dispmessage)\r\n        self.show()\r\n\r\n    def dispmessage(self):\r\n        studentObj=Student(self.ui.lineEditCode.text(), self.ui.lineEditName.text())  \r\n        self.ui.labelResponse.setText(\"Code: \"+studentObj.getCode()+\", Name:\"+studentObj.getName())\r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter04/demoMultilevelInheritance.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoMultilevelInheritance.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(382, 322)\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(20, 60, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.lineEditName = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditName.setGeometry(QtCore.QRect(140, 60, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditName.setFont(font)\r\n        self.lineEditName.setObjectName(\"lineEditName\")\r\n        self.ButtonClickMe = QtWidgets.QPushButton(Dialog)\r\n        self.ButtonClickMe.setGeometry(QtCore.QRect(150, 280, 101, 23))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.ButtonClickMe.setFont(font)\r\n        self.ButtonClickMe.setObjectName(\"ButtonClickMe\")\r\n        self.lineEditCode = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditCode.setGeometry(QtCore.QRect(140, 20, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditCode.setFont(font)\r\n        self.lineEditCode.setObjectName(\"lineEditCode\")\r\n        self.label_2 = QtWidgets.QLabel(Dialog)\r\n        self.label_2.setGeometry(QtCore.QRect(20, 20, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label_2.setFont(font)\r\n        self.label_2.setObjectName(\"label_2\")\r\n        self.lineEditHistoryMarks = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditHistoryMarks.setGeometry(QtCore.QRect(140, 100, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditHistoryMarks.setFont(font)\r\n        self.lineEditHistoryMarks.setObjectName(\"lineEditHistoryMarks\")\r\n        self.label_3 = QtWidgets.QLabel(Dialog)\r\n        self.label_3.setGeometry(QtCore.QRect(20, 100, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label_3.setFont(font)\r\n        self.label_3.setObjectName(\"label_3\")\r\n        self.label_4 = QtWidgets.QLabel(Dialog)\r\n        self.label_4.setGeometry(QtCore.QRect(20, 140, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label_4.setFont(font)\r\n        self.label_4.setObjectName(\"label_4\")\r\n        self.lineEditGeographyMarks = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditGeographyMarks.setGeometry(QtCore.QRect(140, 140, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditGeographyMarks.setFont(font)\r\n        self.lineEditGeographyMarks.setObjectName(\"lineEditGeographyMarks\")\r\n        self.lineEditPercentage = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditPercentage.setEnabled(False)\r\n        self.lineEditPercentage.setGeometry(QtCore.QRect(140, 220, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditPercentage.setFont(font)\r\n        self.lineEditPercentage.setObjectName(\"lineEditPercentage\")\r\n        self.label_5 = QtWidgets.QLabel(Dialog)\r\n        self.label_5.setGeometry(QtCore.QRect(20, 220, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label_5.setFont(font)\r\n        self.label_5.setObjectName(\"label_5\")\r\n        self.lineEditTotal = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditTotal.setEnabled(False)\r\n        self.lineEditTotal.setGeometry(QtCore.QRect(140, 180, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditTotal.setFont(font)\r\n        self.lineEditTotal.setObjectName(\"lineEditTotal\")\r\n        self.label_6 = QtWidgets.QLabel(Dialog)\r\n        self.label_6.setGeometry(QtCore.QRect(20, 180, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label_6.setFont(font)\r\n        self.label_6.setObjectName(\"label_6\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Student Name\"))\r\n        self.ButtonClickMe.setText(_translate(\"Dialog\", \"Click\"))\r\n        self.label_2.setText(_translate(\"Dialog\", \"Student Code\"))\r\n        self.label_3.setText(_translate(\"Dialog\", \"History Marks\"))\r\n        self.label_4.setText(_translate(\"Dialog\", \"Geography Marks\"))\r\n        self.label_5.setText(_translate(\"Dialog\", \"Percentage\"))\r\n        self.label_6.setText(_translate(\"Dialog\", \"Total\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter04/demoMultilevelInheritance.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>382</width>\r\n    <height>322</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>60</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Student Name</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditName\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>60</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"ButtonClickMe\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>150</x>\r\n     <y>280</y>\r\n     <width>101</width>\r\n     <height>23</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Click</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditCode\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>20</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_2\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>20</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Student Code</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditHistoryMarks\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>100</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_3\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>100</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>History Marks</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_4\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>140</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Geography Marks</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditGeographyMarks\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>140</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditPercentage\">\r\n   <property name=\"enabled\">\r\n    <bool>false</bool>\r\n   </property>\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>220</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_5\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>220</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Percentage</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditTotal\">\r\n   <property name=\"enabled\">\r\n    <bool>false</bool>\r\n   </property>\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>180</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_6\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>180</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Total</string>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter04/demoMultipleInheritance.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoMultipleInheritance.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(382, 322)\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(20, 60, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.lineEditName = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditName.setGeometry(QtCore.QRect(140, 60, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditName.setFont(font)\r\n        self.lineEditName.setObjectName(\"lineEditName\")\r\n        self.ButtonClickMe = QtWidgets.QPushButton(Dialog)\r\n        self.ButtonClickMe.setGeometry(QtCore.QRect(150, 280, 101, 23))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.ButtonClickMe.setFont(font)\r\n        self.ButtonClickMe.setObjectName(\"ButtonClickMe\")\r\n        self.lineEditCode = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditCode.setGeometry(QtCore.QRect(140, 20, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditCode.setFont(font)\r\n        self.lineEditCode.setObjectName(\"lineEditCode\")\r\n        self.label_2 = QtWidgets.QLabel(Dialog)\r\n        self.label_2.setGeometry(QtCore.QRect(20, 20, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label_2.setFont(font)\r\n        self.label_2.setObjectName(\"label_2\")\r\n        self.lineEditHistoryMarks = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditHistoryMarks.setGeometry(QtCore.QRect(140, 100, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditHistoryMarks.setFont(font)\r\n        self.lineEditHistoryMarks.setObjectName(\"lineEditHistoryMarks\")\r\n        self.label_3 = QtWidgets.QLabel(Dialog)\r\n        self.label_3.setGeometry(QtCore.QRect(20, 100, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label_3.setFont(font)\r\n        self.label_3.setObjectName(\"label_3\")\r\n        self.label_4 = QtWidgets.QLabel(Dialog)\r\n        self.label_4.setGeometry(QtCore.QRect(20, 140, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label_4.setFont(font)\r\n        self.label_4.setObjectName(\"label_4\")\r\n        self.lineEditGeographyMarks = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditGeographyMarks.setGeometry(QtCore.QRect(140, 140, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditGeographyMarks.setFont(font)\r\n        self.lineEditGeographyMarks.setObjectName(\"lineEditGeographyMarks\")\r\n        self.lineEditPercentage = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditPercentage.setEnabled(False)\r\n        self.lineEditPercentage.setGeometry(QtCore.QRect(140, 220, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditPercentage.setFont(font)\r\n        self.lineEditPercentage.setObjectName(\"lineEditPercentage\")\r\n        self.label_5 = QtWidgets.QLabel(Dialog)\r\n        self.label_5.setGeometry(QtCore.QRect(20, 220, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label_5.setFont(font)\r\n        self.label_5.setObjectName(\"label_5\")\r\n        self.lineEditTotal = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditTotal.setEnabled(False)\r\n        self.lineEditTotal.setGeometry(QtCore.QRect(140, 180, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditTotal.setFont(font)\r\n        self.lineEditTotal.setObjectName(\"lineEditTotal\")\r\n        self.label_6 = QtWidgets.QLabel(Dialog)\r\n        self.label_6.setGeometry(QtCore.QRect(20, 180, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label_6.setFont(font)\r\n        self.label_6.setObjectName(\"label_6\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Student Name\"))\r\n        self.ButtonClickMe.setText(_translate(\"Dialog\", \"Click\"))\r\n        self.label_2.setText(_translate(\"Dialog\", \"Student Code\"))\r\n        self.label_3.setText(_translate(\"Dialog\", \"History Marks\"))\r\n        self.label_4.setText(_translate(\"Dialog\", \"Geography Marks\"))\r\n        self.label_5.setText(_translate(\"Dialog\", \"Percentage\"))\r\n        self.label_6.setText(_translate(\"Dialog\", \"Total\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter04/demoMultipleInheritance.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>382</width>\r\n    <height>322</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>60</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Student Name</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditName\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>60</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"ButtonClickMe\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>150</x>\r\n     <y>280</y>\r\n     <width>101</width>\r\n     <height>23</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Click</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditCode\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>20</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_2\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>20</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Student Code</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditHistoryMarks\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>100</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_3\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>100</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>History Marks</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_4\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>140</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Geography Marks</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditGeographyMarks\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>140</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditPercentage\">\r\n   <property name=\"enabled\">\r\n    <bool>false</bool>\r\n   </property>\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>220</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_5\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>220</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Percentage</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditTotal\">\r\n   <property name=\"enabled\">\r\n    <bool>false</bool>\r\n   </property>\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>180</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_6\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>180</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Total</string>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter04/demoSimpleInheritance.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoSimpleInheritance.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(402, 291)\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(20, 60, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.labelResponse = QtWidgets.QLabel(Dialog)\r\n        self.labelResponse.setGeometry(QtCore.QRect(10, 179, 361, 41))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.labelResponse.setFont(font)\r\n        self.labelResponse.setText(\"\")\r\n        self.labelResponse.setObjectName(\"labelResponse\")\r\n        self.lineEditName = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditName.setGeometry(QtCore.QRect(140, 60, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditName.setFont(font)\r\n        self.lineEditName.setObjectName(\"lineEditName\")\r\n        self.ButtonClickMe = QtWidgets.QPushButton(Dialog)\r\n        self.ButtonClickMe.setGeometry(QtCore.QRect(140, 250, 101, 23))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.ButtonClickMe.setFont(font)\r\n        self.ButtonClickMe.setObjectName(\"ButtonClickMe\")\r\n        self.lineEditCode = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditCode.setGeometry(QtCore.QRect(140, 20, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditCode.setFont(font)\r\n        self.lineEditCode.setObjectName(\"lineEditCode\")\r\n        self.label_2 = QtWidgets.QLabel(Dialog)\r\n        self.label_2.setGeometry(QtCore.QRect(20, 20, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label_2.setFont(font)\r\n        self.label_2.setObjectName(\"label_2\")\r\n        self.lineEditHistoryMarks = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditHistoryMarks.setGeometry(QtCore.QRect(140, 100, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditHistoryMarks.setFont(font)\r\n        self.lineEditHistoryMarks.setObjectName(\"lineEditHistoryMarks\")\r\n        self.label_3 = QtWidgets.QLabel(Dialog)\r\n        self.label_3.setGeometry(QtCore.QRect(20, 100, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label_3.setFont(font)\r\n        self.label_3.setObjectName(\"label_3\")\r\n        self.label_4 = QtWidgets.QLabel(Dialog)\r\n        self.label_4.setGeometry(QtCore.QRect(20, 140, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label_4.setFont(font)\r\n        self.label_4.setObjectName(\"label_4\")\r\n        self.lineEditGeographyMarks = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditGeographyMarks.setGeometry(QtCore.QRect(140, 140, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditGeographyMarks.setFont(font)\r\n        self.lineEditGeographyMarks.setObjectName(\"lineEditGeographyMarks\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Student Name\"))\r\n        self.ButtonClickMe.setText(_translate(\"Dialog\", \"Click\"))\r\n        self.label_2.setText(_translate(\"Dialog\", \"Student Code\"))\r\n        self.label_3.setText(_translate(\"Dialog\", \"History Marks\"))\r\n        self.label_4.setText(_translate(\"Dialog\", \"Geography Marks\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter04/demoSimpleInheritance.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>402</width>\r\n    <height>291</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>60</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Student Name</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"labelResponse\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>10</x>\r\n     <y>179</y>\r\n     <width>361</width>\r\n     <height>41</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string/>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditName\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>60</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"ButtonClickMe\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>250</y>\r\n     <width>101</width>\r\n     <height>23</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Click</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditCode\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>20</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_2\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>20</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Student Code</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditHistoryMarks\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>100</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_3\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>100</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>History Marks</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_4\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>140</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Geography Marks</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditGeographyMarks\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>140</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter04/demoStudentClass.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoStudentClass.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(412, 208)\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(20, 60, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.labelResponse = QtWidgets.QLabel(Dialog)\r\n        self.labelResponse.setGeometry(QtCore.QRect(30, 120, 361, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.labelResponse.setFont(font)\r\n        self.labelResponse.setText(\"\")\r\n        self.labelResponse.setObjectName(\"labelResponse\")\r\n        self.lineEditName = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditName.setGeometry(QtCore.QRect(140, 60, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditName.setFont(font)\r\n        self.lineEditName.setObjectName(\"lineEditName\")\r\n        self.ButtonClickMe = QtWidgets.QPushButton(Dialog)\r\n        self.ButtonClickMe.setGeometry(QtCore.QRect(140, 170, 101, 23))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.ButtonClickMe.setFont(font)\r\n        self.ButtonClickMe.setObjectName(\"ButtonClickMe\")\r\n        self.lineEditCode = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditCode.setGeometry(QtCore.QRect(140, 20, 201, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.lineEditCode.setFont(font)\r\n        self.lineEditCode.setObjectName(\"lineEditCode\")\r\n        self.label_2 = QtWidgets.QLabel(Dialog)\r\n        self.label_2.setGeometry(QtCore.QRect(20, 20, 121, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(11)\r\n        self.label_2.setFont(font)\r\n        self.label_2.setObjectName(\"label_2\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Student Name\"))\r\n        self.ButtonClickMe.setText(_translate(\"Dialog\", \"Click\"))\r\n        self.label_2.setText(_translate(\"Dialog\", \"Student Code\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter04/demoStudentClass.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>412</width>\r\n    <height>208</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>60</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Student Name</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"labelResponse\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>30</x>\r\n     <y>120</y>\r\n     <width>361</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string/>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditName\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>60</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"ButtonClickMe\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>170</y>\r\n     <width>101</width>\r\n     <height>23</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Click</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditCode\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>20</y>\r\n     <width>201</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"label_2\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>20</y>\r\n     <width>121</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>11</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Student Code</string>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter05/callColorDialog.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication, QColorDialog\r\nfrom PyQt5.QtGui import QColor\r\n\r\nfrom demoColorDialog import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        col = QColor(0, 0, 0) \r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.frameColor.setStyleSheet(\"QWidget { background-color: %s }\" % col.name())\r\n        self.ui.pushButtonColor.clicked.connect(self.dispcolor)\r\n        self.show()\r\n\r\n    def dispcolor(self):\r\n        col = QColorDialog.getColor()\r\n        if col.isValid():\r\n            self.ui.frameColor.setStyleSheet(\"QWidget { background-color: %s }\" % col.name())\r\n            self.ui.labelColor.setText(\"You have selected the color with code: \" + str(col.name()))\r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter05/callFileDialog.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QMainWindow, QApplication, QAction, QFileDialog\r\n\r\nfrom demoFileDialog import *\r\n\r\nclass MyForm(QMainWindow):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_MainWindow()\r\n        self.ui.setupUi(self)\r\n        self.ui.actionOpen.triggered.connect(self.openFileDialog)\r\n        self.ui.actionSave.triggered.connect(self.saveFileDialog)\r\n        self.show()\r\n\r\n    def openFileDialog(self):\r\n\r\n        fname = QFileDialog.getOpenFileName(self, 'Open file', '/home')\r\n\r\n        if fname[0]:\r\n            f = open(fname[0], 'r')\r\n\r\n            with f:\r\n                data = f.read()\r\n                self.ui.textEdit.setText(data)\r\n\r\n    def saveFileDialog(self):\r\n        options = QFileDialog.Options()\r\n        options |= QFileDialog.DontUseNativeDialog\r\n        fileName, _ = QFileDialog.getSaveFileName(self,\"QFileDialog.getSaveFileName()\",\"\",\"All Files (*);;Text Files (*.txt)\", options=options)\r\n        f = open(fileName,'w')\r\n        text = self.ui.textEdit.toPlainText()\r\n        f.write(text)\r\n        f.close()\r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter05/callFontDialog.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication, QFontDialog\r\n\r\n\r\nfrom demoFontDialog import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)      \r\n        self.ui.pushButtonFont.clicked.connect(self.changefont)\r\n        self.show()\r\n\r\n    def changefont(self):\r\n        font, ok = QFontDialog.getFont()\r\n        if ok:\r\n            self.ui.textEdit.setFont(font)\r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter05/callInputDialog.pyw",
    "content": "import sys\r\n\r\nfrom PyQt5.QtWidgets import QDialog, QApplication, QInputDialog\r\n\r\nfrom demoInputDialog import *\r\n\r\nclass MyForm(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.ui.pushButtonCountry.clicked.connect(self.dispmessage)\r\n        self.show()\r\n\r\n    def dispmessage(self):\r\n      countries = (\"Albania\", \"Algeria\", \"Andorra\", \"Angola\", \"Antigua and Barbuda\", \"Argentina\", \"Armenia\", \"Aruba\", \"Australia\", \"Austria\", \"Azerbaijan\")\r\n      countryName, ok = QInputDialog.getItem(self, \"Input Dialog\", \"List of countries\", countries, 0, False)\t\t\t\r\n      if ok and countryName:\r\n          self.ui.lineEditCountry.setText(countryName)\r\n\r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    w = MyForm()\r\n    w.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter05/demoColorDialog.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoColorDialog.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(400, 176)\r\n        self.frameColor = QtWidgets.QFrame(Dialog)\r\n        self.frameColor.setGeometry(QtCore.QRect(210, 20, 120, 80))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.frameColor.setFont(font)\r\n        self.frameColor.setFrameShape(QtWidgets.QFrame.StyledPanel)\r\n        self.frameColor.setFrameShadow(QtWidgets.QFrame.Raised)\r\n        self.frameColor.setObjectName(\"frameColor\")\r\n        self.pushButtonColor = QtWidgets.QPushButton(Dialog)\r\n        self.pushButtonColor.setGeometry(QtCore.QRect(30, 40, 151, 23))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.pushButtonColor.setFont(font)\r\n        self.pushButtonColor.setObjectName(\"pushButtonColor\")\r\n        self.labelColor = QtWidgets.QLabel(Dialog)\r\n        self.labelColor.setGeometry(QtCore.QRect(30, 130, 351, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.labelColor.setFont(font)\r\n        self.labelColor.setText(\"\")\r\n        self.labelColor.setObjectName(\"labelColor\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.pushButtonColor.setText(_translate(\"Dialog\", \"Choose color\"))\r\n\r\n"
  },
  {
    "path": "Chapter05/demoColorDialog.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>400</width>\r\n    <height>176</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QFrame\" name=\"frameColor\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>210</x>\r\n     <y>20</y>\r\n     <width>120</width>\r\n     <height>80</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"frameShape\">\r\n    <enum>QFrame::StyledPanel</enum>\r\n   </property>\r\n   <property name=\"frameShadow\">\r\n    <enum>QFrame::Raised</enum>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"pushButtonColor\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>30</x>\r\n     <y>40</y>\r\n     <width>151</width>\r\n     <height>23</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Choose color</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLabel\" name=\"labelColor\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>30</x>\r\n     <y>130</y>\r\n     <width>351</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string/>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter05/demoFileDialog.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoFileDialog.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_MainWindow(object):\r\n    def setupUi(self, MainWindow):\r\n        MainWindow.setObjectName(\"MainWindow\")\r\n        MainWindow.resize(516, 374)\r\n        self.centralwidget = QtWidgets.QWidget(MainWindow)\r\n        self.centralwidget.setObjectName(\"centralwidget\")\r\n        self.textEdit = QtWidgets.QTextEdit(self.centralwidget)\r\n        self.textEdit.setGeometry(QtCore.QRect(0, 10, 521, 331))\r\n        self.textEdit.setObjectName(\"textEdit\")\r\n        MainWindow.setCentralWidget(self.centralwidget)\r\n        self.menubar = QtWidgets.QMenuBar(MainWindow)\r\n        self.menubar.setGeometry(QtCore.QRect(0, 0, 516, 21))\r\n        self.menubar.setObjectName(\"menubar\")\r\n        self.menuFile = QtWidgets.QMenu(self.menubar)\r\n        self.menuFile.setObjectName(\"menuFile\")\r\n        MainWindow.setMenuBar(self.menubar)\r\n        self.statusbar = QtWidgets.QStatusBar(MainWindow)\r\n        self.statusbar.setObjectName(\"statusbar\")\r\n        MainWindow.setStatusBar(self.statusbar)\r\n        self.actionOpen = QtWidgets.QAction(MainWindow)\r\n        self.actionOpen.setObjectName(\"actionOpen\")\r\n        self.actionSave = QtWidgets.QAction(MainWindow)\r\n        self.actionSave.setObjectName(\"actionSave\")\r\n        self.menuFile.addAction(self.actionOpen)\r\n        self.menuFile.addAction(self.actionSave)\r\n        self.menubar.addAction(self.menuFile.menuAction())\r\n\r\n        self.retranslateUi(MainWindow)\r\n        QtCore.QMetaObject.connectSlotsByName(MainWindow)\r\n\r\n    def retranslateUi(self, MainWindow):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        MainWindow.setWindowTitle(_translate(\"MainWindow\", \"MainWindow\"))\r\n        self.menuFile.setTitle(_translate(\"MainWindow\", \"File\"))\r\n        self.actionOpen.setText(_translate(\"MainWindow\", \"Open\"))\r\n        self.actionOpen.setShortcut(_translate(\"MainWindow\", \"Ctrl+O\"))\r\n        self.actionSave.setText(_translate(\"MainWindow\", \"Save\"))\r\n        self.actionSave.setShortcut(_translate(\"MainWindow\", \"Ctrl+S\"))\r\n\r\n"
  },
  {
    "path": "Chapter05/demoFileDialog.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>MainWindow</class>\r\n <widget class=\"QMainWindow\" name=\"MainWindow\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>544</width>\r\n    <height>386</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>MainWindow</string>\r\n  </property>\r\n  <widget class=\"QWidget\" name=\"centralwidget\">\r\n   <widget class=\"QTextEdit\" name=\"textEdit\">\r\n    <property name=\"geometry\">\r\n     <rect>\r\n      <x>0</x>\r\n      <y>10</y>\r\n      <width>521</width>\r\n      <height>331</height>\r\n     </rect>\r\n    </property>\r\n   </widget>\r\n  </widget>\r\n  <widget class=\"QMenuBar\" name=\"menubar\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>0</x>\r\n     <y>0</y>\r\n     <width>544</width>\r\n     <height>21</height>\r\n    </rect>\r\n   </property>\r\n   <widget class=\"QMenu\" name=\"menuFile\">\r\n    <property name=\"title\">\r\n     <string>File</string>\r\n    </property>\r\n    <addaction name=\"actionOpen\"/>\r\n    <addaction name=\"actionSave\"/>\r\n   </widget>\r\n   <addaction name=\"menuFile\"/>\r\n  </widget>\r\n  <widget class=\"QStatusBar\" name=\"statusbar\"/>\r\n  <action name=\"actionOpen\">\r\n   <property name=\"text\">\r\n    <string>Open</string>\r\n   </property>\r\n   <property name=\"shortcut\">\r\n    <string>Ctrl+O</string>\r\n   </property>\r\n  </action>\r\n  <action name=\"actionSave\">\r\n   <property name=\"text\">\r\n    <string>Save</string>\r\n   </property>\r\n   <property name=\"shortcut\">\r\n    <string>Ctrl+S</string>\r\n   </property>\r\n  </action>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter05/demoFontDialog.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoFontDialog.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(400, 300)\r\n        self.textEdit = QtWidgets.QTextEdit(Dialog)\r\n        self.textEdit.setGeometry(QtCore.QRect(30, 60, 331, 221))\r\n        self.textEdit.setObjectName(\"textEdit\")\r\n        self.pushButtonFont = QtWidgets.QPushButton(Dialog)\r\n        self.pushButtonFont.setGeometry(QtCore.QRect(120, 10, 111, 31))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.pushButtonFont.setFont(font)\r\n        self.pushButtonFont.setObjectName(\"pushButtonFont\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.pushButtonFont.setText(_translate(\"Dialog\", \"Change Font\"))\r\n\r\n"
  },
  {
    "path": "Chapter05/demoFontDialog.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>400</width>\r\n    <height>300</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QTextEdit\" name=\"textEdit\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>30</x>\r\n     <y>60</y>\r\n     <width>331</width>\r\n     <height>221</height>\r\n    </rect>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"pushButtonFont\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>120</x>\r\n     <y>10</y>\r\n     <width>111</width>\r\n     <height>31</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Change Font</string>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter05/demoInputDialog.py",
    "content": "\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(565, 74)\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(20, 20, 131, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n        self.lineEditCountry = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditCountry.setGeometry(QtCore.QRect(140, 20, 221, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.lineEditCountry.setFont(font)\r\n        self.lineEditCountry.setObjectName(\"lineEditCountry\")\r\n        self.pushButtonCountry = QtWidgets.QPushButton(Dialog)\r\n        self.pushButtonCountry.setGeometry(QtCore.QRect(400, 20, 131, 23))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.pushButtonCountry.setFont(font)\r\n        self.pushButtonCountry.setObjectName(\"pushButtonCountry\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Your Country:\"))\r\n        self.pushButtonCountry.setText(_translate(\"Dialog\", \"Choose Country\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter05/demoInputDialog.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>565</width>\r\n    <height>74</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QLabel\" name=\"label\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>20</x>\r\n     <y>20</y>\r\n     <width>131</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Your Country:</string>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QLineEdit\" name=\"lineEditCountry\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>140</x>\r\n     <y>20</y>\r\n     <width>221</width>\r\n     <height>20</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QPushButton\" name=\"pushButtonCountry\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>400</x>\r\n     <y>20</y>\r\n     <width>131</width>\r\n     <height>23</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"text\">\r\n    <string>Choose Country</string>\r\n   </property>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter07/callServer.pyw",
    "content": "import sys, time\r\nimport socket\r\nfrom PyQt5 import QtGui\r\nfrom PyQt5 import QtCore\r\nfrom PyQt5.QtWidgets import QApplication, QDialog\r\nfrom PyQt5.QtCore import QCoreApplication\r\nfrom threading import Thread \r\nfrom socketserver import ThreadingMixIn \r\nfrom demoServer import *\r\n\r\nconn=None\r\n\r\nclass Window(QDialog):\r\n    def __init__(self):\r\n        super().__init__()\r\n        self.ui = Ui_Dialog()\r\n        self.ui.setupUi(self)\r\n        self.textEditMessages=self.ui.textEditMessages\r\n        self.ui.pushButtonSend.clicked.connect(self.dispMessage)\r\n        self.show()\r\n\r\n    def dispMessage(self):\r\n        text=self.ui.lineEditMessage.text()\r\n        global conn\r\n        conn.send(text.encode(\"utf-8\"))\r\n        self.ui.textEditMessages.append(\"Server: \"+self.ui.lineEditMessage.text())\r\n        self.ui.lineEditMessage.setText(\"\")\r\n\r\nclass ServerThread(Thread):\r\n    def __init__(self,window): \r\n        Thread.__init__(self) \r\n        self.window=window\r\n   \r\n    def run(self): \r\n        TCP_IP = '0.0.0.0'\r\n        TCP_PORT = 80\r\n        BUFFER_SIZE = 1024 \r\n        tcpServer = socket.socket(socket.AF_INET, socket.SOCK_STREAM) \r\n        tcpServer.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) \r\n        tcpServer.bind((TCP_IP, TCP_PORT)) \r\n        threads = [] \r\n         \r\n        tcpServer.listen(4) \r\n        while True:\r\n            global conn\r\n            (conn, (ip,port)) = tcpServer.accept() \r\n            newthread = ClientThread(ip,port,window) \r\n            newthread.start() \r\n            threads.append(newthread) \r\n           \r\n        for t in threads: \r\n            t.join() \r\n \r\n \r\nclass ClientThread(Thread): \r\n  \r\n    def __init__(self,ip,port,window): \r\n        Thread.__init__(self) \r\n        self.window=window\r\n        self.ip = ip \r\n        self.port = port \r\n        \r\n  \r\n    def run(self): \r\n        while True :              \r\n            global conn\r\n            data = conn.recv(1024) \r\n            window.textEditMessages.append(\"Client: \"+data.decode(\"utf-8\"))\r\n \r\nif __name__==\"__main__\":    \r\n    app = QApplication(sys.argv)\r\n    window = Window()\r\n    serverThread=ServerThread(window)\r\n    serverThread.start()\r\n    window.exec()\r\n    sys.exit(app.exec_())\r\n"
  },
  {
    "path": "Chapter07/demoBrowser.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoBrowser.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_Dialog(object):\r\n    def setupUi(self, Dialog):\r\n        Dialog.setObjectName(\"Dialog\")\r\n        Dialog.resize(563, 339)\r\n        self.widget = QWebEngineView(Dialog)\r\n        self.widget.setGeometry(QtCore.QRect(10, 60, 531, 251))\r\n        self.widget.setObjectName(\"widget\")\r\n        self.pushButtonGo = QtWidgets.QPushButton(Dialog)\r\n        self.pushButtonGo.setGeometry(QtCore.QRect(450, 20, 91, 23))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.pushButtonGo.setFont(font)\r\n        self.pushButtonGo.setObjectName(\"pushButtonGo\")\r\n        self.lineEditURL = QtWidgets.QLineEdit(Dialog)\r\n        self.lineEditURL.setGeometry(QtCore.QRect(100, 20, 331, 21))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.lineEditURL.setFont(font)\r\n        self.lineEditURL.setObjectName(\"lineEditURL\")\r\n        self.label = QtWidgets.QLabel(Dialog)\r\n        self.label.setGeometry(QtCore.QRect(10, 20, 71, 16))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.label.setFont(font)\r\n        self.label.setObjectName(\"label\")\r\n\r\n        self.retranslateUi(Dialog)\r\n        QtCore.QMetaObject.connectSlotsByName(Dialog)\r\n\r\n    def retranslateUi(self, Dialog):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        Dialog.setWindowTitle(_translate(\"Dialog\", \"Dialog\"))\r\n        self.pushButtonGo.setText(_translate(\"Dialog\", \"Go\"))\r\n        self.label.setText(_translate(\"Dialog\", \"Enter URL\"))\r\n\r\nfrom PyQt5.QtWebEngineWidgets import QWebEngineView\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    Dialog = QtWidgets.QDialog()\r\n    ui = Ui_Dialog()\r\n    ui.setupUi(Dialog)\r\n    Dialog.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter07/demoDockWidget.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>MainWindow</class>\r\n <widget class=\"QMainWindow\" name=\"MainWindow\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>637</width>\r\n    <height>440</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>MainWindow</string>\r\n  </property>\r\n  <widget class=\"QWidget\" name=\"centralwidget\"/>\r\n  <widget class=\"QMenuBar\" name=\"menubar\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>0</x>\r\n     <y>0</y>\r\n     <width>637</width>\r\n     <height>21</height>\r\n    </rect>\r\n   </property>\r\n  </widget>\r\n  <widget class=\"QStatusBar\" name=\"statusbar\"/>\r\n  <widget class=\"QDockWidget\" name=\"dockWidget_2\">\r\n   <property name=\"features\">\r\n    <set>QDockWidget::AllDockWidgetFeatures</set>\r\n   </property>\r\n   <property name=\"allowedAreas\">\r\n    <set>Qt::AllDockWidgetAreas</set>\r\n   </property>\r\n   <property name=\"windowTitle\">\r\n    <string>Dockable Sign In Form</string>\r\n   </property>\r\n   <attribute name=\"dockWidgetArea\">\r\n    <number>1</number>\r\n   </attribute>\r\n   <widget class=\"QWidget\" name=\"dockWidgetContents_2\">\r\n    <widget class=\"QLabel\" name=\"label\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>130</x>\r\n       <y>10</y>\r\n       <width>91</width>\r\n       <height>21</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"font\">\r\n      <font>\r\n       <pointsize>12</pointsize>\r\n      </font>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>Sign In</string>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QLabel\" name=\"label_2\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>10</x>\r\n       <y>60</y>\r\n       <width>111</width>\r\n       <height>20</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"font\">\r\n      <font>\r\n       <pointsize>12</pointsize>\r\n      </font>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>Email Address</string>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QLineEdit\" name=\"lineEdit\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>120</x>\r\n       <y>60</y>\r\n       <width>161</width>\r\n       <height>20</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"font\">\r\n      <font>\r\n       <pointsize>12</pointsize>\r\n      </font>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QLabel\" name=\"label_3\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>20</x>\r\n       <y>110</y>\r\n       <width>81</width>\r\n       <height>16</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"font\">\r\n      <font>\r\n       <pointsize>12</pointsize>\r\n      </font>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>Password</string>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QPushButton\" name=\"pushButton\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>100</x>\r\n       <y>150</y>\r\n       <width>75</width>\r\n       <height>23</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"font\">\r\n      <font>\r\n       <pointsize>12</pointsize>\r\n      </font>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>Sign In</string>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QLineEdit\" name=\"lineEdit_2\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>120</x>\r\n       <y>110</y>\r\n       <width>151</width>\r\n       <height>20</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"font\">\r\n      <font>\r\n       <pointsize>12</pointsize>\r\n      </font>\r\n     </property>\r\n    </widget>\r\n   </widget>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "Chapter07/demoMenuBar.py",
    "content": "# -*- coding: utf-8 -*-\r\n\r\n# Form implementation generated from reading ui file 'demoMenuBar.ui'\r\n#\r\n# Created by: PyQt5 UI code generator 5.6\r\n#\r\n# WARNING! All changes made in this file will be lost!\r\n\r\nfrom PyQt5 import QtCore, QtGui, QtWidgets\r\n\r\nclass Ui_MainWindow(object):\r\n    def setupUi(self, MainWindow):\r\n        MainWindow.setObjectName(\"MainWindow\")\r\n        MainWindow.resize(463, 341)\r\n        self.centralwidget = QtWidgets.QWidget(MainWindow)\r\n        self.centralwidget.setObjectName(\"centralwidget\")\r\n        self.label = QtWidgets.QLabel(self.centralwidget)\r\n        self.label.setGeometry(QtCore.QRect(20, 110, 421, 20))\r\n        font = QtGui.QFont()\r\n        font.setPointSize(12)\r\n        self.label.setFont(font)\r\n        self.label.setText(\"\")\r\n        self.label.setObjectName(\"label\")\r\n        MainWindow.setCentralWidget(self.centralwidget)\r\n        self.menubar = QtWidgets.QMenuBar(MainWindow)\r\n        self.menubar.setGeometry(QtCore.QRect(0, 0, 463, 21))\r\n        self.menubar.setObjectName(\"menubar\")\r\n        self.menuDraw = QtWidgets.QMenu(self.menubar)\r\n        self.menuDraw.setObjectName(\"menuDraw\")\r\n        self.menuProperties = QtWidgets.QMenu(self.menuDraw)\r\n        self.menuProperties.setObjectName(\"menuProperties\")\r\n        self.menuEdit = QtWidgets.QMenu(self.menubar)\r\n        self.menuEdit.setObjectName(\"menuEdit\")\r\n        MainWindow.setMenuBar(self.menubar)\r\n        self.statusbar = QtWidgets.QStatusBar(MainWindow)\r\n        self.statusbar.setObjectName(\"statusbar\")\r\n        MainWindow.setStatusBar(self.statusbar)\r\n        self.actionDraw_Circle = QtWidgets.QAction(MainWindow)\r\n        self.actionDraw_Circle.setObjectName(\"actionDraw_Circle\")\r\n        self.actionDraw_Rectangle = QtWidgets.QAction(MainWindow)\r\n        self.actionDraw_Rectangle.setObjectName(\"actionDraw_Rectangle\")\r\n        self.actionDraw_Line = QtWidgets.QAction(MainWindow)\r\n        self.actionDraw_Line.setObjectName(\"actionDraw_Line\")\r\n        self.actionPage_Setup = QtWidgets.QAction(MainWindow)\r\n        self.actionPage_Setup.setObjectName(\"actionPage_Setup\")\r\n        self.actionSet_Password = QtWidgets.QAction(MainWindow)\r\n        self.actionSet_Password.setCheckable(True)\r\n        self.actionSet_Password.setObjectName(\"actionSet_Password\")\r\n        self.actionCut = QtWidgets.QAction(MainWindow)\r\n        self.actionCut.setObjectName(\"actionCut\")\r\n        self.actionCopy = QtWidgets.QAction(MainWindow)\r\n        self.actionCopy.setObjectName(\"actionCopy\")\r\n        self.actionPaste = QtWidgets.QAction(MainWindow)\r\n        self.actionPaste.setObjectName(\"actionPaste\")\r\n        self.menuProperties.addAction(self.actionPage_Setup)\r\n        self.menuProperties.addAction(self.actionSet_Password)\r\n        self.menuDraw.addAction(self.actionDraw_Circle)\r\n        self.menuDraw.addAction(self.actionDraw_Rectangle)\r\n        self.menuDraw.addAction(self.actionDraw_Line)\r\n        self.menuDraw.addSeparator()\r\n        self.menuDraw.addAction(self.menuProperties.menuAction())\r\n        self.menuEdit.addAction(self.actionCut)\r\n        self.menuEdit.addAction(self.actionCopy)\r\n        self.menuEdit.addAction(self.actionPaste)\r\n        self.menubar.addAction(self.menuDraw.menuAction())\r\n        self.menubar.addAction(self.menuEdit.menuAction())\r\n\r\n        self.retranslateUi(MainWindow)\r\n        QtCore.QMetaObject.connectSlotsByName(MainWindow)\r\n\r\n    def retranslateUi(self, MainWindow):\r\n        _translate = QtCore.QCoreApplication.translate\r\n        MainWindow.setWindowTitle(_translate(\"MainWindow\", \"MainWindow\"))\r\n        self.menuDraw.setTitle(_translate(\"MainWindow\", \"Draw\"))\r\n        self.menuProperties.setTitle(_translate(\"MainWindow\", \"Properties\"))\r\n        self.menuEdit.setTitle(_translate(\"MainWindow\", \"Edit\"))\r\n        self.actionDraw_Circle.setText(_translate(\"MainWindow\", \"Draw Circle\"))\r\n        self.actionDraw_Circle.setToolTip(_translate(\"MainWindow\", \"To draw a circle\"))\r\n        self.actionDraw_Circle.setShortcut(_translate(\"MainWindow\", \"Shift+C\"))\r\n        self.actionDraw_Rectangle.setText(_translate(\"MainWindow\", \"Draw Rectangle\"))\r\n        self.actionDraw_Rectangle.setShortcut(_translate(\"MainWindow\", \"Ctrl+R\"))\r\n        self.actionDraw_Line.setText(_translate(\"MainWindow\", \"Draw Line\"))\r\n        self.actionDraw_Line.setShortcut(_translate(\"MainWindow\", \"Ctrl+L\"))\r\n        self.actionPage_Setup.setText(_translate(\"MainWindow\", \"Page Setup\"))\r\n        self.actionPage_Setup.setShortcut(_translate(\"MainWindow\", \"Shift+S\"))\r\n        self.actionSet_Password.setText(_translate(\"MainWindow\", \"Set Password\"))\r\n        self.actionSet_Password.setShortcut(_translate(\"MainWindow\", \"Shift+P\"))\r\n        self.actionCut.setText(_translate(\"MainWindow\", \"Cut\"))\r\n        self.actionCut.setShortcut(_translate(\"MainWindow\", \"Ctrl+X\"))\r\n        self.actionCopy.setText(_translate(\"MainWindow\", \"Copy\"))\r\n        self.actionCopy.setShortcut(_translate(\"MainWindow\", \"Ctrl+C\"))\r\n        self.actionPaste.setText(_translate(\"MainWindow\", \"Paste\"))\r\n        self.actionPaste.setShortcut(_translate(\"MainWindow\", \"Ctrl+V\"))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import sys\r\n    app = QtWidgets.QApplication(sys.argv)\r\n    MainWindow = QtWidgets.QMainWindow()\r\n    ui = Ui_MainWindow()\r\n    ui.setupUi(MainWindow)\r\n    MainWindow.show()\r\n    sys.exit(app.exec_())\r\n\r\n"
  },
  {
    "path": "Chapter07/demoTabWidget.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ui version=\"4.0\">\r\n <class>Dialog</class>\r\n <widget class=\"QDialog\" name=\"Dialog\">\r\n  <property name=\"geometry\">\r\n   <rect>\r\n    <x>0</x>\r\n    <y>0</y>\r\n    <width>574</width>\r\n    <height>300</height>\r\n   </rect>\r\n  </property>\r\n  <property name=\"windowTitle\">\r\n   <string>Dialog</string>\r\n  </property>\r\n  <widget class=\"QTabWidget\" name=\"tabWidget\">\r\n   <property name=\"geometry\">\r\n    <rect>\r\n     <x>10</x>\r\n     <y>10</y>\r\n     <width>481</width>\r\n     <height>271</height>\r\n    </rect>\r\n   </property>\r\n   <property name=\"font\">\r\n    <font>\r\n     <pointsize>12</pointsize>\r\n    </font>\r\n   </property>\r\n   <property name=\"currentIndex\">\r\n    <number>2</number>\r\n   </property>\r\n   <widget class=\"QWidget\" name=\"tab\">\r\n    <attribute name=\"title\">\r\n     <string>Products Listing</string>\r\n    </attribute>\r\n    <widget class=\"QCheckBox\" name=\"checkBox\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>30</x>\r\n       <y>30</y>\r\n       <width>191</width>\r\n       <height>17</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>Cell Phone $150</string>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QCheckBox\" name=\"checkBox_2\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>30</x>\r\n       <y>70</y>\r\n       <width>141</width>\r\n       <height>17</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>Laptop $500</string>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QCheckBox\" name=\"checkBox_3\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>30</x>\r\n       <y>110</y>\r\n       <width>161</width>\r\n       <height>17</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>Camera $250</string>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QCheckBox\" name=\"checkBox_4\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>30</x>\r\n       <y>150</y>\r\n       <width>171</width>\r\n       <height>17</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>Shoes $200</string>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QPushButton\" name=\"pushButton\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>40</x>\r\n       <y>190</y>\r\n       <width>141</width>\r\n       <height>23</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>Add to Cart</string>\r\n     </property>\r\n    </widget>\r\n   </widget>\r\n   <widget class=\"QWidget\" name=\"tab_2\">\r\n    <attribute name=\"title\">\r\n     <string>Payment Method</string>\r\n    </attribute>\r\n    <widget class=\"QRadioButton\" name=\"radioButton\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>40</x>\r\n       <y>30</y>\r\n       <width>131</width>\r\n       <height>17</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>Debit Card</string>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QRadioButton\" name=\"radioButton_2\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>40</x>\r\n       <y>80</y>\r\n       <width>111</width>\r\n       <height>17</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>Credit Card</string>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QRadioButton\" name=\"radioButton_3\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>40</x>\r\n       <y>130</y>\r\n       <width>121</width>\r\n       <height>21</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>Net Banking</string>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QRadioButton\" name=\"radioButton_4\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>40</x>\r\n       <y>180</y>\r\n       <width>181</width>\r\n       <height>21</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>Cash On Delivery</string>\r\n     </property>\r\n    </widget>\r\n   </widget>\r\n   <widget class=\"QWidget\" name=\"tab_3\">\r\n    <attribute name=\"title\">\r\n     <string>Delivery Address</string>\r\n    </attribute>\r\n    <widget class=\"QLineEdit\" name=\"lineEdit\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>160</x>\r\n       <y>10</y>\r\n       <width>291</width>\r\n       <height>20</height>\r\n      </rect>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QLineEdit\" name=\"lineEdit_2\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>160</x>\r\n       <y>50</y>\r\n       <width>291</width>\r\n       <height>20</height>\r\n      </rect>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QLineEdit\" name=\"lineEdit_3\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>160</x>\r\n       <y>90</y>\r\n       <width>291</width>\r\n       <height>20</height>\r\n      </rect>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QLineEdit\" name=\"lineEdit_4\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>160</x>\r\n       <y>130</y>\r\n       <width>291</width>\r\n       <height>20</height>\r\n      </rect>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QLineEdit\" name=\"lineEdit_5\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>160</x>\r\n       <y>170</y>\r\n       <width>291</width>\r\n       <height>20</height>\r\n      </rect>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QLineEdit\" name=\"lineEdit_6\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>160</x>\r\n       <y>210</y>\r\n       <width>291</width>\r\n       <height>20</height>\r\n      </rect>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QLabel\" name=\"label\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>10</x>\r\n       <y>10</y>\r\n       <width>91</width>\r\n       <height>16</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>Address 1</string>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QLabel\" name=\"label_2\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>10</x>\r\n       <y>50</y>\r\n       <width>71</width>\r\n       <height>16</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>Address 2</string>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QLabel\" name=\"label_3\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>10</x>\r\n       <y>90</y>\r\n       <width>47</width>\r\n       <height>13</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>State</string>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QLabel\" name=\"label_4\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>10</x>\r\n       <y>130</y>\r\n       <width>71</width>\r\n       <height>21</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>Country</string>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QLabel\" name=\"label_5\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>10</x>\r\n       <y>170</y>\r\n       <width>71</width>\r\n       <height>16</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>Zip Code</string>\r\n     </property>\r\n    </widget>\r\n    <widget class=\"QLabel\" name=\"label_6\">\r\n     <property name=\"geometry\">\r\n      <rect>\r\n       <x>10</x>\r\n       <y>210</y>\r\n       <width>121</width>\r\n       <height>16</height>\r\n      </rect>\r\n     </property>\r\n     <property name=\"text\">\r\n      <string>Contact Number</string>\r\n     </property>\r\n    </widget>\r\n   </widget>\r\n  </widget>\r\n </widget>\r\n <resources/>\r\n <connections/>\r\n</ui>\r\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 Packt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "\n\n\n# Qt5 Python GUI Programming Cookbook\n\n<a href=\"https://www.packtpub.com/application-development/qt5-python-gui-programming-cookbook?utm_source=github&utm_medium=repository&utm_campaign=9781788831000 \"><img src=\"https://d1ldz4te4covpm.cloudfront.net/sites/default/files/imagecache/ppv4_main_book_cover/B09894_cover.png\" alt=\"Qt5 Python GUI Programming Cookbook\" height=\"256px\" align=\"right\"></a>\n\nThis is the code repository for [Qt5 Python GUI Programming Cookbook](https://www.packtpub.com/application-development/qt5-python-gui-programming-cookbook?utm_source=github&utm_medium=repository&utm_campaign=9781788831000 ), published by Packt.\n\n**\tBuilding responsive and powerful cross-platform applications with PyQt**\n\n## What is this book about?\nPyQt is one of the best cross-platform interface toolkits currently available; it's stable, mature, and completely native. If you want control over all aspects of UI elements, PyQt is what you need. This book will guide you through every concept necessary to create fully functional GUI applications using PyQt, with only a few lines of code.\n\nThis book covers the following exciting features:\nUse basic Qt components, such as a radio button, combo box, and sliders \nUse QSpinBox and sliders to handle different signals generated on mouse clicks \nWork with different Qt layouts to meet user interface requirements \nCreate custom widgets and set up customizations in your GUI \nPerform asynchronous I/O operations and thread handling in the Python GUI \nEmploy network concepts, internet browsing, and Google Maps in UI \nUse graphics rendering and implement animation in your GUI \nMake your GUI application compatible with Android and iOS devices \n\nIf you feel this book is for you, get your [copy](https://www.amazon.com/dp/1-788-83100-4) today!\n\n<a href=\"https://www.packtpub.com/?utm_source=github&utm_medium=banner&utm_campaign=GitHubBanner\"><img src=\"https://raw.githubusercontent.com/PacktPublishing/GitHub/master/GitHub.png\" \nalt=\"https://www.packtpub.com/\" border=\"5\" /></a>\n\n## Instructions and Navigations\nAll of the code is organized into folders. For example, Chapter02.\n\nThe code will look like the following:\n```\nimport sys\nfrom PyQt5.QtWidgets import QDialog, QApplication\nfrom demoCalendar import *\nclass MyForm(QDialog):\n    def __init__(self):\n        super().__init__()\n        self.ui = Ui_Dialog()\n        self.ui.setupUi(self)\n        self.ui.calendarWidget.selectionChanged.connect\n        (self.dispdate)\n        self.show()\n    def dispdate(self):\n        self.ui.dateEdit.setDate(self.ui.calendarWidget.\n        selectedDate())\nif __name__==\"__main__\":\n    app = QApplication(sys.argv)\n    w = MyForm()\n    w.show()\n    sys.exit(app.exec_())\n```\n\n**Following is what you need for this book:**\nIf you’re an intermediate Python programmer wishing to enhance your coding skills by writing powerful GUIs in Python using PyQT, this is the book for you.\n\nWith the following software and hardware list you can run all code files present in the book (Chapter 1-13).\n### Software and Hardware List\n| Chapter | Software required | OS required |\n| -------- | ------------------------------------ | ----------------------------------- |\n| 1-8,10-12  | Python 3.5.0 | Windows, Mac OS X, and Linux (Any) |\n| 1-8, 10-12 | PyQt5 version 5.6 | Windows, Mac OS X, and Linux (Any) |\n| 9 | SQLite 3 | Windows, Mac OS X, and Linux (Any) |\n| 9 | DB Browser for SQLite | Windows, Mac OS X, and Linux (Any) |\n| 13 | QPython | Windows, Mac OS X, and Linux (Any) |\n| 13 | Cython | Windows, Mac OS X, and Linux (Any) |\n| 13 | Kivy | Windows, Mac OS X, and Linux (Any) |\n| 13 | Oracle VM VirtualBox | Windows, Mac OS X, and Linux (Any) |\n| 13 | Kivy Buildozer VM | Windows, Mac OS X, and Linux (Any) |\n| 13 | XCode and libraries | Windows, Mac OS X, and Linux (Any) |\n\nWe also provide a PDF file that has color images of the screenshots/diagrams used in this book. [Click here to download it](https://www.packtpub.com/sites/default/files/downloads/Qt5PythonGUIProgrammingCookbook_ColorImages.pdf).\n\n### Related products\n* Computer Vision with OpenCV 3 and Qt5: Build visually appealing, multithreaded, cross-platform computer vision applications Paperback  – January 2, 2018  [[Packt]](https://www.amazon.com/Computer-Vision-OpenCV-multithreaded-cross-platform/dp/178847239X/ref=sr_1_1?ie=UTF8&qid=1532586055&sr=8-1&keywords=Computer+Vision+with+OpenCV+3+and+Qt5&dpID=51Z4u1hLAzL&preST=_SX218_BO1,204,203,200_QL40_&dpSrc=srch&utm_source=github&utm_medium=repository&utm_campaign=) [[Amazon]](https://www.amazon.com/dp/1-788-47239-X)\n\n* Qt 5 Projects: Develop cross-platform applications with modern UIs using the powerful Qt framework Paperback  – February 23, 2018  [[Packt]](https://www.amazon.com/Qt-Projects-cross-platform-applications-framework/dp/1788293886/ref=sr_1_2_sspa?s=books&ie=UTF8&qid=1532586126&sr=1-2-spons&keywords=Qt+5+Projects&psc=1&utm_source=github&utm_medium=repository&utm_campaign=) [[Amazon]](https://www.amazon.com/dp/)\n\n*  [[Packt]]() [[Amazon]](https://www.amazon.com/dp/)\n\n*  [[Packt]]() [[Amazon]](https://www.amazon.com/dp/)\n\n## Get to Know the Author\n**BM Harwani**\nis the founder and owner of Microchip Computer Education (MCE), based in Ajmer, India. He graduated with a BE in computer engineering from the University of Pune and also has a C level (masters diploma in computer technology) from DOEACC, Government of India. Having been involved in the teaching field for over 20 years, he has developed the art of explaining even the most complicated topics in a straightforward and easily understandable fashion. He is also a renowned speaker and the author of several books. To learn more, visit his blog, a site that helps programmers.\n\n****\n0\n\n****\n0\n\n****\n0\n\n****\n0\n\n## Other books by the authors\n[]()\n\n[]()\n\n[]()\n\n[]()\n\n[]()\n\n### Suggestions and Feedback\n[Click here](https://docs.google.com/forms/d/e/1FAIpQLSdy7dATC6QmEL81FIUuymZ0Wy9vH1jHkvpY57OiMeKGqib_Ow/viewform) if you have any feedback or suggestions.\n\n\n### Download a free PDF\n\n <i>If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.<br>Simply click on the link to claim your free PDF.</i>\n<p align=\"center\"> <a href=\"https://packt.link/free-ebook/9781788831000\">https://packt.link/free-ebook/9781788831000 </a> </p>"
  }
]