|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
# Form implementation generated from reading ui file 'dialogs/db_connection_dialog/db_connection_dialog.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_DBConnection(object):
|
|
|
|
def setupUi(self, DBConnection):
|
|
|
|
DBConnection.setObjectName("DBConnection")
|
|
|
|
DBConnection.resize(328, 262)
|
|
|
|
self.verticalLayout = QtWidgets.QVBoxLayout(DBConnection)
|
|
|
|
self.verticalLayout.setObjectName("verticalLayout")
|
|
|
|
self.dialog_frame = QtWidgets.QFrame(DBConnection)
|
|
|
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
|
|
|
|
sizePolicy.setHorizontalStretch(0)
|
|
|
|
sizePolicy.setVerticalStretch(0)
|
|
|
|
sizePolicy.setHeightForWidth(self.dialog_frame.sizePolicy().hasHeightForWidth())
|
|
|
|
self.dialog_frame.setSizePolicy(sizePolicy)
|
|
|
|
self.dialog_frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
|
|
|
self.dialog_frame.setFrameShadow(QtWidgets.QFrame.Raised)
|
|
|
|
self.dialog_frame.setObjectName("dialog_frame")
|
|
|
|
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.dialog_frame)
|
|
|
|
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
|
|
|
self.title_label = QtWidgets.QLabel(self.dialog_frame)
|
|
|
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
|
|
|
|
sizePolicy.setHorizontalStretch(0)
|
|
|
|
sizePolicy.setVerticalStretch(0)
|
|
|
|
sizePolicy.setHeightForWidth(self.title_label.sizePolicy().hasHeightForWidth())
|
|
|
|
self.title_label.setSizePolicy(sizePolicy)
|
|
|
|
font = QtGui.QFont()
|
|
|
|
font.setPointSize(10)
|
|
|
|
font.setBold(True)
|
|
|
|
font.setWeight(75)
|
|
|
|
self.title_label.setFont(font)
|
|
|
|
self.title_label.setLayoutDirection(QtCore.Qt.LeftToRight)
|
|
|
|
self.title_label.setAlignment(QtCore.Qt.AlignCenter)
|
|
|
|
self.title_label.setObjectName("title_label")
|
|
|
|
self.verticalLayout_2.addWidget(self.title_label)
|
|
|
|
self.host_label = QtWidgets.QLabel(self.dialog_frame)
|
|
|
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
|
|
|
|
sizePolicy.setHorizontalStretch(0)
|
|
|
|
sizePolicy.setVerticalStretch(0)
|
|
|
|
sizePolicy.setHeightForWidth(self.host_label.sizePolicy().hasHeightForWidth())
|
|
|
|
self.host_label.setSizePolicy(sizePolicy)
|
|
|
|
font = QtGui.QFont()
|
|
|
|
font.setBold(True)
|
|
|
|
font.setWeight(75)
|
|
|
|
self.host_label.setFont(font)
|
|
|
|
self.host_label.setObjectName("host_label")
|
|
|
|
self.verticalLayout_2.addWidget(self.host_label)
|
|
|
|
self.host_line_edit = QtWidgets.QLineEdit(self.dialog_frame)
|
|
|
|
self.host_line_edit.setObjectName("host_line_edit")
|
|
|
|
self.verticalLayout_2.addWidget(self.host_line_edit)
|
|
|
|
self.port_label = QtWidgets.QLabel(self.dialog_frame)
|
|
|
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
|
|
|
|
sizePolicy.setHorizontalStretch(0)
|
|
|
|
sizePolicy.setVerticalStretch(0)
|
|
|
|
sizePolicy.setHeightForWidth(self.port_label.sizePolicy().hasHeightForWidth())
|
|
|
|
self.port_label.setSizePolicy(sizePolicy)
|
|
|
|
font = QtGui.QFont()
|
|
|
|
font.setBold(True)
|
|
|
|
font.setWeight(75)
|
|
|
|
self.port_label.setFont(font)
|
|
|
|
self.port_label.setObjectName("port_label")
|
|
|
|
self.verticalLayout_2.addWidget(self.port_label)
|
|
|
|
self.port_line_edit = QtWidgets.QLineEdit(self.dialog_frame)
|
|
|
|
self.port_line_edit.setObjectName("port_line_edit")
|
|
|
|
self.verticalLayout_2.addWidget(self.port_line_edit)
|
|
|
|
self.database_label = QtWidgets.QLabel(self.dialog_frame)
|
|
|
|
font = QtGui.QFont()
|
|
|
|
font.setBold(True)
|
|
|
|
font.setWeight(75)
|
|
|
|
self.database_label.setFont(font)
|
|
|
|
self.database_label.setObjectName("database_label")
|
|
|
|
self.verticalLayout_2.addWidget(self.database_label)
|
|
|
|
self.database_line_edit = QtWidgets.QLineEdit(self.dialog_frame)
|
|
|
|
self.database_line_edit.setObjectName("database_line_edit")
|
|
|
|
self.verticalLayout_2.addWidget(self.database_line_edit)
|
|
|
|
self.user_label = QtWidgets.QLabel(self.dialog_frame)
|
|
|
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
|
|
|
|
sizePolicy.setHorizontalStretch(0)
|
|
|
|
sizePolicy.setVerticalStretch(0)
|
|
|
|
sizePolicy.setHeightForWidth(self.user_label.sizePolicy().hasHeightForWidth())
|
|
|
|
self.user_label.setSizePolicy(sizePolicy)
|
|
|
|
font = QtGui.QFont()
|
|
|
|
font.setBold(True)
|
|
|
|
font.setWeight(75)
|
|
|
|
self.user_label.setFont(font)
|
|
|
|
self.user_label.setObjectName("user_label")
|
|
|
|
self.verticalLayout_2.addWidget(self.user_label)
|
|
|
|
self.user_line_edit = QtWidgets.QLineEdit(self.dialog_frame)
|
|
|
|
self.user_line_edit.setObjectName("user_line_edit")
|
|
|
|
self.verticalLayout_2.addWidget(self.user_line_edit)
|
|
|
|
self.password_label = QtWidgets.QLabel(self.dialog_frame)
|
|
|
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
|
|
|
|
sizePolicy.setHorizontalStretch(0)
|
|
|
|
sizePolicy.setVerticalStretch(0)
|
|
|
|
sizePolicy.setHeightForWidth(self.password_label.sizePolicy().hasHeightForWidth())
|
|
|
|
self.password_label.setSizePolicy(sizePolicy)
|
|
|
|
font = QtGui.QFont()
|
|
|
|
font.setBold(True)
|
|
|
|
font.setWeight(75)
|
|
|
|
self.password_label.setFont(font)
|
|
|
|
self.password_label.setObjectName("password_label")
|
|
|
|
self.verticalLayout_2.addWidget(self.password_label)
|
|
|
|
self.password_line_edit = QtWidgets.QLineEdit(self.dialog_frame)
|
|
|
|
self.password_line_edit.setEchoMode(QtWidgets.QLineEdit.Password)
|
|
|
|
self.password_line_edit.setObjectName("password_line_edit")
|
|
|
|
self.verticalLayout_2.addWidget(self.password_line_edit)
|
|
|
|
self.verticalLayout.addWidget(self.dialog_frame)
|
|
|
|
self.buttonBox = QtWidgets.QDialogButtonBox(DBConnection)
|
|
|
|
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
|
|
|
|
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
|
|
|
|
self.buttonBox.setObjectName("buttonBox")
|
|
|
|
self.verticalLayout.addWidget(self.buttonBox)
|
|
|
|
|
|
|
|
self.retranslateUi(DBConnection)
|
|
|
|
self.buttonBox.accepted.connect(DBConnection.accept) # type: ignore
|
|
|
|
self.buttonBox.rejected.connect(DBConnection.reject) # type: ignore
|
|
|
|
QtCore.QMetaObject.connectSlotsByName(DBConnection)
|
|
|
|
|
|
|
|
def retranslateUi(self, DBConnection):
|
|
|
|
_translate = QtCore.QCoreApplication.translate
|
|
|
|
DBConnection.setWindowTitle(_translate("DBConnection", "Dialog"))
|
|
|
|
self.title_label.setText(_translate("DBConnection", "Edit PostgreSQL Connection"))
|
|
|
|
self.host_label.setText(_translate("DBConnection", "Host:"))
|
|
|
|
self.port_label.setText(_translate("DBConnection", "Port:"))
|
|
|
|
self.database_label.setText(_translate("DBConnection", "Database:"))
|
|
|
|
self.user_label.setText(_translate("DBConnection", "User:"))
|
|
|
|
self.password_label.setText(_translate("DBConnection", "Password:"))
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
import sys
|
|
|
|
app = QtWidgets.QApplication(sys.argv)
|
|
|
|
DBConnection = QtWidgets.QDialog()
|
|
|
|
ui = Ui_DBConnection()
|
|
|
|
ui.setupUi(DBConnection)
|
|
|
|
DBConnection.show()
|
|
|
|
sys.exit(app.exec_())
|