Esempio n. 1
0
class Ui_StepData(object):
    def setupUi(self, stepData):
        if not stepData.objectName():
            stepData.setObjectName(u"stepData")
        stepData.setEnabled(True)
        stepData.setMaximumSize(QSize(410, 16777215))
        self.stepsTab = QWidget()
        self.stepsTab.setObjectName(u"stepsTab")
        sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.stepsTab.sizePolicy().hasHeightForWidth())
        self.stepsTab.setSizePolicy(sizePolicy)
        self.stepsTab.setMinimumSize(QSize(200, 278))
        self.stepsTab.setAutoFillBackground(False)
        self.verticalLayout_2 = QVBoxLayout(self.stepsTab)
        self.verticalLayout_2.setObjectName(u"verticalLayout_2")
        self.verticalLayout_2.setContentsMargins(-1, 11, -1, -1)
        self.stepsTable = QTableWidget(self.stepsTab)
        self.stepsTable.setObjectName(u"stepsTable")

        self.verticalLayout_2.addWidget(self.stepsTable)

        self.stepButtons = QHBoxLayout()
        self.stepButtons.setObjectName(u"stepButtons")
        self.stepDownBtn = QPushButton(self.stepsTab)
        self.stepDownBtn.setObjectName(u"stepDownBtn")

        self.stepButtons.addWidget(self.stepDownBtn)

        self.stepUpBtn = QPushButton(self.stepsTab)
        self.stepUpBtn.setObjectName(u"stepUpBtn")

        self.stepButtons.addWidget(self.stepUpBtn)

        self.removeStepBtn = QPushButton(self.stepsTab)
        self.removeStepBtn.setObjectName(u"removeStepBtn")

        self.stepButtons.addWidget(self.removeStepBtn)

        self.addStepBtn = QPushButton(self.stepsTab)
        self.addStepBtn.setObjectName(u"addStepBtn")

        self.stepButtons.addWidget(self.addStepBtn)

        self.runBtn = QPushButton(self.stepsTab)
        self.runBtn.setObjectName(u"runBtn")
        sizePolicy1 = QSizePolicy(QSizePolicy.MinimumExpanding,
                                  QSizePolicy.Fixed)
        sizePolicy1.setHorizontalStretch(0)
        sizePolicy1.setVerticalStretch(0)
        sizePolicy1.setHeightForWidth(
            self.runBtn.sizePolicy().hasHeightForWidth())
        self.runBtn.setSizePolicy(sizePolicy1)
        self.runBtn.setMinimumSize(QSize(0, 0))
        font = QFont()
        font.setBold(False)
        self.runBtn.setFont(font)
        self.runBtn.setCheckable(False)
        self.runBtn.setFlat(False)

        self.stepButtons.addWidget(self.runBtn)

        self.verticalLayout_2.addLayout(self.stepButtons)

        stepData.addTab(self.stepsTab, "")
        self.templatesTab = QWidget()
        self.templatesTab.setObjectName(u"templatesTab")
        sizePolicy2 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Preferred)
        sizePolicy2.setHorizontalStretch(0)
        sizePolicy2.setVerticalStretch(0)
        sizePolicy2.setHeightForWidth(
            self.templatesTab.sizePolicy().hasHeightForWidth())
        self.templatesTab.setSizePolicy(sizePolicy2)
        self.verticalLayout_19 = QVBoxLayout(self.templatesTab)
        self.verticalLayout_19.setObjectName(u"verticalLayout_19")
        self.treeWidget = QTreeWidget(self.templatesTab)
        __qtreewidgetitem = QTreeWidgetItem()
        __qtreewidgetitem.setText(0, u"1")
        self.treeWidget.setHeaderItem(__qtreewidgetitem)
        self.treeWidget.setObjectName(u"treeWidget")
        sizePolicy3 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Expanding)
        sizePolicy3.setHorizontalStretch(0)
        sizePolicy3.setVerticalStretch(0)
        sizePolicy3.setHeightForWidth(
            self.treeWidget.sizePolicy().hasHeightForWidth())
        self.treeWidget.setSizePolicy(sizePolicy3)

        self.verticalLayout_19.addWidget(self.treeWidget)

        stepData.addTab(self.templatesTab, "")
        self.optionsTab = QWidget()
        self.optionsTab.setObjectName(u"optionsTab")
        sizePolicy4 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
        sizePolicy4.setHorizontalStretch(0)
        sizePolicy4.setVerticalStretch(0)
        sizePolicy4.setHeightForWidth(
            self.optionsTab.sizePolicy().hasHeightForWidth())
        self.optionsTab.setSizePolicy(sizePolicy4)
        self.optionsTab.setAutoFillBackground(True)
        self.verticalLayout_17 = QVBoxLayout(self.optionsTab)
        self.verticalLayout_17.setObjectName(u"verticalLayout_17")
        self.stepOptionsTable = QTableWidget(self.optionsTab)
        self.stepOptionsTable.setObjectName(u"stepOptionsTable")

        self.verticalLayout_17.addWidget(self.stepOptionsTable)

        stepData.addTab(self.optionsTab, "")

        self.retranslateUi(stepData)

        stepData.setCurrentIndex(2)

        QMetaObject.connectSlotsByName(stepData)

    # setupUi

    def retranslateUi(self, stepData):
        self.stepDownBtn.setText(
            QCoreApplication.translate("StepData", u"<", None))
        self.stepUpBtn.setText(
            QCoreApplication.translate("StepData", u">", None))
        self.removeStepBtn.setText(
            QCoreApplication.translate("StepData", u"-", None))
        self.addStepBtn.setText(
            QCoreApplication.translate("StepData", u"+", None))
        self.runBtn.setText(
            QCoreApplication.translate("StepData", u"Run", None))
        stepData.setTabText(
            stepData.indexOf(self.stepsTab),
            QCoreApplication.translate("StepData", u"Steps", None))
        stepData.setTabText(
            stepData.indexOf(self.templatesTab),
            QCoreApplication.translate("StepData", u"Templates", None))
        stepData.setTabText(
            stepData.indexOf(self.optionsTab),
            QCoreApplication.translate("StepData", u"Options", None))
        pass
Esempio n. 2
0
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        if not MainWindow.objectName():
            MainWindow.setObjectName(u"MainWindow")
        MainWindow.resize(1020, 588)
        self.actionSave = QAction(MainWindow)
        self.actionSave.setObjectName(u"actionSave")
        self.actionExit = QAction(MainWindow)
        self.actionExit.setObjectName(u"actionExit")
        self.actionExit_2 = QAction(MainWindow)
        self.actionExit_2.setObjectName(u"actionExit_2")
        self.openini = QAction(MainWindow)
        self.openini.setObjectName(u"openini")
        self.openjson = QAction(MainWindow)
        self.openjson.setObjectName(u"openjson")
        self.main_widget = QWidget(MainWindow)
        self.main_widget.setObjectName(u"main_widget")
        self.ini_widget = QWidget(self.main_widget)
        self.ini_widget.setObjectName(u"ini_widget")
        self.ini_widget.setGeometry(QRect(670, 10, 341, 551))
        self.initable = QTableWidget(self.ini_widget)
        if (self.initable.columnCount() < 2):
            self.initable.setColumnCount(2)
        self.initable.setObjectName(u"initable")
        self.initable.setEnabled(True)
        self.initable.setGeometry(QRect(10, 60, 321, 451))
        font = QFont()
        self.initable.setFont(font)
        self.initable.setEditTriggers(QAbstractItemView.DoubleClicked)
        self.initable.setDragEnabled(False)
        self.initable.setSelectionMode(QAbstractItemView.ExtendedSelection)
        self.initable.setSelectionBehavior(QAbstractItemView.SelectRows)
        self.initable.setWordWrap(False)
        self.initable.setRowCount(0)
        self.initable.setColumnCount(2)
        self.initable.horizontalHeader().setDefaultSectionSize(110)
        self.initable.horizontalHeader().setProperty("showSortIndicator",
                                                     False)
        self.initable.horizontalHeader().setStretchLastSection(True)
        self.initable.verticalHeader().setDefaultSectionSize(21)
        self.inilabel = QLabel(self.ini_widget)
        self.inilabel.setObjectName(u"inilabel")
        self.inilabel.setGeometry(QRect(10, 10, 181, 16))
        self.inipath = QTextBrowser(self.ini_widget)
        self.inipath.setObjectName(u"inipath")
        self.inipath.setEnabled(True)
        self.inipath.setGeometry(QRect(10, 30, 321, 22))
        self.inipath.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
        self.iniapply = QPushButton(self.ini_widget)
        self.iniapply.setObjectName(u"iniapply")
        self.iniapply.setEnabled(True)
        self.iniapply.setGeometry(QRect(250, 520, 80, 21))
        self.inidel = QPushButton(self.ini_widget)
        self.inidel.setObjectName(u"inidel")
        self.inidel.setEnabled(False)
        self.inidel.setGeometry(QRect(10, 520, 80, 21))
        self.iniadd = QPushButton(self.ini_widget)
        self.iniadd.setObjectName(u"iniadd")
        self.iniadd.setEnabled(False)
        self.iniadd.setGeometry(QRect(100, 520, 80, 21))
        self.json_widget = QWidget(self.main_widget)
        self.json_widget.setObjectName(u"json_widget")
        self.json_widget.setGeometry(QRect(0, 10, 661, 551))
        self.checkBox = QCheckBox(self.json_widget)
        self.checkBox.setObjectName(u"checkBox")
        self.checkBox.setEnabled(True)
        self.checkBox.setGeometry(QRect(20, 100, 131, 20))
        self.checkBox.setChecked(True)
        self.delentry = QPushButton(self.json_widget)
        self.delentry.setObjectName(u"delentry")
        self.delentry.setEnabled(False)
        self.delentry.setGeometry(QRect(10, 520, 80, 21))
        self.remote = QLineEdit(self.json_widget)
        self.remote.setObjectName(u"remote")
        self.remote.setEnabled(True)
        self.remote.setGeometry(QRect(20, 130, 601, 22))
        self.textBrowser = QTextBrowser(self.json_widget)
        self.textBrowser.setObjectName(u"textBrowser")
        self.textBrowser.setEnabled(True)
        self.textBrowser.setGeometry(QRect(20, 30, 601, 22))
        self.textBrowser.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
        self.addButton = QPushButton(self.json_widget)
        self.addButton.setObjectName(u"addButton")
        self.addButton.setEnabled(True)
        self.addButton.setGeometry(QRect(280, 160, 61, 22))
        self.table = QTableWidget(self.json_widget)
        if (self.table.columnCount() < 2):
            self.table.setColumnCount(2)
        self.table.setObjectName(u"table")
        self.table.setEnabled(True)
        self.table.setGeometry(QRect(10, 200, 641, 311))
        self.table.setFont(font)
        self.table.setEditTriggers(QAbstractItemView.DoubleClicked)
        self.table.setDragEnabled(False)
        self.table.setSelectionMode(QAbstractItemView.ExtendedSelection)
        self.table.setSelectionBehavior(QAbstractItemView.SelectRows)
        self.table.setWordWrap(False)
        self.table.setRowCount(0)
        self.table.setColumnCount(2)
        self.table.horizontalHeader().setDefaultSectionSize(80)
        self.table.horizontalHeader().setProperty("showSortIndicator", False)
        self.table.horizontalHeader().setStretchLastSection(True)
        self.table.verticalHeader().setDefaultSectionSize(21)
        self.path = QLineEdit(self.json_widget)
        self.path.setObjectName(u"path")
        self.path.setEnabled(True)
        self.path.setGeometry(QRect(20, 70, 531, 22))
        self.apply = QPushButton(self.json_widget)
        self.apply.setObjectName(u"apply")
        self.apply.setEnabled(True)
        self.apply.setGeometry(QRect(570, 520, 80, 21))
        self.label = QLabel(self.json_widget)
        self.label.setObjectName(u"label")
        self.label.setGeometry(QRect(20, 10, 181, 16))
        self.browse = QPushButton(self.json_widget)
        self.browse.setObjectName(u"browse")
        self.browse.setGeometry(QRect(560, 70, 61, 22))
        MainWindow.setCentralWidget(self.main_widget)
        self.menubar = QMenuBar(MainWindow)
        self.menubar.setObjectName(u"menubar")
        self.menubar.setGeometry(QRect(0, 0, 1020, 19))
        self.File = QMenu(self.menubar)
        self.File.setObjectName(u"File")
        self.menuOpen = QMenu(self.File)
        self.menuOpen.setObjectName(u"menuOpen")
        MainWindow.setMenuBar(self.menubar)

        self.menubar.addAction(self.File.menuAction())
        self.File.addAction(self.menuOpen.menuAction())
        self.File.addAction(self.actionSave)
        self.File.addSeparator()
        self.File.addAction(self.actionExit_2)
        self.menuOpen.addAction(self.openini)
        self.menuOpen.addAction(self.openjson)

        self.retranslateUi(MainWindow)

        QMetaObject.connectSlotsByName(MainWindow)

    # setupUi

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(
            QCoreApplication.translate("MainWindow", u"frii-config", None))
        self.actionSave.setText(
            QCoreApplication.translate("MainWindow", u"Save", None))
        self.actionExit.setText(
            QCoreApplication.translate("MainWindow", u"Exit", None))
        self.actionExit_2.setText(
            QCoreApplication.translate("MainWindow", u"Exit", None))
        self.openini.setText(
            QCoreApplication.translate("MainWindow",
                                       u"Main config (frii_update.ini)", None))
        self.openjson.setText(
            QCoreApplication.translate("MainWindow",
                                       u"Repository information (info.json)",
                                       None))
        self.inilabel.setText(
            QCoreApplication.translate("MainWindow",
                                       u"Configuration (frii_update.ini)",
                                       None))
        self.iniapply.setText(
            QCoreApplication.translate("MainWindow", u"Save", None))
        self.inidel.setText(
            QCoreApplication.translate("MainWindow", u"Delete", None))
        self.iniadd.setText(
            QCoreApplication.translate("MainWindow", u"Insert", None))
        self.checkBox.setText(
            QCoreApplication.translate("MainWindow", u"Clone repository",
                                       None))
        self.delentry.setText(
            QCoreApplication.translate("MainWindow", u"Delete", None))
        self.remote.setText(
            QCoreApplication.translate("MainWindow",
                                       u"Enter repository URL here", None))
        self.addButton.setText(
            QCoreApplication.translate("MainWindow", u"Next", None))
        self.path.setText(
            QCoreApplication.translate("MainWindow",
                                       u"Enter repository path here", None))
        self.apply.setText(
            QCoreApplication.translate("MainWindow", u"Save", None))
        self.label.setText(
            QCoreApplication.translate("MainWindow",
                                       u"Saved Information (info.json)", None))
        self.browse.setText(
            QCoreApplication.translate("MainWindow", u"Browse", None))
        self.File.setTitle(
            QCoreApplication.translate("MainWindow", u"File", None))
        self.menuOpen.setTitle(
            QCoreApplication.translate("MainWindow", u"Open", None))
Esempio n. 3
0
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        if not MainWindow.objectName():
            MainWindow.setObjectName(u"MainWindow")
        MainWindow.resize(514, 693)
        self.centralwidget = QWidget(MainWindow)
        self.centralwidget.setObjectName(u"centralwidget")
        self.gridLayout = QGridLayout(self.centralwidget)
        self.gridLayout.setObjectName(u"gridLayout")
        self.pushButton = QPushButton(self.centralwidget)
        self.pushButton.setObjectName(u"pushButton")
        self.pushButton.setCursor(QCursor(Qt.PointingHandCursor))

        self.gridLayout.addWidget(self.pushButton, 0, 1, 1, 1)

        self.tabWidget = QTabWidget(self.centralwidget)
        self.tabWidget.setObjectName(u"tabWidget")
        self.tabWidget.setStyleSheet(u"")
        self.tab = QWidget()
        self.tab.setObjectName(u"tab")
        self.gridLayout_2 = QGridLayout(self.tab)
        self.gridLayout_2.setObjectName(u"gridLayout_2")
        self.tableWidget = QTableWidget(self.tab)
        if (self.tableWidget.columnCount() < 3):
            self.tableWidget.setColumnCount(3)
        __qtablewidgetitem = QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(0, __qtablewidgetitem)
        __qtablewidgetitem1 = QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(1, __qtablewidgetitem1)
        __qtablewidgetitem2 = QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(2, __qtablewidgetitem2)
        self.tableWidget.setObjectName(u"tableWidget")
        self.tableWidget.setStyleSheet(u"")
        self.tableWidget.horizontalHeader().setCascadingSectionResizes(False)
        self.tableWidget.verticalHeader().setVisible(False)

        self.gridLayout_2.addWidget(self.tableWidget, 0, 0, 1, 1)

        self.tabWidget.addTab(self.tab, "")
        self.tab_2 = QWidget()
        self.tab_2.setObjectName(u"tab_2")
        self.gridLayout_3 = QGridLayout(self.tab_2)
        self.gridLayout_3.setObjectName(u"gridLayout_3")
        self.tableWidget_2 = QTableWidget(self.tab_2)
        self.tableWidget_2.setObjectName(u"tableWidget_2")

        self.gridLayout_3.addWidget(self.tableWidget_2, 0, 0, 1, 1)

        self.tabWidget.addTab(self.tab_2, "")

        self.gridLayout.addWidget(self.tabWidget, 1, 0, 1, 2)

        self.lineEdit = QLineEdit(self.centralwidget)
        self.lineEdit.setObjectName(u"lineEdit")
        self.lineEdit.setReadOnly(True)

        self.gridLayout.addWidget(self.lineEdit, 0, 0, 1, 1)

        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QMenuBar(MainWindow)
        self.menubar.setObjectName(u"menubar")
        self.menubar.setGeometry(QRect(0, 0, 514, 22))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QStatusBar(MainWindow)
        self.statusbar.setObjectName(u"statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)

        self.tabWidget.setCurrentIndex(0)

        QMetaObject.connectSlotsByName(MainWindow)

    # setupUi

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(
            QCoreApplication.translate("MainWindow", u"HyperV_controller",
                                       None))
        self.pushButton.setText(
            QCoreApplication.translate("MainWindow", u"\u5237\u65b0", None))
        ___qtablewidgetitem = self.tableWidget.horizontalHeaderItem(0)
        ___qtablewidgetitem.setText(
            QCoreApplication.translate("MainWindow", u"\u540d\u79f0", None))
        ___qtablewidgetitem1 = self.tableWidget.horizontalHeaderItem(1)
        ___qtablewidgetitem1.setText(
            QCoreApplication.translate("MainWindow", u"\u72b6\u6001", None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.tab),
            QCoreApplication.translate("MainWindow", u"\u865a\u62df\u673a",
                                       None))
        self.tabWidget.setTabText(
            self.tabWidget.indexOf(self.tab_2),
            QCoreApplication.translate("MainWindow", u"\u529f\u80fd", None))
Esempio n. 4
0
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        if not MainWindow.objectName():
            MainWindow.setObjectName(u"MainWindow")
        MainWindow.resize(911, 607)
        self.action_open = QAction(MainWindow)
        self.action_open.setObjectName(u"action_open")
        self.action_open.setVisible(False)
        self.action_comparison = QAction(MainWindow)
        self.action_comparison.setObjectName(u"action_comparison")
        self.action_comparison.setVisible(False)
        self.action_plot = QAction(MainWindow)
        self.action_plot.setObjectName(u"action_plot")
        self.action_training_session = QAction(MainWindow)
        self.action_training_session.setObjectName(u"action_training_session")
        self.action_training_session.setVisible(False)
        self.action_game = QAction(MainWindow)
        self.action_game.setObjectName(u"action_game")
        self.action_save = QAction(MainWindow)
        self.action_save.setObjectName(u"action_save")
        self.action_save.setVisible(False)
        self.action_save_log = QAction(MainWindow)
        self.action_save_log.setObjectName(u"action_save_log")
        self.action_save_log.setVisible(False)
        self.action_coordinates = QAction(MainWindow)
        self.action_coordinates.setObjectName(u"action_coordinates")
        self.action_coordinates.setCheckable(True)
        self.action_about = QAction(MainWindow)
        self.action_about.setObjectName(u"action_about")
        self.action_new_db = QAction(MainWindow)
        self.action_new_db.setObjectName(u"action_new_db")
        self.action_open_db = QAction(MainWindow)
        self.action_open_db.setObjectName(u"action_open_db")
        self.centralwidget = QWidget(MainWindow)
        self.centralwidget.setObjectName(u"centralwidget")
        self.verticalLayout_2 = QVBoxLayout(self.centralwidget)
        self.verticalLayout_2.setObjectName(u"verticalLayout_2")
        self.stacked_widget = QStackedWidget(self.centralwidget)
        self.stacked_widget.setObjectName(u"stacked_widget")
        self.game_page = QWidget()
        self.game_page.setObjectName(u"game_page")
        self.gridLayout_3 = QGridLayout(self.game_page)
        self.gridLayout_3.setObjectName(u"gridLayout_3")
        self.connect4 = QPushButton(self.game_page)
        self.connect4.setObjectName(u"connect4")
        sizePolicy = QSizePolicy(QSizePolicy.Minimum,
                                 QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.connect4.sizePolicy().hasHeightForWidth())
        self.connect4.setSizePolicy(sizePolicy)

        self.gridLayout_3.addWidget(self.connect4, 0, 1, 1, 1)

        self.tic_tac_toe = QPushButton(self.game_page)
        self.tic_tac_toe.setObjectName(u"tic_tac_toe")
        sizePolicy1 = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
        sizePolicy1.setHorizontalStretch(0)
        sizePolicy1.setVerticalStretch(0)
        sizePolicy1.setHeightForWidth(
            self.tic_tac_toe.sizePolicy().hasHeightForWidth())
        self.tic_tac_toe.setSizePolicy(sizePolicy1)

        self.gridLayout_3.addWidget(self.tic_tac_toe, 0, 0, 1, 1)

        self.othello = QPushButton(self.game_page)
        self.othello.setObjectName(u"othello")
        sizePolicy.setHeightForWidth(
            self.othello.sizePolicy().hasHeightForWidth())
        self.othello.setSizePolicy(sizePolicy)

        self.gridLayout_3.addWidget(self.othello, 1, 0, 1, 1)

        self.stacked_widget.addWidget(self.game_page)
        self.players_page = QWidget()
        self.players_page.setObjectName(u"players_page")
        self.verticalLayout = QVBoxLayout(self.players_page)
        self.verticalLayout.setObjectName(u"verticalLayout")
        self.player_layout = QGridLayout()
        self.player_layout.setObjectName(u"player_layout")
        self.searches_lock2 = QCheckBox(self.players_page)
        self.searches_lock2.setObjectName(u"searches_lock2")

        self.player_layout.addWidget(self.searches_lock2, 2, 4, 1, 1)

        self.player1 = QComboBox(self.players_page)
        self.player1.setObjectName(u"player1")
        sizePolicy2 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
        sizePolicy2.setHorizontalStretch(0)
        sizePolicy2.setVerticalStretch(0)
        sizePolicy2.setHeightForWidth(
            self.player1.sizePolicy().hasHeightForWidth())
        self.player1.setSizePolicy(sizePolicy2)

        self.player_layout.addWidget(self.player1, 1, 1, 1, 1)

        self.cancel = QPushButton(self.players_page)
        self.cancel.setObjectName(u"cancel")

        self.player_layout.addWidget(self.cancel, 4, 0, 1, 1)

        self.searches_label1 = QLabel(self.players_page)
        self.searches_label1.setObjectName(u"searches_label1")
        sizePolicy3 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Preferred)
        sizePolicy3.setHorizontalStretch(0)
        sizePolicy3.setVerticalStretch(0)
        sizePolicy3.setHeightForWidth(
            self.searches_label1.sizePolicy().hasHeightForWidth())
        self.searches_label1.setSizePolicy(sizePolicy3)

        self.player_layout.addWidget(self.searches_label1, 1, 3, 1, 1)

        self.player2 = QComboBox(self.players_page)
        self.player2.setObjectName(u"player2")
        sizePolicy2.setHeightForWidth(
            self.player2.sizePolicy().hasHeightForWidth())
        self.player2.setSizePolicy(sizePolicy2)

        self.player_layout.addWidget(self.player2, 2, 1, 1, 1)

        self.searches_lock1 = QCheckBox(self.players_page)
        self.searches_lock1.setObjectName(u"searches_lock1")

        self.player_layout.addWidget(self.searches_lock1, 1, 4, 1, 1)

        self.game_label = QLabel(self.players_page)
        self.game_label.setObjectName(u"game_label")
        sizePolicy4 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy4.setHorizontalStretch(0)
        sizePolicy4.setVerticalStretch(0)
        sizePolicy4.setHeightForWidth(
            self.game_label.sizePolicy().hasHeightForWidth())
        self.game_label.setSizePolicy(sizePolicy4)

        self.player_layout.addWidget(self.game_label, 0, 0, 1, 1)

        self.game_name = QLabel(self.players_page)
        self.game_name.setObjectName(u"game_name")

        self.player_layout.addWidget(self.game_name, 0, 1, 1, 4)

        self.searches_label2 = QLabel(self.players_page)
        self.searches_label2.setObjectName(u"searches_label2")

        self.player_layout.addWidget(self.searches_label2, 2, 3, 1, 1)

        self.player_label1 = QLabel(self.players_page)
        self.player_label1.setObjectName(u"player_label1")
        sizePolicy4.setHeightForWidth(
            self.player_label1.sizePolicy().hasHeightForWidth())
        self.player_label1.setSizePolicy(sizePolicy4)

        self.player_layout.addWidget(self.player_label1, 1, 0, 1, 1)

        self.searches1 = QSpinBox(self.players_page)
        self.searches1.setObjectName(u"searches1")
        sizePolicy5 = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Fixed)
        sizePolicy5.setHorizontalStretch(0)
        sizePolicy5.setVerticalStretch(0)
        sizePolicy5.setHeightForWidth(
            self.searches1.sizePolicy().hasHeightForWidth())
        self.searches1.setSizePolicy(sizePolicy5)
        self.searches1.setMaximum(1000000)

        self.player_layout.addWidget(self.searches1, 1, 2, 1, 1)

        self.player_label2 = QLabel(self.players_page)
        self.player_label2.setObjectName(u"player_label2")

        self.player_layout.addWidget(self.player_label2, 2, 0, 1, 1)

        self.shuffle_players = QCheckBox(self.players_page)
        self.shuffle_players.setObjectName(u"shuffle_players")

        self.player_layout.addWidget(self.shuffle_players, 3, 1, 1, 4)

        self.searches2 = QSpinBox(self.players_page)
        self.searches2.setObjectName(u"searches2")
        sizePolicy5.setHeightForWidth(
            self.searches2.sizePolicy().hasHeightForWidth())
        self.searches2.setSizePolicy(sizePolicy5)
        self.searches2.setMaximum(1000000)

        self.player_layout.addWidget(self.searches2, 2, 2, 1, 1)

        self.start = QPushButton(self.players_page)
        self.start.setObjectName(u"start")

        self.player_layout.addWidget(self.start, 4, 1, 1, 4)

        self.player_layout.setColumnStretch(1, 10)
        self.player_layout.setColumnStretch(2, 1)

        self.verticalLayout.addLayout(self.player_layout)

        self.stacked_widget.addWidget(self.players_page)
        self.humans_page = QWidget()
        self.humans_page.setObjectName(u"humans_page")
        self.gridLayout = QGridLayout(self.humans_page)
        self.gridLayout.setObjectName(u"gridLayout")
        self.close_humans = QPushButton(self.humans_page)
        self.close_humans.setObjectName(u"close_humans")
        sizePolicy4.setHeightForWidth(
            self.close_humans.sizePolicy().hasHeightForWidth())
        self.close_humans.setSizePolicy(sizePolicy4)

        self.gridLayout.addWidget(self.close_humans, 1, 1, 1, 1)

        self.players_label = QLabel(self.humans_page)
        self.players_label.setObjectName(u"players_label")

        self.gridLayout.addWidget(self.players_label, 0, 0, 1, 1)

        self.new_human = QPushButton(self.humans_page)
        self.new_human.setObjectName(u"new_human")
        sizePolicy4.setHeightForWidth(
            self.new_human.sizePolicy().hasHeightForWidth())
        self.new_human.setSizePolicy(sizePolicy4)

        self.gridLayout.addWidget(self.new_human, 1, 3, 1, 1)

        self.players_table = QTableWidget(self.humans_page)
        self.players_table.setObjectName(u"players_table")

        self.gridLayout.addWidget(self.players_table, 0, 1, 1, 3)

        self.spacer = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                  QSizePolicy.Minimum)

        self.gridLayout.addItem(self.spacer, 1, 2, 1, 1)

        self.stacked_widget.addWidget(self.humans_page)
        self.rules_page = QWidget()
        self.rules_page.setObjectName(u"rules_page")
        self.gridLayout_4 = QGridLayout(self.rules_page)
        self.gridLayout_4.setObjectName(u"gridLayout_4")
        self.rules_text = QTextBrowser(self.rules_page)
        self.rules_text.setObjectName(u"rules_text")

        self.gridLayout_4.addWidget(self.rules_text, 0, 0, 1, 1)

        self.rules_close = QPushButton(self.rules_page)
        self.rules_close.setObjectName(u"rules_close")
        sizePolicy4.setHeightForWidth(
            self.rules_close.sizePolicy().hasHeightForWidth())
        self.rules_close.setSizePolicy(sizePolicy4)

        self.gridLayout_4.addWidget(self.rules_close, 1, 0, 1, 1)

        self.stacked_widget.addWidget(self.rules_page)
        self.display_page = QWidget()
        self.display_page.setObjectName(u"display_page")
        self.gridLayout_2 = QGridLayout(self.display_page)
        self.gridLayout_2.setObjectName(u"gridLayout_2")
        self.toggle_review = QPushButton(self.display_page)
        self.toggle_review.setObjectName(u"toggle_review")
        sizePolicy4.setHeightForWidth(
            self.toggle_review.sizePolicy().hasHeightForWidth())
        self.toggle_review.setSizePolicy(sizePolicy4)

        self.gridLayout_2.addWidget(self.toggle_review, 3, 2, 1, 1)

        self.move_history = QComboBox(self.display_page)
        self.move_history.setObjectName(u"move_history")
        sizePolicy6 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
        sizePolicy6.setHorizontalStretch(1)
        sizePolicy6.setVerticalStretch(0)
        sizePolicy6.setHeightForWidth(
            self.move_history.sizePolicy().hasHeightForWidth())
        self.move_history.setSizePolicy(sizePolicy6)

        self.gridLayout_2.addWidget(self.move_history, 3, 1, 1, 1)

        self.choices = QTableWidget(self.display_page)
        self.choices.setObjectName(u"choices")
        sizePolicy7 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
        sizePolicy7.setHorizontalStretch(0)
        sizePolicy7.setVerticalStretch(0)
        sizePolicy7.setHeightForWidth(
            self.choices.sizePolicy().hasHeightForWidth())
        self.choices.setSizePolicy(sizePolicy7)

        self.gridLayout_2.addWidget(self.choices, 1, 0, 1, 3)

        self.resume_here = QPushButton(self.display_page)
        self.resume_here.setObjectName(u"resume_here")
        sizePolicy5.setHeightForWidth(
            self.resume_here.sizePolicy().hasHeightForWidth())
        self.resume_here.setSizePolicy(sizePolicy5)

        self.gridLayout_2.addWidget(self.resume_here, 3, 0, 1, 1)

        self.game_display = QLabel(self.display_page)
        self.game_display.setObjectName(u"game_display")

        self.gridLayout_2.addWidget(self.game_display, 0, 0, 1, 3)

        self.stacked_widget.addWidget(self.display_page)
        self.plot_strength_page = QWidget()
        self.plot_strength_page.setObjectName(u"plot_strength_page")
        self.gridLayout_5 = QGridLayout(self.plot_strength_page)
        self.gridLayout_5.setObjectName(u"gridLayout_5")
        self.label = QLabel(self.plot_strength_page)
        self.label.setObjectName(u"label")

        self.gridLayout_5.addWidget(self.label, 0, 0, 1, 1)

        self.plot_game = QComboBox(self.plot_strength_page)
        self.plot_game.setObjectName(u"plot_game")

        self.gridLayout_5.addWidget(self.plot_game, 0, 1, 1, 2)

        self.lineEdit = QLineEdit(self.plot_strength_page)
        self.lineEdit.setObjectName(u"lineEdit")

        self.gridLayout_5.addWidget(self.lineEdit, 2, 1, 1, 2)

        self.label_2 = QLabel(self.plot_strength_page)
        self.label_2.setObjectName(u"label_2")

        self.gridLayout_5.addWidget(self.label_2, 3, 0, 1, 1)

        self.lineEdit_2 = QLineEdit(self.plot_strength_page)
        self.lineEdit_2.setObjectName(u"lineEdit_2")

        self.gridLayout_5.addWidget(self.lineEdit_2, 3, 1, 1, 2)

        self.reset_plot = QPushButton(self.plot_strength_page)
        self.reset_plot.setObjectName(u"reset_plot")

        self.gridLayout_5.addWidget(self.reset_plot, 6, 2, 1, 1)

        self.start_stop_plot = QPushButton(self.plot_strength_page)
        self.start_stop_plot.setObjectName(u"start_stop_plot")

        self.gridLayout_5.addWidget(self.start_stop_plot, 6, 1, 1, 1)

        self.strengths_label = QLabel(self.plot_strength_page)
        self.strengths_label.setObjectName(u"strengths_label")

        self.gridLayout_5.addWidget(self.strengths_label, 2, 0, 1, 1)

        self.label_3 = QLabel(self.plot_strength_page)
        self.label_3.setObjectName(u"label_3")

        self.gridLayout_5.addWidget(self.label_3, 4, 0, 1, 1)

        self.lineEdit_3 = QLineEdit(self.plot_strength_page)
        self.lineEdit_3.setObjectName(u"lineEdit_3")

        self.gridLayout_5.addWidget(self.lineEdit_3, 4, 1, 1, 2)

        self.stacked_widget.addWidget(self.plot_strength_page)
        self.plot_history_page = QWidget()
        self.plot_history_page.setObjectName(u"plot_history_page")
        self.gridLayout_6 = QGridLayout(self.plot_history_page)
        self.gridLayout_6.setObjectName(u"gridLayout_6")
        self.label_4 = QLabel(self.plot_history_page)
        self.label_4.setObjectName(u"label_4")

        self.gridLayout_6.addWidget(self.label_4, 0, 0, 1, 1)

        self.history_game = QComboBox(self.plot_history_page)
        self.history_game.setObjectName(u"history_game")

        self.gridLayout_6.addWidget(self.history_game, 0, 1, 1, 1)

        self.gridLayout_6.setColumnStretch(0, 1)
        self.gridLayout_6.setColumnStretch(1, 8)
        self.stacked_widget.addWidget(self.plot_history_page)

        self.verticalLayout_2.addWidget(self.stacked_widget)

        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QMenuBar(MainWindow)
        self.menubar.setObjectName(u"menubar")
        self.menubar.setGeometry(QRect(0, 0, 911, 22))
        self.menu_file = QMenu(self.menubar)
        self.menu_file.setObjectName(u"menu_file")
        self.menu_new = QMenu(self.menu_file)
        self.menu_new.setObjectName(u"menu_new")
        self.menu_view = QMenu(self.menubar)
        self.menu_view.setObjectName(u"menu_view")
        self.menu_help = QMenu(self.menubar)
        self.menu_help.setObjectName(u"menu_help")
        self.menu_rules = QMenu(self.menu_help)
        self.menu_rules.setObjectName(u"menu_rules")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QStatusBar(MainWindow)
        self.statusbar.setObjectName(u"statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.menubar.addAction(self.menu_file.menuAction())
        self.menubar.addAction(self.menu_view.menuAction())
        self.menubar.addAction(self.menu_help.menuAction())
        self.menu_file.addAction(self.menu_new.menuAction())
        self.menu_file.addAction(self.action_open)
        self.menu_file.addAction(self.action_save)
        self.menu_file.addAction(self.action_save_log)
        self.menu_file.addAction(self.action_new_db)
        self.menu_file.addAction(self.action_open_db)
        self.menu_new.addAction(self.action_game)
        self.menu_new.addAction(self.action_comparison)
        self.menu_new.addAction(self.action_plot)
        self.menu_new.addAction(self.action_training_session)
        self.menu_view.addAction(self.action_coordinates)
        self.menu_help.addAction(self.action_about)
        self.menu_help.addAction(self.menu_rules.menuAction())

        self.retranslateUi(MainWindow)

        self.stacked_widget.setCurrentIndex(2)

        QMetaObject.connectSlotsByName(MainWindow)

    # setupUi

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(
            QCoreApplication.translate("MainWindow", u"MainWindow", None))
        self.action_open.setText(
            QCoreApplication.translate("MainWindow", u"&Open...", None))
        self.action_comparison.setText(
            QCoreApplication.translate("MainWindow", u"&Comparison", None))
        self.action_plot.setText(
            QCoreApplication.translate("MainWindow", u"&Plot", None))
        self.action_training_session.setText(
            QCoreApplication.translate("MainWindow", u"&Training Session",
                                       None))
        self.action_game.setText(
            QCoreApplication.translate("MainWindow", u"&Game", None))
        self.action_save.setText(
            QCoreApplication.translate("MainWindow", u"&Save...", None))
        self.action_save_log.setText(
            QCoreApplication.translate("MainWindow", u"Save &Log...", None))
        self.action_coordinates.setText(
            QCoreApplication.translate("MainWindow", u"Coordinates", None))
        self.action_about.setText(
            QCoreApplication.translate("MainWindow", u"&About...", None))
        self.action_new_db.setText(
            QCoreApplication.translate("MainWindow",
                                       u"New Player &Database...", None))
        self.action_open_db.setText(
            QCoreApplication.translate("MainWindow",
                                       u"&Open Player Database...", None))
        self.connect4.setText(
            QCoreApplication.translate("MainWindow", u"Connect 4", None))
        self.tic_tac_toe.setText(
            QCoreApplication.translate("MainWindow", u"Tic Tac Toe", None))
        self.othello.setText(
            QCoreApplication.translate("MainWindow", u"Othello", None))
        self.searches_lock2.setText(
            QCoreApplication.translate("MainWindow", u"Lock", None))
        self.cancel.setText(
            QCoreApplication.translate("MainWindow", u"Cancel", None))
        self.searches_label1.setText(
            QCoreApplication.translate("MainWindow", u"searches", None))
        self.searches_lock1.setText(
            QCoreApplication.translate("MainWindow", u"Lock", None))
        self.game_label.setText(
            QCoreApplication.translate("MainWindow", u"Game:", None))
        self.game_name.setText(
            QCoreApplication.translate("MainWindow", u"Chosen Game's Name",
                                       None))
        self.searches_label2.setText(
            QCoreApplication.translate("MainWindow", u"searches", None))
        self.player_label1.setText(
            QCoreApplication.translate("MainWindow", u"Player 1:", None))
        self.player_label2.setText(
            QCoreApplication.translate("MainWindow", u"Player 2:", None))
        self.shuffle_players.setText(
            QCoreApplication.translate("MainWindow", u"Shuffle Player Order",
                                       None))
        self.start.setText(
            QCoreApplication.translate("MainWindow", u"Start", None))
        self.close_humans.setText(
            QCoreApplication.translate("MainWindow", u"OK", None))
        self.players_label.setText(
            QCoreApplication.translate("MainWindow", u"Players", None))
        self.new_human.setText(
            QCoreApplication.translate("MainWindow", u"New", None))
        self.rules_close.setText(
            QCoreApplication.translate("MainWindow", u"Close", None))
        self.toggle_review.setText(
            QCoreApplication.translate("MainWindow", u"Review / Resume", None))
        self.resume_here.setText(
            QCoreApplication.translate("MainWindow", u"Resume Here", None))
        self.game_display.setText(
            QCoreApplication.translate("MainWindow", u"Game Display", None))
        self.label.setText(
            QCoreApplication.translate("MainWindow", u"Game:", None))
        #if QT_CONFIG(whatsthis)
        self.lineEdit.setWhatsThis("")
        #endif // QT_CONFIG(whatsthis)
        self.label_2.setText(
            QCoreApplication.translate("MainWindow", u"Opponent min:", None))
        self.reset_plot.setText(
            QCoreApplication.translate("MainWindow", u"Reset", None))
        self.start_stop_plot.setText(
            QCoreApplication.translate("MainWindow", u"Start / Stop", None))
        self.strengths_label.setText(
            QCoreApplication.translate("MainWindow", u"Player Strengths:",
                                       None))
        self.label_3.setText(
            QCoreApplication.translate("MainWindow", u"Opponent max:", None))
        self.label_4.setText(
            QCoreApplication.translate("MainWindow", u"Game:", None))
        self.menu_file.setTitle(
            QCoreApplication.translate("MainWindow", u"&File", None))
        self.menu_new.setTitle(
            QCoreApplication.translate("MainWindow", u"&New", None))
        self.menu_view.setTitle(
            QCoreApplication.translate("MainWindow", u"&View", None))
        self.menu_help.setTitle(
            QCoreApplication.translate("MainWindow", u"&Help", None))
        self.menu_rules.setTitle(
            QCoreApplication.translate("MainWindow", u"&Rules", None))
Esempio n. 5
0
class Ui_Dialog(object):
    def setupUi(self, Dialog):
        if not Dialog.objectName():
            Dialog.setObjectName(u"Dialog")
        Dialog.resize(1136, 733)
        self.formLayout = QFormLayout(Dialog)
        self.formLayout.setObjectName(u"formLayout")
        self.tableWidget = QTableWidget(Dialog)
        if (self.tableWidget.columnCount() < 4):
            self.tableWidget.setColumnCount(4)
        __qtablewidgetitem = QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(0, __qtablewidgetitem)
        __qtablewidgetitem1 = QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(1, __qtablewidgetitem1)
        __qtablewidgetitem2 = QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(2, __qtablewidgetitem2)
        __qtablewidgetitem3 = QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(3, __qtablewidgetitem3)
        self.tableWidget.setObjectName(u"tableWidget")
        self.tableWidget.setMinimumSize(QSize(0, 450))
        self.tableWidget.verticalHeader().setVisible(False)

        self.formLayout.setWidget(1, QFormLayout.SpanningRole, self.tableWidget)

        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.setObjectName(u"horizontalLayout")
        self.textEdit = QTextEdit(Dialog)
        self.textEdit.setObjectName(u"textEdit")
        self.textEdit.setReadOnly(True)

        self.horizontalLayout.addWidget(self.textEdit)

        self.verticalLayout = QVBoxLayout()
        self.verticalLayout.setObjectName(u"verticalLayout")
        self.pushButton = QPushButton(Dialog)
        self.pushButton.setObjectName(u"pushButton")
        sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButton.sizePolicy().hasHeightForWidth())
        self.pushButton.setSizePolicy(sizePolicy)
        self.pushButton.setCursor(QCursor(Qt.PointingHandCursor))

        self.verticalLayout.addWidget(self.pushButton)

        self.pushButton_2 = QPushButton(Dialog)
        self.pushButton_2.setObjectName(u"pushButton_2")
        sizePolicy.setHeightForWidth(self.pushButton_2.sizePolicy().hasHeightForWidth())
        self.pushButton_2.setSizePolicy(sizePolicy)
        self.pushButton_2.setCursor(QCursor(Qt.PointingHandCursor))

        self.verticalLayout.addWidget(self.pushButton_2)


        self.horizontalLayout.addLayout(self.verticalLayout)


        self.formLayout.setLayout(0, QFormLayout.SpanningRole, self.horizontalLayout)

        self.buttonBox = QDialogButtonBox(Dialog)
        self.buttonBox.setObjectName(u"buttonBox")
        self.buttonBox.setOrientation(Qt.Horizontal)
        self.buttonBox.setStandardButtons(QDialogButtonBox.Ok)

        self.formLayout.setWidget(2, QFormLayout.FieldRole, self.buttonBox)


        self.retranslateUi(Dialog)
        self.buttonBox.accepted.connect(Dialog.accept)
        self.buttonBox.rejected.connect(Dialog.reject)

        QMetaObject.connectSlotsByName(Dialog)
    # setupUi

    def retranslateUi(self, Dialog):
        Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"popup_hyperv", None))
        ___qtablewidgetitem = self.tableWidget.horizontalHeaderItem(0)
        ___qtablewidgetitem.setText(QCoreApplication.translate("Dialog", u"\u529f\u80fd", None));
        ___qtablewidgetitem1 = self.tableWidget.horizontalHeaderItem(1)
        ___qtablewidgetitem1.setText(QCoreApplication.translate("Dialog", u"\u8bf4\u660e", None));
        ___qtablewidgetitem2 = self.tableWidget.horizontalHeaderItem(2)
        ___qtablewidgetitem2.setText(QCoreApplication.translate("Dialog", u"\u5f53\u524d\u503c", None));
        ___qtablewidgetitem3 = self.tableWidget.horizontalHeaderItem(3)
        ___qtablewidgetitem3.setText(QCoreApplication.translate("Dialog", u"\u4fee\u6539", None));
        self.pushButton.setText(QCoreApplication.translate("Dialog", u"\u5237\u65b0", None))
        self.pushButton_2.setText(QCoreApplication.translate("Dialog", u"\u4fee\u6539", None))