-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathType.py
More file actions
87 lines (77 loc) · 3.54 KB
/
Copy pathType.py
File metadata and controls
87 lines (77 loc) · 3.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'Type.ui'
#
# Created by: PyQt4 UI code generator 4.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui,uic
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Type(QtGui.QDialog):
def setupUi(self, Dialog):
Dialog.setObjectName(_fromUtf8("Dialog"))
Dialog.resize(284, 161)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(_fromUtf8("Images/database.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
Dialog.setWindowIcon(icon)
self.buttonBox = QtGui.QDialogButtonBox(Dialog)
self.buttonBox.setGeometry(QtCore.QRect(160, 120, 91, 32))
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
self.lineEdit = QtGui.QLineEdit(Dialog)
self.lineEdit.setGeometry(QtCore.QRect(130, 20, 121, 29))
self.lineEdit.setObjectName(_fromUtf8("lineEdit"))
self.comboBox = QtGui.QComboBox(Dialog)
self.comboBox.setGeometry(QtCore.QRect(130, 70, 121, 25))
self.comboBox.setObjectName(_fromUtf8("comboBox"))
self.comboBox.addItem(_fromUtf8(""))
self.comboBox.addItem(_fromUtf8(""))
self.comboBox.addItem(_fromUtf8(""))
self.comboBox.addItem(_fromUtf8(""))
self.label = QtGui.QLabel(Dialog)
self.label.setGeometry(QtCore.QRect(80, 30, 66, 17))
self.label.setObjectName(_fromUtf8("label"))
self.label_2 = QtGui.QLabel(Dialog)
self.label_2.setGeometry(QtCore.QRect(80, 70, 66, 17))
self.label_2.setObjectName(_fromUtf8("label_2"))
self.checkBox = QtGui.QCheckBox(Dialog)
self.checkBox.setGeometry(QtCore.QRect(20, 100, 111, 22))
self.checkBox.setObjectName(_fromUtf8("checkBox"))
self.retranslateUi(Dialog)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Dialog.accept)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
Dialog.setWindowTitle(_translate("Dialog", "What Type", None))
self.comboBox.setItemText(0, _translate("Dialog", "Int", None))
self.comboBox.setItemText(1, _translate("Dialog", "Char", None))
self.comboBox.setItemText(2, _translate("Dialog", "String", None))
self.comboBox.setItemText(3, _translate("Dialog", "Double", None))
self.label.setText(_translate("Dialog", "Name:", None))
self.label_2.setText(_translate("Dialog", "Type:", None))
self.checkBox.setText(_translate("Dialog", "Primary key", None))
'''Falta arreglar estos getters :v'''
def get_types(self):
return str(self.comboBox.currentText())
def get_name(self):
return str(self.lineEdit.text())
def __init__(self):
QtGui.QDialog.__init__(self)
uic.loadUi("Type.ui", self)
if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
Dialog = Type()
Dialog.show()
sys.exit(app.exec_())