개정판 49498c70
add db clear function
Change-Id: I35af3ac361c97d0bb943c445d5ccaf07fbb7c509
DTI_PID/DTI_PID/AppDocData.py | ||
---|---|---|
4167 | 4167 |
|
4168 | 4168 |
return result |
4169 | 4169 |
|
4170 |
def clearAllDrawingDataFromDatabase(self): |
|
4171 |
""" clear all drawing data from database """ |
|
4172 |
|
|
4173 |
drawings = self.getDrawings() |
|
4174 |
|
|
4175 |
with self.project.database.connect() as conn: |
|
4176 |
try: |
|
4177 |
# Get a cursor object |
|
4178 |
cursor = conn.cursor() |
|
4179 |
|
|
4180 |
for drawing in drawings: |
|
4181 |
sql = "delete from LINE_DATA_LIST where PNID_NO = '{}'".format(drawing.UID) |
|
4182 |
cursor.execute(sql) |
|
4183 |
sql = "delete from TitleBlockValues where Drawings_UID = '{}'".format(drawing.UID) |
|
4184 |
cursor.execute(sql) |
|
4185 |
sql = f"delete from LineNoAttributes where Components_UID in " \ |
|
4186 |
f"(select UID from Components where Drawings_UID='{drawing.UID}')" |
|
4187 |
cursor.execute(sql) |
|
4188 |
sql = f"delete from Attributes where Components_UID in " \ |
|
4189 |
f"(select UID from Components where Drawings_UID='{drawing.UID}')" |
|
4190 |
cursor.execute(sql) |
|
4191 |
sql = f"delete from Associations where Components_UID in " \ |
|
4192 |
f"(select UID from Components where Drawings_UID='{drawing.UID}')" |
|
4193 |
cursor.execute(sql) |
|
4194 |
sql = f"delete from Points where Components_UID in " \ |
|
4195 |
f"(select UID from Components where Drawings_UID='{drawing.UID}')" |
|
4196 |
cursor.execute(sql) |
|
4197 |
sql = f"delete from PipeRunItems where PipeRuns_UID in " \ |
|
4198 |
f"(select UID from PipeRuns where Drawings_UID='{drawing.UID}')" |
|
4199 |
cursor.execute(sql) |
|
4200 |
sql = f"delete from PipeRuns where Drawings_UID='{drawing.UID}'" |
|
4201 |
cursor.execute(sql) |
|
4202 |
sql = "delete from Components where Drawings_UID='{}'".format(drawing.UID) |
|
4203 |
cursor.execute(sql) |
|
4204 |
sql = "delete from Stream_Line_List where Drawing_UID='{}'".format(drawing.UID) |
|
4205 |
cursor.execute(sql) |
|
4206 |
sql = "delete from Views where Drawings_UID='{}'".format(drawing.UID) |
|
4207 |
cursor.execute(sql) |
|
4208 |
sql = "delete from Drawings where [UID]='{}'".format(drawing.UID) |
|
4209 |
cursor.execute(sql) |
|
4210 |
|
|
4211 |
if self.project.database.db_type == 'SQLite': |
|
4212 |
cursor.execute('commit') |
|
4213 |
else: |
|
4214 |
conn.commit() |
|
4215 |
|
|
4216 |
# Catch the exception |
|
4217 |
except Exception as ex: |
|
4218 |
# Roll back any change if something goes wrong |
|
4219 |
conn.rollback() |
|
4220 |
|
|
4221 |
from App import App |
|
4222 |
message = 'error occurred({}\\n{}) in {}:{}'.format(repr(ex), sql, |
|
4223 |
sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
4224 |
sys.exc_info()[-1].tb_lineno) |
|
4225 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
4226 |
|
|
4227 |
|
|
4170 | 4228 |
def saveToDatabase(self, items, rect: QRectF, show_progress=None): |
4171 | 4229 |
""" save given items to database """ |
4172 | 4230 |
import uuid |
DTI_PID/DTI_PID/ConfigurationDialog.py | ||
---|---|---|
626 | 626 |
self.ui.tableViewLineNo.doubleClicked.connect(self.lineNoItemDoubleCliced) |
627 | 627 |
self.ui.tableViewTagNo.doubleClicked.connect(self.tagNoItemDoubleClicked) |
628 | 628 |
self.ui.pushButtonClearAccessInfo.clicked.connect(self.clear_drawing_access_info_clicked) |
629 |
self.ui.pushButtonClearDatabase.clicked.connect(self.clear_drawing_Data_clicked) |
|
629 | 630 |
self.ui.pushButtonServerTest.clicked.connect(self.on_test_connection_clicked) |
630 | 631 |
self.ui.buttonGroup_7.buttonClicked.connect(self.symbol_engine_change) # symbol engine group |
631 | 632 |
|
... | ... | |
760 | 761 |
sys.exc_info()[-1].tb_lineno) |
761 | 762 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
762 | 763 |
|
764 |
def clear_drawing_Data_clicked(self): |
|
765 |
reply = QMessageBox.question(self, self.tr('Continue?'), |
|
766 |
self.tr('Are you sure you want to clear all drawing data from database?\nTo proceed, enter "Confirm" in the right input box.'), |
|
767 |
QMessageBox.Yes, QMessageBox.Cancel) |
|
768 |
if reply == QMessageBox.Yes: |
|
769 |
if self.ui.lineEditClearDatabase.text() == 'Confirm': |
|
770 |
AppDocData.instance().clearAllDrawingDataFromDatabase() |
|
771 |
QMessageBox.information(self, self.tr('Information'), self.tr('Succeeded')) |
|
772 |
else: |
|
773 |
QMessageBox.warning(self, self.tr('Warning'), 'To proceed, enter "Confirm" in the right input box.') |
|
774 |
|
|
763 | 775 |
def clear_drawing_access_info_clicked(self): |
764 | 776 |
reply = QMessageBox.question(self, self.tr('Continue?'), |
765 | 777 |
self.tr('Are you sure you want to clear drawing access information?'), |
DTI_PID/DTI_PID/Configuration_UI.py | ||
---|---|---|
800 | 800 |
self.gridLayout_23.setObjectName("gridLayout_23") |
801 | 801 |
self.gridLayout_31 = QtWidgets.QGridLayout() |
802 | 802 |
self.gridLayout_31.setObjectName("gridLayout_31") |
803 |
self.label_61 = QtWidgets.QLabel(self.groupBox_11) |
|
804 |
self.label_61.setObjectName("label_61") |
|
805 |
self.gridLayout_31.addWidget(self.label_61, 5, 0, 1, 1) |
|
803 | 806 |
spacerItem8 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) |
804 | 807 |
self.gridLayout_31.addItem(spacerItem8, 1, 2, 1, 1) |
805 |
self.label_58 = QtWidgets.QLabel(self.groupBox_11) |
|
806 |
self.label_58.setObjectName("label_58") |
|
807 |
self.gridLayout_31.addWidget(self.label_58, 3, 0, 1, 1) |
|
808 |
self.label_31 = QtWidgets.QLabel(self.groupBox_11) |
|
809 |
self.label_31.setMinimumSize(QtCore.QSize(200, 0)) |
|
810 |
self.label_31.setObjectName("label_31") |
|
811 |
self.gridLayout_31.addWidget(self.label_31, 4, 0, 1, 1) |
|
808 |
self.label_62 = QtWidgets.QLabel(self.groupBox_11) |
|
809 |
self.label_62.setObjectName("label_62") |
|
810 |
self.gridLayout_31.addWidget(self.label_62, 6, 0, 1, 1) |
|
811 |
self.pushButtonClearAccessInfo = QtWidgets.QPushButton(self.groupBox_11) |
|
812 |
self.pushButtonClearAccessInfo.setObjectName("pushButtonClearAccessInfo") |
|
813 |
self.gridLayout_31.addWidget(self.pushButtonClearAccessInfo, 4, 1, 1, 1) |
|
814 |
self.label_30 = QtWidgets.QLabel(self.groupBox_11) |
|
815 |
self.label_30.setObjectName("label_30") |
|
816 |
self.gridLayout_31.addWidget(self.label_30, 1, 0, 1, 1) |
|
817 |
self.label_34 = QtWidgets.QLabel(self.groupBox_11) |
|
818 |
self.label_34.setObjectName("label_34") |
|
819 |
self.gridLayout_31.addWidget(self.label_34, 2, 0, 1, 1) |
|
820 |
self.spinBoxSaveAlarm = QtWidgets.QSpinBox(self.groupBox_11) |
|
821 |
self.spinBoxSaveAlarm.setMaximum(100) |
|
822 |
self.spinBoxSaveAlarm.setSingleStep(10) |
|
823 |
self.spinBoxSaveAlarm.setObjectName("spinBoxSaveAlarm") |
|
824 |
self.gridLayout_31.addWidget(self.spinBoxSaveAlarm, 0, 1, 1, 1) |
|
812 | 825 |
self.horizontalLayout_14 = QtWidgets.QHBoxLayout() |
813 | 826 |
self.horizontalLayout_14.setObjectName("horizontalLayout_14") |
814 | 827 |
self.radioButtonLineListYes = QtWidgets.QRadioButton(self.groupBox_11) |
... | ... | |
822 | 835 |
self.buttonGroup_11.addButton(self.radioButtonLineListNo) |
823 | 836 |
self.horizontalLayout_14.addWidget(self.radioButtonLineListNo) |
824 | 837 |
self.gridLayout_31.addLayout(self.horizontalLayout_14, 3, 1, 1, 1) |
825 |
self.pushButtonClearAccessInfo = QtWidgets.QPushButton(self.groupBox_11) |
|
826 |
self.pushButtonClearAccessInfo.setObjectName("pushButtonClearAccessInfo") |
|
827 |
self.gridLayout_31.addWidget(self.pushButtonClearAccessInfo, 4, 1, 1, 1) |
|
828 |
self.spinBoxSaveAlarm = QtWidgets.QSpinBox(self.groupBox_11) |
|
829 |
self.spinBoxSaveAlarm.setMaximum(100) |
|
830 |
self.spinBoxSaveAlarm.setSingleStep(10) |
|
831 |
self.spinBoxSaveAlarm.setObjectName("spinBoxSaveAlarm") |
|
832 |
self.gridLayout_31.addWidget(self.spinBoxSaveAlarm, 0, 1, 1, 1) |
|
833 |
self.label_34 = QtWidgets.QLabel(self.groupBox_11) |
|
834 |
self.label_34.setObjectName("label_34") |
|
835 |
self.gridLayout_31.addWidget(self.label_34, 2, 0, 1, 1) |
|
836 |
self.spinBoxListeningPort = QtWidgets.QSpinBox(self.groupBox_11) |
|
837 |
self.spinBoxListeningPort.setMaximum(9999) |
|
838 |
self.spinBoxListeningPort.setProperty("value", 2549) |
|
839 |
self.spinBoxListeningPort.setObjectName("spinBoxListeningPort") |
|
840 |
self.gridLayout_31.addWidget(self.spinBoxListeningPort, 5, 1, 1, 1) |
|
841 |
self.label_61 = QtWidgets.QLabel(self.groupBox_11) |
|
842 |
self.label_61.setObjectName("label_61") |
|
843 |
self.gridLayout_31.addWidget(self.label_61, 5, 0, 1, 1) |
|
844 |
self.label_30 = QtWidgets.QLabel(self.groupBox_11) |
|
845 |
self.label_30.setObjectName("label_30") |
|
846 |
self.gridLayout_31.addWidget(self.label_30, 1, 0, 1, 1) |
|
847 | 838 |
self.label_49 = QtWidgets.QLabel(self.groupBox_11) |
848 | 839 |
self.label_49.setObjectName("label_49") |
849 | 840 |
self.gridLayout_31.addWidget(self.label_49, 0, 0, 1, 1) |
... | ... | |
866 | 857 |
self.buttonGroup.addButton(self.radioButtonLoadXmlNo) |
867 | 858 |
self.horizontalLayout_3.addWidget(self.radioButtonLoadXmlNo) |
868 | 859 |
self.gridLayout_31.addLayout(self.horizontalLayout_3, 1, 1, 1, 1) |
860 |
self.label_31 = QtWidgets.QLabel(self.groupBox_11) |
|
861 |
self.label_31.setMinimumSize(QtCore.QSize(200, 0)) |
|
862 |
self.label_31.setObjectName("label_31") |
|
863 |
self.gridLayout_31.addWidget(self.label_31, 4, 0, 1, 1) |
|
864 |
self.label_58 = QtWidgets.QLabel(self.groupBox_11) |
|
865 |
self.label_58.setObjectName("label_58") |
|
866 |
self.gridLayout_31.addWidget(self.label_58, 3, 0, 1, 1) |
|
867 |
self.spinBoxListeningPort = QtWidgets.QSpinBox(self.groupBox_11) |
|
868 |
self.spinBoxListeningPort.setMaximum(9999) |
|
869 |
self.spinBoxListeningPort.setProperty("value", 2549) |
|
870 |
self.spinBoxListeningPort.setObjectName("spinBoxListeningPort") |
|
871 |
self.gridLayout_31.addWidget(self.spinBoxListeningPort, 5, 1, 1, 1) |
|
872 |
self.spinBoxConnectionPort = QtWidgets.QSpinBox(self.groupBox_11) |
|
873 |
self.spinBoxConnectionPort.setMaximum(9999) |
|
874 |
self.spinBoxConnectionPort.setProperty("value", 3030) |
|
875 |
self.spinBoxConnectionPort.setObjectName("spinBoxConnectionPort") |
|
876 |
self.gridLayout_31.addWidget(self.spinBoxConnectionPort, 6, 1, 1, 1) |
|
869 | 877 |
self.horizontalLayout_4 = QtWidgets.QHBoxLayout() |
870 | 878 |
self.horizontalLayout_4.setObjectName("horizontalLayout_4") |
871 | 879 |
self.radioButtonSaveUnknownYes = QtWidgets.QRadioButton(self.groupBox_11) |
... | ... | |
881 | 889 |
self.buttonGroup_2.addButton(self.radioButtonSaveUnknownNo) |
882 | 890 |
self.horizontalLayout_4.addWidget(self.radioButtonSaveUnknownNo) |
883 | 891 |
self.gridLayout_31.addLayout(self.horizontalLayout_4, 2, 1, 1, 1) |
884 |
self.label_62 = QtWidgets.QLabel(self.groupBox_11) |
|
885 |
self.label_62.setObjectName("label_62") |
|
886 |
self.gridLayout_31.addWidget(self.label_62, 6, 0, 1, 1) |
|
887 |
self.spinBoxConnectionPort = QtWidgets.QSpinBox(self.groupBox_11) |
|
888 |
self.spinBoxConnectionPort.setMaximum(9999) |
|
889 |
self.spinBoxConnectionPort.setProperty("value", 3030) |
|
890 |
self.spinBoxConnectionPort.setObjectName("spinBoxConnectionPort") |
|
891 |
self.gridLayout_31.addWidget(self.spinBoxConnectionPort, 6, 1, 1, 1) |
|
892 |
self.label_67 = QtWidgets.QLabel(self.groupBox_11) |
|
893 |
self.label_67.setObjectName("label_67") |
|
894 |
self.gridLayout_31.addWidget(self.label_67, 7, 0, 1, 1) |
|
895 |
self.pushButtonClearDatabase = QtWidgets.QPushButton(self.groupBox_11) |
|
896 |
self.pushButtonClearDatabase.setObjectName("pushButtonClearDatabase") |
|
897 |
self.gridLayout_31.addWidget(self.pushButtonClearDatabase, 7, 1, 1, 1) |
|
898 |
self.lineEditClearDatabase = QtWidgets.QLineEdit(self.groupBox_11) |
|
899 |
self.lineEditClearDatabase.setObjectName("lineEditClearDatabase") |
|
900 |
self.gridLayout_31.addWidget(self.lineEditClearDatabase, 7, 2, 1, 1) |
|
892 | 901 |
self.gridLayout_23.addLayout(self.gridLayout_31, 0, 0, 1, 1) |
893 | 902 |
self.gridLayout_21.addWidget(self.groupBox_11, 0, 0, 1, 1) |
894 | 903 |
self.groupBox_12 = QtWidgets.QGroupBox(self.tabETC) |
... | ... | |
1221 | 1230 |
self.label_25.setText(_translate("ConfigurationDialog", "Color Representation")) |
1222 | 1231 |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabLineColor), _translate("ConfigurationDialog", "Line No Color")) |
1223 | 1232 |
self.groupBox_11.setTitle(_translate("ConfigurationDialog", "Program Data")) |
1224 |
self.label_58.setText(_translate("ConfigurationDialog", "Line List by Using Stream No : ")) |
|
1225 |
self.label_31.setText(_translate("ConfigurationDialog", "Clear Drawing Access Information : ")) |
|
1226 |
self.radioButtonLineListYes.setText(_translate("ConfigurationDialog", "Yes")) |
|
1227 |
self.radioButtonLineListNo.setText(_translate("ConfigurationDialog", "No")) |
|
1228 |
self.pushButtonClearAccessInfo.setText(_translate("ConfigurationDialog", "Clear")) |
|
1229 |
self.label_34.setText(_translate("ConfigurationDialog", "Save Unknown Item to XML Only : ")) |
|
1230 | 1233 |
self.label_61.setText(_translate("ConfigurationDialog", "Listening Port(2549) : ")) |
1234 |
self.label_62.setText(_translate("ConfigurationDialog", "Connection Port(3030) : ")) |
|
1235 |
self.pushButtonClearAccessInfo.setText(_translate("ConfigurationDialog", "Clear")) |
|
1231 | 1236 |
self.label_30.setText(_translate("ConfigurationDialog", "Load Data From : ")) |
1237 |
self.label_34.setText(_translate("ConfigurationDialog", "Save Unknown Item to XML Only : ")) |
|
1238 |
self.radioButtonLineListYes.setText(_translate("ConfigurationDialog", "Yes")) |
|
1239 |
self.radioButtonLineListNo.setText(_translate("ConfigurationDialog", "No")) |
|
1232 | 1240 |
self.label_49.setText(_translate("ConfigurationDialog", "Save Alarm(min) : ")) |
1233 | 1241 |
self.radioButtonLoadXmlOnly.setText(_translate("ConfigurationDialog", "XML Only")) |
1234 | 1242 |
self.radioButtonLoadXmlYes.setText(_translate("ConfigurationDialog", "XML Frist")) |
1235 | 1243 |
self.radioButtonLoadXmlNo.setText(_translate("ConfigurationDialog", "Database Only")) |
1244 |
self.label_31.setText(_translate("ConfigurationDialog", "Clear Drawing Access Information : ")) |
|
1245 |
self.label_58.setText(_translate("ConfigurationDialog", "Line List by Using Stream No : ")) |
|
1236 | 1246 |
self.radioButtonSaveUnknownYes.setText(_translate("ConfigurationDialog", "Yes")) |
1237 | 1247 |
self.radioButtonSaveUnknownNo.setText(_translate("ConfigurationDialog", "No")) |
1238 |
self.label_62.setText(_translate("ConfigurationDialog", "Connection Port(3030)")) |
|
1248 |
self.label_67.setText(_translate("ConfigurationDialog", "Clear Drawing Data from Database : ")) |
|
1249 |
self.pushButtonClearDatabase.setText(_translate("ConfigurationDialog", "Clear")) |
|
1239 | 1250 |
self.groupBox_12.setTitle(_translate("ConfigurationDialog", "Visual")) |
1240 | 1251 |
self.label_36.setText(_translate("ConfigurationDialog", "Background Text Transparency : ")) |
1241 | 1252 |
self.radioButtonBackTextYes.setText(_translate("ConfigurationDialog", "Yes")) |
DTI_PID/DTI_PID/UI/Configuration.ui | ||
---|---|---|
1636 | 1636 |
<layout class="QGridLayout" name="gridLayout_23"> |
1637 | 1637 |
<item row="0" column="0"> |
1638 | 1638 |
<layout class="QGridLayout" name="gridLayout_31"> |
1639 |
<item row="5" column="0"> |
|
1640 |
<widget class="QLabel" name="label_61"> |
|
1641 |
<property name="text"> |
|
1642 |
<string>Listening Port(2549) : </string> |
|
1643 |
</property> |
|
1644 |
</widget> |
|
1645 |
</item> |
|
1639 | 1646 |
<item row="1" column="2"> |
1640 | 1647 |
<spacer name="horizontalSpacer_3"> |
1641 | 1648 |
<property name="orientation"> |
... | ... | |
1649 | 1656 |
</property> |
1650 | 1657 |
</spacer> |
1651 | 1658 |
</item> |
1652 |
<item row="3" column="0">
|
|
1653 |
<widget class="QLabel" name="label_58">
|
|
1659 |
<item row="6" column="0">
|
|
1660 |
<widget class="QLabel" name="label_62">
|
|
1654 | 1661 |
<property name="text"> |
1655 |
<string>Line List by Using Stream No : </string>
|
|
1662 |
<string>Connection Port(3030) : </string>
|
|
1656 | 1663 |
</property> |
1657 | 1664 |
</widget> |
1658 | 1665 |
</item> |
1659 |
<item row="4" column="0"> |
|
1660 |
<widget class="QLabel" name="label_31"> |
|
1661 |
<property name="minimumSize"> |
|
1662 |
<size> |
|
1663 |
<width>200</width> |
|
1664 |
<height>0</height> |
|
1665 |
</size> |
|
1666 |
<item row="4" column="1"> |
|
1667 |
<widget class="QPushButton" name="pushButtonClearAccessInfo"> |
|
1668 |
<property name="text"> |
|
1669 |
<string>Clear</string> |
|
1666 | 1670 |
</property> |
1671 |
</widget> |
|
1672 |
</item> |
|
1673 |
<item row="1" column="0"> |
|
1674 |
<widget class="QLabel" name="label_30"> |
|
1667 | 1675 |
<property name="text"> |
1668 |
<string>Clear Drawing Access Information : </string> |
|
1676 |
<string>Load Data From : </string> |
|
1677 |
</property> |
|
1678 |
</widget> |
|
1679 |
</item> |
|
1680 |
<item row="2" column="0"> |
|
1681 |
<widget class="QLabel" name="label_34"> |
|
1682 |
<property name="text"> |
|
1683 |
<string>Save Unknown Item to XML Only : </string> |
|
1684 |
</property> |
|
1685 |
</widget> |
|
1686 |
</item> |
|
1687 |
<item row="0" column="1"> |
|
1688 |
<widget class="QSpinBox" name="spinBoxSaveAlarm"> |
|
1689 |
<property name="maximum"> |
|
1690 |
<number>100</number> |
|
1691 |
</property> |
|
1692 |
<property name="singleStep"> |
|
1693 |
<number>10</number> |
|
1669 | 1694 |
</property> |
1670 | 1695 |
</widget> |
1671 | 1696 |
</item> |
... | ... | |
1693 | 1718 |
</item> |
1694 | 1719 |
</layout> |
1695 | 1720 |
</item> |
1696 |
<item row="4" column="1"> |
|
1697 |
<widget class="QPushButton" name="pushButtonClearAccessInfo"> |
|
1698 |
<property name="text"> |
|
1699 |
<string>Clear</string> |
|
1700 |
</property> |
|
1701 |
</widget> |
|
1702 |
</item> |
|
1703 |
<item row="0" column="1"> |
|
1704 |
<widget class="QSpinBox" name="spinBoxSaveAlarm"> |
|
1705 |
<property name="maximum"> |
|
1706 |
<number>100</number> |
|
1707 |
</property> |
|
1708 |
<property name="singleStep"> |
|
1709 |
<number>10</number> |
|
1710 |
</property> |
|
1711 |
</widget> |
|
1712 |
</item> |
|
1713 |
<item row="2" column="0"> |
|
1714 |
<widget class="QLabel" name="label_34"> |
|
1715 |
<property name="text"> |
|
1716 |
<string>Save Unknown Item to XML Only : </string> |
|
1717 |
</property> |
|
1718 |
</widget> |
|
1719 |
</item> |
|
1720 |
<item row="5" column="1"> |
|
1721 |
<widget class="QSpinBox" name="spinBoxListeningPort"> |
|
1722 |
<property name="maximum"> |
|
1723 |
<number>9999</number> |
|
1724 |
</property> |
|
1725 |
<property name="value"> |
|
1726 |
<number>2549</number> |
|
1727 |
</property> |
|
1728 |
</widget> |
|
1729 |
</item> |
|
1730 |
<item row="5" column="0"> |
|
1731 |
<widget class="QLabel" name="label_61"> |
|
1732 |
<property name="text"> |
|
1733 |
<string>Listening Port(2549) : </string> |
|
1734 |
</property> |
|
1735 |
</widget> |
|
1736 |
</item> |
|
1737 |
<item row="1" column="0"> |
|
1738 |
<widget class="QLabel" name="label_30"> |
|
1739 |
<property name="text"> |
|
1740 |
<string>Load Data From : </string> |
|
1741 |
</property> |
|
1742 |
</widget> |
|
1743 |
</item> |
|
1744 | 1721 |
<item row="0" column="0"> |
1745 | 1722 |
<widget class="QLabel" name="label_49"> |
1746 | 1723 |
<property name="text"> |
... | ... | |
1788 | 1765 |
</item> |
1789 | 1766 |
</layout> |
1790 | 1767 |
</item> |
1768 |
<item row="4" column="0"> |
|
1769 |
<widget class="QLabel" name="label_31"> |
|
1770 |
<property name="minimumSize"> |
|
1771 |
<size> |
|
1772 |
<width>200</width> |
|
1773 |
<height>0</height> |
|
1774 |
</size> |
|
1775 |
</property> |
|
1776 |
<property name="text"> |
|
1777 |
<string>Clear Drawing Access Information : </string> |
|
1778 |
</property> |
|
1779 |
</widget> |
|
1780 |
</item> |
|
1781 |
<item row="3" column="0"> |
|
1782 |
<widget class="QLabel" name="label_58"> |
|
1783 |
<property name="text"> |
|
1784 |
<string>Line List by Using Stream No : </string> |
|
1785 |
</property> |
|
1786 |
</widget> |
|
1787 |
</item> |
|
1788 |
<item row="5" column="1"> |
|
1789 |
<widget class="QSpinBox" name="spinBoxListeningPort"> |
|
1790 |
<property name="maximum"> |
|
1791 |
<number>9999</number> |
|
1792 |
</property> |
|
1793 |
<property name="value"> |
|
1794 |
<number>2549</number> |
|
1795 |
</property> |
|
1796 |
</widget> |
|
1797 |
</item> |
|
1798 |
<item row="6" column="1"> |
|
1799 |
<widget class="QSpinBox" name="spinBoxConnectionPort"> |
|
1800 |
<property name="maximum"> |
|
1801 |
<number>9999</number> |
|
1802 |
</property> |
|
1803 |
<property name="value"> |
|
1804 |
<number>3030</number> |
|
1805 |
</property> |
|
1806 |
</widget> |
|
1807 |
</item> |
|
1791 | 1808 |
<item row="2" column="1"> |
1792 | 1809 |
<layout class="QHBoxLayout" name="horizontalLayout_4"> |
1793 | 1810 |
<item> |
... | ... | |
1818 | 1835 |
</item> |
1819 | 1836 |
</layout> |
1820 | 1837 |
</item> |
1821 |
<item row="6" column="0">
|
|
1822 |
<widget class="QLabel" name="label_62">
|
|
1838 |
<item row="7" column="0">
|
|
1839 |
<widget class="QLabel" name="label_67">
|
|
1823 | 1840 |
<property name="text"> |
1824 |
<string>Connection Port(3030)</string>
|
|
1841 |
<string>Clear Drawing Data from Database : </string>
|
|
1825 | 1842 |
</property> |
1826 | 1843 |
</widget> |
1827 | 1844 |
</item> |
1828 |
<item row="6" column="1"> |
|
1829 |
<widget class="QSpinBox" name="spinBoxConnectionPort"> |
|
1830 |
<property name="maximum"> |
|
1831 |
<number>9999</number> |
|
1832 |
</property> |
|
1833 |
<property name="value"> |
|
1834 |
<number>3030</number> |
|
1845 |
<item row="7" column="1"> |
|
1846 |
<widget class="QPushButton" name="pushButtonClearDatabase"> |
|
1847 |
<property name="text"> |
|
1848 |
<string>Clear</string> |
|
1835 | 1849 |
</property> |
1836 | 1850 |
</widget> |
1837 | 1851 |
</item> |
1852 |
<item row="7" column="2"> |
|
1853 |
<widget class="QLineEdit" name="lineEditClearDatabase"/> |
|
1854 |
</item> |
|
1838 | 1855 |
</layout> |
1839 | 1856 |
</item> |
1840 | 1857 |
</layout> |
... | ... | |
2280 | 2297 |
</connection> |
2281 | 2298 |
</connections> |
2282 | 2299 |
<buttongroups> |
2283 |
<buttongroup name="buttonGroup_10"/> |
|
2284 |
<buttongroup name="buttonGroup_15"/> |
|
2300 |
<buttongroup name="buttonGroup_4"/> |
|
2301 |
<buttongroup name="buttonGroup_16"/> |
|
2302 |
<buttongroup name="buttonGroup_9"/> |
|
2303 |
<buttongroup name="buttonGroup_13"/> |
|
2304 |
<buttongroup name="buttonGroup_5"/> |
|
2285 | 2305 |
<buttongroup name="buttonGroup_12"/> |
2306 |
<buttongroup name="buttonGroup_15"/> |
|
2307 |
<buttongroup name="buttonGroup_3"/> |
|
2286 | 2308 |
<buttongroup name="buttonGroup_8"/> |
2309 |
<buttongroup name="buttonGroup"/> |
|
2310 |
<buttongroup name="buttonGroup_2"/> |
|
2287 | 2311 |
<buttongroup name="buttonGroup_6"/> |
2288 | 2312 |
<buttongroup name="buttonGroup_14"/> |
2289 |
<buttongroup name="buttonGroup"/> |
|
2290 |
<buttongroup name="buttonGroup_13"/> |
|
2291 |
<buttongroup name="buttonGroup_3"/> |
|
2313 |
<buttongroup name="buttonGroup_10"/> |
|
2292 | 2314 |
<buttongroup name="buttonGroup_7"/> |
2293 |
<buttongroup name="buttonGroup_2"/> |
|
2294 |
<buttongroup name="buttonGroup_16"/> |
|
2295 |
<buttongroup name="buttonGroup_4"/> |
|
2296 | 2315 |
<buttongroup name="buttonGroup_11"/> |
2297 |
<buttongroup name="buttonGroup_5"/> |
|
2298 |
<buttongroup name="buttonGroup_9"/> |
|
2299 | 2316 |
</buttongroups> |
2300 | 2317 |
</ui> |
minorTools/makeClearSql.py | ||
---|---|---|
33 | 33 |
sql.append(f"delete from PipeRuns where Drawings_UID='{drawing_uid}'") |
34 | 34 |
sql.append("delete from Components where Drawings_UID='{}'".format(drawing_uid)) |
35 | 35 |
sql.append("delete from Stream_Line_List where Drawing_UID='{}'".format(drawing_uid)) |
36 |
sql.append("delete from View where Drawing_UID='{}'".format(drawing_uid)) |
|
36 | 37 |
sql.append("delete from Drawings where [UID]='{}'".format(drawing_uid)) |
37 | 38 |
|
38 | 39 |
sqls.append(";\n".join(sql)) |
내보내기 Unified diff