def __init__(self, notifier, parent): QtGui.QWidget.__init__(self, parent) author_font = QtGui.QFont(self.font()) author_font.setPointSize(int(author_font.pointSize() * 1.1)) summary_font = QtGui.QFont(author_font) summary_font.setWeight(QtGui.QFont.Bold) policy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.gravatar_label = gravatar.GravatarLabel() self.author_label = TextLabel() self.author_label.setTextFormat(Qt.RichText) self.author_label.setFont(author_font) self.author_label.setSizePolicy(policy) self.author_label.setAlignment(Qt.AlignBottom) self.author_label.elide() self.summary_label = TextLabel() self.summary_label.setTextFormat(Qt.PlainText) self.summary_label.setFont(summary_font) self.summary_label.setSizePolicy(policy) self.summary_label.setAlignment(Qt.AlignTop) self.summary_label.elide() self.sha1_label = TextLabel() self.sha1_label.setTextFormat(Qt.PlainText) self.sha1_label.setSizePolicy(policy) self.sha1_label.setAlignment(Qt.AlignTop) self.sha1_label.elide() self.diff = DiffTextEdit(self, whitespace=False) self.tasks = set() self.reflector = QtCore.QObject(self) self.info_layout = QtGui.QVBoxLayout() self.info_layout.setMargin(defs.no_margin) self.info_layout.setSpacing(defs.no_spacing) self.info_layout.addWidget(self.author_label) self.info_layout.addWidget(self.summary_label) self.info_layout.addWidget(self.sha1_label) self.logo_layout = QtGui.QHBoxLayout() self.logo_layout.setContentsMargins(defs.margin, 0, defs.margin, 0) self.logo_layout.setSpacing(defs.button_spacing) self.logo_layout.addWidget(self.gravatar_label) self.logo_layout.addLayout(self.info_layout) self.main_layout = QtGui.QVBoxLayout() self.main_layout.setMargin(defs.no_margin) self.main_layout.setSpacing(defs.spacing) self.main_layout.addLayout(self.logo_layout) self.main_layout.addWidget(self.diff) self.setLayout(self.main_layout) notifier.add_observer(COMMITS_SELECTED, self.commits_selected) self.connect(self.reflector, SIGNAL('diff'), self.diff.setText) self.connect(self.reflector, SIGNAL('task_done'), self.task_done)
def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(800, 570) MainWindow.setMaximumSize(QtCore.QSize(800, 570)) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.widget = QtGui.QWidget(self.centralwidget) self.widget.setGeometry(QtCore.QRect(-1, -1, 801, 551)) self.widget.setStyleSheet(_fromUtf8("background-color: rgb(255, 255, 255);")) self.widget.setObjectName(_fromUtf8("widget")) self.widget_2 = QtGui.QWidget(self.widget) self.widget_2.setGeometry(QtCore.QRect(50, 40, 201, 61)) self.widget_2.setStyleSheet(_fromUtf8("background-color: rgb(57, 57, 209);\n" "border-radius: 10px;")) self.widget_2.setObjectName(_fromUtf8("widget_2")) self.label = QtGui.QLabel(self.widget_2) self.label.setGeometry(QtCore.QRect(20, 10, 141, 41)) self.label.setStyleSheet(_fromUtf8("color: rgb(255, 255, 255);\n" "font: 20pt \"Trebuchet MS\";")) self.label.setObjectName(_fromUtf8("label")) self.listView = QtGui.QListView(self.widget) self.listView.setGeometry(QtCore.QRect(60, 80, 691, 421)) self.listView.setObjectName(_fromUtf8("listView")) self.button_volver = QtGui.QPushButton(self.widget) self.button_volver.setGeometry(QtCore.QRect(30, 40, 31, 61)) self.button_volver.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor)) self.button_volver.setStyleSheet(_fromUtf8("background-color: rgb(57, 57, 209);\n" "border-radius: 10px;")) self.button_volver.setText(_fromUtf8("")) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8("Icon/back.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.button_volver.setIcon(icon) self.button_volver.setObjectName(_fromUtf8("button_volver")) self.button_nvo_psicologo = QtGui.QPushButton(self.widget) self.button_nvo_psicologo.setGeometry(QtCore.QRect(720, 460, 61, 61)) self.button_nvo_psicologo.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor)) self.button_nvo_psicologo.setStyleSheet(_fromUtf8("background-color: rgb(57, 57, 209);\n" "border-radius: 30px;")) self.button_nvo_psicologo.setText(_fromUtf8("")) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(_fromUtf8("Icon/nuevo.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.button_nvo_psicologo.setIcon(icon1) self.button_nvo_psicologo.setCheckable(False) self.button_nvo_psicologo.setObjectName(_fromUtf8("button_nvo_psicologo")) self.lista_psicologos = QtGui.QListWidget(self.widget) self.lista_psicologos.setGeometry(QtCore.QRect(60, 100, 691, 401)) self.lista_psicologos.viewport().setProperty("cursor", QtGui.QCursor(QtCore.Qt.PointingHandCursor)) self.lista_psicologos.setMovement(QtGui.QListView.Static) self.lista_psicologos.setFlow(QtGui.QListView.TopToBottom) self.lista_psicologos.setLayoutMode(QtGui.QListView.Batched) self.lista_psicologos.setViewMode(QtGui.QListView.ListMode) self.lista_psicologos.setSelectionRectVisible(True) self.lista_psicologos.setObjectName(_fromUtf8("lista_psicologos")) item = QtGui.QListWidgetItem() item.setTextAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter) font = QtGui.QFont() font.setFamily(_fromUtf8("Trebuchet MS")) font.setPointSize(22) font.setBold(False) font.setWeight(50) font.setStrikeOut(False) font.setKerning(True) font.setStyleStrategy(QtGui.QFont.PreferDefault) item.setFont(font) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(_fromUtf8("Icon/user.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) item.setIcon(icon2) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.NoBrush) item.setBackground(brush) item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsDragEnabled|QtCore.Qt.ItemIsDropEnabled|QtCore.Qt.ItemIsEnabled) self.lista_psicologos.addItem(item) item = QtGui.QListWidgetItem() font = QtGui.QFont() font.setFamily(_fromUtf8("Trebuchet MS")) font.setPointSize(22) item.setFont(font) item.setIcon(icon2) self.lista_psicologos.addItem(item) self.listView.raise_() self.widget_2.raise_() self.button_volver.raise_() self.lista_psicologos.raise_() self.button_nvo_psicologo.raise_() MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 21)) self.menubar.setObjectName(_fromUtf8("menubar")) MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setObjectName(_fromUtf8("statusbar")) MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) self.lista_psicologos.setCurrentRow(-1) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def __init__(self, parent=None): self.loopFlag = 0 self.map_width = 763 self.map_height = 507 self.x_greenwich = 67 self.y_redline = 296 self.reader = geoip2.database.Reader('GeoIP/GeoLite2-City.mmdb', ['ja']) self.worldmapimage = 'world_map.png' self.host_addr_v4 = "" self.host_sub = ['192', '168', '0', '0'] self.subnet_mask = "" self.drawFlag = 0 self.s_cap_res = "" self.d_cap_res = "" self.srcLocationX = None self.srcLocationY = None self.dstLocationX = None self.dstLocationY = None self.loglist = [] self.mypackets = "" self.__storeNum = 1000 tablen = '-' * 10 logging.basicConfig(filename='out_pyreshark.log', format=tablen + '%(asctime)s' + tablen + '\n%(message)s', level=logging.DEBUG) super(MainWindow, self).__init__() self.start_button = QPushButton("Start") self.start_button.clicked.connect(self.start_capture) self.stop_button = QPushButton("Stop") self.stop_button.clicked.connect(self.stop_capture) self.log_button = QPushButton("Log") self.log_button.clicked.connect(self.browse_log) self.view = QtGui.QGraphicsView() self.view.setSizePolicy(QSizePolicy.Ignored, QSizePolicy.Ignored) self.scene = QtGui.QGraphicsScene() scene_addr = hex(id(self.scene)) pixmap = QtGui.QPixmap(self.worldmapimage) self.item = QtGui.QGraphicsPixmapItem(pixmap) item_addr = hex(id(self.item)) self.scene.addItem(self.item) self.scene.addLine(0, self.y_redline, self.map_width, self.y_redline, QPen(Qt.red)) self.scene.addLine(self.x_greenwich, 0, self.x_greenwich, self.map_height, QPen(Qt.blue)) self.scene.addLine(370, 0, 370, self.map_height, QPen(Qt.black)) #japan_x self.scene.addLine(0, 213, self.map_width, 213, QPen(Qt.black)) #japan_y self.view.setScene(self.scene) line = "-" * 50 self.label1 = QtGui.QLabel("") self.label2 = QtGui.QLabel("") self.label3 = QtGui.QLabel("") self.label4 = QtGui.QLabel("") self.label5 = QtGui.QLabel("") self.exampleLabel = QtGui.QLabel( "プロトコル: 送信元(国名,経度,緯度) \n=> 送信先(国名,経度,緯度)\n" + line) font = QtGui.QFont() font.setPointSize(14) self.label1.setFont(font) self.label2.setFont(font) self.label3.setFont(font) self.label4.setFont(font) self.label5.setFont(font) self.exampleLabel.setFont(font) labelLayout = QVBoxLayout() labelLayout.addWidget(self.exampleLabel) labelLayout.addWidget(self.label1) labelLayout.addWidget(self.label2) labelLayout.addWidget(self.label3) labelLayout.addWidget(self.label4) labelLayout.addWidget(self.label5) buttonLayout = QHBoxLayout() buttonLayout.addWidget(self.start_button) buttonLayout.addWidget(self.stop_button) buttonLayout.addWidget(self.log_button) mapLayout = QHBoxLayout() mapLayout.addLayout(labelLayout) mapLayout.addWidget(self.view) mainLayout = QVBoxLayout() mainLayout.addLayout(mapLayout) mainLayout.addLayout(buttonLayout) self.setLayout(mainLayout) self.resize(1400, 500) self.setWindowTitle("IP_Mapper") self.show()
def setupUi(self, Dialog): Dialog.setObjectName(_fromUtf8("Dialog")) Dialog.resize(525, 170) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(85, 85, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(213, 213, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(149, 149, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(42, 42, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(56, 56, 170)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(85, 85, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Shadow, brush) brush = QtGui.QBrush(QtGui.QColor(170, 170, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.AlternateBase, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipBase, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(85, 85, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(213, 213, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(149, 149, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(42, 42, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(56, 56, 170)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(85, 85, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Shadow, brush) brush = QtGui.QBrush(QtGui.QColor(170, 170, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.AlternateBase, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipBase, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush) brush = QtGui.QBrush(QtGui.QColor(42, 42, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(85, 85, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(213, 213, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(149, 149, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(42, 42, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(56, 56, 170)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush) brush = QtGui.QBrush(QtGui.QColor(42, 42, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush) brush = QtGui.QBrush(QtGui.QColor(42, 42, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(85, 85, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(85, 85, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Shadow, brush) brush = QtGui.QBrush(QtGui.QColor(85, 85, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.AlternateBase, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipBase, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush) Dialog.setPalette(palette) self.gridLayout = QtGui.QGridLayout(Dialog) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.NameEntryBox_6 = QtGui.QLineEdit(Dialog) self.NameEntryBox_6.setObjectName(_fromUtf8("NameEntryBox_6")) self.gridLayout.addWidget(self.NameEntryBox_6, 2, 1, 1, 1) self.NameEntryBox_2 = QtGui.QLineEdit(Dialog) self.NameEntryBox_2.setObjectName(_fromUtf8("NameEntryBox_2")) self.gridLayout.addWidget(self.NameEntryBox_2, 3, 0, 1, 1) self.NameEntryBox_3 = QtGui.QLineEdit(Dialog) self.NameEntryBox_3.setText(_fromUtf8("")) self.NameEntryBox_3.setObjectName(_fromUtf8("NameEntryBox_3")) self.gridLayout.addWidget(self.NameEntryBox_3, 4, 0, 1, 1) self.PasswordRemind_8 = QtGui.QLabel(Dialog) font = QtGui.QFont() font.setPointSize(10) font.setBold(True) font.setWeight(75) self.PasswordRemind_8.setFont(font) self.PasswordRemind_8.setObjectName(_fromUtf8("PasswordRemind_8")) self.gridLayout.addWidget(self.PasswordRemind_8, 1, 1, 1, 1) self.PasswordRemind = QtGui.QLabel(Dialog) font = QtGui.QFont() font.setPointSize(10) font.setBold(True) font.setWeight(75) self.PasswordRemind.setFont(font) self.PasswordRemind.setObjectName(_fromUtf8("PasswordRemind")) self.gridLayout.addWidget(self.PasswordRemind, 1, 0, 1, 1) self.NameEntryBox_5 = QtGui.QLineEdit(Dialog) self.NameEntryBox_5.setObjectName(_fromUtf8("NameEntryBox_5")) self.gridLayout.addWidget(self.NameEntryBox_5, 3, 1, 1, 1) self.NameEntryBox_4 = QtGui.QLineEdit(Dialog) self.NameEntryBox_4.setText(_fromUtf8("")) self.NameEntryBox_4.setObjectName(_fromUtf8("NameEntryBox_4")) self.gridLayout.addWidget(self.NameEntryBox_4, 4, 1, 1, 1) self.NameEntryBox = QtGui.QLineEdit(Dialog) self.NameEntryBox.setObjectName(_fromUtf8("NameEntryBox")) self.gridLayout.addWidget(self.NameEntryBox, 2, 0, 1, 1) self.Title = QtGui.QLabel(Dialog) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(85, 85, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(213, 213, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(149, 149, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(42, 42, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(56, 56, 170)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(85, 85, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Shadow, brush) brush = QtGui.QBrush(QtGui.QColor(170, 170, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.AlternateBase, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipBase, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(85, 85, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(213, 213, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(149, 149, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(42, 42, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(56, 56, 170)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(85, 85, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Shadow, brush) brush = QtGui.QBrush(QtGui.QColor(170, 170, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.AlternateBase, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipBase, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush) brush = QtGui.QBrush(QtGui.QColor(42, 42, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(85, 85, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(213, 213, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush) brush = QtGui.QBrush(QtGui.QColor(149, 149, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush) brush = QtGui.QBrush(QtGui.QColor(42, 42, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(56, 56, 170)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush) brush = QtGui.QBrush(QtGui.QColor(42, 42, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush) brush = QtGui.QBrush(QtGui.QColor(42, 42, 127)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(85, 85, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(85, 85, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Shadow, brush) brush = QtGui.QBrush(QtGui.QColor(85, 85, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.AlternateBase, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipBase, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush) self.Title.setPalette(palette) font = QtGui.QFont() font.setPointSize(14) font.setBold(True) font.setWeight(75) self.Title.setFont(font) self.Title.setObjectName(_fromUtf8("Title")) self.gridLayout.addWidget(self.Title, 0, 0, 1, 1) self.buttonBox = QtGui.QDialogButtonBox(Dialog) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok) self.buttonBox.setObjectName(_fromUtf8("buttonBox")) self.gridLayout.addWidget(self.buttonBox, 5, 1, 1, 1) 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 __init__(self, marketProxy, exchangeProxy, remoteMarketID, action, parent=None): base_name, counter_name = marketProxy.getPrettyCommodityNames() title = QtCore.QCoreApplication.translate( 'ExchangeDockWidget', "{0} - {1}", "{exchange name} - {market name}, you just pick the order and the seperator" ).format(exchangeProxy.name, marketProxy.getPrettyName()) super(ExchangeDockWidget, self).__init__(title, parent) self.market_proxy = marketProxy self.exchange = exchangeProxy.getExchangeObject() self.remote_market = remoteMarketID self.enable_exchange_action = action # get our display parameters if self.exchange.valueType is int: self.base_factor, self.counter_factor = self.exchange.getFactors(self.remote_market) self.base_power, self.counter_power = self.exchange.getPowers(self.remote_market) self.scale = self.exchange.getScale(self.remote_market) self.base_precision = self.market_proxy.getPrecisionBase() self.counter_precision = self.market_proxy.getPrecisionCounter() side_layout = QtGui.QGridLayout() label_font = QtGui.QFont() label_font.setPointSize(7) row = 0 for translation, stat in ( (QtCore.QCoreApplication.translate('ExchangeDockWidget', "ask", "best ask price"), 'ask'), (QtCore.QCoreApplication.translate('ExchangeDockWidget', "last", "price of last trade"), 'last'), (QtCore.QCoreApplication.translate('ExchangeDockWidget', "bid", "best bid price"), 'bid')): label = QtGui.QLabel(translation) label.setAlignment(QtCore.Qt.AlignRight) label.setFont(label_font) if self.exchange.valueType is int: widget = dojima.ui.widget.LCDIntWidget(factor=self.counter_factor, power=self.counter_power) elif self.exchange.valueType is Decimal: widget = dojima.ui.widget.LCDDecimalWidget() else: raise NotImplementedError("{} is not a supported exchange.valueType".format(exchange.valueType)) setattr(self, '{}_widget'.format(stat), widget) side_layout.addWidget(label, row, 0, 1, 2) row += 1 side_layout.addWidget(widget, row, 0, 1, 2) side_layout.setRowStretch(row, 1) row += 1 refresh_label = QtGui.QLabel(QtCore.QCoreApplication.translate('ExchangeDockWidget', "refresh rate:", "ticker refresh rate")) refresh_label.setAlignment(QtCore.Qt.AlignRight) refresh_spin = QtGui.QSpinBox(maximum=3600, minimum=4, prefix=QtCore.QCoreApplication.translate('ExchangeDockWidget', "", "The prefix before the number in the " "refresh rate spin box"), suffix=QtCore.QCoreApplication.translate('ExchangeDockWidget', "s", "The suffix after the number in the " "refresh rate spin box") ) refresh_spin.valueChanged[int].connect(self.exchange.setTickerRefreshRate) refresh_spin.setValue(self.exchange.getTickerRefreshRate()) side_layout.addWidget(refresh_label, row, 0) side_layout.addWidget(refresh_spin, row, 1) self.menu_bar = ExchangeDockWidgetMenuBar(self) if hasattr(self.exchange, 'getDepthProxy'): self.menu_bar.addDepthChartAction() if hasattr(self.exchange, 'getTradesProxy'): self.menu_bar.addTradesChartAction() # account UI account_layout = QtGui.QGridLayout() # get the prefixi and suffixi base_prefix, base_suffix = self.market_proxy.getPrefixSuffixBase() counter_prefix, counter_suffix = self.market_proxy.getPrefixSuffixCounter() if self.exchange.valueType is int: self.base_balance_total_label = dojima.ui.widget.AssetAmountIntView(factor=self.base_factor) self.counter_balance_total_label = dojima.ui.widget.AssetAmountIntView(factor=self.counter_factor) self.base_balance_liquid_label = dojima.ui.widget.AssetAmountIntView(factor=self.base_factor) self.counter_balance_liquid_label = dojima.ui.widget.AssetAmountIntView(factor=self.counter_factor) self.amount_spin = dojima.ui.widget.AssetIntSpinBox(factor=self.base_factor, power=self.base_power, scale=self.scale) self.price_spin = dojima.ui.widget.AssetIntSpinBox(factor=self.counter_factor, power=self.counter_power) self.estimate_view = dojima.ui.widget.AssetAmountIntView(factor=self.counter_factor) self.ask_price_delegate = dojima.ui.widget.OfferItemIntDelegate(prefix=counter_prefix, suffix=counter_suffix, factor=self.counter_factor) self.bid_price_delegate = dojima.ui.widget.OfferItemIntDelegate(prefix=counter_prefix, suffix=counter_suffix, factor=self.counter_factor) self.ask_outstanding_delegate = dojima.ui.widget.OfferItemIntDelegate(prefix=base_prefix, suffix=base_suffix, factor=self.base_factor) self.bid_outstanding_delegate = dojima.ui.widget.OfferItemIntDelegate(prefix=base_prefix, suffix=base_suffix, factor=self.base_factor) elif self.exchange.valueType is Decimal: self.base_balance_total_label = dojima.ui.widget.AssetAmountDecimalView() self.counter_balance_total_label = dojima.ui.widget.AssetAmountDecimalView() self.base_balance_liquid_label = dojima.ui.widget.AssetAmountDecimalView() self.counter_balance_liquid_label = dojima.ui.widget.AssetAmountDecimalView() self.amount_spin = dojima.ui.widget.AssetDecimalSpinBox() self.price_spin = dojima.ui.widget.AssetDecimalSpinBox() self.estimate_view = dojima.ui.widget.AssetAmountDecimalView() self.ask_price_delegate = dojima.ui.widget.OfferItemDecimalDelegate(prefix=counter_prefix, suffix=counter_suffix) self.bid_price_delegate = dojima.ui.widget.OfferItemDecimalDelegate(prefix=counter_prefix, suffix=counter_suffix) self.ask_outstanding_delegate = dojima.ui.widget.OfferItemDecimalDelegate(prefix=base_prefix, suffix=base_suffix) self.bid_outstanding_delegate = dojima.ui.widget.OfferItemDecimalDelegate(prefix=base_prefix, suffix=base_suffix) else: raise NotImplementedError("{} is not a supported exchange.valueType".format(exchange.valueType)) tool_tip_total_text = QtCore.QCoreApplication.translate('ExchangeDockWidget', "Total balance.") tool_tip_liquid_text = QtCore.QCoreApplication.translate('ExchangeDockWidget', "Balance available for trade.") self.base_balance_total_label.setToolTip(tool_tip_total_text) self.counter_balance_total_label.setToolTip(tool_tip_total_text) self.base_balance_liquid_label.setToolTip(tool_tip_liquid_text) self.counter_balance_liquid_label.setToolTip(tool_tip_liquid_text) self.estimate_view.setDisabled(True) refresh_balance_action = QtGui.QAction( QtCore.QCoreApplication.translate('ExchangeDockWidget', "&refresh balance"), self, triggered=self.refreshBalance) balance_font = QtGui.QFont() balance_font.setPointSize(13) for label in (self.base_balance_total_label, self.counter_balance_total_label, self.base_balance_liquid_label, self.counter_balance_liquid_label): label.setAlignment(QtCore.Qt.AlignHCenter) label.setFont(balance_font) label.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu) label.addAction(refresh_balance_action) if base_prefix: for widget in (self.base_balance_total_label, self.base_balance_liquid_label, self.amount_spin): widget.setPrefix(base_prefix) if base_suffix: for widget in (self.base_balance_total_label, self.base_balance_liquid_label, self.amount_spin): widget.setSuffix(base_suffix) if counter_prefix: for widget in (self.counter_balance_total_label, self.counter_balance_liquid_label, self.price_spin, self.estimate_view): widget.setPrefix(counter_prefix) if counter_suffix: for widget in (self.counter_balance_total_label, self.counter_balance_liquid_label, self.price_spin, self.estimate_view): widget.setSuffix(counter_suffix) offer_button = QtGui.QPushButton( QtCore.QCoreApplication.translate('ExchangeDockWidget', "offer", "as in place offer")) offer_button_menu = QtGui.QMenu() offer_ask_action = QtGui.QAction( QtCore.QCoreApplication.translate('ExchangeDockWidget', "Ask"), offer_button) offer_bid_action = QtGui.QAction( QtCore.QCoreApplication.translate('ExchangeDockWidget', "Bid"), offer_button) offer_button_menu.addAction(offer_ask_action) offer_button_menu.addAction(offer_bid_action) offer_button.setMenu(offer_button_menu) at_seperator = QtCore.QCoreApplication.translate('ExchangeDockWidget', "@", "amount @ price") account_layout.addWidget(self.base_balance_total_label, 0,0) account_layout.addWidget(self.counter_balance_total_label, 0,1) account_layout.addWidget(self.base_balance_liquid_label, 1,0) account_layout.addWidget(self.counter_balance_liquid_label, 1,1) sublayout = QtGui.QFormLayout() sublayout.addRow( QtCore.QCoreApplication.translate('ExchangeDockWidget', "Amount:", "The offer amount label."), self.amount_spin) sublayout.addRow( QtCore.QCoreApplication.translate('ExchangeDockWidget', "Price:", "The offer price label."), self.price_spin) #TODO disable the offer menu actions when bid is higher than ask and so on # also disable the actions when either price or amount is 0 account_layout.addLayout(sublayout, 2,0, 2,2) account_layout.addWidget(offer_button, 4,0) account_layout.addWidget(self.estimate_view, 4,1) for spin in (self.amount_spin, self.price_spin): spin.setMaximum(999999) self.ask_offers_view = dojima.ui.widget.OffersView() account_layout.addWidget(self.ask_offers_view, 5,0, 1,2) self.bid_offers_view = dojima.ui.widget.OffersView() account_layout.addWidget(self.bid_offers_view, 6,0, 1,2) self.ask_offers_view.setItemDelegateForColumn(dojima.data.offers.PRICE, self.ask_price_delegate) self.bid_offers_view.setItemDelegateForColumn(dojima.data.offers.PRICE, self.bid_price_delegate) self.ask_offers_view.setItemDelegateForColumn(dojima.data.offers.OUTSTANDING, self.ask_outstanding_delegate) self.bid_offers_view.setItemDelegateForColumn(dojima.data.offers.OUTSTANDING, self.bid_outstanding_delegate) for view in self.ask_offers_view, self.bid_offers_view: view.setSelectionMode(QtGui.QListView.SingleSelection) view.setSelectionBehavior(QtGui.QListView.SelectRows) view.setShowGrid(False) view.verticalHeader().hide() view.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu) #base_offer_delegate = dojima.ui.widget.OfferItemDelegate( # factor=self.base_factor, # prefix=base_prefix, suffix=base_suffix) #view.setItemDelegateForColumn(dojima.data.offers.OUTSTANDING, # base_offer_delegate) #Refresh offers action refresh_offers_action = QtGui.QAction(QtCore.QCoreApplication.translate('ExchangeDockWidget', "&refresh offers") , self, triggered=self.refreshOffers) #Cancel offer action cancel_ask_action = QtGui.QAction(QtCore.QCoreApplication.translate('ExchangeDockWidget', "&cancel ask offer"), self, triggered=self.cancelAsk) self.ask_offers_view.addAction(cancel_ask_action) self.ask_offers_view.addAction(refresh_offers_action) cancel_bid_action = QtGui.QAction(QtCore.QCoreApplication.translate('ExchangeDockWidget', "&cancel bid offer"), self, triggered=self.cancelBid) self.bid_offers_view.addAction(cancel_bid_action) self.bid_offers_view.addAction(refresh_offers_action) # inter-widget connections self.amount_spin.editingFinished.connect(self.offerChanged) self.price_spin.editingFinished.connect(self.offerChanged) # Connect to account # these are remote ids, not local self.exchange.accountChanged.connect(self.setAccounts) self.exchange.exchange_error_signal.connect( self.exchange_error_handler) offer_ask_action.triggered.connect(self.placeAskLimit) offer_bid_action.triggered.connect(self.placeBidLimit) self.layout = QtGui.QHBoxLayout() self.layout.setMenuBar(self.menu_bar) self.layout.addLayout(side_layout) self.layout.addLayout(account_layout) self.layout.setStretchFactor(side_layout, 1) self.layout.setStretchFactor(account_layout, 4) widget = QtGui.QWidget(self) widget.setLayout(self.layout) self.setWidget(widget) # Exchanges may store a reference to this menu and update it self.exchange.populateMenuBar(self.menu_bar, self.remote_market) #proxy = self.exchange.getAccountValidityProxy(self.remote_market) #proxy.accountValidityChanged.connect(self.setEnabled) self.account_widgets = ( self.base_balance_total_label, self.base_balance_liquid_label, self.counter_balance_total_label, self.counter_balance_liquid_label, self.amount_spin, self.price_spin, self.ask_offers_view, self.bid_offers_view ) self.setAccounts(self.remote_market)
def initUI(self): font = QtGui.QFont("Sans Serif", 21, QtGui.QFont.Bold) title = QtGui.QLabel('Here are some suggestions!') title.setFont(font) details = QtGui.QLabel('We picked them up just for you:)') details.setStyleSheet( 'QLabel {color: gray; font-size: 12px; font-weight: regular;}') info = QtGui.QVBoxLayout() info.addWidget(title) info.addWidget(details) sug_lbl = QtGui.QLabel('Suggest by') scombo = QtGui.QComboBox() scombo.addItem("Ratings") scombo.addItem("Waiting Time") scombo.addItem("Level") shbox = QtGui.QHBoxLayout() shbox.addWidget(sug_lbl) shbox.addWidget(scombo, 1) sbox = QtGui.QGroupBox('Suggestion') sbox.setStyleSheet( 'QGroupBox {color: gray; font-size: 9px; font-weight: bold;}') sbox.setLayout(shbox) ratings_vbox = QtGui.QVBoxLayout() ratings_vbox.addWidget(barbercard(None)) ratings_vbox.addWidget(barbercard(None)) ratings_vbox.addWidget(barbercard(None)) ratings_vbox.addWidget(barbercard(None)) ratings_panel = QtGui.QGroupBox('Barber Info') ratings_panel.setStyleSheet( 'QGroupBox {color: gray; font-size: 9px; font-weight: bold;}') ratings_panel.setLayout(ratings_vbox) scroll = QtGui.QScrollArea() scroll.setWidget(ratings_panel) scroll.setWidgetResizable(True) scroll.setStyleSheet('QScrollArea {border-radius: 10px;}') scroll.setFixedHeight(280) scroll.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) scroll.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) cancel_btn = QtGui.QPushButton('Back') cancel_btn.resize(cancel_btn.sizeHint()) cancel_btn.clicked.connect(self.goback) go_btn = QtGui.QPushButton('More') go_btn.resize(go_btn.sizeHint()) go_btn.clicked.connect(self.loadmore) btns = QtGui.QHBoxLayout() btns.addStretch(1) btns.addWidget(go_btn, 1) btns.addWidget(cancel_btn, 1) layout = QtGui.QVBoxLayout() layout.addLayout(info) layout.addStretch(1) layout.addWidget(sbox) layout.addWidget(scroll) layout.addStretch(1) layout.addLayout(btns) self.setLayout(layout)
def setupUi(self, Dialog): Dialog.setObjectName(_fromUtf8("Dialog")) Dialog.resize(518, 105) Dialog.setMinimumSize(QtCore.QSize(518, 105)) Dialog.setMaximumSize(QtCore.QSize(518, 105)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(95, 95, 95)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(95, 95, 95)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(95, 95, 95)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(95, 95, 95)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) Dialog.setPalette(palette) self.verticalLayout = QtGui.QVBoxLayout(Dialog) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.label = QtGui.QLabel(Dialog) self.label.setMinimumSize(QtCore.QSize(500, 20)) self.label.setMaximumSize(QtCore.QSize(500, 20)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) self.label.setPalette(palette) font = QtGui.QFont() font.setPointSize(12) self.label.setFont(font) self.label.setObjectName(_fromUtf8("label")) self.verticalLayout.addWidget(self.label) self.LE_MDP = QtGui.QLineEdit(Dialog) self.LE_MDP.setMinimumSize(QtCore.QSize(500, 20)) self.LE_MDP.setMaximumSize(QtCore.QSize(500, 20)) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) self.LE_MDP.setPalette(palette) self.LE_MDP.setStyleSheet( _fromUtf8("background-color: rgb(120, 120, 120);\n" "color: rgb(0, 0, 0);\n" "border: 1px solid rgb(240, 240, 240);")) self.LE_MDP.setText(_fromUtf8("")) self.LE_MDP.setEchoMode(QtGui.QLineEdit.Normal) self.LE_MDP.setObjectName(_fromUtf8("LE_MDP")) self.verticalLayout.addWidget(self.LE_MDP) self.retranslateUi(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
def __init__(self, parent=None): QtGui.QTextEdit.__init__(self, parent) self.setReadOnly(True) self.setFont(QtGui.QFont('Courier'))
def setupUi(self, ConfirmMetadataDialog): ConfirmMetadataDialog.setObjectName(_fromUtf8("ConfirmMetadataDialog")) ConfirmMetadataDialog.setWindowModality(QtCore.Qt.ApplicationModal) ConfirmMetadataDialog.resize(434, 702) ConfirmMetadataDialog.setModal(False) self.gridLayout_2 = QtGui.QGridLayout(ConfirmMetadataDialog) self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) self.gridLayout = QtGui.QGridLayout() self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.label = QtGui.QLabel(ConfirmMetadataDialog) self.label.setObjectName(_fromUtf8("label")) self.gridLayout.addWidget(self.label, 0, 0, 1, 1) spacerItem = QtGui.QSpacerItem(28, 128, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem, 0, 1, 4, 1) self.artistLineEdit = QtGui.QLineEdit(ConfirmMetadataDialog) self.artistLineEdit.setObjectName(_fromUtf8("artistLineEdit")) self.gridLayout.addWidget(self.artistLineEdit, 0, 2, 1, 1) self.label_2 = QtGui.QLabel(ConfirmMetadataDialog) self.label_2.setObjectName(_fromUtf8("label_2")) self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) self.dateEdit = QtGui.QDateEdit(ConfirmMetadataDialog) self.dateEdit.setMinimumDate(QtCore.QDate(1900, 1, 1)) self.dateEdit.setCalendarPopup(True) self.dateEdit.setObjectName(_fromUtf8("dateEdit")) self.gridLayout.addWidget(self.dateEdit, 1, 2, 1, 1) self.label_3 = QtGui.QLabel(ConfirmMetadataDialog) self.label_3.setObjectName(_fromUtf8("label_3")) self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1) self.locationLineEdit = QtGui.QLineEdit(ConfirmMetadataDialog) self.locationLineEdit.setObjectName(_fromUtf8("locationLineEdit")) self.gridLayout.addWidget(self.locationLineEdit, 2, 2, 1, 1) self.label_4 = QtGui.QLabel(ConfirmMetadataDialog) self.label_4.setObjectName(_fromUtf8("label_4")) self.gridLayout.addWidget(self.label_4, 3, 0, 1, 1) self.venueLineEdit = QtGui.QLineEdit(ConfirmMetadataDialog) self.venueLineEdit.setObjectName(_fromUtf8("venueLineEdit")) self.gridLayout.addWidget(self.venueLineEdit, 3, 2, 1, 1) self.label_8 = QtGui.QLabel(ConfirmMetadataDialog) self.label_8.setObjectName(_fromUtf8("label_8")) self.gridLayout.addWidget(self.label_8, 4, 0, 1, 1) self.genreLineEdit = QtGui.QLineEdit(ConfirmMetadataDialog) self.genreLineEdit.setObjectName(_fromUtf8("genreLineEdit")) self.gridLayout.addWidget(self.genreLineEdit, 4, 2, 1, 1) self.label_7 = QtGui.QLabel(ConfirmMetadataDialog) self.label_7.setObjectName(_fromUtf8("label_7")) self.gridLayout.addWidget(self.label_7, 5, 0, 1, 2) self.titleLineEdit = QtGui.QLineEdit(ConfirmMetadataDialog) self.titleLineEdit.setObjectName(_fromUtf8("titleLineEdit")) self.gridLayout.addWidget(self.titleLineEdit, 5, 2, 1, 1) self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1) self.horizontalLayout_2 = QtGui.QHBoxLayout() self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) spacerItem1 = QtGui.QSpacerItem(148, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem1) self.label_5 = QtGui.QLabel(ConfirmMetadataDialog) font = QtGui.QFont() font.setPointSize(15) self.label_5.setFont(font) self.label_5.setObjectName(_fromUtf8("label_5")) self.horizontalLayout_2.addWidget(self.label_5) self.verticalLayout = QtGui.QVBoxLayout() self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.horizontalLayout_2.addLayout(self.verticalLayout) spacerItem2 = QtGui.QSpacerItem(148, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem2) self.gridLayout_2.addLayout(self.horizontalLayout_2, 1, 0, 1, 1) self.tracklistTableWidget = QtGui.QTableWidget(ConfirmMetadataDialog) self.tracklistTableWidget.setObjectName( _fromUtf8("tracklistTableWidget")) self.tracklistTableWidget.setColumnCount(0) self.tracklistTableWidget.setRowCount(0) self.gridLayout_2.addWidget(self.tracklistTableWidget, 2, 0, 1, 1) self.horizontalLayout_4 = QtGui.QHBoxLayout() self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4")) self.gridLayout_2.addLayout(self.horizontalLayout_4, 3, 0, 1, 1) self.horizontalLayout_3 = QtGui.QHBoxLayout() self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) spacerItem3 = QtGui.QSpacerItem(118, 18, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem3) self.label_6 = QtGui.QLabel(ConfirmMetadataDialog) font = QtGui.QFont() font.setPointSize(15) self.label_6.setFont(font) self.label_6.setObjectName(_fromUtf8("label_6")) self.horizontalLayout_3.addWidget(self.label_6) self.verticalLayout_2 = QtGui.QVBoxLayout() self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.horizontalLayout_3.addLayout(self.verticalLayout_2) spacerItem4 = QtGui.QSpacerItem(118, 17, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem4) self.gridLayout_2.addLayout(self.horizontalLayout_3, 4, 0, 1, 1) self.commentsTextEdit = QtGui.QTextEdit(ConfirmMetadataDialog) self.commentsTextEdit.setObjectName(_fromUtf8("commentsTextEdit")) self.gridLayout_2.addWidget(self.commentsTextEdit, 5, 0, 1, 1) self.horizontalLayout_5 = QtGui.QHBoxLayout() self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5")) spacerItem5 = QtGui.QSpacerItem(148, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_5.addItem(spacerItem5) self.refreshTracklistButton = QtGui.QPushButton(ConfirmMetadataDialog) self.refreshTracklistButton.setAutoDefault(False) self.refreshTracklistButton.setObjectName( _fromUtf8("refreshTracklistButton")) self.horizontalLayout_5.addWidget(self.refreshTracklistButton) spacerItem6 = QtGui.QSpacerItem(158, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_5.addItem(spacerItem6) self.gridLayout_2.addLayout(self.horizontalLayout_5, 6, 0, 1, 1) self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) spacerItem7 = QtGui.QSpacerItem(128, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem7) self.pushButton = QtGui.QPushButton(ConfirmMetadataDialog) self.pushButton.setAutoDefault(False) self.pushButton.setDefault(True) self.pushButton.setObjectName(_fromUtf8("pushButton")) self.horizontalLayout.addWidget(self.pushButton) spacerItem8 = QtGui.QSpacerItem(128, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem8) self.gridLayout_2.addLayout(self.horizontalLayout, 7, 0, 1, 1) self.label.setBuddy(self.artistLineEdit) self.label_2.setBuddy(self.dateEdit) self.label_3.setBuddy(self.locationLineEdit) self.label_4.setBuddy(self.venueLineEdit) self.label_7.setBuddy(self.titleLineEdit) self.retranslateUi(ConfirmMetadataDialog) QtCore.QObject.connect(self.pushButton, QtCore.SIGNAL(_fromUtf8("clicked()")), ConfirmMetadataDialog.accept) QtCore.QObject.connect(self.refreshTracklistButton, QtCore.SIGNAL(_fromUtf8("clicked()")), ConfirmMetadataDialog.refreshTracks) QtCore.QMetaObject.connectSlotsByName(ConfirmMetadataDialog)
def setupUi(self, DockWidget): DockWidget.setObjectName(_fromUtf8("DockWidget")) DockWidget.resize(266, 387) self.dockWidgetContents = QtGui.QWidget() self.dockWidgetContents.setObjectName(_fromUtf8("dockWidgetContents")) self.gridLayout = QtGui.QGridLayout(self.dockWidgetContents) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.label_70 = QtGui.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_70.setFont(font) self.label_70.setObjectName(_fromUtf8("label_70")) self.gridLayout.addWidget(self.label_70, 0, 1, 1, 1) self.label_80 = QtGui.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_80.setFont(font) self.label_80.setObjectName(_fromUtf8("label_80")) self.gridLayout.addWidget(self.label_80, 0, 2, 1, 1) self.label_27 = QtGui.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_27.setFont(font) self.label_27.setObjectName(_fromUtf8("label_27")) self.gridLayout.addWidget(self.label_27, 1, 0, 1, 1) self.listView = QtGui.QListView(self.dockWidgetContents) self.listView.setObjectName(_fromUtf8("listView")) self.gridLayout.addWidget(self.listView, 1, 1, 1, 1) self.listViewDis = QtGui.QListView(self.dockWidgetContents) self.listViewDis.setEnabled(False) self.listViewDis.setObjectName(_fromUtf8("listViewDis")) self.gridLayout.addWidget(self.listViewDis, 1, 2, 1, 1) self.label_59 = QtGui.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_59.setFont(font) self.label_59.setObjectName(_fromUtf8("label_59")) self.gridLayout.addWidget(self.label_59, 2, 0, 1, 1) self.treeView = QtGui.QTreeView(self.dockWidgetContents) self.treeView.setObjectName(_fromUtf8("treeView")) self.gridLayout.addWidget(self.treeView, 2, 1, 1, 1) self.treeViewDis = QtGui.QTreeView(self.dockWidgetContents) self.treeViewDis.setEnabled(False) self.treeViewDis.setObjectName(_fromUtf8("treeViewDis")) self.gridLayout.addWidget(self.treeViewDis, 2, 2, 1, 1) self.label_60 = QtGui.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_60.setFont(font) self.label_60.setObjectName(_fromUtf8("label_60")) self.gridLayout.addWidget(self.label_60, 3, 0, 1, 1) self.tableView = QtGui.QTableView(self.dockWidgetContents) self.tableView.setObjectName(_fromUtf8("tableView")) self.gridLayout.addWidget(self.tableView, 3, 1, 1, 1) self.tableViewDis = QtGui.QTableView(self.dockWidgetContents) self.tableViewDis.setEnabled(False) self.tableViewDis.setObjectName(_fromUtf8("tableViewDis")) self.gridLayout.addWidget(self.tableViewDis, 3, 2, 1, 1) self.label_61 = QtGui.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_61.setFont(font) self.label_61.setObjectName(_fromUtf8("label_61")) self.gridLayout.addWidget(self.label_61, 4, 0, 1, 1) self.columnView = QtGui.QColumnView(self.dockWidgetContents) self.columnView.setObjectName(_fromUtf8("columnView")) self.gridLayout.addWidget(self.columnView, 4, 1, 1, 1) self.columnViewDis = QtGui.QColumnView(self.dockWidgetContents) self.columnViewDis.setEnabled(False) self.columnViewDis.setObjectName(_fromUtf8("columnViewDis")) self.gridLayout.addWidget(self.columnViewDis, 4, 2, 1, 1) DockWidget.setWidget(self.dockWidgetContents) self.retranslateUi(DockWidget) QtCore.QMetaObject.connectSlotsByName(DockWidget)
def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(600, 300) MainWindow.setMinimumSize(QtCore.QSize(600, 300)) MainWindow.setMaximumSize(QtCore.QSize(600, 300)) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.pushButton = QtGui.QPushButton(self.centralwidget) self.pushButton.setGeometry(QtCore.QRect(30, 250, 401, 31)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.pushButton.setFont(font) self.pushButton.setAutoFillBackground(False) self.pushButton.setStyleSheet( _fromUtf8("background-color: rgb(170, 170, 127);\n" "color: rgb(254, 254, 254);\n" "font-weight: bold;\n" "border-radius: 5px;")) self.pushButton.setAutoRepeat(False) self.pushButton.setObjectName(_fromUtf8("pushButton")) self.pushButton_2 = QtGui.QPushButton(self.centralwidget) self.pushButton_2.setGeometry(QtCore.QRect(450, 250, 121, 31)) self.pushButton_2.setAutoFillBackground(False) self.pushButton_2.setStyleSheet( _fromUtf8("background-color: rgb(0, 170, 255);\n" "color: rgb(254, 254, 254);\n" "font-weight: bold;\n" "border-radius: 5px;")) self.pushButton_2.setObjectName(_fromUtf8("pushButton_2")) self.line = QtGui.QFrame(self.centralwidget) self.line.setGeometry(QtCore.QRect(10, 230, 581, 20)) self.line.setFrameShape(QtGui.QFrame.HLine) self.line.setFrameShadow(QtGui.QFrame.Sunken) self.line.setObjectName(_fromUtf8("line")) self.lineEdit = QtGui.QLineEdit(self.centralwidget) self.lineEdit.setGeometry(QtCore.QRect(10, 180, 113, 41)) self.lineEdit.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.lineEdit.setDragEnabled(False) self.lineEdit.setReadOnly(True) self.lineEdit.setObjectName(_fromUtf8("lineEdit")) self.label = QtGui.QLabel(self.centralwidget) self.label.setGeometry(QtCore.QRect(-2, -1, 601, 41)) self.label.setStyleSheet( _fromUtf8("color: rgb(255, 255, 255);\n" "background-color: rgb(188, 237, 81);\n" "font-weight: bold;")) self.label.setObjectName(_fromUtf8("label")) self.layoutWidget = QtGui.QWidget(self.centralwidget) self.layoutWidget.setGeometry(QtCore.QRect(140, 50, 321, 161)) self.layoutWidget.setObjectName(_fromUtf8("layoutWidget")) self.verticalLayout = QtGui.QVBoxLayout(self.layoutWidget) self.verticalLayout.setMargin(0) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.horizontalSlider = QtGui.QSlider(self.layoutWidget) self.horizontalSlider.setMaximum(255) self.horizontalSlider.setProperty("value", 248) self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal) self.horizontalSlider.setTickPosition(QtGui.QSlider.TicksAbove) self.horizontalSlider.setTickInterval(10) self.horizontalSlider.setObjectName(_fromUtf8("horizontalSlider")) self.verticalLayout.addWidget(self.horizontalSlider) self.horizontalSlider_2 = QtGui.QSlider(self.layoutWidget) self.horizontalSlider_2.setMaximum(255) self.horizontalSlider_2.setProperty("value", 221) self.horizontalSlider_2.setSliderPosition(221) self.horizontalSlider_2.setOrientation(QtCore.Qt.Horizontal) self.horizontalSlider_2.setTickPosition(QtGui.QSlider.TicksAbove) self.horizontalSlider_2.setTickInterval(10) self.horizontalSlider_2.setObjectName(_fromUtf8("horizontalSlider_2")) self.verticalLayout.addWidget(self.horizontalSlider_2) self.horizontalSlider_3 = QtGui.QSlider(self.layoutWidget) self.horizontalSlider_3.setMaximum(255) self.horizontalSlider_3.setProperty("value", 161) self.horizontalSlider_3.setOrientation(QtCore.Qt.Horizontal) self.horizontalSlider_3.setTickPosition(QtGui.QSlider.TicksAbove) self.horizontalSlider_3.setTickInterval(10) self.horizontalSlider_3.setObjectName(_fromUtf8("horizontalSlider_3")) self.verticalLayout.addWidget(self.horizontalSlider_3) self.layoutWidget1 = QtGui.QWidget(self.centralwidget) self.layoutWidget1.setGeometry(QtCore.QRect(470, 50, 61, 161)) self.layoutWidget1.setObjectName(_fromUtf8("layoutWidget1")) self.verticalLayout_2 = QtGui.QVBoxLayout(self.layoutWidget1) self.verticalLayout_2.setMargin(0) self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.label_2 = QtGui.QLabel(self.layoutWidget1) self.label_2.setStyleSheet( _fromUtf8("color: rgb(255, 0, 0);\n" "font-weight: bold;")) self.label_2.setObjectName(_fromUtf8("label_2")) self.verticalLayout_2.addWidget(self.label_2) self.label_3 = QtGui.QLabel(self.layoutWidget1) self.label_3.setStyleSheet( _fromUtf8("color: rgb(0, 255, 0);\n" "font-weight: bold;")) self.label_3.setObjectName(_fromUtf8("label_3")) self.verticalLayout_2.addWidget(self.label_3) self.label_4 = QtGui.QLabel(self.layoutWidget1) self.label_4.setStyleSheet( _fromUtf8("color: rgb(0, 0, 255);\n" "font-weight: bold;")) self.label_4.setObjectName(_fromUtf8("label_4")) self.verticalLayout_2.addWidget(self.label_4) self.layoutWidget2 = QtGui.QWidget(self.centralwidget) self.layoutWidget2.setGeometry(QtCore.QRect(542, 50, 51, 161)) self.layoutWidget2.setObjectName(_fromUtf8("layoutWidget2")) self.verticalLayout_3 = QtGui.QVBoxLayout(self.layoutWidget2) self.verticalLayout_3.setMargin(0) self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3")) self.label_5 = QtGui.QLabel(self.layoutWidget2) self.label_5.setText(_fromUtf8("")) self.label_5.setObjectName(_fromUtf8("label_5")) self.verticalLayout_3.addWidget(self.label_5) self.label_6 = QtGui.QLabel(self.layoutWidget2) self.label_6.setText(_fromUtf8("")) self.label_6.setObjectName(_fromUtf8("label_6")) self.verticalLayout_3.addWidget(self.label_6) self.label_7 = QtGui.QLabel(self.layoutWidget2) self.label_7.setText(_fromUtf8("")) self.label_7.setObjectName(_fromUtf8("label_7")) self.verticalLayout_3.addWidget(self.label_7) self.lineEdit_2 = QtGui.QLineEdit(self.centralwidget) self.lineEdit_2.setGeometry(QtCore.QRect(10, 60, 113, 101)) self.lineEdit_2.setStyleSheet(_fromUtf8("border-radius: 10px;\n")) self.lineEdit_2.setReadOnly(True) self.lineEdit_2.setObjectName(_fromUtf8("lineEdit_2")) MainWindow.setCentralWidget(self.centralwidget) self.retranslateUi(MainWindow) QtCore.QObject.connect(self.horizontalSlider, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.label_5.setNum) QtCore.QObject.connect(self.horizontalSlider_2, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.label_6.setNum) QtCore.QObject.connect(self.horizontalSlider_3, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.label_7.setNum) QtCore.QObject.connect(self.horizontalSlider, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), MainWindow.cambiarColorFondo) QtCore.QObject.connect(self.horizontalSlider_2, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), MainWindow.cambiarColorFondo) QtCore.QObject.connect(self.horizontalSlider_3, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), MainWindow.cambiarColorFondo) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def __init__(self, fileList): super().__init__() self.columnsToRemove = {} self.setWindowModality(QtCore.Qt.ApplicationModal) self.setSizeGripEnabled(True) allRepr = thread.getRepresentationAllTags(fileList) self.layout = QtGui.QGridLayout() self.buttonAdd = QtGui.QPushButton('Add') self.buttonOk = QtGui.QPushButton('Ok') self.buttonCancel = QtGui.QPushButton('Cancel') self.layout.addWidget(self.buttonAdd, 0, 0) self.layout.addWidget(self.buttonCancel, 0, 1) self.layout.addWidget(self.buttonOk, 0, 2) formLayout = QtGui.QFormLayout() self.artistLine = QtGui.QLineEdit(self) self.artistLine.setText(allRepr.get('ARTIST', '')) self.albumLine = QtGui.QLineEdit(self) self.albumLine.setText(allRepr.get('ALBUM', '')) self.yearLine = QtGui.QLineEdit(self) self.yearLine.setText(allRepr.get('DATE', '')) self.genreLine = QtGui.QLineEdit(self) self.genreLine.setText(allRepr.get('GENRE', '')) formLayout.addRow('Artist', self.artistLine) formLayout.addRow('Album', self.albumLine) formLayout.addRow('Year', self.yearLine) formLayout.addRow('Genre', self.genreLine) self.layout.addLayout(formLayout, 1, 0, 1, 3) self.tagTable = QtGui.QTableView() self.model = QtGui.QStandardItemModel() self.tagTable.setModel(self.model) # Add rows listKeys = [ x for x in thread.getAllKeys(fileList) if x not in ['ARTIST', 'ALBUM', 'DATE', 'GENRE'] ] allTags = thread.getAllTags(fileList) attribs = [[allTags[key][file] for key in listKeys] for file in range(len(fileList))] nodes = [[QtGui.QStandardItem(x) for x in attrList] for attrList in attribs] for n in nodes: self.model.appendRow(n) # Add the headers to the list of values attribs.append(listKeys) fontMetric = QtGui.QFontMetrics(QtGui.QFont()) colWidth = [[fontMetric.width(x) for x in l] for l in attribs] maxWidth = [max(x) for x in zip(*colWidth)] # Fill headers for i, h in enumerate(listKeys): self.model.setHeaderData(i, QtCore.Qt.Horizontal, h.title()) self.tagTable.horizontalHeader().resizeSection(i, maxWidth[i]) self.tagTable.setAlternatingRowColors(True) self.tagTable.setWordWrap(False) self.tagTable.verticalHeader().hide() self.tagTable.horizontalHeader().setHighlightSections(False) self.tagTable.horizontalHeader().setResizeMode( QtGui.QHeaderView.Interactive) self.tagTable.horizontalHeader().setStretchLastSection(True) self.layout.addWidget(self.tagTable, 2, 0, 1, 3) self.setLayout(self.layout) self.buttonOk.clicked.connect(self.saveChanges) self.buttonCancel.clicked.connect(self.refuse) self.buttonAdd.clicked.connect(self.addColumn) self.tagTable.horizontalHeader().sectionDoubleClicked.connect( self.changeHorizontalHeader) screen = QtGui.QDesktopWidget().screenGeometry() self.resize(min(sum(maxWidth) + 10, screen.width() - 10), self.sizeHint().height())
def setButtonFont(self, button, family, size): ''' Changes the font of the text in the button. ''' button.setFont(QtGui.QFont(family, size))
def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(1310, 740) self.Attitude_Name = QtGui.QLabel(Form) self.Attitude_Name.setGeometry(QtCore.QRect(850, 230, 211, 20)) self.Attitude_Name.setAcceptDrops(False) self.Attitude_Name.setAlignment(QtCore.Qt.AlignCenter) self.Attitude_Name.setObjectName(_fromUtf8("Attitude_Name")) self.Heading_Name = QtGui.QLabel(Form) self.Heading_Name.setGeometry(QtCore.QRect(1080, 230, 211, 20)) self.Heading_Name.setAcceptDrops(False) self.Heading_Name.setAlignment(QtCore.Qt.AlignCenter) self.Heading_Name.setObjectName(_fromUtf8("Heading_Name")) self.Turn_Name = QtGui.QLabel(Form) self.Turn_Name.setGeometry(QtCore.QRect(850, 360, 211, 20)) self.Turn_Name.setAcceptDrops(False) self.Turn_Name.setAlignment(QtCore.Qt.AlignCenter) self.Turn_Name.setObjectName(_fromUtf8("Turn_Name")) self.Throttle_Name = QtGui.QLabel(Form) self.Throttle_Name.setGeometry(QtCore.QRect(1080, 360, 211, 20)) self.Throttle_Name.setAcceptDrops(False) self.Throttle_Name.setAlignment(QtCore.Qt.AlignCenter) self.Throttle_Name.setObjectName(_fromUtf8("Throttle_Name")) self.Battery = QtGui.QProgressBar(Form) self.Battery.setGeometry(QtCore.QRect(1210, 422, 61, 201)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.Battery.setFont(font) self.Battery.setLayoutDirection(QtCore.Qt.LeftToRight) self.Battery.setProperty("value", 50) self.Battery.setTextVisible(True) self.Battery.setOrientation(QtCore.Qt.Vertical) self.Battery.setInvertedAppearance(False) self.Battery.setTextDirection(QtGui.QProgressBar.TopToBottom) self.Battery.setObjectName(_fromUtf8("Battery")) self.Battery_Name = QtGui.QLabel(Form) self.Battery_Name.setGeometry(QtCore.QRect(1200, 640, 91, 20)) self.Battery_Name.setAcceptDrops(False) self.Battery_Name.setAlignment(QtCore.Qt.AlignCenter) self.Battery_Name.setObjectName(_fromUtf8("Battery_Name")) self.Throttle = QtGui.QProgressBar(Form) self.Throttle.setGeometry(QtCore.QRect(1080, 290, 211, 51)) self.Throttle.setProperty("value", 24) self.Throttle.setObjectName(_fromUtf8("Throttle")) self.EXIT = QtGui.QPushButton(Form) self.EXIT.setGeometry(QtCore.QRect(1190, 690, 99, 27)) self.EXIT.setObjectName(_fromUtf8("EXIT")) self.layoutWidget = QtGui.QWidget(Form) self.layoutWidget.setGeometry(QtCore.QRect(500, 650, 209, 60)) self.layoutWidget.setObjectName(_fromUtf8("layoutWidget")) self.DATA_1 = QtGui.QVBoxLayout(self.layoutWidget) self.DATA_1.setMargin(0) self.DATA_1.setObjectName(_fromUtf8("DATA_1")) self.Altitude = QtGui.QHBoxLayout() self.Altitude.setObjectName(_fromUtf8("Altitude")) self.Altitude_Name = QtGui.QLabel(self.layoutWidget) self.Altitude_Name.setMinimumSize(QtCore.QSize(16, 17)) font = QtGui.QFont() font.setPointSize(16) font.setItalic(False) self.Altitude_Name.setFont(font) self.Altitude_Name.setLayoutDirection(QtCore.Qt.LeftToRight) self.Altitude_Name.setAlignment(QtCore.Qt.AlignCenter) self.Altitude_Name.setObjectName(_fromUtf8("Altitude_Name")) self.Altitude.addWidget(self.Altitude_Name) self.Altitude_LCD = QtGui.QLCDNumber(self.layoutWidget) self.Altitude_LCD.setEnabled(True) self.Altitude_LCD.setAutoFillBackground(True) self.Altitude_LCD.setSmallDecimalPoint(False) self.Altitude_LCD.setDigitCount(5) self.Altitude_LCD.setMode(QtGui.QLCDNumber.Dec) self.Altitude_LCD.setSegmentStyle(QtGui.QLCDNumber.Flat) self.Altitude_LCD.setObjectName(_fromUtf8("Altitude_LCD")) self.Altitude.addWidget(self.Altitude_LCD) self.Altitude_Units = QtGui.QLabel(self.layoutWidget) font = QtGui.QFont() font.setPointSize(13) self.Altitude_Units.setFont(font) self.Altitude_Units.setAlignment(QtCore.Qt.AlignCenter) self.Altitude_Units.setObjectName(_fromUtf8("Altitude_Units")) self.Altitude.addWidget(self.Altitude_Units) self.DATA_1.addLayout(self.Altitude) self.Pressure = QtGui.QHBoxLayout() self.Pressure.setObjectName(_fromUtf8("Pressure")) self.Pressure_Name = QtGui.QLabel(self.layoutWidget) self.Pressure_Name.setMinimumSize(QtCore.QSize(16, 17)) font = QtGui.QFont() font.setPointSize(16) font.setItalic(False) self.Pressure_Name.setFont(font) self.Pressure_Name.setLayoutDirection(QtCore.Qt.LeftToRight) self.Pressure_Name.setAlignment(QtCore.Qt.AlignCenter) self.Pressure_Name.setObjectName(_fromUtf8("Pressure_Name")) self.Pressure.addWidget(self.Pressure_Name) self.Pressure_LCD = QtGui.QLCDNumber(self.layoutWidget) self.Pressure_LCD.setEnabled(True) self.Pressure_LCD.setAutoFillBackground(True) self.Pressure_LCD.setSmallDecimalPoint(False) self.Pressure_LCD.setDigitCount(5) self.Pressure_LCD.setSegmentStyle(QtGui.QLCDNumber.Flat) self.Pressure_LCD.setObjectName(_fromUtf8("Pressure_LCD")) self.Pressure.addWidget(self.Pressure_LCD) self.Pressure_Units = QtGui.QLabel(self.layoutWidget) font = QtGui.QFont() font.setPointSize(13) self.Pressure_Units.setFont(font) self.Pressure_Units.setAlignment(QtCore.Qt.AlignCenter) self.Pressure_Units.setObjectName(_fromUtf8("Pressure_Units")) self.Pressure.addWidget(self.Pressure_Units) self.DATA_1.addLayout(self.Pressure) self.layoutWidget1 = QtGui.QWidget(Form) self.layoutWidget1.setGeometry(QtCore.QRect(880, 687, 258, 34)) self.layoutWidget1.setObjectName(_fromUtf8("layoutWidget1")) self.MODE_DISPLAY = QtGui.QHBoxLayout(self.layoutWidget1) self.MODE_DISPLAY.setMargin(0) self.MODE_DISPLAY.setObjectName(_fromUtf8("MODE_DISPLAY")) self.Mode_Name = QtGui.QLabel(self.layoutWidget1) font = QtGui.QFont() font.setPointSize(20) self.Mode_Name.setFont(font) self.Mode_Name.setObjectName(_fromUtf8("Mode_Name")) self.MODE_DISPLAY.addWidget(self.Mode_Name) self.Display = QtGui.QLabel(self.layoutWidget1) font = QtGui.QFont() font.setPointSize(20) self.Display.setFont(font) self.Display.setObjectName(_fromUtf8("Display")) self.MODE_DISPLAY.addWidget(self.Display) self.Test = QtGui.QSlider(Form) self.Test.setGeometry(QtCore.QRect(1170, 440, 41, 191)) self.Test.setOrientation(QtCore.Qt.Vertical) self.Test.setObjectName(_fromUtf8("Test")) self.Frame = QtGui.QLabel(Form) self.Frame.setGeometry(QtCore.QRect(10, 10, 832, 624)) self.Frame.setText(_fromUtf8("")) self.Frame.setObjectName(_fromUtf8("Frame")) self.Attitude_Image = QtGui.QLabel(Form) self.Attitude_Image.setGeometry(QtCore.QRect(850, 10, 210, 210)) self.Attitude_Image.setText(_fromUtf8("")) self.Attitude_Image.setObjectName(_fromUtf8("Attitude_Image")) self.Heading_Image = QtGui.QLabel(Form) self.Heading_Image.setGeometry(QtCore.QRect(1080, 10, 210, 210)) self.Heading_Image.setText(_fromUtf8("")) self.Heading_Image.setObjectName(_fromUtf8("Heading_Image")) self.Turn_Image = QtGui.QLabel(Form) self.Turn_Image.setGeometry(QtCore.QRect(850, 290, 210, 53)) self.Turn_Image.setText(_fromUtf8("")) self.Turn_Image.setObjectName(_fromUtf8("Turn_Image")) self.Frame_Zoom = QtGui.QLabel(Form) self.Frame_Zoom.setGeometry(QtCore.QRect(850, 420, 320, 240)) self.Frame_Zoom.setText(_fromUtf8("")) self.Frame_Zoom.setObjectName(_fromUtf8("Frame_Zoom")) self.widget = QtGui.QWidget(Form) self.widget.setGeometry(QtCore.QRect(41, 643, 174, 88)) self.widget.setObjectName(_fromUtf8("widget")) self.verticalLayout = QtGui.QVBoxLayout(self.widget) self.verticalLayout.setMargin(0) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.GPS_Name = QtGui.QLabel(self.widget) self.GPS_Name.setMinimumSize(QtCore.QSize(16, 17)) font = QtGui.QFont() font.setPointSize(16) font.setItalic(False) self.GPS_Name.setFont(font) self.GPS_Name.setLayoutDirection(QtCore.Qt.LeftToRight) self.GPS_Name.setAlignment(QtCore.Qt.AlignCenter) self.GPS_Name.setObjectName(_fromUtf8("GPS_Name")) self.verticalLayout.addWidget(self.GPS_Name) self.Latitude = QtGui.QHBoxLayout() self.Latitude.setObjectName(_fromUtf8("Latitude")) self.Latitude_Name = QtGui.QLabel(self.widget) font = QtGui.QFont() font.setPointSize(15) self.Latitude_Name.setFont(font) self.Latitude_Name.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.Latitude_Name.setObjectName(_fromUtf8("Latitude_Name")) self.Latitude.addWidget(self.Latitude_Name) self.Latitude_LCD = QtGui.QLCDNumber(self.widget) self.Latitude_LCD.setEnabled(True) font = QtGui.QFont() font.setPointSize(15) font.setBold(False) font.setItalic(False) font.setUnderline(False) font.setWeight(50) self.Latitude_LCD.setFont(font) self.Latitude_LCD.setAutoFillBackground(True) self.Latitude_LCD.setSmallDecimalPoint(False) self.Latitude_LCD.setDigitCount(11) self.Latitude_LCD.setSegmentStyle(QtGui.QLCDNumber.Flat) self.Latitude_LCD.setProperty("intValue", 0) self.Latitude_LCD.setObjectName(_fromUtf8("Latitude_LCD")) self.Latitude.addWidget(self.Latitude_LCD) self.verticalLayout.addLayout(self.Latitude) self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.Longitude_Name = QtGui.QLabel(self.widget) font = QtGui.QFont() font.setPointSize(15) self.Longitude_Name.setFont(font) self.Longitude_Name.setAlignment(QtCore.Qt.AlignCenter) self.Longitude_Name.setObjectName(_fromUtf8("Longitude_Name")) self.horizontalLayout.addWidget(self.Longitude_Name) self.Lonigitude_LCD = QtGui.QLCDNumber(self.widget) self.Lonigitude_LCD.setEnabled(True) font = QtGui.QFont() font.setPointSize(15) self.Lonigitude_LCD.setFont(font) self.Lonigitude_LCD.setAutoFillBackground(True) self.Lonigitude_LCD.setFrameShadow(QtGui.QFrame.Raised) self.Lonigitude_LCD.setSmallDecimalPoint(False) self.Lonigitude_LCD.setDigitCount(11) self.Lonigitude_LCD.setSegmentStyle(QtGui.QLCDNumber.Flat) self.Lonigitude_LCD.setProperty("value", 0.0) self.Lonigitude_LCD.setProperty("intValue", 0) self.Lonigitude_LCD.setObjectName(_fromUtf8("Lonigitude_LCD")) self.horizontalLayout.addWidget(self.Lonigitude_LCD) self.verticalLayout.addLayout(self.horizontalLayout) self.widget1 = QtGui.QWidget(Form) self.widget1.setGeometry(QtCore.QRect(740, 650, 65, 66)) self.widget1.setObjectName(_fromUtf8("widget1")) self.Zoom = QtGui.QVBoxLayout(self.widget1) self.Zoom.setMargin(0) self.Zoom.setObjectName(_fromUtf8("Zoom")) self.Altitude_Name_2 = QtGui.QLabel(self.widget1) self.Altitude_Name_2.setMinimumSize(QtCore.QSize(16, 17)) font = QtGui.QFont() font.setPointSize(16) font.setItalic(False) self.Altitude_Name_2.setFont(font) self.Altitude_Name_2.setLayoutDirection(QtCore.Qt.LeftToRight) self.Altitude_Name_2.setAlignment(QtCore.Qt.AlignCenter) self.Altitude_Name_2.setObjectName(_fromUtf8("Altitude_Name_2")) self.Zoom.addWidget(self.Altitude_Name_2) self.horizontalLayout_2 = QtGui.QHBoxLayout() self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.Pressure_LCD_2 = QtGui.QLCDNumber(self.widget1) self.Pressure_LCD_2.setEnabled(True) font = QtGui.QFont() font.setPointSize(18) self.Pressure_LCD_2.setFont(font) self.Pressure_LCD_2.setAutoFillBackground(True) self.Pressure_LCD_2.setSmallDecimalPoint(False) self.Pressure_LCD_2.setDigitCount(2) self.Pressure_LCD_2.setSegmentStyle(QtGui.QLCDNumber.Flat) self.Pressure_LCD_2.setObjectName(_fromUtf8("Pressure_LCD_2")) self.horizontalLayout_2.addWidget(self.Pressure_LCD_2) self.X = QtGui.QLabel(self.widget1) self.X.setMinimumSize(QtCore.QSize(16, 17)) font = QtGui.QFont() font.setPointSize(20) font.setItalic(False) self.X.setFont(font) self.X.setLayoutDirection(QtCore.Qt.LeftToRight) self.X.setAlignment(QtCore.Qt.AlignCenter) self.X.setObjectName(_fromUtf8("X")) self.horizontalLayout_2.addWidget(self.X) self.Zoom.addLayout(self.horizontalLayout_2) self.retranslateUi(Form) QtCore.QObject.connect(self.Test, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.Battery.setValue) QtCore.QObject.connect(self.Test, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.Altitude_LCD.display) QtCore.QMetaObject.connectSlotsByName(Form)
def ventana_Principal(self, Form): Form.setObjectName(CfromUtf8("Form")) Form.resize(640, 480) Form.setMinimumSize(QtCore.QSize(640, 480)) Form.setMaximumSize(QtCore.QSize(640, 480)) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(CfromUtf8("Recursos/bandera.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) Form.setWindowIcon(icon) Form.setLayoutDirection(QtCore.Qt.LeftToRight) # Definimos las label's a usar para agregar el texto self.label = QtGui.QLabel(Form) self.label.setGeometry(QtCore.QRect(185, 140, 271, 31)) font = QtGui.QFont() font.setFamily(CfromUtf8("Arial")) font.setPointSize(18) font.setItalic(False) self.label.setFont(font) self.label.setLayoutDirection(QtCore.Qt.LeftToRight) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setWordWrap(True) self.label.setObjectName(CfromUtf8("label")) self.label_2 = QtGui.QLabel(Form) self.label_2.setGeometry(QtCore.QRect(180, 190, 181, 31)) font = QtGui.QFont() font.setFamily(CfromUtf8("Arial")) font.setPointSize(18) font.setItalic(False) self.label_2.setFont(font) self.label_2.setAlignment(QtCore.Qt.AlignCenter) self.label_2.setWordWrap(True) self.label_2.setObjectName(CfromUtf8("label_2")) self.label_3 = QtGui.QLabel(Form) self.label_3.setGeometry(QtCore.QRect(185, 240, 311, 31)) font = QtGui.QFont() font.setFamily(CfromUtf8("Arial")) font.setPointSize(18) font.setItalic(False) self.label_3.setFont(font) self.label_3.setLayoutDirection(QtCore.Qt.LeftToRight) self.label_3.setAlignment(QtCore.Qt.AlignCenter) self.label_3.setWordWrap(True) self.label_3.setObjectName(CfromUtf8("label_3")) # Se agregaron Labe's para contener las imagenes self.label_4 = QtGui.QLabel(Form) self.label_4.setGeometry(QtCore.QRect(140, 130, 40, 40)) self.label_4.setText(CfromUtf8("")) self.label_4.setPixmap( QtGui.QPixmap(CfromUtf8("Recursos/metro-hidalgo.png"))) self.label_4.setObjectName(CfromUtf8("label_4")) self.label_5 = QtGui.QLabel(Form) self.label_5.setGeometry(QtCore.QRect(140, 180, 40, 40)) self.label_5.setText(CfromUtf8("")) self.label_5.setPixmap( QtGui.QPixmap(CfromUtf8("Recursos/metro-allende.png"))) self.label_5.setObjectName(CfromUtf8("label_5")) self.label_6 = QtGui.QLabel(Form) self.label_6.setGeometry(QtCore.QRect(140, 230, 40, 40)) self.label_6.setText(CfromUtf8("")) self.label_6.setPixmap( QtGui.QPixmap(CfromUtf8("Recursos/metro-morelos.png"))) self.label_6.setObjectName(CfromUtf8("label_6")) # Agregamos el boton el cual al precionarlo nos dira cuantos dias faltan para el # proximo 15 de septiembre del siguiente año. self.pushButton = QtGui.QPushButton(Form) self.pushButton.setGeometry(QtCore.QRect(70, 330, 500, 61)) font = QtGui.QFont() font.setFamily(CfromUtf8("Arial")) font.setPointSize(22) self.pushButton.setFont(font) self.pushButton.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor)) self.pushButton.setAutoDefault(False) self.pushButton.setDefault(False) self.pushButton.setFlat(False) self.pushButton.setObjectName(CfromUtf8("pushButton")) self.retranslateUi(Form) self.pushButton.setCheckable(True) QtCore.QObject.connect(self.pushButton, QtCore.SIGNAL(CfromUtf8("clicked()")), self.btnstate) QtCore.QMetaObject.connectSlotsByName(Form)
def read_ccam_ui(self): self.read_ccam = QtGui.QGroupBox() font = QtGui.QFont() font.setPointSize(10) self.read_ccam.setFont(font) self.read_ccam.setObjectName(_fromUtf8("Read ChemCam Data")) self.read_ccam_vlayout = QtGui.QVBoxLayout(self.read_ccam) self.read_ccam_vlayout.setObjectName(_fromUtf8("read_ccam_vlayout")) #label and linedit for specifying search string self.searchstring_hlayout = QtGui.QHBoxLayout() self.read_ccam_searchstring_label = QtGui.QLabel(self.read_ccam) self.read_ccam_searchstring_label.setText('Search String: ') self.searchstring_hlayout.addWidget(self.read_ccam_searchstring_label) defaultstring = '*CCS*.SAV' self.read_ccam_searchstring = QtGui.QLineEdit(self.read_ccam) self.read_ccam_searchstring.setText(defaultstring) self.searchstring_hlayout.addWidget(self.read_ccam_searchstring) self.read_ccam_vlayout.addLayout(self.searchstring_hlayout) #label and linedit for specifying search path self.searchpath_hLayout = QtGui.QHBoxLayout() self.search_path_label = QtGui.QLabel(self.read_ccam) self.search_path_label.setText('Search directory:') self.searchpath_hLayout.addWidget(self.search_path_label) self.search_path_line_edit = QtGui.QLineEdit(self.read_ccam) self.search_path_line_edit.setReadOnly( True) # User can't edit this line self.searchpath_hLayout.addWidget(self.search_path_line_edit) self.search_path_button = QtGui.QToolButton(self.read_ccam) self.search_path_button.setText('...') self.searchpath_hLayout.addWidget(self.search_path_button) self.read_ccam_vlayout.addLayout(self.searchpath_hLayout) #label and linedit for specifying metadata self.metadata_hLayout = QtGui.QHBoxLayout() self.metadata_label = QtGui.QLabel(self.read_ccam) self.metadata_label.setText('Metadata file(s):') self.metadata_hLayout.addWidget(self.metadata_label) self.metadata_line_edit = QtGui.QLineEdit(self.read_ccam) self.metadata_line_edit.setReadOnly(True) # User can't edit this line self.metadata_hLayout.addWidget(self.metadata_line_edit) self.metadata_button = QtGui.QToolButton(self.read_ccam) self.metadata_button.setText('...') self.metadata_hLayout.addWidget(self.metadata_button) self.read_ccam_vlayout.addLayout(self.metadata_hLayout) #label and linedit for output file self.outfile_hlayout = QtGui.QHBoxLayout() self.read_ccam_outfile_label = QtGui.QLabel(self.read_ccam) self.read_ccam_outfile_label.setText('Output file name:') self.outfile_hlayout.addWidget(self.read_ccam_outfile_label) self.read_ccam_outfile = QtGui.QLineEdit(self.read_ccam) self.outfile_hlayout.addWidget(self.read_ccam_outfile) self.read_ccam_vlayout.addLayout(self.outfile_hlayout) #ave vs singleshot buttons self.ave_hlayout = QtGui.QHBoxLayout() self.ave_button = QtGui.QRadioButton('Averages') self.singleshot_button = QtGui.QRadioButton('Single Shots') self.ave_hlayout.addWidget(self.ave_button) self.ave_hlayout.addWidget(self.singleshot_button) self.ave_button.setChecked(True) self.read_ccam_vlayout.addLayout(self.ave_hlayout) self.read_ccam_searchstring.textChanged.connect( lambda: self.get_read_ccam_params()) self.read_ccam_outfile.textChanged.connect( lambda: self.get_read_ccam_params()) self.search_path_button.clicked.connect( lambda: self.on_searchpathButton_clicked()) self.metadata_button.clicked.connect( lambda: self.on_metadataButton_clicked()) self.ave_button.toggled.connect(lambda: self.get_read_ccam_params()) self.singleshot_button.toggled.connect( lambda: self.get_read_ccam_params()) self.read_ccam.setTitle( _translate("MainWindow", "Read ChemCam Data", None)) self.module_layout.addWidget(self.read_ccam)
def initUI(self): font = QtGui.QFont("Sans Serif", 21, QtGui.QFont.Bold) _msg = 'Hello {}!'.format('Darling') self.welcome = QtGui.QLabel(_msg) self.welcome.setFont(font) self.details = QtGui.QLabel('Please choose your services and barber:)') self.details.setStyleSheet( 'QLabel {color: gray; font-size: 12px; font-weight: regular;}') info = QtGui.QVBoxLayout() info.addWidget(self.welcome) info.addWidget(self.details) service = QtGui.QLabel('Service') barber = QtGui.QLabel('Barber') self.haircut = QtGui.QCheckBox('Hair Cut') self.wash = QtGui.QCheckBox('Wash') self.protect = QtGui.QCheckBox('Protect') self.haircut.setChecked(True) service_cb = QtGui.QGridLayout() service_cb.addWidget(self.haircut, 0, 0) service_cb.addWidget(self.wash, 0, 1) service_cb.addWidget(self.protect, 1, 0) serbox = QtGui.QGroupBox() serbox.setLayout(service_cb) self.stack = QtGui.QStackedWidget() self.bcombo = bcombo = QtGui.QComboBox() self.barbercards = {} customer = self.parent.customer server = customer.get_server() for bb in server.barbers.values(): if not server.is_anon_barber_id(bb.uid): bcombo.addItem(bb.name) card = barbercard(barber=bb) self.stack.addWidget(card) self.barbercards[bb.name] = card bcombo.currentIndexChanged.connect(self.update_barberinfo) sug_btn = QtGui.QPushButton('Suggest') sug_btn.resize(sug_btn.sizeHint()) sug_btn.clicked.connect(self.suggest) grid = QtGui.QGridLayout() grid.addWidget(service, 0, 0) grid.addWidget(serbox, 0, 1, 2, 3) grid.addWidget(barber, 2, 0) grid.addWidget(bcombo, 2, 1, 1, 2) grid.addWidget(sug_btn, 2, 3) gbox = QtGui.QGroupBox('Service') gbox.setStyleSheet( 'QGroupBox {color: gray; font-size: 9px; font-weight: bold;}') gbox.setLayout(grid) self.do_btn = QtGui.QPushButton('Put an Order') self.do_btn.resize(self.do_btn.sizeHint()) self.out_btn = QtGui.QPushButton('Logout') self.out_btn.resize(self.out_btn.sizeHint()) self.do_btn.clicked.connect(self.order) self.out_btn.clicked.connect(self.logout) self.haircut.stateChanged.connect(self.check_service) self.wash.stateChanged.connect(self.check_service) self.protect.stateChanged.connect(self.check_service) btns = QtGui.QHBoxLayout() btns.addWidget(self.out_btn, 1) btns.addWidget(self.do_btn, 2) self.update_barberinfo() layout = QtGui.QVBoxLayout() layout.addLayout(info) layout.addWidget(gbox) layout.addWidget(self.stack) layout.addStretch(1) layout.addLayout(btns) self.setLayout(layout)
def setupUi(self, PatternWidget): PatternWidget.setObjectName(_fromUtf8("PatternWidget")) PatternWidget.resize(616, 78) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( PatternWidget.sizePolicy().hasHeightForWidth()) PatternWidget.setSizePolicy(sizePolicy) PatternWidget.setMinimumSize(QtCore.QSize(550, 78)) PatternWidget.setMaximumSize(QtCore.QSize(16777215, 78)) PatternWidget.setFocusPolicy(QtCore.Qt.StrongFocus) PatternWidget.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) self.mainLayout = QtGui.QHBoxLayout(PatternWidget) self.mainLayout.setSpacing(0) self.mainLayout.setMargin(0) self.mainLayout.setObjectName(_fromUtf8("mainLayout")) self.MainFrame = QtGui.QFrame(PatternWidget) self.MainFrame.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu) self.MainFrame.setFrameShape(QtGui.QFrame.StyledPanel) self.MainFrame.setFrameShadow(QtGui.QFrame.Raised) self.MainFrame.setObjectName(_fromUtf8("MainFrame")) self.PatternStripLayout = QtGui.QHBoxLayout(self.MainFrame) self.PatternStripLayout.setSpacing(0) self.PatternStripLayout.setContentsMargins(2, 0, 2, 0) self.PatternStripLayout.setObjectName(_fromUtf8("PatternStripLayout")) self.DataFrame = QtGui.QWidget(self.MainFrame) self.DataFrame.setMinimumSize(QtCore.QSize(316, 0)) self.DataFrame.setMaximumSize(QtCore.QSize(316, 16777215)) self.DataFrame.setObjectName(_fromUtf8("DataFrame")) self.TempoScaleSpinBox = QtGui.QDoubleSpinBox(self.DataFrame) self.TempoScaleSpinBox.setEnabled(False) self.TempoScaleSpinBox.setGeometry(QtCore.QRect(215, 39, 81, 31)) font = QtGui.QFont() font.setPointSize(16) self.TempoScaleSpinBox.setFont(font) self.TempoScaleSpinBox.setDecimals(1) self.TempoScaleSpinBox.setMinimum(10.0) self.TempoScaleSpinBox.setMaximum(600.0) self.TempoScaleSpinBox.setProperty("value", 120.0) self.TempoScaleSpinBox.setObjectName(_fromUtf8("TempoScaleSpinBox")) self.ToLabel = QtGui.QLabel(self.DataFrame) self.ToLabel.setEnabled(False) self.ToLabel.setGeometry(QtCore.QRect(92, 51, 16, 16)) self.ToLabel.setObjectName(_fromUtf8("ToLabel")) self.LastBarLbl = QtGui.QLabel(self.DataFrame) self.LastBarLbl.setEnabled(False) self.LastBarLbl.setGeometry(QtCore.QRect(105, 51, 31, 16)) self.LastBarLbl.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu) self.LastBarLbl.setFrameShape(QtGui.QFrame.Box) self.LastBarLbl.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.LastBarLbl.setObjectName(_fromUtf8("LastBarLbl")) self.BarSpinBox = QtGui.QSpinBox(self.DataFrame) self.BarSpinBox.setGeometry(QtCore.QRect(28, 1, 111, 51)) font = QtGui.QFont() font.setPointSize(32) self.BarSpinBox.setFont(font) self.BarSpinBox.setLayoutDirection(QtCore.Qt.LeftToRight) self.BarSpinBox.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.BarSpinBox.setButtonSymbols(QtGui.QAbstractSpinBox.UpDownArrows) self.BarSpinBox.setMinimum(1) self.BarSpinBox.setMaximum(999) self.BarSpinBox.setProperty("value", 1) self.BarSpinBox.setObjectName(_fromUtf8("BarSpinBox")) self.MeterCustomBtn = QtGui.QPushButton(self.DataFrame) self.MeterCustomBtn.setGeometry(QtCore.QRect(143, 0, 16, 71)) font = QtGui.QFont() font.setPointSize(6) font.setKerning(True) self.MeterCustomBtn.setFont(font) self.MeterCustomBtn.setCheckable(True) self.MeterCustomBtn.setChecked(False) self.MeterCustomBtn.setObjectName(_fromUtf8("MeterCustomBtn")) self.TempoMainSpinBox = QtGui.QDoubleSpinBox(self.DataFrame) self.TempoMainSpinBox.setGeometry(QtCore.QRect(215, 0, 81, 31)) font = QtGui.QFont() font.setPointSize(16) self.TempoMainSpinBox.setFont(font) self.TempoMainSpinBox.setDecimals(1) self.TempoMainSpinBox.setMinimum(10.0) self.TempoMainSpinBox.setMaximum(600.0) self.TempoMainSpinBox.setProperty("value", 120.0) self.TempoMainSpinBox.setObjectName(_fromUtf8("TempoMainSpinBox")) self.MainEnabledBtn = QtGui.QPushButton(self.DataFrame) self.MainEnabledBtn.setGeometry(QtCore.QRect(8, 0, 16, 71)) font = QtGui.QFont() font.setPointSize(6) font.setKerning(True) self.MainEnabledBtn.setFont(font) self.MainEnabledBtn.setCheckable(True) self.MainEnabledBtn.setChecked(True) self.MainEnabledBtn.setObjectName(_fromUtf8("MainEnabledBtn")) self.AccentsDefBtn = QtGui.QPushButton(self.DataFrame) self.AccentsDefBtn.setGeometry(QtCore.QRect(301, 0, 16, 71)) font = QtGui.QFont() font.setPointSize(6) font.setKerning(True) self.AccentsDefBtn.setFont(font) self.AccentsDefBtn.setCheckable(True) self.AccentsDefBtn.setObjectName(_fromUtf8("AccentsDefBtn")) self.Div2 = QtGui.QFrame(self.DataFrame) self.Div2.setGeometry(QtCore.QRect(211, 1, 4, 71)) self.Div2.setFrameShape(QtGui.QFrame.VLine) self.Div2.setFrameShadow(QtGui.QFrame.Sunken) self.Div2.setObjectName(_fromUtf8("Div2")) self.FromLbl = QtGui.QLabel(self.DataFrame) self.FromLbl.setEnabled(False) self.FromLbl.setGeometry(QtCore.QRect(30, 51, 31, 16)) self.FromLbl.setObjectName(_fromUtf8("FromLbl")) self.MeterNumSpinBox = QtGui.QSpinBox(self.DataFrame) self.MeterNumSpinBox.setEnabled(False) self.MeterNumSpinBox.setGeometry(QtCore.QRect(158, 1, 51, 31)) font = QtGui.QFont() font.setPointSize(16) self.MeterNumSpinBox.setFont(font) self.MeterNumSpinBox.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.MeterNumSpinBox.setMinimum(1) self.MeterNumSpinBox.setMaximum(32) self.MeterNumSpinBox.setProperty("value", 4) self.MeterNumSpinBox.setObjectName(_fromUtf8("MeterNumSpinBox")) self.DivMeter = QtGui.QFrame(self.DataFrame) self.DivMeter.setGeometry(QtCore.QRect(158, 27, 51, 16)) self.DivMeter.setFrameShape(QtGui.QFrame.HLine) self.DivMeter.setFrameShadow(QtGui.QFrame.Sunken) self.DivMeter.setObjectName(_fromUtf8("DivMeter")) self.FirstBarLbl = QtGui.QLabel(self.DataFrame) self.FirstBarLbl.setEnabled(False) self.FirstBarLbl.setGeometry(QtCore.QRect(60, 51, 31, 16)) self.FirstBarLbl.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) self.FirstBarLbl.setFrameShape(QtGui.QFrame.Box) self.FirstBarLbl.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.FirstBarLbl.setObjectName(_fromUtf8("FirstBarLbl")) self.Div1 = QtGui.QFrame(self.DataFrame) self.Div1.setGeometry(QtCore.QRect(138, 1, 4, 71)) self.Div1.setFrameShape(QtGui.QFrame.VLine) self.Div1.setFrameShadow(QtGui.QFrame.Sunken) self.Div1.setObjectName(_fromUtf8("Div1")) self.Div3 = QtGui.QFrame(self.DataFrame) self.Div3.setGeometry(QtCore.QRect(296, 1, 4, 71)) self.Div3.setFrameShape(QtGui.QFrame.VLine) self.Div3.setFrameShadow(QtGui.QFrame.Sunken) self.Div3.setObjectName(_fromUtf8("Div3")) self.MeterDenSpinBox = QtGui.QSpinBox(self.DataFrame) self.MeterDenSpinBox.setEnabled(False) self.MeterDenSpinBox.setGeometry(QtCore.QRect(158, 38, 51, 31)) font = QtGui.QFont() font.setPointSize(16) self.MeterDenSpinBox.setFont(font) self.MeterDenSpinBox.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.MeterDenSpinBox.setMinimum(1) self.MeterDenSpinBox.setMaximum(128) self.MeterDenSpinBox.setProperty("value", 4) self.MeterDenSpinBox.setObjectName(_fromUtf8("MeterDenSpinBox")) self.line = QtGui.QFrame(self.DataFrame) self.line.setGeometry(QtCore.QRect(3, 0, 3, 70)) self.line.setFrameShadow(QtGui.QFrame.Raised) self.line.setFrameShape(QtGui.QFrame.VLine) self.line.setFrameShadow(QtGui.QFrame.Sunken) self.line.setObjectName(_fromUtf8("line")) self.TempoChangeCombo = QtGui.QComboBox(self.DataFrame) self.TempoChangeCombo.setGeometry(QtCore.QRect(215, 27, 81, 16)) font = QtGui.QFont() font.setPointSize(7) self.TempoChangeCombo.setFont(font) self.TempoChangeCombo.setObjectName(_fromUtf8("TempoChangeCombo")) self.TempoChangeCombo.addItem(_fromUtf8("")) self.TempoChangeCombo.addItem(_fromUtf8("")) self.PatternStripLayout.addWidget(self.DataFrame) self.BeatsFrame = QtGui.QWidget(self.MainFrame) self.BeatsFrame.setEnabled(False) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(1) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.BeatsFrame.sizePolicy().hasHeightForWidth()) self.BeatsFrame.setSizePolicy(sizePolicy) self.BeatsFrame.setMinimumSize(QtCore.QSize(160, 0)) self.BeatsFrame.setContextMenuPolicy(QtCore.Qt.NoContextMenu) self.BeatsFrame.setObjectName(_fromUtf8("BeatsFrame")) self.BeatsLayout = QtGui.QHBoxLayout(self.BeatsFrame) self.BeatsLayout.setSpacing(0) self.BeatsLayout.setMargin(0) self.BeatsLayout.setMargin(0) self.BeatsLayout.setObjectName(_fromUtf8("BeatsLayout")) self.PatternStripLayout.addWidget(self.BeatsFrame) self.VolumeFrame = QtGui.QWidget(self.MainFrame) self.VolumeFrame.setMinimumSize(QtCore.QSize(58, 0)) self.VolumeFrame.setMaximumSize(QtCore.QSize(58, 16777215)) self.VolumeFrame.setObjectName(_fromUtf8("VolumeFrame")) self.VolSpinBox = QtGui.QDoubleSpinBox(self.VolumeFrame) self.VolSpinBox.setGeometry(QtCore.QRect(5, 24, 51, 22)) self.VolSpinBox.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.VolSpinBox.setDecimals(1) self.VolSpinBox.setSingleStep(0.1) self.VolSpinBox.setProperty("value", 1.0) self.VolSpinBox.setObjectName(_fromUtf8("VolSpinBox")) self.VolDefBtn = QtGui.QPushButton(self.VolumeFrame) self.VolDefBtn.setGeometry(QtCore.QRect(5, 2, 51, 22)) self.VolDefBtn.setCheckable(True) self.VolDefBtn.setObjectName(_fromUtf8("VolDefBtn")) self.VolMuteBtn = QtGui.QPushButton(self.VolumeFrame) self.VolMuteBtn.setGeometry(QtCore.QRect(5, 47, 51, 22)) self.VolMuteBtn.setCheckable(True) self.VolMuteBtn.setChecked(False) self.VolMuteBtn.setObjectName(_fromUtf8("VolMuteBtn")) self.Div4 = QtGui.QFrame(self.VolumeFrame) self.Div4.setGeometry(QtCore.QRect(0, 0, 4, 71)) self.Div4.setFrameShape(QtGui.QFrame.VLine) self.Div4.setFrameShadow(QtGui.QFrame.Sunken) self.Div4.setObjectName(_fromUtf8("Div4")) self.PatternStripLayout.addWidget(self.VolumeFrame) self.mainLayout.addWidget(self.MainFrame) self.actionAggiungi = QtGui.QAction(PatternWidget) self.actionAggiungi.setObjectName(_fromUtf8("actionAggiungi")) self.retranslateUi(PatternWidget) self.TempoChangeCombo.setCurrentIndex(0) QtCore.QObject.connect(self.AccentsDefBtn, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.BeatsFrame.setEnabled) QtCore.QObject.connect(self.MeterCustomBtn, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.MeterNumSpinBox.setEnabled) QtCore.QObject.connect(self.MeterCustomBtn, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.MeterDenSpinBox.setEnabled) QtCore.QMetaObject.connectSlotsByName(PatternWidget)
def setupUi(self, TelaCadastro): TelaCadastro.setObjectName(_fromUtf8("TelaCadastro")) TelaCadastro.resize(800, 600) self.centralwidget = QtGui.QWidget(TelaCadastro) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.label = QtGui.QLabel(self.centralwidget) self.label.setGeometry(QtCore.QRect(30, 80, 61, 17)) font = QtGui.QFont() font.setPointSize(14) font.setBold(True) font.setWeight(75) self.label.setFont(font) self.label.setObjectName(_fromUtf8("label")) self.label_2 = QtGui.QLabel(self.centralwidget) self.label_2.setGeometry(QtCore.QRect(30, 170, 61, 17)) font = QtGui.QFont() font.setPointSize(14) font.setBold(True) font.setWeight(75) self.label_2.setFont(font) self.label_2.setObjectName(_fromUtf8("label_2")) self.label_3 = QtGui.QLabel(self.centralwidget) self.label_3.setGeometry(QtCore.QRect(510, 80, 41, 17)) font = QtGui.QFont() font.setPointSize(14) font.setBold(True) font.setWeight(75) self.label_3.setFont(font) self.label_3.setObjectName(_fromUtf8("label_3")) self.label_4 = QtGui.QLabel(self.centralwidget) self.label_4.setGeometry(QtCore.QRect(30, 260, 61, 20)) font = QtGui.QFont() font.setPointSize(14) font.setBold(True) font.setWeight(75) self.label_4.setFont(font) self.label_4.setObjectName(_fromUtf8("label_4")) self.label_5 = QtGui.QLabel(self.centralwidget) self.label_5.setGeometry(QtCore.QRect(440, 260, 61, 17)) font = QtGui.QFont() font.setPointSize(14) font.setBold(True) font.setWeight(75) self.label_5.setFont(font) self.label_5.setObjectName(_fromUtf8("label_5")) self.label_6 = QtGui.QLabel(self.centralwidget) self.label_6.setGeometry(QtCore.QRect(270, 170, 91, 17)) font = QtGui.QFont() font.setPointSize(14) font.setBold(True) font.setWeight(75) self.label_6.setFont(font) self.label_6.setObjectName(_fromUtf8("label_6")) self.lineEditNome = QtGui.QLineEdit(self.centralwidget) self.lineEditNome.setGeometry(QtCore.QRect(90, 70, 371, 27)) self.lineEditNome.setObjectName(_fromUtf8("lineEditNome")) self.lineEditIdade = QtGui.QLineEdit(self.centralwidget) self.lineEditIdade.setGeometry(QtCore.QRect(90, 160, 121, 27)) self.lineEditIdade.setObjectName(_fromUtf8("lineEditIdade")) self.lineEditCPF = QtGui.QLineEdit(self.centralwidget) self.lineEditCPF.setGeometry(QtCore.QRect(560, 70, 211, 27)) self.lineEditCPF.setFrame(True) self.lineEditCPF.setCursorPosition(0) self.lineEditCPF.setObjectName(_fromUtf8("lineEditCPF")) self.lineEditEndereco = QtGui.QLineEdit(self.centralwidget) self.lineEditEndereco.setGeometry(QtCore.QRect(370, 160, 401, 27)) self.lineEditEndereco.setObjectName(_fromUtf8("lineEditEndereco")) self.lineEditLogin = QtGui.QLineEdit(self.centralwidget) self.lineEditLogin.setGeometry(QtCore.QRect(90, 250, 301, 27)) self.lineEditLogin.setObjectName(_fromUtf8("lineEditLogin")) self.lineEditSenha = QtGui.QLineEdit(self.centralwidget) self.lineEditSenha.setGeometry(QtCore.QRect(510, 250, 261, 27)) self.lineEditSenha.setEchoMode(QtGui.QLineEdit.Password) self.lineEditSenha.setObjectName(_fromUtf8("lineEditSenha")) self.pushButtonCadastrar = QtGui.QPushButton(self.centralwidget) self.pushButtonCadastrar.setGeometry(QtCore.QRect(40, 500, 171, 61)) font = QtGui.QFont() font.setPointSize(14) font.setBold(True) font.setWeight(75) self.pushButtonCadastrar.setFont(font) self.pushButtonCadastrar.setObjectName( _fromUtf8("pushButtonCadastrar")) self.pushButtonSair = QtGui.QPushButton(self.centralwidget) self.pushButtonSair.setGeometry(QtCore.QRect(310, 500, 171, 61)) font = QtGui.QFont() font.setPointSize(14) font.setBold(True) font.setWeight(75) self.pushButtonSair.setFont(font) self.pushButtonSair.setObjectName(_fromUtf8("pushButtonSair")) self.pushButtonInicio = QtGui.QPushButton(self.centralwidget) self.pushButtonInicio.setGeometry(QtCore.QRect(0, 0, 98, 27)) self.pushButtonInicio.setObjectName(_fromUtf8("pushButtonInicio")) self.label_8 = QtGui.QLabel(self.centralwidget) self.label_8.setGeometry(QtCore.QRect(30, 350, 61, 17)) font = QtGui.QFont() font.setPointSize(14) font.setBold(True) font.setWeight(75) self.label_8.setFont(font) self.label_8.setObjectName(_fromUtf8("label_8")) self.lineEditEmail = QtGui.QLineEdit(self.centralwidget) self.lineEditEmail.setGeometry(QtCore.QRect(90, 340, 391, 27)) self.lineEditEmail.setObjectName(_fromUtf8("lineEditEmail")) self.label_7 = QtGui.QLabel(self.centralwidget) self.label_7.setGeometry(QtCore.QRect(530, 340, 231, 221)) self.label_7.setText(_fromUtf8("")) """self.label_7.setPixmap(QtGui.QPixmap(_fromUtf8("../../../../Downloads/PARA REDES/cadastro.png")))""" self.label_7.setObjectName(_fromUtf8("label_7")) self.comboBoxCartao = QtGui.QComboBox(self.centralwidget) self.comboBoxCartao.setGeometry(QtCore.QRect(100, 420, 131, 27)) self.comboBoxCartao.setObjectName(_fromUtf8("comboBoxCartao")) self.comboBoxCartao.addItem(_fromUtf8("")) self.comboBoxCartao.addItem(_fromUtf8("")) self.comboBoxCartao.addItem(_fromUtf8("")) self.comboBoxCartao.addItem(_fromUtf8("")) self.label_9 = QtGui.QLabel(self.centralwidget) self.label_9.setGeometry(QtCore.QRect(30, 430, 71, 17)) font = QtGui.QFont() font.setPointSize(14) font.setBold(True) font.setWeight(75) self.label_9.setFont(font) self.label_9.setObjectName(_fromUtf8("label_9")) self.label_10 = QtGui.QLabel(self.centralwidget) self.label_10.setGeometry(QtCore.QRect(260, 430, 66, 17)) font = QtGui.QFont() font.setPointSize(14) font.setBold(True) font.setWeight(75) self.label_10.setFont(font) self.label_10.setObjectName(_fromUtf8("label_10")) self.lineEditConta = QtGui.QLineEdit(self.centralwidget) self.lineEditConta.setGeometry(QtCore.QRect(320, 420, 161, 27)) self.lineEditConta.setObjectName(_fromUtf8("lineEditConta")) TelaCadastro.setCentralWidget(self.centralwidget) self.actionInicio = QtGui.QAction(TelaCadastro) self.actionInicio.setObjectName(_fromUtf8("actionInicio")) self.actionSair = QtGui.QAction(TelaCadastro) self.actionSair.setObjectName(_fromUtf8("actionSair")) self.actionCadastro = QtGui.QAction(TelaCadastro) self.actionCadastro.setObjectName(_fromUtf8("actionCadastro")) self.actionLogin = QtGui.QAction(TelaCadastro) self.actionLogin.setObjectName(_fromUtf8("actionLogin")) self.retranslateUi(TelaCadastro) QtCore.QObject.connect(self.pushButtonCadastrar, QtCore.SIGNAL(_fromUtf8("clicked()")), TelaCadastro.cadastrar) QtCore.QObject.connect(self.pushButtonSair, QtCore.SIGNAL(_fromUtf8("clicked()")), TelaCadastro.sairCadastro) QtCore.QObject.connect(self.pushButtonInicio, QtCore.SIGNAL(_fromUtf8("clicked()")), TelaCadastro.inicio) QtCore.QMetaObject.connectSlotsByName(TelaCadastro) TelaCadastro.setTabOrder(self.lineEditNome, self.lineEditCPF) TelaCadastro.setTabOrder(self.lineEditCPF, self.lineEditIdade) TelaCadastro.setTabOrder(self.lineEditIdade, self.lineEditEndereco) TelaCadastro.setTabOrder(self.lineEditEndereco, self.lineEditLogin) TelaCadastro.setTabOrder(self.lineEditLogin, self.lineEditSenha) TelaCadastro.setTabOrder(self.lineEditSenha, self.lineEditEmail) TelaCadastro.setTabOrder(self.lineEditEmail, self.comboBoxCartao) TelaCadastro.setTabOrder(self.comboBoxCartao, self.lineEditConta) TelaCadastro.setTabOrder(self.lineEditConta, self.pushButtonCadastrar) TelaCadastro.setTabOrder(self.pushButtonCadastrar, self.pushButtonSair) TelaCadastro.setTabOrder(self.pushButtonSair, self.pushButtonInicio)
def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(709, 591) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.graphicsView = QtGui.QGraphicsView(self.centralwidget) self.graphicsView.setGeometry(QtCore.QRect(15, 11, 701, 531)) self.graphicsView.setStyleSheet( _fromUtf8( "background-color:\n" "qlineargradient(spread:pad, x1:1, y1:1, x2:1, y2:0, stop:0 rgba(0, 129, 178, 255), stop:1 rgba(255, 255, 255, 255))" )) self.graphicsView.setObjectName(_fromUtf8("graphicsView")) self.pushButton_5 = QtGui.QPushButton(self.centralwidget) self.pushButton_5.setGeometry(QtCore.QRect(440, 370, 121, 31)) font = QtGui.QFont() font.setPointSize(10) font.setBold(True) font.setWeight(75) self.pushButton_5.setFont(font) self.pushButton_5.setObjectName(_fromUtf8("pushButton_5")) self.pushButton_5.clicked.connect(self.uploadvideo) self.graphicsView_2 = QtGui.QGraphicsView(self.centralwidget) self.graphicsView_2.setGeometry(QtCore.QRect(0, 0, 711, 81)) brush = QtGui.QBrush(QtGui.QColor(170, 0, 127)) brush.setStyle(QtCore.Qt.NoBrush) self.graphicsView_2.setBackgroundBrush(brush) self.graphicsView_2.setObjectName(_fromUtf8("graphicsView_2")) self.label_2 = QtGui.QLabel(self.centralwidget) self.label_2.setGeometry(QtCore.QRect(40, 20, 231, 41)) font = QtGui.QFont() font.setFamily(_fromUtf8("Segoe Script")) font.setPointSize(18) font.setBold(True) font.setItalic(True) font.setWeight(75) self.label_2.setFont(font) self.label_2.setObjectName(_fromUtf8("label_2")) self.pushButton_2 = QtGui.QPushButton(self.centralwidget) self.pushButton_2.setGeometry(QtCore.QRect(480, 10, 111, 41)) font = QtGui.QFont() font.setPointSize(10) font.setBold(True) font.setWeight(75) self.pushButton_2.setFont(font) self.pushButton_2.setStyleSheet( _fromUtf8("background-color:rgb(0, 0, 0);\n" "color:rgb(255, 255, 255)")) self.pushButton_2.setObjectName(_fromUtf8("pushButton_2")) self.pushButton_2.clicked.connect(self.management) self.pushButton_4 = QtGui.QPushButton(self.centralwidget) self.pushButton_4.setGeometry(QtCore.QRect(280, 10, 91, 41)) font = QtGui.QFont() font.setPointSize(10) font.setBold(True) font.setItalic(False) font.setWeight(75) self.pushButton_4.setFont(font) self.pushButton_4.setStyleSheet( _fromUtf8("background-color:rgb(0, 0, 0);\n" "color:rgb(255, 255, 255)")) self.pushButton_4.setAutoDefault(True) self.pushButton_4.setObjectName(_fromUtf8("pushButton_4")) self.frame = QtGui.QFrame(self.centralwidget) self.frame.setGeometry(QtCore.QRect(110, 180, 120, 80)) self.frame.setFrameShape(QtGui.QFrame.StyledPanel) self.frame.setFrameShadow(QtGui.QFrame.Raised) self.frame.setObjectName(_fromUtf8("frame")) self.comboBox_2 = QtGui.QComboBox(self.centralwidget) self.comboBox_2.setGeometry(QtCore.QRect(490, 180, 141, 31)) self.comboBox_2.setObjectName(_fromUtf8("comboBox_2")) ############## conn = pymysql.connect(host="localhost", user='******', password="******", db="db_attendance") ## conn = mysql.connector.connect(host="localhost" , user='******', password="******" , database="db_attendance") cur = conn.cursor() session = [] query1 = ("select ses_name from tbl_session") cur.execute(query1) records = cur.fetchall() for row in records: session.append(str(row[0])) conn.commit() self.comboBox_2.addItems(session) self.comboBox_2.currentIndexChanged.connect(self.changed) self.pushButton_6 = QtGui.QPushButton(self.centralwidget) self.pushButton_6.setGeometry(QtCore.QRect(370, 420, 261, 31)) font = QtGui.QFont() font.setPointSize(12) font.setBold(True) font.setWeight(75) self.pushButton_6.setFont(font) self.pushButton_6.setStyleSheet( _fromUtf8("background-color:rgb(0, 0, 0);\n" "color:rgb(255, 255, 255)")) self.pushButton_6.setObjectName(_fromUtf8("pushButton_6")) self.pushButton_6.clicked.connect(self.processing) self.label_10 = QtGui.QLabel(self.centralwidget) self.label_10.setGeometry(QtCore.QRect(420, 110, 231, 41)) font = QtGui.QFont() font.setFamily(_fromUtf8("Segoe Script")) font.setPointSize(18) font.setBold(True) font.setItalic(True) font.setWeight(75) self.label_10.setFont(font) self.label_10.setObjectName(_fromUtf8("label_10")) self.comboBox = QtGui.QComboBox(self.centralwidget) self.comboBox.setGeometry(QtCore.QRect(490, 230, 141, 31)) self.comboBox.setObjectName(_fromUtf8("comboBox")) self.pushButton_3 = QtGui.QPushButton(self.centralwidget) self.pushButton_3.setGeometry(QtCore.QRect(600, 10, 91, 41)) font = QtGui.QFont() font.setPointSize(10) font.setBold(True) font.setWeight(75) self.pushButton_3.setFont(font) self.pushButton_3.setStyleSheet( _fromUtf8("background-color:rgb(0, 0, 0);\n" "color:rgb(255, 255, 255)")) self.pushButton_3.setObjectName(_fromUtf8("pushButton_3")) self.pushButton = QtGui.QPushButton(self.centralwidget) self.pushButton.setGeometry(QtCore.QRect(380, 10, 91, 41)) font = QtGui.QFont() font.setPointSize(10) font.setBold(True) font.setWeight(75) self.pushButton.setFont(font) self.pushButton.setStyleSheet( _fromUtf8("background-color:rgb(0, 0, 0);\n" "color:rgb(255, 255, 255)")) self.pushButton.setObjectName(_fromUtf8("pushButton")) self.label = QtGui.QLabel(self.centralwidget) self.label.setGeometry(QtCore.QRect(0, 80, 311, 461)) self.label.setText(_fromUtf8("")) self.label.setPixmap( QtGui.QPixmap( _fromUtf8( "E:/final year projects/documents/nimradesigner/QTdesigner/hgyg.jpg" ))) self.label.setScaledContents(True) self.label.setObjectName(_fromUtf8("label")) self.label_11 = QtGui.QLabel(self.centralwidget) self.label_11.setGeometry(QtCore.QRect(360, 170, 111, 41)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_11.setFont(font) self.label_11.setObjectName(_fromUtf8("label_11")) self.label_8 = QtGui.QLabel(self.centralwidget) self.label_8.setGeometry(QtCore.QRect(360, 220, 111, 41)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_8.setFont(font) self.label_8.setObjectName(_fromUtf8("label_8")) self.label_9 = QtGui.QLabel(self.centralwidget) self.label_9.setGeometry(QtCore.QRect(360, 270, 111, 41)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_9.setFont(font) self.label_9.setObjectName(_fromUtf8("label_9")) self.comboBox_3 = QtGui.QComboBox(self.centralwidget) self.comboBox_3.setGeometry(QtCore.QRect(490, 270, 141, 31)) self.comboBox_3.setObjectName(_fromUtf8("comboBox_3")) self.label_12 = QtGui.QLabel(self.centralwidget) self.label_12.setGeometry(QtCore.QRect(360, 310, 111, 41)) font = QtGui.QFont() font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_12.setFont(font) self.label_12.setObjectName(_fromUtf8("label_12")) self.dateEdit = QtGui.QDateEdit(self.centralwidget) self.dateEdit.setGeometry(QtCore.QRect(490, 320, 141, 31)) self.dateEdit.setDateTime( QtCore.QDateTime(QtCore.QDate(2020, 1, 2), QtCore.QTime(0, 0, 0))) self.dateEdit.setObjectName(_fromUtf8("dateEdit")) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 709, 21)) self.menubar.setObjectName(_fromUtf8("menubar")) MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setObjectName(_fromUtf8("statusbar")) MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def setupUi(self, Dialog): Dialog.setObjectName(_fromUtf8("Dialog")) Dialog.resize(525, 525) Dialog.setMinimumSize(QtCore.QSize(525, 525)) Dialog.setMaximumSize(QtCore.QSize(525, 525)) self.frame = QtGui.QFrame(Dialog) self.frame.setGeometry(QtCore.QRect(0, 0, 525, 525)) self.frame.setMinimumSize(QtCore.QSize(525, 525)) self.frame.setMaximumSize(QtCore.QSize(525, 525)) self.frame.setStyleSheet(_fromUtf8("QFrame{background-color:white}")) self.frame.setFrameShape(QtGui.QFrame.StyledPanel) self.frame.setFrameShadow(QtGui.QFrame.Raised) self.frame.setObjectName(_fromUtf8("frame")) self.checkBox_1 = QtGui.QCheckBox(self.frame) self.checkBox_1.setEnabled(True) self.checkBox_1.setGeometry(QtCore.QRect(20, 90, 221, 20)) font = QtGui.QFont() font.setFamily(_fromUtf8("KoPub돋움체 Light")) font.setPointSize(12) font.setBold(False) font.setWeight(50) font.setKerning(True) self.checkBox_1.setFont(font) self.checkBox_1.setCheckable(False) self.checkBox_1.setObjectName(_fromUtf8("checkBox_1")) self.checkBox_2 = QtGui.QCheckBox(self.frame) self.checkBox_2.setGeometry(QtCore.QRect(20, 130, 321, 20)) font = QtGui.QFont() font.setFamily(_fromUtf8("KoPub돋움체 Light")) font.setPointSize(12) font.setBold(False) font.setWeight(50) self.checkBox_2.setFont(font) self.checkBox_2.setCheckable(False) self.checkBox_2.setObjectName(_fromUtf8("checkBox_2")) self.checkBox_3 = QtGui.QCheckBox(self.frame) self.checkBox_3.setGeometry(QtCore.QRect(20, 170, 221, 20)) font = QtGui.QFont() font.setFamily(_fromUtf8("KoPub돋움체 Light")) font.setPointSize(12) font.setBold(False) font.setWeight(50) self.checkBox_3.setFont(font) self.checkBox_3.setCheckable(False) self.checkBox_3.setObjectName(_fromUtf8("checkBox_3")) self.checkBox_4 = QtGui.QCheckBox(self.frame) self.checkBox_4.setGeometry(QtCore.QRect(20, 210, 221, 20)) font = QtGui.QFont() font.setFamily(_fromUtf8("KoPub돋움체 Light")) font.setPointSize(12) font.setBold(False) font.setWeight(50) self.checkBox_4.setFont(font) self.checkBox_4.setCheckable(False) self.checkBox_4.setObjectName(_fromUtf8("checkBox_4")) self.checkBox_5 = QtGui.QCheckBox(self.frame) self.checkBox_5.setGeometry(QtCore.QRect(20, 250, 221, 20)) font = QtGui.QFont() font.setFamily(_fromUtf8("KoPub돋움체 Light")) font.setPointSize(12) font.setBold(False) font.setWeight(50) self.checkBox_5.setFont(font) self.checkBox_5.setCheckable(False) self.checkBox_5.setObjectName(_fromUtf8("checkBox_5")) self.label = QtGui.QLabel(self.frame) self.label.setGeometry(QtCore.QRect(20, 20, 161, 31)) font = QtGui.QFont() font.setFamily(_fromUtf8("KoPub돋움체 Bold")) font.setPointSize(14) font.setBold(True) font.setWeight(75) self.label.setFont(font) self.label.setObjectName(_fromUtf8("label")) self.label_2 = QtGui.QLabel(self.frame) self.label_2.setGeometry(QtCore.QRect(40, 110, 281, 16)) font = QtGui.QFont() font.setFamily(_fromUtf8("KoPub돋움체 Light")) font.setPointSize(10) self.label_2.setFont(font) self.label_2.setStyleSheet(_fromUtf8("QLabel{color:rgb(77, 77, 77)}")) self.label_2.setObjectName(_fromUtf8("label_2")) self.label_3 = QtGui.QLabel(self.frame) self.label_3.setGeometry(QtCore.QRect(40, 150, 281, 16)) font = QtGui.QFont() font.setFamily(_fromUtf8("KoPub돋움체 Light")) font.setPointSize(10) self.label_3.setFont(font) self.label_3.setStyleSheet(_fromUtf8("QLabel{color:rgb(77, 77, 77)}")) self.label_3.setObjectName(_fromUtf8("label_3")) self.label_4 = QtGui.QLabel(self.frame) self.label_4.setGeometry(QtCore.QRect(40, 190, 321, 21)) font = QtGui.QFont() font.setFamily(_fromUtf8("KoPub돋움체 Light")) font.setPointSize(10) self.label_4.setFont(font) self.label_4.setStyleSheet(_fromUtf8("QLabel{color:rgb(77, 77, 77)}")) self.label_4.setObjectName(_fromUtf8("label_4")) self.label_6 = QtGui.QLabel(self.frame) self.label_6.setGeometry(QtCore.QRect(40, 230, 281, 16)) font = QtGui.QFont() font.setFamily(_fromUtf8("KoPub돋움체 Light")) font.setPointSize(10) self.label_6.setFont(font) self.label_6.setStyleSheet(_fromUtf8("QLabel{color:rgb(77, 77, 77)}")) self.label_6.setObjectName(_fromUtf8("label_6")) self.label_8 = QtGui.QLabel(self.frame) self.label_8.setGeometry(QtCore.QRect(40, 270, 281, 16)) font = QtGui.QFont() font.setFamily(_fromUtf8("KoPub돋움체 Light")) font.setPointSize(10) self.label_8.setFont(font) self.label_8.setStyleSheet(_fromUtf8("QLabel{color:rgb(77, 77, 77)}")) self.label_8.setObjectName(_fromUtf8("label_8")) self.pushButton = QtGui.QPushButton(self.frame) self.pushButton.setGeometry(QtCore.QRect(380, 470, 121, 23)) self.pushButton.setObjectName(_fromUtf8("pushButton")) self.retranslateUi(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
def setupUi(self, server_ui): server_ui.setObjectName(_fromUtf8("server_ui")) server_ui.resize(400, 300) server_ui.setStyleSheet( _fromUtf8( "QWidget{\n" "background:#484848;\n" "}\n" "QAbstractButton{\n" "border-style:none;\n" "border-radius:0px;\n" "padding:5px;\n" "color:#DCDCDC;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #484848,stop:1 #383838);\n" "}\n" "QAbstractButton:hover{\n" "color:#FFFFFF;\n" "background-color:#00BB9E;\n" "}\n" "QAbstractButton:pressed{\n" "color:#DCDCDC;\n" "border-style:solid;\n" "border-width:0px 0px 0px 2px;\n" "padding:4px 4px 4px 2px;\n" "border-color:#00BB9E;\n" "background-color:#444444;\n" "}\n" "QLabel{\n" "color:#DCDCDC;\n" "border:1px solid #484848;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #484848,stop:1 #383838);\n" "}\n" "QLabel:focus{\n" "border:1px solid #00BB9E;\n" "background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #646464,stop:1 #525252);\n" "}\n" "QLineEdit{\n" "border:1px solid #242424;\n" "border-radius:3px;\n" "padding:2px;\n" "background:none;\n" "selection-background-color:#484848;\n" "selection-color:#DCDCDC;\n" "}\n" "QLineEdit:focus,QLineEdit:hover{\n" "border:1px solid #242424;\n" "}\n" "QLineEdit{\n" "border:1px solid #242424;\n" "border-radius:3px;\n" "padding:2px;\n" "background:none;\n" "selection-background-color:#484848;\n" "selection-color:#DCDCDC;\n" "}\n" "\n" "QLineEdit:focus,QLineEdit:hover{\n" "border:1px solid #242424;\n" "}\n" "QLineEdit{\n" "lineedit-password-character:9679;\n" "}")) self.label = QtGui.QLabel(server_ui) self.label.setGeometry(QtCore.QRect(100, 150, 200, 42)) font = QtGui.QFont() font.setFamily(_fromUtf8("3ds")) font.setPointSize(26) self.label.setFont(font) self.label.setObjectName(_fromUtf8("label")) self.Button_Server = QtGui.QPushButton(server_ui) self.Button_Server.setGeometry(QtCore.QRect(150, 220, 100, 40)) font = QtGui.QFont() font.setFamily(_fromUtf8("3ds")) font.setPointSize(12) self.Button_Server.setFont(font) self.Button_Server.setObjectName(_fromUtf8("Button_Server")) self.label_2 = QtGui.QLabel(server_ui) self.label_2.setGeometry(QtCore.QRect(0, 0, 301, 41)) font = QtGui.QFont() font.setFamily(_fromUtf8("3ds")) font.setPointSize(28) font.setBold(True) font.setWeight(75) self.label_2.setFont(font) self.label_2.setStyleSheet(_fromUtf8("")) self.label_2.setObjectName(_fromUtf8("label_2")) self.pushButton_Close = QtGui.QPushButton(server_ui) self.pushButton_Close.setGeometry(QtCore.QRect(350, 0, 50, 40)) self.pushButton_Close.setObjectName(_fromUtf8("pushButton_Close")) self.pushButton_Min = QtGui.QPushButton(server_ui) self.pushButton_Min.setGeometry(QtCore.QRect(300, 0, 50, 40)) self.pushButton_Min.setObjectName(_fromUtf8("pushButton_Min")) self.retranslateUi(server_ui) QtCore.QMetaObject.connectSlotsByName(server_ui)
def setupUi(self, Sharkdown): Sharkdown.setObjectName(_fromUtf8("Sharkdown")) Sharkdown.resize(899, 600) font = QtGui.QFont() font.setBold(False) font.setWeight(50) font.setStyleStrategy(QtGui.QFont.NoAntialias) Sharkdown.setFont(font) self.centralwidget = QtGui.QWidget(Sharkdown) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.horizontalLayout = QtGui.QHBoxLayout(self.centralwidget) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.horizontal_layout = QtGui.QHBoxLayout() self.horizontal_layout.setObjectName(_fromUtf8("horizontal_layout")) self.Markdown = QtGui.QTextEdit(self.centralwidget) font = QtGui.QFont() font.setFamily(_fromUtf8("Times New Roman")) font.setPointSize(12) font.setKerning(True) self.Markdown.setFont(font) self.Markdown.setMouseTracking(True) self.Markdown.setFocusPolicy(QtCore.Qt.StrongFocus) self.Markdown.setFrameShape(QtGui.QFrame.StyledPanel) self.Markdown.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded) self.Markdown.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded) self.Markdown.setHtml( _fromUtf8( "<!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:\'Times New Roman\'; font-size:12pt; 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; font-family:\'MS Sans Serif\';\"><br /></p></body></html>" )) self.Markdown.setAcceptRichText(False) self.Markdown.setObjectName(_fromUtf8("Markdown")) self.horizontal_layout.addWidget(self.Markdown) self.HtmlViewer = QtGui.QTextBrowser(self.centralwidget) font = QtGui.QFont() font.setFamily(_fromUtf8("Times New Roman")) font.setPointSize(12) self.HtmlViewer.setFont(font) self.HtmlViewer.setLayoutDirection(QtCore.Qt.LeftToRight) self.HtmlViewer.setOpenLinks(False) self.HtmlViewer.setObjectName(_fromUtf8("HtmlViewer")) self.horizontal_layout.addWidget(self.HtmlViewer) self.horizontalLayout.addLayout(self.horizontal_layout) Sharkdown.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(Sharkdown) self.menubar.setGeometry(QtCore.QRect(0, 0, 899, 21)) self.menubar.setObjectName(_fromUtf8("menubar")) self.menuFile = QtGui.QMenu(self.menubar) self.menuFile.setObjectName(_fromUtf8("menuFile")) self.menuView = QtGui.QMenu(self.menubar) self.menuView.setObjectName(_fromUtf8("menuView")) self.menuHelp = QtGui.QMenu(self.menubar) self.menuHelp.setObjectName(_fromUtf8("menuHelp")) self.menuFormat = QtGui.QMenu(self.menubar) self.menuFormat.setObjectName(_fromUtf8("menuFormat")) self.menuCommand = QtGui.QMenu(self.menuFormat) self.menuCommand.setObjectName(_fromUtf8("menuCommand")) self.menuCode = QtGui.QMenu(self.menuFormat) self.menuCode.setObjectName(_fromUtf8("menuCode")) self.menuVariable = QtGui.QMenu(self.menuFormat) self.menuVariable.setObjectName(_fromUtf8("menuVariable")) self.menuEdit = QtGui.QMenu(self.menubar) self.menuEdit.setObjectName(_fromUtf8("menuEdit")) Sharkdown.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(Sharkdown) self.statusbar.setObjectName(_fromUtf8("statusbar")) Sharkdown.setStatusBar(self.statusbar) self.toolBar = QtGui.QToolBar(Sharkdown) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.toolBar.setFont(font) self.toolBar.setObjectName(_fromUtf8("toolBar")) Sharkdown.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar) self.actionEditor_Viewer = QtGui.QAction(Sharkdown) self.actionEditor_Viewer.setObjectName( _fromUtf8("actionEditor_Viewer")) self.actionEditor_Only = QtGui.QAction(Sharkdown) self.actionEditor_Only.setObjectName(_fromUtf8("actionEditor_Only")) self.actionViewer_Only = QtGui.QAction(Sharkdown) self.actionViewer_Only.setObjectName(_fromUtf8("actionViewer_Only")) self.actionNew = QtGui.QAction(Sharkdown) self.actionNew.setObjectName(_fromUtf8("actionNew")) self.actionSave = QtGui.QAction(Sharkdown) self.actionSave.setObjectName(_fromUtf8("actionSave")) self.actionSave_As = QtGui.QAction(Sharkdown) self.actionSave_As.setObjectName(_fromUtf8("actionSave_As")) self.actionExit = QtGui.QAction(Sharkdown) self.actionExit.setMenuRole(QtGui.QAction.QuitRole) self.actionExit.setObjectName(_fromUtf8("actionExit")) self.actionDocs = QtGui.QAction(Sharkdown) self.actionDocs.setObjectName(_fromUtf8("actionDocs")) self.actionAbout = QtGui.QAction(Sharkdown) self.actionAbout.setMenuRole(QtGui.QAction.AboutRole) self.actionAbout.setObjectName(_fromUtf8("actionAbout")) self.actionLoad = QtGui.QAction(Sharkdown) self.actionLoad.setObjectName(_fromUtf8("actionLoad")) self.actionH1 = QtGui.QAction(Sharkdown) self.actionH1.setCheckable(False) self.actionH1.setObjectName(_fromUtf8("actionH1")) self.actionH2 = QtGui.QAction(Sharkdown) self.actionH2.setObjectName(_fromUtf8("actionH2")) self.actionH3 = QtGui.QAction(Sharkdown) self.actionH3.setObjectName(_fromUtf8("actionH3")) self.actionToolbar = QtGui.QAction(Sharkdown) self.actionToolbar.setObjectName(_fromUtf8("actionToolbar")) self.actionBold = QtGui.QAction(Sharkdown) self.actionBold.setObjectName(_fromUtf8("actionBold")) self.actionItalic = QtGui.QAction(Sharkdown) self.actionItalic.setObjectName(_fromUtf8("actionItalic")) self.actionInline_Code = QtGui.QAction(Sharkdown) self.actionInline_Code.setObjectName(_fromUtf8("actionInline_Code")) self.actionCode_Block = QtGui.QAction(Sharkdown) self.actionCode_Block.setObjectName(_fromUtf8("actionCode_Block")) self.actionNote_Block = QtGui.QAction(Sharkdown) self.actionNote_Block.setObjectName(_fromUtf8("actionNote_Block")) self.actionURL = QtGui.QAction(Sharkdown) self.actionURL.setObjectName(_fromUtf8("actionURL")) self.actionImage = QtGui.QAction(Sharkdown) self.actionImage.setObjectName(_fromUtf8("actionImage")) self.actionCommand_Nonroot = QtGui.QAction(Sharkdown) self.actionCommand_Nonroot.setObjectName( _fromUtf8("actionCommand_Nonroot")) self.actionCommand_Root = QtGui.QAction(Sharkdown) self.actionCommand_Root.setObjectName(_fromUtf8("actionCommand_Root")) self.actionCommand_Custom = QtGui.QAction(Sharkdown) self.actionCommand_Custom.setObjectName( _fromUtf8("actionCommand_Custom")) self.actionWarning_Block = QtGui.QAction(Sharkdown) self.actionWarning_Block.setObjectName( _fromUtf8("actionWarning_Block")) self.actionEm_Dash = QtGui.QAction(Sharkdown) self.actionEm_Dash.setObjectName(_fromUtf8("actionEm_Dash")) self.actionList = QtGui.QAction(Sharkdown) self.actionList.setObjectName(_fromUtf8("actionList")) self.actionLabeled_Code = QtGui.QAction(Sharkdown) self.actionLabeled_Code.setObjectName(_fromUtf8("actionLabeled_Code")) self.actionSecondary_Label_Code = QtGui.QAction(Sharkdown) self.actionSecondary_Label_Code.setObjectName( _fromUtf8("actionSecondary_Label_Code")) self.actionVariable_2 = QtGui.QAction(Sharkdown) self.actionVariable_2.setObjectName(_fromUtf8("actionVariable_2")) self.actionInline_Variable = QtGui.QAction(Sharkdown) self.actionInline_Variable.setObjectName( _fromUtf8("actionInline_Variable")) self.actionUndo = QtGui.QAction(Sharkdown) self.actionUndo.setObjectName(_fromUtf8("actionUndo")) self.actionCopy = QtGui.QAction(Sharkdown) self.actionCopy.setObjectName(_fromUtf8("actionCopy")) self.actionPaste = QtGui.QAction(Sharkdown) self.actionPaste.setObjectName(_fromUtf8("actionPaste")) self.actionSkip = QtGui.QAction(Sharkdown) self.actionSkip.setObjectName(_fromUtf8("actionSkip")) self.menuFile.addAction(self.actionNew) self.menuFile.addAction(self.actionLoad) self.menuFile.addAction(self.actionSave) self.menuFile.addAction(self.actionSave_As) self.menuFile.addSeparator() self.menuFile.addAction(self.actionExit) self.menuView.addAction(self.actionEditor_Viewer) self.menuView.addAction(self.actionEditor_Only) self.menuView.addAction(self.actionViewer_Only) self.menuView.addSeparator() self.menuView.addAction(self.actionToolbar) self.menuHelp.addAction(self.actionDocs) self.menuHelp.addSeparator() self.menuHelp.addAction(self.actionAbout) self.menuCommand.addAction(self.actionCommand_Nonroot) self.menuCommand.addAction(self.actionCommand_Root) self.menuCommand.addAction(self.actionCommand_Custom) self.menuCode.addAction(self.actionInline_Code) self.menuCode.addAction(self.actionCode_Block) self.menuCode.addSeparator() self.menuCode.addAction(self.actionLabeled_Code) self.menuCode.addAction(self.actionSecondary_Label_Code) self.menuVariable.addAction(self.actionVariable_2) self.menuVariable.addAction(self.actionInline_Variable) self.menuFormat.addAction(self.actionH1) self.menuFormat.addAction(self.actionH2) self.menuFormat.addAction(self.actionH3) self.menuFormat.addSeparator() self.menuFormat.addAction(self.actionBold) self.menuFormat.addAction(self.actionItalic) self.menuFormat.addSeparator() self.menuFormat.addAction(self.actionList) self.menuFormat.addSeparator() self.menuFormat.addAction(self.menuCommand.menuAction()) self.menuFormat.addSeparator() self.menuFormat.addAction(self.menuCode.menuAction()) self.menuFormat.addAction(self.menuVariable.menuAction()) self.menuFormat.addSeparator() self.menuFormat.addAction(self.actionNote_Block) self.menuFormat.addAction(self.actionWarning_Block) self.menuFormat.addSeparator() self.menuFormat.addAction(self.actionURL) self.menuFormat.addAction(self.actionImage) self.menuFormat.addSeparator() self.menuFormat.addAction(self.actionEm_Dash) self.menuEdit.addAction(self.actionUndo) self.menuEdit.addAction(self.actionCopy) self.menuEdit.addAction(self.actionPaste) self.menuEdit.addSeparator() self.menuEdit.addAction(self.actionSkip) self.menubar.addAction(self.menuFile.menuAction()) self.menubar.addAction(self.menuEdit.menuAction()) self.menubar.addAction(self.menuView.menuAction()) self.menubar.addAction(self.menuFormat.menuAction()) self.menubar.addAction(self.menuHelp.menuAction()) self.toolBar.addAction(self.actionH1) self.toolBar.addAction(self.actionH2) self.toolBar.addAction(self.actionH3) self.toolBar.addSeparator() self.toolBar.addAction(self.actionBold) self.toolBar.addAction(self.actionItalic) self.toolBar.addSeparator() self.toolBar.addAction(self.actionList) self.toolBar.addSeparator() self.toolBar.addAction(self.actionInline_Code) self.toolBar.addAction(self.actionCode_Block) self.toolBar.addAction(self.actionLabeled_Code) self.toolBar.addAction(self.actionSecondary_Label_Code) self.toolBar.addSeparator() self.toolBar.addAction(self.actionVariable_2) self.toolBar.addAction(self.actionInline_Variable) self.toolBar.addSeparator() self.toolBar.addAction(self.actionCommand_Nonroot) self.toolBar.addAction(self.actionCommand_Root) self.toolBar.addAction(self.actionCommand_Custom) self.toolBar.addSeparator() self.toolBar.addAction(self.actionNote_Block) self.toolBar.addAction(self.actionWarning_Block) self.toolBar.addSeparator() self.toolBar.addAction(self.actionURL) self.toolBar.addAction(self.actionImage) self.toolBar.addSeparator() self.toolBar.addAction(self.actionEm_Dash) self.retranslateUi(Sharkdown) QtCore.QObject.connect(self.actionCopy, QtCore.SIGNAL(_fromUtf8("triggered()")), self.Markdown.copy) QtCore.QObject.connect(self.actionPaste, QtCore.SIGNAL(_fromUtf8("triggered()")), self.Markdown.paste) QtCore.QObject.connect(self.actionUndo, QtCore.SIGNAL(_fromUtf8("triggered()")), self.Markdown.undo) QtCore.QObject.connect( self.Markdown, QtCore.SIGNAL(_fromUtf8("cursorPositionChanged()")), self.Markdown.update) QtCore.QMetaObject.connectSlotsByName(Sharkdown)
def setupUi(self, ClientConfiguration): ClientConfiguration.setObjectName(_fromUtf8("ClientConfiguration")) ClientConfiguration.resize(412, 483) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) ClientConfiguration.setPalette(palette) ClientConfiguration.setAutoFillBackground(False) ClientConfiguration.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.logout_bt = QtGui.QPushButton(ClientConfiguration) self.logout_bt.setGeometry(QtCore.QRect(10, 360, 391, 31)) font = QtGui.QFont() font.setFamily(_fromUtf8("Lato")) font.setPointSize(12) font.setBold(True) font.setWeight(75) self.logout_bt.setFont(font) self.logout_bt.setStyleSheet(_fromUtf8("QPushButton {\n" " background-color: #CC0000;\n" " border: 1px solid #CC0000;\n" " color: #fff;\n" " border-radius: 7px;\n" "}\n" "QPushButton:hover{\n" " background-color: #bb0a0a;\n" " border-color: #bb0a0a;\n" "}\n" "QPushButton:active {\n" " background-color: #ce0e0e;\n" " border-color: #ce0e0e;\n" "}")) self.logout_bt.setObjectName(_fromUtf8("logout_bt")) self.label_5 = QtGui.QLabel(ClientConfiguration) self.label_5.setGeometry(QtCore.QRect(10, 14, 251, 21)) font = QtGui.QFont() font.setFamily(_fromUtf8("Lato")) font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_5.setFont(font) self.label_5.setObjectName(_fromUtf8("label_5")) self.connections_onetime = QtGui.QSpinBox(ClientConfiguration) self.connections_onetime.setGeometry(QtCore.QRect(260, 50, 141, 32)) self.connections_onetime.setObjectName(_fromUtf8("connections_onetime")) self.label_19 = QtGui.QLabel(ClientConfiguration) self.label_19.setGeometry(QtCore.QRect(10, 56, 171, 20)) font = QtGui.QFont() font.setFamily(_fromUtf8("Lato")) font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_19.setFont(font) self.label_19.setObjectName(_fromUtf8("label_19")) self.clear_logs_bt = QtGui.QPushButton(ClientConfiguration) self.clear_logs_bt.setGeometry(QtCore.QRect(10, 260, 391, 41)) font = QtGui.QFont() font.setFamily(_fromUtf8("Lato")) font.setPointSize(12) font.setBold(True) font.setWeight(75) self.clear_logs_bt.setFont(font) self.clear_logs_bt.setStyleSheet(_fromUtf8("QPushButton:pressed {\n" "\n" "}\n" "QPushButton {\n" " background-color: #ffa500;\n" " border: 1px solid #ffa500;\n" " color: #fff;\n" " border-radius: 7px;\n" "}\n" "")) self.clear_logs_bt.setObjectName(_fromUtf8("clear_logs_bt")) self.shard_size_unit = QtGui.QComboBox(ClientConfiguration) self.shard_size_unit.setGeometry(QtCore.QRect(340, 8, 61, 31)) self.shard_size_unit.setObjectName(_fromUtf8("shard_size_unit")) self.shard_size_unit.addItem(_fromUtf8("")) self.shard_size_unit.addItem(_fromUtf8("")) self.shard_size_unit.addItem(_fromUtf8("")) self.shard_size_unit.addItem(_fromUtf8("")) self.max_shard_size = QtGui.QSpinBox(ClientConfiguration) self.max_shard_size.setGeometry(QtCore.QRect(260, 7, 71, 32)) self.max_shard_size.setObjectName(_fromUtf8("max_shard_size")) self.max_download_bandwidth = QtGui.QLineEdit(ClientConfiguration) self.max_download_bandwidth.setEnabled(False) self.max_download_bandwidth.setGeometry(QtCore.QRect(260, 93, 141, 31)) self.max_download_bandwidth.setObjectName(_fromUtf8("max_download_bandwidth")) self.label_7 = QtGui.QLabel(ClientConfiguration) self.label_7.setEnabled(False) self.label_7.setGeometry(QtCore.QRect(10, 100, 211, 16)) font = QtGui.QFont() font.setFamily(_fromUtf8("Lato")) font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_7.setFont(font) self.label_7.setObjectName(_fromUtf8("label_7")) self.max_upload_bandwidth = QtGui.QLineEdit(ClientConfiguration) self.max_upload_bandwidth.setEnabled(False) self.max_upload_bandwidth.setGeometry(QtCore.QRect(260, 133, 141, 31)) self.max_upload_bandwidth.setObjectName(_fromUtf8("max_upload_bandwidth")) self.label_8 = QtGui.QLabel(ClientConfiguration) self.label_8.setEnabled(False) self.label_8.setGeometry(QtCore.QRect(10, 140, 191, 16)) font = QtGui.QFont() font.setFamily(_fromUtf8("Lato")) font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_8.setFont(font) self.label_8.setObjectName(_fromUtf8("label_8")) self.restore_to_default_bt = QtGui.QPushButton(ClientConfiguration) self.restore_to_default_bt.setGeometry(QtCore.QRect(10, 310, 391, 41)) font = QtGui.QFont() font.setFamily(_fromUtf8("Lato")) font.setPointSize(12) font.setBold(True) font.setWeight(75) self.restore_to_default_bt.setFont(font) self.restore_to_default_bt.setStyleSheet(_fromUtf8("QPushButton:pressed {\n" "\n" "}\n" "QPushButton {\n" " background-color: #ffa500;\n" " border: 1px solid #ffa500;\n" " color: #fff;\n" " border-radius: 7px;\n" "}\n" "")) self.restore_to_default_bt.setObjectName(_fromUtf8("restore_to_default_bt")) self.label_9 = QtGui.QLabel(ClientConfiguration) self.label_9.setEnabled(False) self.label_9.setGeometry(QtCore.QRect(10, 180, 221, 16)) font = QtGui.QFont() font.setFamily(_fromUtf8("Lato")) font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_9.setFont(font) self.label_9.setObjectName(_fromUtf8("label_9")) self.shard_size_unit_2 = QtGui.QComboBox(ClientConfiguration) self.shard_size_unit_2.setGeometry(QtCore.QRect(260, 173, 141, 31)) self.shard_size_unit_2.setObjectName(_fromUtf8("shard_size_unit_2")) self.shard_size_unit_2.addItem(_fromUtf8("")) self.apply_bt = QtGui.QPushButton(ClientConfiguration) self.apply_bt.setGeometry(QtCore.QRect(280, 440, 121, 31)) font = QtGui.QFont() font.setFamily(_fromUtf8("Lato")) font.setPointSize(12) font.setBold(True) font.setWeight(75) self.apply_bt.setFont(font) self.apply_bt.setStyleSheet(_fromUtf8("QPushButton:hover{\n" " background-color: #83bf20;\n" " border-color: #83bf20;\n" "}\n" "QPushButton:active {\n" " background-color: #93cc36;\n" " border-color: #93cc36;\n" "}\n" "QPushButton{\n" " background-color: #88c425;\n" " border: 1px solid #88c425;\n" " color: #fff;\n" " border-radius: 7px;\n" "}")) self.apply_bt.setObjectName(_fromUtf8("apply_bt")) self.cancel_bt = QtGui.QPushButton(ClientConfiguration) self.cancel_bt.setGeometry(QtCore.QRect(10, 440, 91, 31)) font = QtGui.QFont() font.setFamily(_fromUtf8("Lato")) font.setPointSize(12) font.setBold(True) font.setWeight(75) self.cancel_bt.setFont(font) self.cancel_bt.setStyleSheet(_fromUtf8("QPushButton {\n" " background-color: #CC0000;\n" " border: 1px solid #CC0000;\n" " color: #fff;\n" " border-radius: 7px;\n" "}\n" "QPushButton:hover{\n" " background-color: #bb0a0a;\n" " border-color: #bb0a0a;\n" "}\n" "QPushButton:active {\n" " background-color: #ce0e0e;\n" " border-color: #ce0e0e;\n" "}")) self.cancel_bt.setObjectName(_fromUtf8("cancel_bt")) self.bridge_request_timeout = QtGui.QSpinBox(ClientConfiguration) self.bridge_request_timeout.setGeometry(QtCore.QRect(260, 210, 111, 32)) self.bridge_request_timeout.setMinimum(1) self.bridge_request_timeout.setMaximum(3600) self.bridge_request_timeout.setProperty("value", 5) self.bridge_request_timeout.setObjectName(_fromUtf8("bridge_request_timeout")) self.label_20 = QtGui.QLabel(ClientConfiguration) self.label_20.setGeometry(QtCore.QRect(10, 216, 241, 20)) font = QtGui.QFont() font.setFamily(_fromUtf8("Lato")) font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_20.setFont(font) self.label_20.setObjectName(_fromUtf8("label_20")) self.label_21 = QtGui.QLabel(ClientConfiguration) self.label_21.setGeometry(QtCore.QRect(380, 220, 20, 21)) font = QtGui.QFont() font.setFamily(_fromUtf8("Lato")) font.setPointSize(11) font.setBold(True) font.setWeight(75) self.label_21.setFont(font) self.label_21.setObjectName(_fromUtf8("label_21")) self.retranslateUi(ClientConfiguration) self.shard_size_unit.setCurrentIndex(1) self.shard_size_unit_2.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(ClientConfiguration) ClientConfiguration.setTabOrder(self.max_shard_size, self.shard_size_unit) ClientConfiguration.setTabOrder(self.shard_size_unit, self.connections_onetime) ClientConfiguration.setTabOrder(self.connections_onetime, self.max_download_bandwidth) ClientConfiguration.setTabOrder(self.max_download_bandwidth, self.max_upload_bandwidth) ClientConfiguration.setTabOrder(self.max_upload_bandwidth, self.shard_size_unit_2) ClientConfiguration.setTabOrder(self.shard_size_unit_2, self.clear_logs_bt) ClientConfiguration.setTabOrder(self.clear_logs_bt, self.restore_to_default_bt) ClientConfiguration.setTabOrder(self.restore_to_default_bt, self.logout_bt) ClientConfiguration.setTabOrder(self.logout_bt, self.cancel_bt) ClientConfiguration.setTabOrder(self.cancel_bt, self.apply_bt)
def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(540, 450) MainWindow.setStyleSheet( _fromUtf8("QLineEdit{\n" " color: #555;\n" " background-color: #fff;\n" " background-image: none;\n" " border: 1px solid #ccc;\n" " border-radius: 4px;\n" " height: 25px; \n" "}\n" "QMainWindow{ \n" " background-color: #eee;\n" "}\n" "QPushButton{\n" " width: 100px;\n" " color: #fff;\n" " background-color: #337ab7;\n" " font-size: 12px;\n" " line-height: 1.3333333;\n" " border: 1px solid #2e6da4;\n" " border-radius: 4px;\n" " height: 25px; \n" "}")) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.layoutWidget = QtGui.QWidget(self.centralwidget) self.layoutWidget.setGeometry(QtCore.QRect(110, 80, 325, 293)) self.layoutWidget.setObjectName(_fromUtf8("layoutWidget")) self.verticalLayout_5 = QtGui.QVBoxLayout(self.layoutWidget) self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5")) self.verticalLayout_3 = QtGui.QVBoxLayout() self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3")) self.horizontalLayout_4 = QtGui.QHBoxLayout() self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4")) spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_4.addItem(spacerItem) self.label = QtGui.QLabel(self.layoutWidget) font = QtGui.QFont() font.setPointSize(16) self.label.setFont(font) self.label.setObjectName(_fromUtf8("label")) self.horizontalLayout_4.addWidget(self.label) spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_4.addItem(spacerItem1) self.verticalLayout_3.addLayout(self.horizontalLayout_4) spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.verticalLayout_3.addItem(spacerItem2) self.verticalLayout_5.addLayout(self.verticalLayout_3) self.verticalLayout_4 = QtGui.QVBoxLayout() self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4")) self.verticalLayout = QtGui.QVBoxLayout() self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.label_2 = QtGui.QLabel(self.layoutWidget) self.label_2.setObjectName(_fromUtf8("label_2")) self.horizontalLayout.addWidget(self.label_2) self.lineEditUser = QtGui.QLineEdit(self.layoutWidget) self.lineEditUser.setStyleSheet( _fromUtf8("lineEditUser{\n" " color: #555;\n" " background-color: #fff;\n" " background-image: none;\n" " border: 1px solid #ccc;\n" " border-radius: 4px;\n" "}")) self.lineEditUser.setObjectName(_fromUtf8("lineEditUser")) self.horizontalLayout.addWidget(self.lineEditUser) self.verticalLayout.addLayout(self.horizontalLayout) self.horizontalLayout_2 = QtGui.QHBoxLayout() self.horizontalLayout_2.setSpacing(12) self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.label_3 = QtGui.QLabel(self.layoutWidget) self.label_3.setObjectName(_fromUtf8("label_3")) self.horizontalLayout_2.addWidget(self.label_3) self.lineEditPass = QtGui.QLineEdit(self.layoutWidget) self.lineEditPass.setInputMask(_fromUtf8("")) self.lineEditPass.setEchoMode(QtGui.QLineEdit.Password) self.lineEditPass.setObjectName(_fromUtf8("lineEditPass")) self.horizontalLayout_2.addWidget(self.lineEditPass) self.verticalLayout.addLayout(self.horizontalLayout_2) self.verticalLayout_4.addLayout(self.verticalLayout) spacerItem3 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.verticalLayout_4.addItem(spacerItem3) self.verticalLayout_5.addLayout(self.verticalLayout_4) self.verticalLayout_2 = QtGui.QVBoxLayout() self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.buttonEntrar = QtGui.QPushButton(self.layoutWidget) self.buttonEntrar.setObjectName(_fromUtf8("buttonEntrar")) self.verticalLayout_2.addWidget(self.buttonEntrar) self.horizontalLayout_3 = QtGui.QHBoxLayout() self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) spacerItem4 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem4) self.label_4 = QtGui.QLabel(self.layoutWidget) self.label_4.setObjectName(_fromUtf8("label_4")) self.horizontalLayout_3.addWidget(self.label_4) spacerItem5 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem5) self.verticalLayout_2.addLayout(self.horizontalLayout_3) self.buttonCreate = QtGui.QPushButton(self.layoutWidget) self.buttonCreate.setObjectName(_fromUtf8("buttonCreate")) self.verticalLayout_2.addWidget(self.buttonCreate) self.verticalLayout_5.addLayout(self.verticalLayout_2) MainWindow.setCentralWidget(self.centralwidget) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setObjectName(_fromUtf8("statusbar")) MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QObject.connect(self.buttonEntrar, QtCore.SIGNAL(_fromUtf8("clicked()")), MainWindow.show) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def setupUi(self, frmClimatology): frmClimatology.setObjectName(_fromUtf8("frmClimatology")) frmClimatology.resize(618, 417) font = QtGui.QFont() font.setPointSize(10) frmClimatology.setFont(font) self.centralWidget = QtGui.QWidget(frmClimatology) self.centralWidget.setObjectName(_fromUtf8("centralWidget")) self.verticalLayout_3 = QtGui.QVBoxLayout(self.centralWidget) self.verticalLayout_3.setMargin(11) self.verticalLayout_3.setSpacing(6) self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3")) self.fraTop = QtGui.QFrame(self.centralWidget) self.fraTop.setFrameShape(QtGui.QFrame.StyledPanel) self.fraTop.setFrameShadow(QtGui.QFrame.Raised) self.fraTop.setObjectName(_fromUtf8("fraTop")) self.verticalLayout = QtGui.QVBoxLayout(self.fraTop) self.verticalLayout.setMargin(11) self.verticalLayout.setSpacing(6) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.tabClimate = QtGui.QTabWidget(self.fraTop) self.tabClimate.setObjectName(_fromUtf8("tabClimate")) self.Temperature = QtGui.QWidget() self.Temperature.setObjectName(_fromUtf8("Temperature")) self.gridLayout_5 = QtGui.QGridLayout(self.Temperature) self.gridLayout_5.setMargin(11) self.gridLayout_5.setSpacing(6) self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5")) self.fraNoData = QtGui.QFrame(self.Temperature) self.fraNoData.setFrameShape(QtGui.QFrame.StyledPanel) self.fraNoData.setFrameShadow(QtGui.QFrame.Raised) self.fraNoData.setObjectName(_fromUtf8("fraNoData")) self.verticalLayout_2 = QtGui.QVBoxLayout(self.fraNoData) self.verticalLayout_2.setMargin(11) self.verticalLayout_2.setSpacing(6) self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.lblSource = QtGui.QLabel(self.fraNoData) self.lblSource.setObjectName(_fromUtf8("lblSource")) self.verticalLayout_2.addWidget(self.lblSource) self.rbnNoData = QtGui.QRadioButton(self.fraNoData) self.rbnNoData.setObjectName(_fromUtf8("rbnNoData")) self.verticalLayout_2.addWidget(self.rbnNoData) self.gridLayout_5.addWidget(self.fraNoData, 1, 0, 1, 1) self.fraTimeseries = QtGui.QFrame(self.Temperature) self.fraTimeseries.setFrameShape(QtGui.QFrame.StyledPanel) self.fraTimeseries.setFrameShadow(QtGui.QFrame.Raised) self.fraTimeseries.setObjectName(_fromUtf8("fraTimeseries")) self.horizontalLayout_2 = QtGui.QHBoxLayout(self.fraTimeseries) self.horizontalLayout_2.setMargin(11) self.horizontalLayout_2.setSpacing(6) self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.rbnTimeseries = QtGui.QRadioButton(self.fraTimeseries) self.rbnTimeseries.setObjectName(_fromUtf8("rbnTimeseries")) self.horizontalLayout_2.addWidget(self.rbnTimeseries) self.cboTimeSeries = QtGui.QComboBox(self.fraTimeseries) self.cboTimeSeries.setObjectName(_fromUtf8("cboTimeSeries")) self.horizontalLayout_2.addWidget(self.cboTimeSeries) self.btnTimeSeries = QtGui.QToolButton(self.fraTimeseries) self.btnTimeSeries.setObjectName(_fromUtf8("btnTimeSeries")) self.horizontalLayout_2.addWidget(self.btnTimeSeries) self.gridLayout_5.addWidget(self.fraTimeseries, 2, 0, 1, 1) self.fraExternal = QtGui.QFrame(self.Temperature) self.fraExternal.setFrameShape(QtGui.QFrame.StyledPanel) self.fraExternal.setFrameShadow(QtGui.QFrame.Raised) self.fraExternal.setObjectName(_fromUtf8("fraExternal")) self.gridLayout_2 = QtGui.QGridLayout(self.fraExternal) self.gridLayout_2.setMargin(11) self.gridLayout_2.setSpacing(6) self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) self.txtClimate = QtGui.QLineEdit(self.fraExternal) self.txtClimate.setObjectName(_fromUtf8("txtClimate")) self.gridLayout_2.addWidget(self.txtClimate, 2, 0, 1, 2) self.btnClimate = QtGui.QToolButton(self.fraExternal) self.btnClimate.setObjectName(_fromUtf8("btnClimate")) self.gridLayout_2.addWidget(self.btnClimate, 2, 2, 1, 1) self.dedStart = QtGui.QDateEdit(self.fraExternal) self.dedStart.setObjectName(_fromUtf8("dedStart")) self.gridLayout_2.addWidget(self.dedStart, 3, 1, 1, 2) self.cbxStart = QtGui.QCheckBox(self.fraExternal) self.cbxStart.setObjectName(_fromUtf8("cbxStart")) self.gridLayout_2.addWidget(self.cbxStart, 3, 0, 1, 1) self.rbnExternal = QtGui.QRadioButton(self.fraExternal) self.rbnExternal.setObjectName(_fromUtf8("rbnExternal")) self.gridLayout_2.addWidget(self.rbnExternal, 1, 0, 1, 1) self.gridLayout_5.addWidget(self.fraExternal, 3, 0, 1, 1) self.tabClimate.addTab(self.Temperature, _fromUtf8("")) self.Evaporation = QtGui.QWidget() self.Evaporation.setObjectName(_fromUtf8("Evaporation")) self.gridLayout_3 = QtGui.QGridLayout(self.Evaporation) self.gridLayout_3.setMargin(11) self.gridLayout_3.setSpacing(6) self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3")) self.fraEvapTop = QtGui.QFrame(self.Evaporation) self.fraEvapTop.setFrameShape(QtGui.QFrame.StyledPanel) self.fraEvapTop.setFrameShadow(QtGui.QFrame.Raised) self.fraEvapTop.setObjectName(_fromUtf8("fraEvapTop")) self.gridLayout_10 = QtGui.QGridLayout(self.fraEvapTop) self.gridLayout_10.setMargin(11) self.gridLayout_10.setSpacing(6) self.gridLayout_10.setObjectName(_fromUtf8("gridLayout_10")) self.lblEvap = QtGui.QLabel(self.fraEvapTop) self.lblEvap.setObjectName(_fromUtf8("lblEvap")) self.gridLayout_10.addWidget(self.lblEvap, 0, 0, 1, 1) self.cboEvap = QtGui.QComboBox(self.fraEvapTop) self.cboEvap.setObjectName(_fromUtf8("cboEvap")) self.gridLayout_10.addWidget(self.cboEvap, 0, 1, 1, 1) self.lblDaily = QtGui.QLabel(self.fraEvapTop) self.lblDaily.setObjectName(_fromUtf8("lblDaily")) self.gridLayout_10.addWidget(self.lblDaily, 1, 0, 1, 1) self.txtDaily = QtGui.QLineEdit(self.fraEvapTop) self.txtDaily.setObjectName(_fromUtf8("txtDaily")) self.gridLayout_10.addWidget(self.txtDaily, 1, 1, 1, 1) spacerItem = QtGui.QSpacerItem(188, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.gridLayout_10.addItem(spacerItem, 1, 2, 1, 1) self.lblEvapTs = QtGui.QLabel(self.fraEvapTop) self.lblEvapTs.setObjectName(_fromUtf8("lblEvapTs")) self.gridLayout_10.addWidget(self.lblEvapTs, 2, 0, 1, 1) self.cboEvapTs = QtGui.QComboBox(self.fraEvapTop) self.cboEvapTs.setObjectName(_fromUtf8("cboEvapTs")) self.gridLayout_10.addWidget(self.cboEvapTs, 2, 1, 1, 1) self.btnEvapTS = QtGui.QToolButton(self.fraEvapTop) self.btnEvapTS.setObjectName(_fromUtf8("btnEvapTS")) self.gridLayout_10.addWidget(self.btnEvapTS, 2, 2, 1, 1) self.lblEvapMisc = QtGui.QLabel(self.fraEvapTop) self.lblEvapMisc.setWordWrap(True) self.lblEvapMisc.setObjectName(_fromUtf8("lblEvapMisc")) self.gridLayout_10.addWidget(self.lblEvapMisc, 3, 0, 1, 3) self.tblEvap = QtGui.QTableWidget(self.fraEvapTop) self.tblEvap.setObjectName(_fromUtf8("tblEvap")) self.tblEvap.setColumnCount(12) self.tblEvap.setRowCount(1) item = QtGui.QTableWidgetItem() self.tblEvap.setVerticalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tblEvap.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tblEvap.setHorizontalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.tblEvap.setHorizontalHeaderItem(2, item) item = QtGui.QTableWidgetItem() self.tblEvap.setHorizontalHeaderItem(3, item) item = QtGui.QTableWidgetItem() self.tblEvap.setHorizontalHeaderItem(4, item) item = QtGui.QTableWidgetItem() self.tblEvap.setHorizontalHeaderItem(5, item) item = QtGui.QTableWidgetItem() self.tblEvap.setHorizontalHeaderItem(6, item) item = QtGui.QTableWidgetItem() self.tblEvap.setHorizontalHeaderItem(7, item) item = QtGui.QTableWidgetItem() self.tblEvap.setHorizontalHeaderItem(8, item) item = QtGui.QTableWidgetItem() self.tblEvap.setHorizontalHeaderItem(9, item) item = QtGui.QTableWidgetItem() self.tblEvap.setHorizontalHeaderItem(10, item) item = QtGui.QTableWidgetItem() self.tblEvap.setHorizontalHeaderItem(11, item) self.tblEvap.verticalHeader().setVisible(False) self.gridLayout_10.addWidget(self.tblEvap, 4, 0, 1, 3) self.gridLayout_3.addWidget(self.fraEvapTop, 0, 0, 1, 1) self.lineEvap = QtGui.QFrame(self.Evaporation) self.lineEvap.setFrameShape(QtGui.QFrame.HLine) self.lineEvap.setFrameShadow(QtGui.QFrame.Sunken) self.lineEvap.setObjectName(_fromUtf8("lineEvap")) self.gridLayout_3.addWidget(self.lineEvap, 1, 0, 1, 1) self.fraEvapBottom = QtGui.QFrame(self.Evaporation) self.fraEvapBottom.setFrameShape(QtGui.QFrame.StyledPanel) self.fraEvapBottom.setFrameShadow(QtGui.QFrame.Raised) self.fraEvapBottom.setObjectName(_fromUtf8("fraEvapBottom")) self.gridLayout_4 = QtGui.QGridLayout(self.fraEvapBottom) self.gridLayout_4.setMargin(11) self.gridLayout_4.setSpacing(6) self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4")) self.lblMonthly = QtGui.QLabel(self.fraEvapBottom) self.lblMonthly.setObjectName(_fromUtf8("lblMonthly")) self.gridLayout_4.addWidget(self.lblMonthly, 0, 0, 1, 1) self.cboMonthly = QtGui.QComboBox(self.fraEvapBottom) self.cboMonthly.setObjectName(_fromUtf8("cboMonthly")) self.gridLayout_4.addWidget(self.cboMonthly, 0, 1, 1, 1) self.btnPattern = QtGui.QToolButton(self.fraEvapBottom) self.btnPattern.setObjectName(_fromUtf8("btnPattern")) self.gridLayout_4.addWidget(self.btnPattern, 0, 2, 1, 1) self.btnDelete = QtGui.QToolButton(self.fraEvapBottom) self.btnDelete.setObjectName(_fromUtf8("btnDelete")) self.gridLayout_4.addWidget(self.btnDelete, 0, 3, 1, 1) self.cbxDry = QtGui.QCheckBox(self.fraEvapBottom) self.cbxDry.setObjectName(_fromUtf8("cbxDry")) self.gridLayout_4.addWidget(self.cbxDry, 1, 0, 1, 1) self.gridLayout_3.addWidget(self.fraEvapBottom, 2, 0, 1, 1) self.tabClimate.addTab(self.Evaporation, _fromUtf8("")) self.WindSpeed = QtGui.QWidget() self.WindSpeed.setObjectName(_fromUtf8("WindSpeed")) self.gridLayout_6 = QtGui.QGridLayout(self.WindSpeed) self.gridLayout_6.setMargin(11) self.gridLayout_6.setSpacing(6) self.gridLayout_6.setObjectName(_fromUtf8("gridLayout_6")) self.rbnUseClimate = QtGui.QRadioButton(self.WindSpeed) self.rbnUseClimate.setObjectName(_fromUtf8("rbnUseClimate")) self.gridLayout_6.addWidget(self.rbnUseClimate, 0, 0, 1, 1) self.rbnMonthly = QtGui.QRadioButton(self.WindSpeed) self.rbnMonthly.setObjectName(_fromUtf8("rbnMonthly")) self.gridLayout_6.addWidget(self.rbnMonthly, 1, 0, 1, 1) self.lblMonthlyWind = QtGui.QLabel(self.WindSpeed) self.lblMonthlyWind.setObjectName(_fromUtf8("lblMonthlyWind")) self.gridLayout_6.addWidget(self.lblMonthlyWind, 2, 0, 1, 1) self.tblWind = QtGui.QTableWidget(self.WindSpeed) self.tblWind.setRowCount(1) self.tblWind.setColumnCount(12) self.tblWind.setObjectName(_fromUtf8("tblWind")) item = QtGui.QTableWidgetItem() self.tblWind.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tblWind.setHorizontalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.tblWind.setHorizontalHeaderItem(2, item) item = QtGui.QTableWidgetItem() self.tblWind.setHorizontalHeaderItem(3, item) item = QtGui.QTableWidgetItem() self.tblWind.setHorizontalHeaderItem(4, item) item = QtGui.QTableWidgetItem() self.tblWind.setHorizontalHeaderItem(5, item) item = QtGui.QTableWidgetItem() self.tblWind.setHorizontalHeaderItem(6, item) item = QtGui.QTableWidgetItem() self.tblWind.setHorizontalHeaderItem(7, item) item = QtGui.QTableWidgetItem() self.tblWind.setHorizontalHeaderItem(8, item) item = QtGui.QTableWidgetItem() self.tblWind.setHorizontalHeaderItem(9, item) item = QtGui.QTableWidgetItem() self.tblWind.setHorizontalHeaderItem(10, item) item = QtGui.QTableWidgetItem() self.tblWind.setHorizontalHeaderItem(11, item) self.tblWind.verticalHeader().setVisible(False) self.gridLayout_6.addWidget(self.tblWind, 3, 0, 1, 1) self.fraWindBot = QtGui.QFrame(self.WindSpeed) self.fraWindBot.setFrameShape(QtGui.QFrame.StyledPanel) self.fraWindBot.setFrameShadow(QtGui.QFrame.Raised) self.fraWindBot.setObjectName(_fromUtf8("fraWindBot")) self.gridLayout_6.addWidget(self.fraWindBot, 4, 0, 1, 1) self.tabClimate.addTab(self.WindSpeed, _fromUtf8("")) self.SnowMelt = QtGui.QWidget() self.SnowMelt.setObjectName(_fromUtf8("SnowMelt")) self.gridLayout_7 = QtGui.QGridLayout(self.SnowMelt) self.gridLayout_7.setMargin(11) self.gridLayout_7.setSpacing(6) self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7")) self.lblSnowDivide = QtGui.QLabel(self.SnowMelt) self.lblSnowDivide.setWordWrap(True) self.lblSnowDivide.setObjectName(_fromUtf8("lblSnowDivide")) self.gridLayout_7.addWidget(self.lblSnowDivide, 0, 0, 1, 1) self.txtSnowDivide = QtGui.QLineEdit(self.SnowMelt) self.txtSnowDivide.setObjectName(_fromUtf8("txtSnowDivide")) self.gridLayout_7.addWidget(self.txtSnowDivide, 0, 1, 1, 1) self.lblSnowATI = QtGui.QLabel(self.SnowMelt) self.lblSnowATI.setWordWrap(True) self.lblSnowATI.setObjectName(_fromUtf8("lblSnowATI")) self.gridLayout_7.addWidget(self.lblSnowATI, 1, 0, 1, 1) self.txtSnowATI = QtGui.QLineEdit(self.SnowMelt) self.txtSnowATI.setObjectName(_fromUtf8("txtSnowATI")) self.gridLayout_7.addWidget(self.txtSnowATI, 1, 1, 1, 1) self.lblSnowMelt = QtGui.QLabel(self.SnowMelt) self.lblSnowMelt.setWordWrap(True) self.lblSnowMelt.setObjectName(_fromUtf8("lblSnowMelt")) self.gridLayout_7.addWidget(self.lblSnowMelt, 2, 0, 1, 1) self.txtSnowMelt = QtGui.QLineEdit(self.SnowMelt) self.txtSnowMelt.setObjectName(_fromUtf8("txtSnowMelt")) self.gridLayout_7.addWidget(self.txtSnowMelt, 2, 1, 1, 1) self.lblSnowElevation = QtGui.QLabel(self.SnowMelt) self.lblSnowElevation.setWordWrap(True) self.lblSnowElevation.setObjectName(_fromUtf8("lblSnowElevation")) self.gridLayout_7.addWidget(self.lblSnowElevation, 3, 0, 1, 1) self.txtSnowElevation = QtGui.QLineEdit(self.SnowMelt) self.txtSnowElevation.setObjectName(_fromUtf8("txtSnowElevation")) self.gridLayout_7.addWidget(self.txtSnowElevation, 3, 1, 1, 1) self.lblSnowLatitude = QtGui.QLabel(self.SnowMelt) self.lblSnowLatitude.setWordWrap(True) self.lblSnowLatitude.setObjectName(_fromUtf8("lblSnowLatitude")) self.gridLayout_7.addWidget(self.lblSnowLatitude, 4, 0, 1, 1) self.txtSnowLatitude = QtGui.QLineEdit(self.SnowMelt) self.txtSnowLatitude.setObjectName(_fromUtf8("txtSnowLatitude")) self.gridLayout_7.addWidget(self.txtSnowLatitude, 4, 1, 1, 1) self.lblSnowLongitude = QtGui.QLabel(self.SnowMelt) self.lblSnowLongitude.setWordWrap(True) self.lblSnowLongitude.setObjectName(_fromUtf8("lblSnowLongitude")) self.gridLayout_7.addWidget(self.lblSnowLongitude, 5, 0, 1, 1) self.txtSnowLongitude = QtGui.QLineEdit(self.SnowMelt) self.txtSnowLongitude.setObjectName(_fromUtf8("txtSnowLongitude")) self.gridLayout_7.addWidget(self.txtSnowLongitude, 5, 1, 1, 1) self.tabClimate.addTab(self.SnowMelt, _fromUtf8("")) self.ArealDepletion = QtGui.QWidget() self.ArealDepletion.setObjectName(_fromUtf8("ArealDepletion")) self.verticalLayout_6 = QtGui.QVBoxLayout(self.ArealDepletion) self.verticalLayout_6.setMargin(11) self.verticalLayout_6.setSpacing(6) self.verticalLayout_6.setObjectName(_fromUtf8("verticalLayout_6")) self.lblFraction = QtGui.QLabel(self.ArealDepletion) self.lblFraction.setObjectName(_fromUtf8("lblFraction")) self.verticalLayout_6.addWidget(self.lblFraction) self.tblAreal = QtGui.QTableWidget(self.ArealDepletion) self.tblAreal.setRowCount(10) self.tblAreal.setColumnCount(2) self.tblAreal.setObjectName(_fromUtf8("tblAreal")) item = QtGui.QTableWidgetItem() self.tblAreal.setVerticalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tblAreal.setVerticalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.tblAreal.setVerticalHeaderItem(2, item) item = QtGui.QTableWidgetItem() self.tblAreal.setVerticalHeaderItem(3, item) item = QtGui.QTableWidgetItem() self.tblAreal.setVerticalHeaderItem(4, item) item = QtGui.QTableWidgetItem() self.tblAreal.setVerticalHeaderItem(5, item) item = QtGui.QTableWidgetItem() self.tblAreal.setVerticalHeaderItem(6, item) item = QtGui.QTableWidgetItem() self.tblAreal.setVerticalHeaderItem(7, item) item = QtGui.QTableWidgetItem() self.tblAreal.setVerticalHeaderItem(8, item) item = QtGui.QTableWidgetItem() self.tblAreal.setVerticalHeaderItem(9, item) item = QtGui.QTableWidgetItem() self.tblAreal.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tblAreal.setHorizontalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.tblAreal.setItem(0, 0, item) self.tblAreal.verticalHeader().setHighlightSections(True) self.verticalLayout_6.addWidget(self.tblAreal) self.frame = QtGui.QFrame(self.ArealDepletion) self.frame.setFrameShape(QtGui.QFrame.StyledPanel) self.frame.setFrameShadow(QtGui.QFrame.Raised) self.frame.setObjectName(_fromUtf8("frame")) self.gridLayout_8 = QtGui.QGridLayout(self.frame) self.gridLayout_8.setMargin(11) self.gridLayout_8.setSpacing(6) self.gridLayout_8.setObjectName(_fromUtf8("gridLayout_8")) self.btnPerNat = QtGui.QPushButton(self.frame) self.btnPerNat.setObjectName(_fromUtf8("btnPerNat")) self.gridLayout_8.addWidget(self.btnPerNat, 1, 1, 1, 1) self.btnPerNo = QtGui.QPushButton(self.frame) self.btnPerNo.setObjectName(_fromUtf8("btnPerNo")) self.gridLayout_8.addWidget(self.btnPerNo, 0, 1, 1, 1) self.btnImpNat = QtGui.QPushButton(self.frame) self.btnImpNat.setObjectName(_fromUtf8("btnImpNat")) self.gridLayout_8.addWidget(self.btnImpNat, 1, 0, 1, 1) self.btnImpNo = QtGui.QPushButton(self.frame) self.btnImpNo.setObjectName(_fromUtf8("btnImpNo")) self.gridLayout_8.addWidget(self.btnImpNo, 0, 0, 1, 1) spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.gridLayout_8.addItem(spacerItem1, 0, 2, 1, 1) self.verticalLayout_6.addWidget(self.frame) self.tabClimate.addTab(self.ArealDepletion, _fromUtf8("")) self.Adjustments = QtGui.QWidget() self.Adjustments.setObjectName(_fromUtf8("Adjustments")) self.verticalLayout_4 = QtGui.QVBoxLayout(self.Adjustments) self.verticalLayout_4.setMargin(11) self.verticalLayout_4.setSpacing(6) self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4")) self.tblAdjustments = QtGui.QTableWidget(self.Adjustments) self.tblAdjustments.setObjectName(_fromUtf8("tblAdjustments")) self.tblAdjustments.setColumnCount(4) self.tblAdjustments.setRowCount(12) item = QtGui.QTableWidgetItem() self.tblAdjustments.setVerticalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tblAdjustments.setVerticalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.tblAdjustments.setVerticalHeaderItem(2, item) item = QtGui.QTableWidgetItem() self.tblAdjustments.setVerticalHeaderItem(3, item) item = QtGui.QTableWidgetItem() self.tblAdjustments.setVerticalHeaderItem(4, item) item = QtGui.QTableWidgetItem() self.tblAdjustments.setVerticalHeaderItem(5, item) item = QtGui.QTableWidgetItem() self.tblAdjustments.setVerticalHeaderItem(6, item) item = QtGui.QTableWidgetItem() self.tblAdjustments.setVerticalHeaderItem(7, item) item = QtGui.QTableWidgetItem() self.tblAdjustments.setVerticalHeaderItem(8, item) item = QtGui.QTableWidgetItem() self.tblAdjustments.setVerticalHeaderItem(9, item) item = QtGui.QTableWidgetItem() self.tblAdjustments.setVerticalHeaderItem(10, item) item = QtGui.QTableWidgetItem() self.tblAdjustments.setVerticalHeaderItem(11, item) item = QtGui.QTableWidgetItem() self.tblAdjustments.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tblAdjustments.setHorizontalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.tblAdjustments.setHorizontalHeaderItem(2, item) item = QtGui.QTableWidgetItem() self.tblAdjustments.setHorizontalHeaderItem(3, item) self.verticalLayout_4.addWidget(self.tblAdjustments) self.frame_2 = QtGui.QFrame(self.Adjustments) self.frame_2.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_2.setFrameShadow(QtGui.QFrame.Raised) self.frame_2.setObjectName(_fromUtf8("frame_2")) self.verticalLayout_4.addWidget(self.frame_2) self.fraAdjBottom = QtGui.QFrame(self.Adjustments) self.fraAdjBottom.setFrameShape(QtGui.QFrame.StyledPanel) self.fraAdjBottom.setFrameShadow(QtGui.QFrame.Raised) self.fraAdjBottom.setObjectName(_fromUtf8("fraAdjBottom")) self.gridLayout_9 = QtGui.QGridLayout(self.fraAdjBottom) self.gridLayout_9.setMargin(11) self.gridLayout_9.setSpacing(6) self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9")) self.lblAdjustments = QtGui.QLabel(self.fraAdjBottom) self.lblAdjustments.setObjectName(_fromUtf8("lblAdjustments")) self.gridLayout_9.addWidget(self.lblAdjustments, 0, 0, 1, 1) self.btnClear = QtGui.QPushButton(self.fraAdjBottom) self.btnClear.setObjectName(_fromUtf8("btnClear")) self.gridLayout_9.addWidget(self.btnClear, 0, 2, 1, 1) spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.gridLayout_9.addItem(spacerItem2, 0, 1, 1, 1) self.verticalLayout_4.addWidget(self.fraAdjBottom) self.tabClimate.addTab(self.Adjustments, _fromUtf8("")) self.verticalLayout.addWidget(self.tabClimate) self.verticalLayout_3.addWidget(self.fraTop) self.fraOKCancel = QtGui.QFrame(self.centralWidget) self.fraOKCancel.setFrameShape(QtGui.QFrame.StyledPanel) self.fraOKCancel.setFrameShadow(QtGui.QFrame.Raised) self.fraOKCancel.setObjectName(_fromUtf8("fraOKCancel")) self.horizontalLayout = QtGui.QHBoxLayout(self.fraOKCancel) self.horizontalLayout.setMargin(11) self.horizontalLayout.setSpacing(6) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) spacerItem3 = QtGui.QSpacerItem(338, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem3) self.cmdOK = QtGui.QPushButton(self.fraOKCancel) self.cmdOK.setObjectName(_fromUtf8("cmdOK")) self.horizontalLayout.addWidget(self.cmdOK) self.cmdCancel = QtGui.QPushButton(self.fraOKCancel) self.cmdCancel.setObjectName(_fromUtf8("cmdCancel")) self.horizontalLayout.addWidget(self.cmdCancel) self.verticalLayout_3.addWidget(self.fraOKCancel) frmClimatology.setCentralWidget(self.centralWidget) self.retranslateUi(frmClimatology) self.tabClimate.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(frmClimatology)
def setupUi(self, FavWindow, MainMenuWindow, username): self.mw = MainMenuWindow self.fw = FavWindow self.username = username FavWindow.setGeometry(320, 100, 640, 480) self.cur.execute("select count(*) from allwords where " + str(self.username) + "=3 or " + str(self.username) + "=1") self.rcount = self.cur.fetchone()[0] #print self.rcount FavWindow.setObjectName(_fromUtf8("FavWindow")) FavWindow.resize(640, 463) font = QtGui.QFont() font.setFamily(_fromUtf8("Ubuntu Condensed")) font.setPointSize(14) FavWindow.setFont(font) FavWindow.setStyleSheet( _fromUtf8("background-color: rgb(255, 255, 255);\n" "color: rgb(0, 0, 0);")) self.labheader = QtGui.QLabel(FavWindow) self.labheader.setGeometry(QtCore.QRect(20, 22, 601, 51)) font = QtGui.QFont() font.setFamily(_fromUtf8("Ubuntu Condensed")) font.setPointSize(14) font.setBold(True) font.setWeight(75) self.labheader.setFont(font) self.labheader.setStyleSheet( _fromUtf8("background-color: rgb(206, 36, 57);\n" "color: rgb(255, 255, 255);")) self.labheader.setAlignment(QtCore.Qt.AlignCenter) self.labheader.setObjectName(_fromUtf8("labheader")) self.tableWidget = QtGui.QTableWidget(FavWindow) self.tableWidget.setGeometry(QtCore.QRect(20, 100, 600, 300)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.tableWidget.sizePolicy().hasHeightForWidth()) self.tableWidget.setSizePolicy(sizePolicy) self.mainmenu_btn = QtGui.QPushButton(FavWindow) self.mainmenu_btn.setGeometry(QtCore.QRect(20, 22, 51, 51)) self.mainmenu_btn.setCursor(QtGui.QCursor( QtCore.Qt.PointingHandCursor)) self.mainmenu_btn.setStyleSheet( _fromUtf8("background-color: rgba(255, 255, 255, 0);")) self.mainmenu_btn.setText(_fromUtf8("")) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8("menu.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.mainmenu_btn.setIcon(icon) self.mainmenu_btn.setIconSize(QtCore.QSize(25, 25)) self.mainmenu_btn.setFlat(False) self.mainmenu_btn.setObjectName(_fromUtf8("mainmenu_btn")) self.tableWidget.setMinimumSize(QtCore.QSize(600, 300)) self.tableWidget.setMaximumSize(QtCore.QSize(600, 300)) font = QtGui.QFont() font.setFamily(_fromUtf8("Ubuntu Condensed")) font.setPointSize(14) self.tableWidget.setFont(font) self.tableWidget.setFrameShadow(QtGui.QFrame.Plain) self.tableWidget.setEditTriggers( QtGui.QAbstractItemView.NoEditTriggers) self.tableWidget.setAlternatingRowColors(False) self.tableWidget.setShowGrid(True) self.tableWidget.setGridStyle(QtCore.Qt.SolidLine) self.tableWidget.setRowCount(self.rcount) self.tableWidget.setColumnCount(2) self.tableWidget.setObjectName(_fromUtf8("tableWidget")) item = QtGui.QTableWidgetItem() self.tableWidget.setItem(0, 0, item) item = QtGui.QTableWidgetItem() self.tableWidget.setItem(0, 1, item) item = QtGui.QTableWidgetItem() self.tableWidget.setItem(1, 0, item) item = QtGui.QTableWidgetItem() self.tableWidget.setItem(1, 1, item) item = QtGui.QTableWidgetItem() self.tableWidget.setItem(2, 0, item) item = QtGui.QTableWidgetItem() self.tableWidget.setItem(2, 1, item) self.tableWidget.horizontalHeader().setVisible(False) self.tableWidget.horizontalHeader().setStretchLastSection(True) self.tableWidget.verticalHeader().setVisible(True) self.retranslateUi(FavWindow) QtCore.QMetaObject.connectSlotsByName(FavWindow) self.mainmenu_btn.clicked.connect(self.btnMMClicked) fetch = self.cur.execute( "select bwords, bmeanings from allwords where " + str(self.username) + "=3 or " + str(self.username) + "=1 order by bwords asc") fetch = list(fetch) for i in range(self.rcount): self.newitem1 = QtGui.QTableWidgetItem(fetch[i][0]) self.newitem2 = QtGui.QTableWidgetItem(fetch[i][1]) self.tableWidget.setItem(i, 0, self.newitem1) self.tableWidget.setItem(i, 1, self.newitem2)
def setupUi(self, MainWindow): '''Dessin de l'interface de la fenêtre principale''' MainWindow.setObjectName("MainWindow") self.font = QtGui.QFont() # Défini la taille de police général de djl (la plus petite) self.font.setPointSize(config(info=15)) self.setFont(self.font) self.font2 = QtGui.QFont() # Défini la taille de police (moyenne) pour certains éléments (comme la liste des jeux) self.font2.setPointSize(config(info=15) + 2) self.font3 = QtGui.QFont() # Défini la taille (la plus grande) de police pour certains éléments # (Comme le nom du jeu en dépôt) self.font3.setPointSize(config(info=15) + 6) if config(info=10 ) == '1': # Future, enlever la condition pour djl 1.2.13 x, y = 780, 680 self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") MainWindow.setCentralWidget(self.centralwidget) self.tabWidget = QtGui.QTabWidget(self.centralwidget) # self.tabWidget = QtGui.QTabWidget(self) #<<< # self.tabWidget.setGeometry(QtCore.QRect(0,0,x,y-23)) self.tabWidget.setObjectName("tabWidget") self.tab = QtGui.QWidget() # Liste des jeux self.tab.setObjectName("tab") self.tab_2 = QtGui.QWidget() # Dépot self.tab_2.setObjectName("tab_2") self.tab_3 = QtGui.QWidget() # IRC self.tab_3.setObjectName("tab_3") self.tab_4 = QtGui.QWidget() # Actu self.tab_4.setObjectName("tab_4") self.tab_5 = QtGui.QWidget() # Gestionnaire de modules self.tab_5.setObjectName("tab_5") # self.gridlayout = QtGui.QGridLayout(self.centralwidget) self.gridlayout.setObjectName("gridlayout") self.gridlayout.addWidget(self.tabWidget, 0, 0) self.gridlayout_1 = QtGui.QGridLayout(self.tab) self.gridlayout_1.setObjectName("gridlayout1") # Défini l'ordre des onglets: self.tabWidget.addTab(self.tab_4, "") self.tabWidget.addTab(self.tab, "") self.tabWidget.addTab(self.tab_2, "") self.tabWidget.addTab(self.tab_3, "") self.tabWidget.addTab(self.tab_5, "") # else: x, y = 350, 640 MainWindow.resize( QtCore.QSize(QtCore.QRect(0, 0, x, y).size()).expandedTo( MainWindow.minimumSizeHint())) icone = QtGui.QIcon((os.getcwd() + '/icone.png')) MainWindow.setWindowIcon(icone) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) #sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding,QtGui.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( MainWindow.sizePolicy().hasHeightForWidth()) MainWindow.setSizePolicy(sizePolicy) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, x, 26)) self.menubar.setObjectName("menubar") self.menubar.setFont(self.font) MainWindow.setMenuBar(self.menubar) # # Liste des jeux: # print '>>>'+config(info=10) # Futur, enlever la clause pour djl 1.2.13 if config(info=10) == '0': # Si c'est l'interface simple self.listWidget = QtGui.QListWidget(self) #self.recherche_jeu = QtGui.QLineEdit(self) self.setCentralWidget(self.listWidget) # if config(info=10)=='1': #Si c'est l'interface complète else: # self.creer_liste(filtre='0') self.listWidget = QtGui.QListWidget( self.tab) # Liste des jeux de l'onglet "Jeux" self.recherche_jeu = QtGui.QLineEdit( self.tab) # Barre de recherche des jeux self.gridlayout_1.addWidget(self.recherche_jeu, 0, 0) self.gridlayout_1.addWidget(self.listWidget, 1, 0) self.listWidget.setAlternatingRowColors(True) self.listWidget.setFont(self.font2) # self.listWidget.setGeometry(QtCore.QRect(0,0,x-10,y-55)) self.listWidget.setBaseSize(QtCore.QSize(0, 0)) # Défini le taille des icones: self.listWidget.setIconSize(QtCore.QSize(32, 32)) self.listWidget.setGridSize(QtCore.QSize(34, 34)) self.listWidget.setObjectName("listWidget") #self.listWidget.contextMenuPolicy = 1 self.listWidget.contextMenuEvent = self.contextMenuEvent self.menuMenu = QtGui.QMenu(self.menubar) self.menuMenu.setObjectName("menuMenu") self.menuMenu.setFont(self.font) self.menuAide = QtGui.QMenu(self.menubar) self.menuAide.setObjectName("menuAide") self.menuAide.setFont(self.font) self.actionAjouter_jeu = QtGui.QAction(MainWindow) self.actionAjouter_jeu.setObjectName("actionAjouter_jeu") self.action_change_ui = QtGui.QAction(MainWindow) self.action_change_ui.setObjectName("action_change_ui") self.action_Import_desk = QtGui.QAction(MainWindow) self.action_Import_desk.setObjectName("action_Import_desk") #self.actionSupprimer_desk = QtGui.QAction(MainWindow) # self.actionSupprimer_desk.setObjectName("actionSupprimer_desk") # self.actionSupprimer_desk.setEnabled(False) self.actionConfig = QtGui.QAction(MainWindow) self.actionConfig.setObjectName("actionConfig") self.actionRedem = QtGui.QAction(MainWindow) self.actionRedem.setObjectName("actionRedem") self.action_maj = QtGui.QAction(MainWindow) self.action_maj.setObjectName("action_maj") self.actionQuitter = QtGui.QAction(MainWindow) self.actionQuitter.setObjectName("actionQuitter") self.action_Infos_sys = QtGui.QAction(MainWindow) self.action_Infos_sys.setObjectName("action_Infos_sys") self.action_historique = QtGui.QAction(MainWindow) self.action_historique.setObjectName("action_historique") self.action_journal = QtGui.QAction(MainWindow) self.action_journal.setObjectName("action_journal") self.action_sortie_jeu = QtGui.QAction(MainWindow) self.action_sortie_jeu.setObjectName("action_sortie_jeu") self.action_rapport = QtGui.QAction(MainWindow) self.action_rapport.setObjectName("action_rapport") self.action_Apropos = QtGui.QAction(MainWindow) self.action_Apropos.setObjectName("action_Apropos") self.actionInstallWine = QtGui.QAction(MainWindow) self.actionInstallWine.setObjectName("actionInstallWine") #self.action_args = QtGui.QAction(MainWindow) # self.action_args.setObjectName("action_args") # self.action_args.setEnabled(False) self.menuMenu.addAction(self.action_change_ui) self.menuMenu.addAction(self.actionAjouter_jeu) self.menuMenu.addAction(self.action_Import_desk) # self.menuMenu.addAction(self.actionSupprimer_desk) self.menuMenu.addSeparator() self.menuMenu.addAction(self.actionInstallWine) # self.menuMenu.addAction(self.action_args) self.menuMenu.addSeparator() self.menuMenu.addAction(self.actionConfig) # Ajout du menu pour le choix de la langue: #self.menuLang = self.menuMenu.addMenu(self.tr(i18n.traduc("Langue"))) self.menuLang = QtGui.QMenu(self.menuMenu) self.menuLang.setFont(self.font) self.menuMenu.addMenu(self.menuLang) self.menuMenu.addAction(self.action_maj) self.menuMenu.addAction(self.actionRedem) self.menuMenu.addAction(self.actionQuitter) self.menubar.addAction(self.menuMenu.menuAction()) # Menu de la langue: self.action_FR = QtGui.QAction(MainWindow) self.action_FR.setObjectName("action_FR") self.action_EN = QtGui.QAction(MainWindow) self.action_EN.setObjectName("action_EN") self.action_HU = QtGui.QAction(MainWindow) self.action_HU.setObjectName("action_HU") self.action_GL = QtGui.QAction(MainWindow) self.action_GL.setObjectName("action_GL") self.action_RU = QtGui.QAction(MainWindow) self.action_RU.setObjectName("action_RU") self.action_SV = QtGui.QAction(MainWindow) self.action_SV.setObjectName("action_SV") self.action_IT = QtGui.QAction(MainWindow) self.action_IT.setObjectName("action_IT") self.action_ES = QtGui.QAction(MainWindow) self.action_ES.setObjectName("action_ES") self.action_DE = QtGui.QAction(MainWindow) self.action_DE.setObjectName("action_DE") self.action_PL = QtGui.QAction(MainWindow) self.action_PL.setObjectName("action_PL") self.action_PT = QtGui.QAction(MainWindow) self.action_PT.setObjectName("action_PT") self.menuLang.addAction(self.action_DE) self.menuLang.addAction(self.action_EN) self.menuLang.addAction(self.action_ES) self.menuLang.addAction(self.action_FR) self.menuLang.addAction(self.action_GL) self.menuLang.addAction(self.action_HU) self.menuLang.addAction(self.action_IT) self.menuLang.addAction(self.action_RU) self.menuLang.addAction(self.action_PL) self.menuLang.addAction(self.action_PT) self.menuLang.addAction(self.action_SV) # self.menuDepot = QtGui.QMenu(self.menubar) self.menuDepot.setObjectName("menuDepot") self.menuDepot.setFont(self.font) self.action_creer_def = QtGui.QAction(MainWindow) self.action_creer_def.setObjectName("action_creer_def") self.action_dependances = QtGui.QAction(MainWindow) self.action_dependances.setObjectName("action_dependances") self.menuDepot.addAction(self.action_dependances) self.menuDepot.addAction(self.action_creer_def) self.menubar.addAction(self.menuDepot.menuAction()) # self.menubar.addAction(self.menuDepot.menuAction()) # self.menuDepot.addSeparator() #self.actionFermer = QtGui.QAction(MainWindow) # self.actionFermer.setObjectName("actionFermer") # self.menuDepot.addAction(self.actionFermer) # self.menubar.addAction(self.menuDepot.menuAction()) self.menuAide.addAction(self.action_Infos_sys) self.menuAide.addAction(self.action_historique) self.menuAide.addAction(self.action_journal) self.menuAide.addAction(self.action_sortie_jeu) self.menuAide.addAction(self.action_rapport) self.menuAide.addAction(self.action_Apropos) self.menubar.addAction(self.menuAide.menuAction()) self.action_sortie_jeu.setEnabled(False) # # self.retranslateUi(MainWindow) self.connexions_o() QtCore.QMetaObject.connectSlotsByName(MainWindow)
def setupUi(self, endGame): endGame.setObjectName(_fromUtf8("endGame")) endGame.resize(461, 252) self.gridLayout_2 = QtGui.QGridLayout(endGame) self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) self.gridLayout = QtGui.QGridLayout() self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.player1 = QtGui.QRadioButton(endGame) font = QtGui.QFont() font.setPointSize(12) self.player1.setFont(font) self.player1.setText(_fromUtf8("")) self.player1.setObjectName(_fromUtf8("player1")) self.buttonGroup = QtGui.QButtonGroup(endGame) self.buttonGroup.setObjectName(_fromUtf8("buttonGroup")) self.buttonGroup.addButton(self.player1) self.gridLayout.addWidget(self.player1, 0, 0, 1, 1) self.player3 = QtGui.QRadioButton(endGame) self.player3.setEnabled(False) font = QtGui.QFont() font.setPointSize(12) self.player3.setFont(font) self.player3.setText(_fromUtf8("")) self.player3.setObjectName(_fromUtf8("player3")) self.buttonGroup.addButton(self.player3) self.gridLayout.addWidget(self.player3, 2, 0, 1, 1) self.player2 = QtGui.QRadioButton(endGame) font = QtGui.QFont() font.setPointSize(12) self.player2.setFont(font) self.player2.setText(_fromUtf8("")) self.player2.setObjectName(_fromUtf8("player2")) self.buttonGroup.addButton(self.player2) self.gridLayout.addWidget(self.player2, 1, 0, 1, 1) self.modScore2 = QtGui.QSpinBox(endGame) font = QtGui.QFont() font.setPointSize(12) self.modScore2.setFont(font) self.modScore2.setObjectName(_fromUtf8("modScore2")) self.gridLayout.addWidget(self.modScore2, 1, 2, 1, 1) self.modScore3 = QtGui.QSpinBox(endGame) self.modScore3.setEnabled(False) font = QtGui.QFont() font.setPointSize(12) self.modScore3.setFont(font) self.modScore3.setObjectName(_fromUtf8("modScore3")) self.gridLayout.addWidget(self.modScore3, 2, 2, 1, 1) self.score1 = QtGui.QSpinBox(endGame) font = QtGui.QFont() font.setPointSize(12) self.score1.setFont(font) self.score1.setProperty("value", 0) self.score1.setObjectName(_fromUtf8("score1")) self.gridLayout.addWidget(self.score1, 0, 1, 1, 1) self.score2 = QtGui.QSpinBox(endGame) font = QtGui.QFont() font.setPointSize(12) self.score2.setFont(font) self.score2.setObjectName(_fromUtf8("score2")) self.gridLayout.addWidget(self.score2, 1, 1, 1, 1) self.score3 = QtGui.QSpinBox(endGame) self.score3.setEnabled(False) font = QtGui.QFont() font.setPointSize(12) self.score3.setFont(font) self.score3.setObjectName(_fromUtf8("score3")) self.gridLayout.addWidget(self.score3, 2, 1, 1, 1) self.modScore4 = QtGui.QSpinBox(endGame) self.modScore4.setEnabled(False) font = QtGui.QFont() font.setPointSize(12) self.modScore4.setFont(font) self.modScore4.setObjectName(_fromUtf8("modScore4")) self.gridLayout.addWidget(self.modScore4, 3, 2, 1, 1) self.score4 = QtGui.QSpinBox(endGame) self.score4.setEnabled(False) font = QtGui.QFont() font.setPointSize(12) self.score4.setFont(font) self.score4.setObjectName(_fromUtf8("score4")) self.gridLayout.addWidget(self.score4, 3, 1, 1, 1) self.modScore1 = QtGui.QSpinBox(endGame) font = QtGui.QFont() font.setPointSize(12) self.modScore1.setFont(font) self.modScore1.setObjectName(_fromUtf8("modScore1")) self.gridLayout.addWidget(self.modScore1, 0, 2, 1, 1) self.player4 = QtGui.QRadioButton(endGame) self.player4.setEnabled(False) font = QtGui.QFont() font.setPointSize(12) self.player4.setFont(font) self.player4.setText(_fromUtf8("")) self.player4.setObjectName(_fromUtf8("player4")) self.buttonGroup.addButton(self.player4) self.gridLayout.addWidget(self.player4, 3, 0, 1, 1) self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1) self.buttonBox = QtGui.QDialogButtonBox(endGame) font = QtGui.QFont() font.setPointSize(12) self.buttonBox.setFont(font) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok) self.buttonBox.setObjectName(_fromUtf8("buttonBox")) self.gridLayout_2.addWidget(self.buttonBox, 1, 0, 1, 1) self.retranslateUi(endGame) QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), endGame.accept) QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), endGame.reject) QtCore.QMetaObject.connectSlotsByName(endGame)
def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(376, 338) self.spinBox = QtGui.QSpinBox(Form) self.spinBox.setGeometry(QtCore.QRect(20, 160, 161, 121)) font = QtGui.QFont() font.setPointSize(35) font.setBold(True) font.setWeight(75) self.spinBox.setFont(font) self.spinBox.setMaximum(9) self.spinBox.setObjectName(_fromUtf8("spinBox")) self.label = QtGui.QLabel(Form) self.label.setGeometry(QtCore.QRect(20, 120, 111, 21)) font = QtGui.QFont() font.setPointSize(12) font.setBold(True) font.setWeight(75) self.label.setFont(font) self.label.setObjectName(_fromUtf8("label")) self.pushButton = QtGui.QPushButton(Form) self.pushButton.setGeometry(QtCore.QRect(220, 190, 131, 41)) self.pushButton.setObjectName(_fromUtf8("pushButton")) self.pushButton_2 = QtGui.QPushButton(Form) self.pushButton_2.setGeometry(QtCore.QRect(220, 240, 131, 41)) self.pushButton_2.setObjectName(_fromUtf8("pushButton_2")) self.pushButton_3 = QtGui.QPushButton(Form) self.pushButton_3.setGeometry(QtCore.QRect(220, 140, 131, 41)) self.pushButton_3.setObjectName(_fromUtf8("pushButton_3")) self.progressBar = QtGui.QProgressBar(Form) self.progressBar.setGeometry(QtCore.QRect(20, 60, 118, 23)) self.progressBar.setProperty("value", 0) self.progressBar.setObjectName(_fromUtf8("progressBar")) self.label_2 = QtGui.QLabel(Form) self.label_2.setGeometry(QtCore.QRect(20, 20, 111, 21)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_2.setFont(font) self.label_2.setObjectName(_fromUtf8("label_2")) self.label_3 = QtGui.QLabel(Form) self.label_3.setGeometry(QtCore.QRect(200, 20, 111, 21)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_3.setFont(font) self.label_3.setObjectName(_fromUtf8("label_3")) self.label_4 = QtGui.QLabel(Form) self.label_4.setGeometry(QtCore.QRect(190, 60, 131, 31)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_4.setFont(font) self.label_4.setText(_fromUtf8("")) self.label_4.setObjectName(_fromUtf8("label_4")) self.table_no = 0 self.current_table_position = 0 self.client = actionlib.SimpleActionClient('move_base', MoveBaseAction) self.goal = MoveBaseGoal() self.update_values() self.retranslateUi(Form) QtCore.QObject.connect(self.spinBox, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.set_table_number) QtCore.QObject.connect(self.pushButton_3, QtCore.SIGNAL(_fromUtf8("clicked()")), self.Home) QtCore.QObject.connect(self.pushButton, QtCore.SIGNAL(_fromUtf8("clicked()")), self.Go) QtCore.QObject.connect(self.pushButton_2, QtCore.SIGNAL(_fromUtf8("clicked()")), self.Cancel) QtCore.QMetaObject.connectSlotsByName(Form)