Exemple #1
0
    def __init__(self, parent=None, label="Renamer", text=""):
        super(GetNameWidget, self).__init__(parent)
        self.result = ""
        self.line = LineEdit(label="Rename", placeholder_text=text)

        layout = QtWidgets.QVBoxLayout()
        layout.addWidget(self.line)

        button_layout = QtWidgets.QHBoxLayout()
        # button_group = QtGui.QButtonGroup()
        layout.addLayout(button_layout)

        # sets the default button at confirm
        button = QtWidgets.QPushButton("Confirm")
        button.setDefault(True)
        button.setFocus()

        # adds the cancel button
        cancel = QtWidgets.QPushButton("Cancel")
        button.clicked.connect(self.rename_call)
        cancel.clicked.connect(self.close_ui)
        button_layout.addWidget(button)
        button_layout.addWidget(cancel)

        self.setWindowTitle(label)
        self.setLayout(layout)
Exemple #2
0
 def build(self):
     """
     builds the widget with stuff.
     :return: <bool> True for success.
     """
     self.widgets['label'] = QtWidgets.QLabel("Intentionally Empty")
     self.widgets['instructions'] = QtWidgets.QVBoxLayout()
     self.widgets['updateButton'] = QtWidgets.QPushButton("Update")
     self.main_layout.addLayout(self.widgets['instructions'])
     self.widgets['instructions'].insertStretch(0)
     self.widgets['instructions'].addWidget(self.widgets['label'])
     self.main_layout.addWidget(self.widgets['updateButton'])
     return True
Exemple #3
0
    def __init__(self, parent=None):
        super(InformationForm, self).__init__(parent)

        # define variables
        self.parent = parent
        self.main_layout = QtWidgets.QVBoxLayout(self)
        self.widgets = {}

        self.build()

        self.resize(40, 100)
        self.setLayout(self.main_layout)
        self.connect_buttons()
Exemple #4
0
    def __init__(self, parent=None):
        super(ModuleForm, self).__init__(parent)
        self.resize(200, 400)
        self.parent = parent

        # set the toggle back at default
        self.build = 0

        self.vertical_layout = QtWidgets.QVBoxLayout(self)
        self.combo_layout = QtWidgets.QHBoxLayout()

        self.creature_combo = QtWidgets.QComboBox(self)
        self.fill_blueprints()

        self.creature_label = QtWidgets.QLabel("Select Blueprint: ")
        self.combo_layout.addWidget(self.creature_label)
        self.combo_layout.addWidget(self.creature_combo)
        self.vertical_layout.addLayout(self.combo_layout)

        self.list = self.add_module_list()
        slider_layout = self.add_build_slider()

        # connect buttons
        # self.button.clicked.connect(self.finish_all_call)

        self.vertical_layout.addLayout(slider_layout)
        self.vertical_layout.addWidget(self.list)
        self.setLayout(self.vertical_layout)

        self.setMinimumWidth(self.parent.WIDTH / 2)

        # connect the widget
        self.list.itemClicked.connect(parent.select_item)

        # connect the combo changer
        self.creature_combo.currentIndexChanged.connect(
            self.creature_selected_call)
Exemple #5
0
    def __init__(self, parent=None, list_items=()):
        super(ModulesList, self).__init__(parent)
        self.selected_item = None

        self.list_items = list_items

        vertical_layout = QtWidgets.QVBoxLayout()
        self.list_widget = QtWidgets.QListWidget()
        vertical_layout.addWidget(self.list_widget)

        horizontal_layout = QtWidgets.QHBoxLayout()
        self.ok_button = QtWidgets.QPushButton("Ok")
        self.cancel_button = QtWidgets.QPushButton("Cancel")
        horizontal_layout.addWidget(self.ok_button)
        horizontal_layout.addWidget(self.cancel_button)

        vertical_layout.addLayout(horizontal_layout)

        self.list_widget.addItems(self.list_items)

        self.create_connections()

        self.setLayout(vertical_layout)
        self.setWindowTitle("Modules List")
Exemple #6
0
    def __init__(self, parent=None):
        super(ModuleDialog, self).__init__(parent)

        # class variables
        self.vertical_layout = QtWidgets.QVBoxLayout(self)
        self.vertical_layout.addStretch(1)