Esempio n. 1
0
 def createWidget(self, parent):
     return ColorButton(parent)
Esempio n. 2
0
    def setupUi(self, NewTilesetDialog):
        NewTilesetDialog.setObjectName("NewTilesetDialog")
        NewTilesetDialog.resize(387, 314)
        self.verticalLayout = QtWidgets.QVBoxLayout(NewTilesetDialog)
        self.verticalLayout.setSizeConstraint(
            QtWidgets.QLayout.SetMinAndMaxSize)
        self.verticalLayout.setObjectName("verticalLayout")
        self.tilesetGroupBox = QtWidgets.QGroupBox(NewTilesetDialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.tilesetGroupBox.sizePolicy().hasHeightForWidth())
        self.tilesetGroupBox.setSizePolicy(sizePolicy)
        self.tilesetGroupBox.setObjectName("tilesetGroupBox")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.tilesetGroupBox)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.tilesetType = QtWidgets.QComboBox(self.tilesetGroupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.tilesetType.sizePolicy().hasHeightForWidth())
        self.tilesetType.setSizePolicy(sizePolicy)
        self.tilesetType.setObjectName("tilesetType")
        self.tilesetType.addItem("")
        self.tilesetType.addItem("")
        self.gridLayout_2.addWidget(self.tilesetType, 1, 1, 1, 1)
        self.typeLabel = QtWidgets.QLabel(self.tilesetGroupBox)
        self.typeLabel.setObjectName("typeLabel")
        self.gridLayout_2.addWidget(self.typeLabel, 1, 0, 1, 1)
        self.nameLabel = QtWidgets.QLabel(self.tilesetGroupBox)
        self.nameLabel.setObjectName("nameLabel")
        self.gridLayout_2.addWidget(self.nameLabel, 0, 0, 1, 1)
        self.name = QtWidgets.QLineEdit(self.tilesetGroupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.name.sizePolicy().hasHeightForWidth())
        self.name.setSizePolicy(sizePolicy)
        self.name.setObjectName("name")
        self.gridLayout_2.addWidget(self.name, 0, 1, 1, 1)
        self.verticalLayout.addWidget(self.tilesetGroupBox)
        self.imageGroupBox = QtWidgets.QGroupBox(NewTilesetDialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.imageGroupBox.sizePolicy().hasHeightForWidth())
        self.imageGroupBox.setSizePolicy(sizePolicy)
        self.imageGroupBox.setCheckable(False)
        self.imageGroupBox.setObjectName("imageGroupBox")
        self.gridLayout = QtWidgets.QGridLayout(self.imageGroupBox)
        self.gridLayout.setObjectName("gridLayout")
        self.sourceLabel = QtWidgets.QLabel(self.imageGroupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.sourceLabel.sizePolicy().hasHeightForWidth())
        self.sourceLabel.setSizePolicy(sizePolicy)
        self.sourceLabel.setObjectName("sourceLabel")
        self.gridLayout.addWidget(self.sourceLabel, 0, 0, 1, 1)
        self.browseButton = QtWidgets.QPushButton(self.imageGroupBox)
        self.browseButton.setObjectName("browseButton")
        self.gridLayout.addWidget(self.browseButton, 0, 4, 1, 1)
        self.useTransparentColor = QtWidgets.QCheckBox(self.imageGroupBox)
        self.useTransparentColor.setObjectName("useTransparentColor")
        self.gridLayout.addWidget(self.useTransparentColor, 1, 0, 1, 2)
        self.colorButton = ColorButton(self.imageGroupBox)
        self.colorButton.setEnabled(False)
        self.colorButton.setObjectName("colorButton")
        self.gridLayout.addWidget(self.colorButton, 1, 2, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(0, 13,
                                           QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem, 1, 3, 1, 1)
        self.gridLayout_3 = QtWidgets.QGridLayout()
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.tileHeight = QtWidgets.QSpinBox(self.imageGroupBox)
        self.tileHeight.setMinimum(1)
        self.tileHeight.setMaximum(9999)
        self.tileHeight.setProperty("value", 32)
        self.tileHeight.setObjectName("tileHeight")
        self.gridLayout_3.addWidget(self.tileHeight, 1, 1, 1, 1)
        self.tileHeightLabel = QtWidgets.QLabel(self.imageGroupBox)
        self.tileHeightLabel.setObjectName("tileHeightLabel")
        self.gridLayout_3.addWidget(self.tileHeightLabel, 1, 0, 1, 1)
        spacerItem1 = QtWidgets.QSpacerItem(20, 20,
                                            QtWidgets.QSizePolicy.Preferred,
                                            QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_3.addItem(spacerItem1, 1, 2, 1, 1)
        self.tileWidth = QtWidgets.QSpinBox(self.imageGroupBox)
        self.tileWidth.setEnabled(True)
        self.tileWidth.setMinimum(1)
        self.tileWidth.setMaximum(9999)
        self.tileWidth.setProperty("value", 32)
        self.tileWidth.setObjectName("tileWidth")
        self.gridLayout_3.addWidget(self.tileWidth, 0, 1, 1, 1)
        self.marginLabel = QtWidgets.QLabel(self.imageGroupBox)
        self.marginLabel.setObjectName("marginLabel")
        self.gridLayout_3.addWidget(self.marginLabel, 0, 3, 1, 1)
        self.margin = QtWidgets.QSpinBox(self.imageGroupBox)
        self.margin.setMinimum(0)
        self.margin.setMaximum(9999)
        self.margin.setProperty("value", 0)
        self.margin.setObjectName("margin")
        self.gridLayout_3.addWidget(self.margin, 0, 4, 1, 1)
        self.spacing = QtWidgets.QSpinBox(self.imageGroupBox)
        self.spacing.setMinimum(0)
        self.spacing.setMaximum(9999)
        self.spacing.setProperty("value", 0)
        self.spacing.setObjectName("spacing")
        self.gridLayout_3.addWidget(self.spacing, 1, 4, 1, 1)
        self.tileWidthLabel = QtWidgets.QLabel(self.imageGroupBox)
        self.tileWidthLabel.setObjectName("tileWidthLabel")
        self.gridLayout_3.addWidget(self.tileWidthLabel, 0, 0, 1, 1)
        self.spacingLabel = QtWidgets.QLabel(self.imageGroupBox)
        self.spacingLabel.setObjectName("spacingLabel")
        self.gridLayout_3.addWidget(self.spacingLabel, 1, 3, 1, 1)
        spacerItem2 = QtWidgets.QSpacerItem(0, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_3.addItem(spacerItem2, 1, 5, 1, 1)
        self.gridLayout.addLayout(self.gridLayout_3, 2, 0, 1, 5)
        self.image = QtWidgets.QLineEdit(self.imageGroupBox)
        self.image.setObjectName("image")
        self.gridLayout.addWidget(self.image, 0, 1, 1, 3)
        self.verticalLayout.addWidget(self.imageGroupBox)
        self.buttonBox = QtWidgets.QDialogButtonBox(NewTilesetDialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                          | QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)
        self.nameLabel.setBuddy(self.name)

        self.retranslateUi(NewTilesetDialog)
        self.buttonBox.accepted.connect(NewTilesetDialog.tryAccept)
        self.buttonBox.rejected.connect(NewTilesetDialog.reject)
        self.useTransparentColor.toggled['bool'].connect(
            self.colorButton.setEnabled)
        QtCore.QMetaObject.connectSlotsByName(NewTilesetDialog)
        NewTilesetDialog.setTabOrder(self.name, self.tilesetType)
        NewTilesetDialog.setTabOrder(self.tilesetType, self.image)
        NewTilesetDialog.setTabOrder(self.image, self.browseButton)
        NewTilesetDialog.setTabOrder(self.browseButton,
                                     self.useTransparentColor)
        NewTilesetDialog.setTabOrder(self.useTransparentColor,
                                     self.colorButton)
        NewTilesetDialog.setTabOrder(self.colorButton, self.tileWidth)
        NewTilesetDialog.setTabOrder(self.tileWidth, self.tileHeight)
        NewTilesetDialog.setTabOrder(self.tileHeight, self.margin)
        NewTilesetDialog.setTabOrder(self.margin, self.spacing)
        NewTilesetDialog.setTabOrder(self.spacing, self.buttonBox)
Esempio n. 3
0
    def __init__(self):
        super().__init__()

        palette = ColorButton()
        palette.colorChanged.connect(self.show_selected_color)
        self.setCentralWidget(palette)
Esempio n. 4
0
    def setupUi(self, Plot_Options_Dialog):
        Plot_Options_Dialog.setObjectName("Plot_Options_Dialog")
        Plot_Options_Dialog.setWindowModality(QtCore.Qt.WindowModal)
        Plot_Options_Dialog.resize(570, 358)
        Plot_Options_Dialog.setFocusPolicy(QtCore.Qt.TabFocus)
        self.vboxlayout = QtGui.QVBoxLayout(Plot_Options_Dialog)
        self.vboxlayout.setObjectName("vboxlayout")
        self.tabWidget = QtGui.QTabWidget(Plot_Options_Dialog)
        self.tabWidget.setMinimumSize(QtCore.QSize(0, 30))
        self.tabWidget.setObjectName("tabWidget")
        self.gen_options_tab = QtGui.QWidget()
        self.gen_options_tab.setObjectName("gen_options_tab")
        self.layoutWidget = QtGui.QWidget(self.gen_options_tab)
        self.layoutWidget.setGeometry(QtCore.QRect(33, 50, 295, 124))
        self.layoutWidget.setObjectName("layoutWidget")
        self.gridlayout = QtGui.QGridLayout(self.layoutWidget)
        self.gridlayout.setObjectName("gridlayout")
        self.label_3 = QtGui.QLabel(self.layoutWidget)
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setWeight(75)
        font.setBold(True)
        self.label_3.setFont(font)
        self.label_3.setAlignment(QtCore.Qt.AlignCenter)
        self.label_3.setObjectName("label_3")
        self.gridlayout.addWidget(self.label_3, 0, 1, 1, 1)
        self.label_4 = QtGui.QLabel(self.layoutWidget)
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setWeight(75)
        font.setBold(True)
        self.label_4.setFont(font)
        self.label_4.setAlignment(QtCore.Qt.AlignCenter)
        self.label_4.setObjectName("label_4")
        self.gridlayout.addWidget(self.label_4, 0, 2, 1, 1)
        self.min_label = QtGui.QLabel(self.layoutWidget)
        self.min_label.setAlignment(QtCore.Qt.AlignRight
                                    | QtCore.Qt.AlignTrailing
                                    | QtCore.Qt.AlignVCenter)
        self.min_label.setObjectName("min_label")
        self.gridlayout.addWidget(self.min_label, 1, 0, 1, 1)
        self.xmin_lineEdit = QtGui.QLineEdit(self.layoutWidget)
        self.xmin_lineEdit.setObjectName("xmin_lineEdit")
        self.gridlayout.addWidget(self.xmin_lineEdit, 1, 1, 1, 1)
        self.ymin_lineEdit = QtGui.QLineEdit(self.layoutWidget)
        self.ymin_lineEdit.setObjectName("ymin_lineEdit")
        self.gridlayout.addWidget(self.ymin_lineEdit, 1, 2, 1, 1)
        self.max_label = QtGui.QLabel(self.layoutWidget)
        self.max_label.setAlignment(QtCore.Qt.AlignRight
                                    | QtCore.Qt.AlignTrailing
                                    | QtCore.Qt.AlignVCenter)
        self.max_label.setObjectName("max_label")
        self.gridlayout.addWidget(self.max_label, 2, 0, 1, 1)
        self.xmax_lineEdit = QtGui.QLineEdit(self.layoutWidget)
        self.xmax_lineEdit.setObjectName("xmax_lineEdit")
        self.gridlayout.addWidget(self.xmax_lineEdit, 2, 1, 1, 1)
        self.ymax_lineEdit = QtGui.QLineEdit(self.layoutWidget)
        self.ymax_lineEdit.setObjectName("ymax_lineEdit")
        self.gridlayout.addWidget(self.ymax_lineEdit, 2, 2, 1, 1)
        self.axis_text_label = QtGui.QLabel(self.layoutWidget)
        self.axis_text_label.setAlignment(QtCore.Qt.AlignRight
                                          | QtCore.Qt.AlignTrailing
                                          | QtCore.Qt.AlignVCenter)
        self.axis_text_label.setObjectName("axis_text_label")
        self.gridlayout.addWidget(self.axis_text_label, 3, 0, 1, 1)
        self.xlabel_lineEdit = QtGui.QLineEdit(self.layoutWidget)
        self.xlabel_lineEdit.setObjectName("xlabel_lineEdit")
        self.gridlayout.addWidget(self.xlabel_lineEdit, 3, 1, 1, 1)
        self.ylabel_lineEdit = QtGui.QLineEdit(self.layoutWidget)
        self.ylabel_lineEdit.setObjectName("ylabel_lineEdit")
        self.gridlayout.addWidget(self.ylabel_lineEdit, 3, 2, 1, 1)
        self.logy_cb = QtGui.QCheckBox(self.gen_options_tab)
        self.logy_cb.setGeometry(QtCore.QRect(43, 220, 83, 23))
        self.logy_cb.setObjectName("logy_cb")
        self.plot_title_label = QtGui.QLabel(self.gen_options_tab)
        self.plot_title_label.setGeometry(QtCore.QRect(33, 10, 61, 27))
        self.plot_title_label.setAlignment(QtCore.Qt.AlignRight
                                           | QtCore.Qt.AlignTrailing
                                           | QtCore.Qt.AlignVCenter)
        self.plot_title_label.setObjectName("plot_title_label")
        self.logx_cb = QtGui.QCheckBox(self.gen_options_tab)
        self.logx_cb.setGeometry(QtCore.QRect(43, 190, 83, 23))
        self.logx_cb.setObjectName("logx_cb")
        self.plottitle_lineEdit = QtGui.QLineEdit(self.gen_options_tab)
        self.plottitle_lineEdit.setGeometry(QtCore.QRect(100, 10, 291, 27))
        self.plottitle_lineEdit.setObjectName("plottitle_lineEdit")
        self.toggleGrid_btn = QtGui.QPushButton(self.gen_options_tab)
        self.toggleGrid_btn.setGeometry(QtCore.QRect(150, 190, 75, 23))
        self.toggleGrid_btn.setObjectName("toggleGrid_btn")
        self.tabWidget.addTab(self.gen_options_tab, "")
        self.trace_options_tab = QtGui.QWidget()
        self.trace_options_tab.setObjectName("trace_options_tab")
        self.gridlayout1 = QtGui.QGridLayout(self.trace_options_tab)
        self.gridlayout1.setObjectName("gridlayout1")
        self.gridlayout2 = QtGui.QGridLayout()
        self.gridlayout2.setObjectName("gridlayout2")
        self.label_11 = QtGui.QLabel(self.trace_options_tab)
        self.label_11.setObjectName("label_11")
        self.gridlayout2.addWidget(self.label_11, 0, 0, 1, 1)
        self.activePlotListWidget = QtGui.QListWidget(self.trace_options_tab)
        self.activePlotListWidget.setObjectName("activePlotListWidget")
        self.gridlayout2.addWidget(self.activePlotListWidget, 1, 0, 1, 1)
        self.gridlayout1.addLayout(self.gridlayout2, 0, 0, 4, 1)
        self.label = QtGui.QLabel(self.trace_options_tab)
        self.label.setObjectName("label")
        self.gridlayout1.addWidget(self.label, 0, 1, 1, 1)
        self.lstyle_comboBox = QtGui.QComboBox(self.trace_options_tab)
        self.lstyle_comboBox.setObjectName("lstyle_comboBox")
        self.gridlayout1.addWidget(self.lstyle_comboBox, 0, 2, 1, 1)
        self.label_8 = QtGui.QLabel(self.trace_options_tab)
        self.label_8.setObjectName("label_8")
        self.gridlayout1.addWidget(self.label_8, 1, 1, 1, 1)
        self.label_5 = QtGui.QLabel(self.trace_options_tab)
        self.label_5.setObjectName("label_5")
        self.gridlayout1.addWidget(self.label_5, 2, 1, 1, 1)
        self.mstyle_comboBox = QtGui.QComboBox(self.trace_options_tab)
        self.mstyle_comboBox.setObjectName("mstyle_comboBox")
        self.gridlayout1.addWidget(self.mstyle_comboBox, 2, 2, 1, 1)
        self.label_2 = QtGui.QLabel(self.trace_options_tab)
        self.label_2.setObjectName("label_2")
        self.gridlayout1.addWidget(self.label_2, 3, 1, 1, 1)
        self.lw_spinBox = QtGui.QDoubleSpinBox(self.trace_options_tab)
        self.lw_spinBox.setMinimum(0.25)
        self.lw_spinBox.setMaximum(50.0)
        self.lw_spinBox.setSingleStep(0.25)
        self.lw_spinBox.setProperty("value", QtCore.QVariant(1.0))
        self.lw_spinBox.setObjectName("lw_spinBox")
        self.gridlayout1.addWidget(self.lw_spinBox, 1, 2, 1, 1)
        self.ms_spinBox = QtGui.QDoubleSpinBox(self.trace_options_tab)
        self.ms_spinBox.setMinimum(0.25)
        self.ms_spinBox.setMaximum(50.0)
        self.ms_spinBox.setSingleStep(0.25)
        self.ms_spinBox.setProperty("value", QtCore.QVariant(1.0))
        self.ms_spinBox.setObjectName("ms_spinBox")
        self.gridlayout1.addWidget(self.ms_spinBox, 3, 2, 1, 1)
        self.lineColorBtn = ColorButton(self.trace_options_tab)
        self.lineColorBtn.setEnabled(True)
        self.lineColorBtn.setToolButtonStyle(
            QtCore.Qt.ToolButtonTextBesideIcon)
        self.lineColorBtn.setObjectName("lineColorBtn")
        self.gridlayout1.addWidget(self.lineColorBtn, 4, 1, 1, 1)
        self.markerColorBtn = ColorButton(self.trace_options_tab)
        self.markerColorBtn.setEnabled(True)
        self.markerColorBtn.setToolButtonStyle(
            QtCore.Qt.ToolButtonTextBesideIcon)
        self.markerColorBtn.setObjectName("markerColorBtn")
        self.gridlayout1.addWidget(self.markerColorBtn, 4, 2, 1, 1)
        self.tabWidget.addTab(self.trace_options_tab, "")
        self.vboxlayout.addWidget(self.tabWidget)
        self.buttonBox = QtGui.QDialogButtonBox(Plot_Options_Dialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel
                                          | QtGui.QDialogButtonBox.NoButton
                                          | QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.vboxlayout.addWidget(self.buttonBox)

        self.retranslateUi(Plot_Options_Dialog)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"),
                               Plot_Options_Dialog.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"),
                               Plot_Options_Dialog.reject)
        QtCore.QMetaObject.connectSlotsByName(Plot_Options_Dialog)
Esempio n. 5
0
    def setupUi(self, PreferencesDialog):
        PreferencesDialog.setObjectName("PreferencesDialog")
        PreferencesDialog.resize(421, 426)
        self.verticalLayout = QtWidgets.QVBoxLayout(PreferencesDialog)
        self.verticalLayout.setSizeConstraint(QtWidgets.QLayout.SetFixedSize)
        self.verticalLayout.setObjectName("verticalLayout")
        self.tabWidget = QtWidgets.QTabWidget(PreferencesDialog)
        self.tabWidget.setObjectName("tabWidget")
        self.tab = QtWidgets.QWidget()
        self.tab.setObjectName("tab")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.tab)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.groupBox = QtWidgets.QGroupBox(self.tab)
        self.groupBox.setObjectName("groupBox")
        self.gridLayout = QtWidgets.QGridLayout(self.groupBox)
        self.gridLayout.setObjectName("gridLayout")
        self.reloadTilesetImages = QtWidgets.QCheckBox(self.groupBox)
        self.reloadTilesetImages.setObjectName("reloadTilesetImages")
        self.gridLayout.addWidget(self.reloadTilesetImages, 1, 0, 1, 2)
        self.enableDtd = QtWidgets.QCheckBox(self.groupBox)
        self.enableDtd.setObjectName("enableDtd")
        self.gridLayout.addWidget(self.enableDtd, 0, 0, 1, 2)
        self.openLastFiles = QtWidgets.QCheckBox(self.groupBox)
        self.openLastFiles.setChecked(True)
        self.openLastFiles.setObjectName("openLastFiles")
        self.gridLayout.addWidget(self.openLastFiles, 2, 0, 1, 1)
        self.verticalLayout_2.addWidget(self.groupBox)
        self.groupBox_2 = QtWidgets.QGroupBox(self.tab)
        self.groupBox_2.setObjectName("groupBox_2")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_2)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.openGL = QtWidgets.QCheckBox(self.groupBox_2)
        self.openGL.setObjectName("openGL")
        self.gridLayout_2.addWidget(self.openGL, 5, 0, 1, 4)
        self.label_2 = QtWidgets.QLabel(self.groupBox_2)
        self.label_2.setObjectName("label_2")
        self.gridLayout_2.addWidget(self.label_2, 0, 0, 1, 1)
        self.label_3 = QtWidgets.QLabel(self.groupBox_2)
        self.label_3.setObjectName("label_3")
        self.gridLayout_2.addWidget(self.label_3, 2, 0, 1, 1)
        self.gridColor = ColorButton(self.groupBox_2)
        self.gridColor.setObjectName("gridColor")
        self.gridLayout_2.addWidget(self.gridColor, 2, 3, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(0, 20,
                                           QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_2.addItem(spacerItem, 0, 4, 1, 1)
        self.languageCombo = QtWidgets.QComboBox(self.groupBox_2)
        self.languageCombo.setObjectName("languageCombo")
        self.gridLayout_2.addWidget(self.languageCombo, 0, 3, 1, 1)
        self.label_4 = QtWidgets.QLabel(self.groupBox_2)
        self.label_4.setObjectName("label_4")
        self.gridLayout_2.addWidget(self.label_4, 3, 0, 1, 1)
        self.gridFine = QtWidgets.QSpinBox(self.groupBox_2)
        self.gridFine.setMinimum(1)
        self.gridFine.setMaximum(128)
        self.gridFine.setObjectName("gridFine")
        self.gridLayout_2.addWidget(self.gridFine, 3, 3, 1, 1)
        self.objectLineWidth = QtWidgets.QDoubleSpinBox(self.groupBox_2)
        self.objectLineWidth.setDecimals(1)
        self.objectLineWidth.setMinimum(1.0)
        self.objectLineWidth.setProperty("value", 2.0)
        self.objectLineWidth.setObjectName("objectLineWidth")
        self.gridLayout_2.addWidget(self.objectLineWidth, 4, 3, 1, 1)
        self.label = QtWidgets.QLabel(self.groupBox_2)
        self.label.setObjectName("label")
        self.gridLayout_2.addWidget(self.label, 4, 0, 1, 1)
        self.verticalLayout_2.addWidget(self.groupBox_2)
        spacerItem1 = QtWidgets.QSpacerItem(381, 1,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem1)
        self.tabWidget.addTab(self.tab, "")
        self.tab_2 = QtWidgets.QWidget()
        self.tab_2.setObjectName("tab_2")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.tab_2)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.groupBox_3 = QtWidgets.QGroupBox(self.tab_2)
        self.groupBox_3.setObjectName("groupBox_3")
        self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.groupBox_3)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.objectTypesTable = QtWidgets.QTableView(self.groupBox_3)
        self.objectTypesTable.setSelectionBehavior(
            QtWidgets.QAbstractItemView.SelectRows)
        self.objectTypesTable.setVerticalScrollMode(
            QtWidgets.QAbstractItemView.ScrollPerPixel)
        self.objectTypesTable.setWordWrap(False)
        self.objectTypesTable.setObjectName("objectTypesTable")
        self.objectTypesTable.horizontalHeader().setHighlightSections(False)
        self.objectTypesTable.verticalHeader().setVisible(False)
        self.objectTypesTable.verticalHeader().setHighlightSections(False)
        self.verticalLayout_4.addWidget(self.objectTypesTable)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.addObjectTypeButton = QtWidgets.QToolButton(self.groupBox_3)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/images/22x22/add.png"),
                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.addObjectTypeButton.setIcon(icon)
        self.addObjectTypeButton.setAutoRaise(True)
        self.addObjectTypeButton.setObjectName("addObjectTypeButton")
        self.horizontalLayout.addWidget(self.addObjectTypeButton)
        self.removeObjectTypeButton = QtWidgets.QToolButton(self.groupBox_3)
        self.removeObjectTypeButton.setEnabled(False)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(":/images/22x22/remove.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.removeObjectTypeButton.setIcon(icon1)
        self.removeObjectTypeButton.setAutoRaise(True)
        self.removeObjectTypeButton.setObjectName("removeObjectTypeButton")
        self.horizontalLayout.addWidget(self.removeObjectTypeButton)
        spacerItem2 = QtWidgets.QSpacerItem(40, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem2)
        self.importObjectTypesButton = QtWidgets.QPushButton(self.groupBox_3)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.importObjectTypesButton.sizePolicy().hasHeightForWidth())
        self.importObjectTypesButton.setSizePolicy(sizePolicy)
        self.importObjectTypesButton.setObjectName("importObjectTypesButton")
        self.horizontalLayout.addWidget(self.importObjectTypesButton)
        self.exportObjectTypesButton = QtWidgets.QPushButton(self.groupBox_3)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.exportObjectTypesButton.sizePolicy().hasHeightForWidth())
        self.exportObjectTypesButton.setSizePolicy(sizePolicy)
        self.exportObjectTypesButton.setObjectName("exportObjectTypesButton")
        self.horizontalLayout.addWidget(self.exportObjectTypesButton)
        self.verticalLayout_4.addLayout(self.horizontalLayout)
        self.verticalLayout_3.addWidget(self.groupBox_3)
        self.tabWidget.addTab(self.tab_2, "")
        self.tab_3 = QtWidgets.QWidget()
        self.tab_3.setObjectName("tab_3")
        self.autoMapWhileDrawing = QtWidgets.QCheckBox(self.tab_3)
        self.autoMapWhileDrawing.setGeometry(QtCore.QRect(10, 20, 391, 22))
        self.autoMapWhileDrawing.setObjectName("autoMapWhileDrawing")
        self.tabWidget.addTab(self.tab_3, "")
        self.verticalLayout.addWidget(self.tabWidget)
        self.buttonBox = QtWidgets.QDialogButtonBox(PreferencesDialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)
        self.label_2.setBuddy(self.languageCombo)
        self.label_3.setBuddy(self.gridColor)
        self.label_4.setBuddy(self.gridFine)
        self.label.setBuddy(self.objectLineWidth)

        self.retranslateUi(PreferencesDialog)
        self.tabWidget.setCurrentIndex(0)
        self.buttonBox.rejected.connect(PreferencesDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(PreferencesDialog)
        PreferencesDialog.setTabOrder(self.tabWidget, self.enableDtd)
        PreferencesDialog.setTabOrder(self.enableDtd, self.reloadTilesetImages)
        PreferencesDialog.setTabOrder(self.reloadTilesetImages,
                                      self.languageCombo)
        PreferencesDialog.setTabOrder(self.languageCombo, self.gridColor)
        PreferencesDialog.setTabOrder(self.gridColor, self.gridFine)
        PreferencesDialog.setTabOrder(self.gridFine, self.objectLineWidth)
        PreferencesDialog.setTabOrder(self.objectLineWidth, self.openGL)
        PreferencesDialog.setTabOrder(self.openGL, self.buttonBox)
        PreferencesDialog.setTabOrder(self.buttonBox,
                                      self.importObjectTypesButton)
        PreferencesDialog.setTabOrder(self.importObjectTypesButton,
                                      self.exportObjectTypesButton)
        PreferencesDialog.setTabOrder(self.exportObjectTypesButton,
                                      self.autoMapWhileDrawing)
        PreferencesDialog.setTabOrder(self.autoMapWhileDrawing,
                                      self.removeObjectTypeButton)
        PreferencesDialog.setTabOrder(self.removeObjectTypeButton,
                                      self.addObjectTypeButton)
        PreferencesDialog.setTabOrder(self.addObjectTypeButton,
                                      self.objectTypesTable)