Updated Uis
This commit is contained in:
parent
9d76648a7d
commit
e0e5116006
|
|
@ -1,43 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'apikey.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.9
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_Form(object):
|
||||
def setupUi(self, Form):
|
||||
Form.setObjectName("Form")
|
||||
Form.resize(265, 91)
|
||||
self.label = QtWidgets.QLabel(Form)
|
||||
self.label.setGeometry(QtCore.QRect(20, 10, 91, 16))
|
||||
self.label.setObjectName("label")
|
||||
self.lineEdit = QtWidgets.QLineEdit(Form)
|
||||
self.lineEdit.setGeometry(QtCore.QRect(110, 10, 141, 21))
|
||||
self.lineEdit.setObjectName("lineEdit")
|
||||
self.pushButton = QtWidgets.QPushButton(Form)
|
||||
self.pushButton.setGeometry(QtCore.QRect(14, 40, 111, 24))
|
||||
self.pushButton.setObjectName("pushButton")
|
||||
self.pushButton_2 = QtWidgets.QPushButton(Form)
|
||||
self.pushButton_2.setGeometry(QtCore.QRect(134, 40, 121, 24))
|
||||
self.pushButton_2.setObjectName("pushButton_2")
|
||||
self.label_2 = QtWidgets.QLabel(Form)
|
||||
self.label_2.setGeometry(QtCore.QRect(20, 70, 231, 16))
|
||||
self.label_2.setObjectName("label_2")
|
||||
|
||||
self.retranslateUi(Form)
|
||||
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||
|
||||
def retranslateUi(self, Form):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Form.setWindowTitle(_translate("Form", "Form"))
|
||||
self.label.setText(_translate("Form", "OpenAI API-Key"))
|
||||
self.pushButton.setText(_translate("Form", "Test Key"))
|
||||
self.pushButton_2.setText(_translate("Form", "Save"))
|
||||
self.label_2.setText(_translate("Form", "Key working..."))
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file '.\connection.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.9
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_Form(object):
|
||||
def setupUi(self, Form):
|
||||
Form.setObjectName("Form")
|
||||
Form.resize(249, 217)
|
||||
self.label = QtWidgets.QLabel(Form)
|
||||
self.label.setGeometry(QtCore.QRect(20, 10, 101, 16))
|
||||
self.label.setObjectName("label")
|
||||
self.label_2 = QtWidgets.QLabel(Form)
|
||||
self.label_2.setGeometry(QtCore.QRect(20, 40, 49, 16))
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.label_3 = QtWidgets.QLabel(Form)
|
||||
self.label_3.setGeometry(QtCore.QRect(20, 70, 61, 16))
|
||||
self.label_3.setObjectName("label_3")
|
||||
self.label_4 = QtWidgets.QLabel(Form)
|
||||
self.label_4.setGeometry(QtCore.QRect(20, 100, 81, 16))
|
||||
self.label_4.setObjectName("label_4")
|
||||
self.label_5 = QtWidgets.QLabel(Form)
|
||||
self.label_5.setGeometry(QtCore.QRect(20, 130, 61, 16))
|
||||
self.label_5.setObjectName("label_5")
|
||||
self.IP = QtWidgets.QLineEdit(Form)
|
||||
self.IP.setGeometry(QtCore.QRect(100, 10, 131, 21))
|
||||
self.IP.setText("")
|
||||
self.IP.setObjectName("IP")
|
||||
self.port = QtWidgets.QLineEdit(Form)
|
||||
self.port.setGeometry(QtCore.QRect(100, 40, 131, 21))
|
||||
self.port.setText("")
|
||||
self.port.setObjectName("port")
|
||||
self.username = QtWidgets.QLineEdit(Form)
|
||||
self.username.setGeometry(QtCore.QRect(100, 70, 131, 21))
|
||||
self.username.setText("")
|
||||
self.username.setObjectName("username")
|
||||
self.password = QtWidgets.QLineEdit(Form)
|
||||
self.password.setGeometry(QtCore.QRect(100, 100, 131, 21))
|
||||
self.password.setInputMethodHints(QtCore.Qt.ImhHiddenText|QtCore.Qt.ImhSensitiveData)
|
||||
self.password.setObjectName("password")
|
||||
self.database = QtWidgets.QLineEdit(Form)
|
||||
self.database.setGeometry(QtCore.QRect(100, 130, 131, 21))
|
||||
self.database.setObjectName("database")
|
||||
self.TestConnection = QtWidgets.QPushButton(Form)
|
||||
self.TestConnection.setEnabled(False)
|
||||
self.TestConnection.setGeometry(QtCore.QRect(14, 160, 101, 24))
|
||||
self.TestConnection.setObjectName("TestConnection")
|
||||
self.saveButton = QtWidgets.QPushButton(Form)
|
||||
self.saveButton.setEnabled(False)
|
||||
self.saveButton.setGeometry(QtCore.QRect(130, 160, 101, 24))
|
||||
self.saveButton.setObjectName("saveButton")
|
||||
self.returnLabel = QtWidgets.QLabel(Form)
|
||||
self.returnLabel.setGeometry(QtCore.QRect(20, 190, 211, 16))
|
||||
self.returnLabel.setObjectName("returnLabel")
|
||||
|
||||
self.retranslateUi(Form)
|
||||
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||
|
||||
def retranslateUi(self, Form):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Form.setWindowTitle(_translate("Form", "Form"))
|
||||
self.label.setText(_translate("Form", "IP"))
|
||||
self.label_2.setText(_translate("Form", "Port"))
|
||||
self.label_3.setText(_translate("Form", "Username"))
|
||||
self.label_4.setText(_translate("Form", "Password"))
|
||||
self.label_5.setText(_translate("Form", "Database"))
|
||||
self.TestConnection.setText(_translate("Form", "Test Connection"))
|
||||
self.saveButton.setText(_translate("Form", "Save"))
|
||||
self.returnLabel.setText(_translate("Form", "Connection ... / Saved..."))
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
class UiConnect(QtWidgets):
|
||||
def __init__(self):
|
||||
self.setupUi(self)
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file '.\Window.ui'
|
||||
# Form implementation generated from reading ui file 'Window.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.9
|
||||
#
|
||||
|
|
@ -14,11 +14,11 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
|||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.resize(800, 600)
|
||||
MainWindow.resize(796, 591)
|
||||
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName("centralwidget")
|
||||
self.textInput = QtWidgets.QLineEdit(self.centralwidget)
|
||||
self.textInput.setGeometry(QtCore.QRect(20, 30, 661, 21))
|
||||
self.textInput.setGeometry(QtCore.QRect(20, 30, 650, 21))
|
||||
self.textInput.setObjectName("textInput")
|
||||
self.textLabel = QtWidgets.QLabel(self.centralwidget)
|
||||
self.textLabel.setGeometry(QtCore.QRect(20, 10, 71, 16))
|
||||
|
|
@ -26,38 +26,39 @@ class Ui_MainWindow(object):
|
|||
self.statementLabel = QtWidgets.QLabel(self.centralwidget)
|
||||
self.statementLabel.setGeometry(QtCore.QRect(20, 60, 121, 16))
|
||||
self.statementLabel.setObjectName("statementLabel")
|
||||
self.statementInput = QtWidgets.QLineEdit(self.centralwidget)
|
||||
self.statementInput.setGeometry(QtCore.QRect(20, 80, 661, 21))
|
||||
self.statementInput.setObjectName("statementInput")
|
||||
self.convertButton = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.convertButton.setGeometry(QtCore.QRect(690, 30, 91, 24))
|
||||
self.convertButton.setGeometry(QtCore.QRect(680, 30, 100, 24))
|
||||
self.convertButton.setObjectName("convertButton")
|
||||
self.shellInput = QtWidgets.QLineEdit(self.centralwidget)
|
||||
self.shellInput.setGeometry(QtCore.QRect(20, 150, 661, 21))
|
||||
self.shellInput.setObjectName("shellInput")
|
||||
self.shellLabel = QtWidgets.QLabel(self.centralwidget)
|
||||
self.shellLabel.setGeometry(QtCore.QRect(20, 130, 101, 16))
|
||||
self.shellLabel.setGeometry(QtCore.QRect(410, 60, 91, 20))
|
||||
self.shellLabel.setObjectName("shellLabel")
|
||||
self.executeButton = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.executeButton.setGeometry(QtCore.QRect(690, 150, 91, 24))
|
||||
self.executeButton.setGeometry(QtCore.QRect(680, 200, 100, 24))
|
||||
self.executeButton.setObjectName("executeButton")
|
||||
self.pasteButton = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.pasteButton.setGeometry(QtCore.QRect(690, 80, 91, 24))
|
||||
self.pasteButton.setGeometry(QtCore.QRect(300, 200, 100, 24))
|
||||
self.pasteButton.setObjectName("pasteButton")
|
||||
self.outputLabel = QtWidgets.QLabel(self.centralwidget)
|
||||
self.outputLabel.setGeometry(QtCore.QRect(20, 180, 661, 16))
|
||||
self.outputLabel.setGeometry(QtCore.QRect(20, 230, 761, 16))
|
||||
self.outputLabel.setObjectName("outputLabel")
|
||||
self.outputTable = QtWidgets.QTableWidget(self.centralwidget)
|
||||
self.outputTable.setGeometry(QtCore.QRect(20, 240, 761, 311))
|
||||
self.outputTable.setGeometry(QtCore.QRect(20, 270, 761, 281))
|
||||
self.outputTable.setObjectName("outputTable")
|
||||
self.outputTable.setColumnCount(0)
|
||||
self.outputTable.setRowCount(0)
|
||||
self.outputTableLabel = QtWidgets.QLabel(self.centralwidget)
|
||||
self.outputTableLabel.setGeometry(QtCore.QRect(20, 220, 49, 16))
|
||||
self.outputTableLabel.setGeometry(QtCore.QRect(20, 250, 49, 16))
|
||||
self.outputTableLabel.setObjectName("outputTableLabel")
|
||||
self.shellInput = QtWidgets.QTextEdit(self.centralwidget)
|
||||
self.shellInput.setGeometry(QtCore.QRect(410, 80, 375, 111))
|
||||
self.shellInput.setObjectName("shellInput")
|
||||
self.statementOutput = QtWidgets.QTextEdit(self.centralwidget)
|
||||
self.statementOutput.setEnabled(True)
|
||||
self.statementOutput.setGeometry(QtCore.QRect(20, 80, 375, 111))
|
||||
self.statementOutput.setObjectName("statementOutput")
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
self.menubar = QtWidgets.QMenuBar(MainWindow)
|
||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 22))
|
||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 796, 26))
|
||||
self.menubar.setObjectName("menubar")
|
||||
self.menuSettings = QtWidgets.QMenu(self.menubar)
|
||||
self.menuSettings.setObjectName("menuSettings")
|
||||
|
|
@ -88,8 +89,13 @@ class Ui_MainWindow(object):
|
|||
self.shellLabel.setText(_translate("MainWindow", "SQL Shell"))
|
||||
self.executeButton.setText(_translate("MainWindow", "Execute"))
|
||||
self.pasteButton.setText(_translate("MainWindow", "Paste to Shell"))
|
||||
self.outputLabel.setText(_translate("MainWindow", "oputputLabel"))
|
||||
self.outputLabel.setText(_translate("MainWindow", "outputLabel"))
|
||||
self.outputTableLabel.setText(_translate("MainWindow", "Output"))
|
||||
self.statementOutput.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
||||
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
|
||||
"p, li { white-space: pre-wrap; }\n"
|
||||
"</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:7.8pt; font-weight:400; font-style:normal;\">\n"
|
||||
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"))
|
||||
self.menuSettings.setTitle(_translate("MainWindow", "Settings"))
|
||||
self.actionConnect_DB.setText(_translate("MainWindow", "Connect DB"))
|
||||
self.actionConnect_API_Key.setText(_translate("MainWindow", "Connect API Key"))
|
||||
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
<width>796</width>
|
||||
<height>591</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
<rect>
|
||||
<x>20</x>
|
||||
<y>30</y>
|
||||
<width>661</width>
|
||||
<width>650</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
@ -50,22 +50,12 @@
|
|||
<string>SQL Statement:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="statementInput">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>80</y>
|
||||
<width>661</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="convertButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>690</x>
|
||||
<x>680</x>
|
||||
<y>30</y>
|
||||
<width>91</width>
|
||||
<width>100</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
@ -73,21 +63,11 @@
|
|||
<string>Convert to SQL</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="shellInput">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>150</y>
|
||||
<width>661</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="shellLabel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>126</y>
|
||||
<x>410</x>
|
||||
<y>60</y>
|
||||
<width>91</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
|
|
@ -99,9 +79,9 @@
|
|||
<widget class="QPushButton" name="executeButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>690</x>
|
||||
<y>150</y>
|
||||
<width>91</width>
|
||||
<x>680</x>
|
||||
<y>200</y>
|
||||
<width>100</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
@ -112,9 +92,9 @@
|
|||
<widget class="QPushButton" name="pasteButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>690</x>
|
||||
<y>80</y>
|
||||
<width>91</width>
|
||||
<x>300</x>
|
||||
<y>200</y>
|
||||
<width>100</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
@ -126,8 +106,8 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>180</y>
|
||||
<width>661</width>
|
||||
<y>230</y>
|
||||
<width>761</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
@ -139,9 +119,9 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>240</y>
|
||||
<y>270</y>
|
||||
<width>761</width>
|
||||
<height>311</height>
|
||||
<height>281</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
|
|
@ -149,7 +129,7 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>220</y>
|
||||
<y>250</y>
|
||||
<width>49</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
|
|
@ -158,14 +138,44 @@
|
|||
<string>Output</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QTextEdit" name="shellInput">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>410</x>
|
||||
<y>80</y>
|
||||
<width>375</width>
|
||||
<height>111</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QTextEdit" name="statementOutput">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>80</y>
|
||||
<width>375</width>
|
||||
<height>111</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="html">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:7.8pt; font-weight:400; font-style:normal;">
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>22</height>
|
||||
<width>796</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuSettings">
|
||||
43
gui/gui/apikey.py
Normal file
43
gui/gui/apikey.py
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'apikey.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.9
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_ApiKey(object):
|
||||
def setupUi(self, ApiKey):
|
||||
ApiKey.setObjectName("ApiKey")
|
||||
ApiKey.resize(276, 98)
|
||||
self.label = QtWidgets.QLabel(ApiKey)
|
||||
self.label.setGeometry(QtCore.QRect(20, 10, 91, 16))
|
||||
self.label.setObjectName("label")
|
||||
self.apikeyInput = QtWidgets.QLineEdit(ApiKey)
|
||||
self.apikeyInput.setGeometry(QtCore.QRect(120, 10, 141, 21))
|
||||
self.apikeyInput.setObjectName("apikeyInput")
|
||||
self.testButton = QtWidgets.QPushButton(ApiKey)
|
||||
self.testButton.setGeometry(QtCore.QRect(14, 40, 111, 24))
|
||||
self.testButton.setObjectName("testButton")
|
||||
self.saveButton = QtWidgets.QPushButton(ApiKey)
|
||||
self.saveButton.setGeometry(QtCore.QRect(140, 40, 121, 24))
|
||||
self.saveButton.setObjectName("saveButton")
|
||||
self.outputLabel = QtWidgets.QLabel(ApiKey)
|
||||
self.outputLabel.setGeometry(QtCore.QRect(20, 70, 231, 16))
|
||||
self.outputLabel.setObjectName("outputLabel")
|
||||
|
||||
self.retranslateUi(ApiKey)
|
||||
QtCore.QMetaObject.connectSlotsByName(ApiKey)
|
||||
|
||||
def retranslateUi(self, ApiKey):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
ApiKey.setWindowTitle(_translate("ApiKey", "Form"))
|
||||
self.label.setText(_translate("ApiKey", "OpenAI API-Key"))
|
||||
self.testButton.setText(_translate("ApiKey", "Test Key"))
|
||||
self.saveButton.setText(_translate("ApiKey", "Save"))
|
||||
self.outputLabel.setText(_translate("ApiKey", "Key working..."))
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<class>ApiKey</class>
|
||||
<widget class="QWidget" name="ApiKey">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>265</width>
|
||||
<height>91</height>
|
||||
<width>276</width>
|
||||
<height>98</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
|
@ -26,17 +26,17 @@
|
|||
<string>OpenAI API-Key</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<widget class="QLineEdit" name="apikeyInput">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<x>120</x>
|
||||
<y>10</y>
|
||||
<width>141</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<widget class="QPushButton" name="testButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>14</x>
|
||||
|
|
@ -49,10 +49,10 @@
|
|||
<string>Test Key</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<widget class="QPushButton" name="saveButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>134</x>
|
||||
<x>140</x>
|
||||
<y>40</y>
|
||||
<width>121</width>
|
||||
<height>24</height>
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
<string>Save</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<widget class="QLabel" name="outputLabel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
86
gui/gui/connection.py
Normal file
86
gui/gui/connection.py
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'connection.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.9
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_Connection(object):
|
||||
def setupUi(self, Connection):
|
||||
Connection.setObjectName("Connection")
|
||||
Connection.resize(249, 252)
|
||||
self.label = QtWidgets.QLabel(Connection)
|
||||
self.label.setGeometry(QtCore.QRect(20, 10, 101, 16))
|
||||
self.label.setObjectName("label")
|
||||
self.label_2 = QtWidgets.QLabel(Connection)
|
||||
self.label_2.setGeometry(QtCore.QRect(20, 70, 49, 16))
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.label_3 = QtWidgets.QLabel(Connection)
|
||||
self.label_3.setGeometry(QtCore.QRect(20, 100, 61, 16))
|
||||
self.label_3.setObjectName("label_3")
|
||||
self.label_4 = QtWidgets.QLabel(Connection)
|
||||
self.label_4.setGeometry(QtCore.QRect(20, 130, 81, 16))
|
||||
self.label_4.setObjectName("label_4")
|
||||
self.label_5 = QtWidgets.QLabel(Connection)
|
||||
self.label_5.setGeometry(QtCore.QRect(20, 160, 61, 16))
|
||||
self.label_5.setObjectName("label_5")
|
||||
self.portInput = QtWidgets.QLineEdit(Connection)
|
||||
self.portInput.setGeometry(QtCore.QRect(100, 70, 131, 21))
|
||||
self.portInput.setText("")
|
||||
self.portInput.setObjectName("portInput")
|
||||
self.usernameInput = QtWidgets.QLineEdit(Connection)
|
||||
self.usernameInput.setGeometry(QtCore.QRect(100, 100, 131, 21))
|
||||
self.usernameInput.setText("")
|
||||
self.usernameInput.setObjectName("usernameInput")
|
||||
self.passwordInput = QtWidgets.QLineEdit(Connection)
|
||||
self.passwordInput.setGeometry(QtCore.QRect(100, 130, 131, 21))
|
||||
self.passwordInput.setInputMethodHints(QtCore.Qt.ImhHiddenText|QtCore.Qt.ImhSensitiveData)
|
||||
self.passwordInput.setObjectName("passwordInput")
|
||||
self.databaseInput = QtWidgets.QLineEdit(Connection)
|
||||
self.databaseInput.setGeometry(QtCore.QRect(100, 160, 131, 21))
|
||||
self.databaseInput.setObjectName("databaseInput")
|
||||
self.testButton = QtWidgets.QPushButton(Connection)
|
||||
self.testButton.setEnabled(False)
|
||||
self.testButton.setGeometry(QtCore.QRect(14, 190, 101, 24))
|
||||
self.testButton.setObjectName("testButton")
|
||||
self.saveButton = QtWidgets.QPushButton(Connection)
|
||||
self.saveButton.setEnabled(False)
|
||||
self.saveButton.setGeometry(QtCore.QRect(130, 190, 101, 24))
|
||||
self.saveButton.setObjectName("saveButton")
|
||||
self.returnLabel = QtWidgets.QLabel(Connection)
|
||||
self.returnLabel.setGeometry(QtCore.QRect(20, 220, 211, 16))
|
||||
self.returnLabel.setObjectName("returnLabel")
|
||||
self.label_6 = QtWidgets.QLabel(Connection)
|
||||
self.label_6.setGeometry(QtCore.QRect(20, 40, 101, 16))
|
||||
self.label_6.setObjectName("label_6")
|
||||
self.ipInput = QtWidgets.QLineEdit(Connection)
|
||||
self.ipInput.setGeometry(QtCore.QRect(100, 40, 131, 21))
|
||||
self.ipInput.setText("")
|
||||
self.ipInput.setObjectName("ipInput")
|
||||
self.dbtypeCombo = QtWidgets.QComboBox(Connection)
|
||||
self.dbtypeCombo.setGeometry(QtCore.QRect(100, 10, 131, 22))
|
||||
self.dbtypeCombo.setObjectName("dbtypeCombo")
|
||||
self.dbtypeCombo.addItem("")
|
||||
|
||||
self.retranslateUi(Connection)
|
||||
QtCore.QMetaObject.connectSlotsByName(Connection)
|
||||
|
||||
def retranslateUi(self, Connection):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Connection.setWindowTitle(_translate("Connection", "Form"))
|
||||
self.label.setText(_translate("Connection", "Database"))
|
||||
self.label_2.setText(_translate("Connection", "Port"))
|
||||
self.label_3.setText(_translate("Connection", "Username"))
|
||||
self.label_4.setText(_translate("Connection", "Password"))
|
||||
self.label_5.setText(_translate("Connection", "Database"))
|
||||
self.testButton.setText(_translate("Connection", "Test Connection"))
|
||||
self.saveButton.setText(_translate("Connection", "Save"))
|
||||
self.returnLabel.setText(_translate("Connection", "Connection ... / Saved..."))
|
||||
self.label_6.setText(_translate("Connection", "IP"))
|
||||
self.dbtypeCombo.setItemText(0, _translate("Connection", "PostgrSQL"))
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<class>Connection</class>
|
||||
<widget class="QWidget" name="Connection">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>249</width>
|
||||
<height>217</height>
|
||||
<height>252</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
|
@ -23,14 +23,14 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>IP</string>
|
||||
<string>Database</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>40</y>
|
||||
<y>70</y>
|
||||
<width>49</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>70</y>
|
||||
<y>100</y>
|
||||
<width>61</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>100</y>
|
||||
<y>130</y>
|
||||
<width>81</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>130</y>
|
||||
<y>160</y>
|
||||
<width>61</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
|
|
@ -78,33 +78,7 @@
|
|||
<string>Database</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="IP">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>10</y>
|
||||
<width>131</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="port">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>40</y>
|
||||
<width>131</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="username">
|
||||
<widget class="QLineEdit" name="portInput">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
|
|
@ -117,7 +91,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="password">
|
||||
<widget class="QLineEdit" name="usernameInput">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
|
|
@ -126,11 +100,11 @@
|
|||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="inputMethodHints">
|
||||
<set>Qt::ImhHiddenText|Qt::ImhSensitiveData</set>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="database">
|
||||
<widget class="QLineEdit" name="passwordInput">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
|
|
@ -139,15 +113,28 @@
|
|||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="inputMethodHints">
|
||||
<set>Qt::ImhHiddenText|Qt::ImhSensitiveData</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="TestConnection">
|
||||
<widget class="QLineEdit" name="databaseInput">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>160</y>
|
||||
<width>131</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="testButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>14</x>
|
||||
<y>160</y>
|
||||
<y>190</y>
|
||||
<width>101</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
|
|
@ -163,7 +150,7 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>130</x>
|
||||
<y>160</y>
|
||||
<y>190</y>
|
||||
<width>101</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
|
|
@ -176,7 +163,7 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>190</y>
|
||||
<y>220</y>
|
||||
<width>211</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
|
|
@ -185,24 +172,48 @@
|
|||
<string>Connection ... / Saved...</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>40</y>
|
||||
<width>101</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>IP</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="ipInput">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>40</y>
|
||||
<width>131</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="dbtypeCombo">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>10</y>
|
||||
<width>131</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>PostgrSQL</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>IP</sender>
|
||||
<signal>textChanged(QString)</signal>
|
||||
<receiver>saveButton</receiver>
|
||||
<slot>customSlot()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>171</x>
|
||||
<y>25</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>199</x>
|
||||
<y>170</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<connections/>
|
||||
</ui>
|
||||
23
gui/gui/convert.py
Normal file
23
gui/gui/convert.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import os
|
||||
import subprocess
|
||||
|
||||
|
||||
def convert():
|
||||
# get a list of all .ui files in the current directory
|
||||
ui_files = [f for f in os.listdir('.') if f.endswith('.ui')]
|
||||
|
||||
# loop over each .ui file and convert it to a .py file
|
||||
for ui_filename in ui_files:
|
||||
# construct the name of the output .py file
|
||||
py_filename = os.path.splitext(ui_filename)[0] + '.py'
|
||||
|
||||
# run the pyuic5 command to convert the .ui file to a .py file
|
||||
cmd = f'pyuic5 {ui_filename} -o {py_filename}'
|
||||
subprocess.call(cmd, shell=True)
|
||||
|
||||
# print a message to indicate that the conversion is complete
|
||||
print(f'{ui_filename} converted to {py_filename}')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
convert()
|
||||
Loading…
Reference in New Issue
Block a user