Beispiel #1
0
    def __init__(self, dialog, parent=None):
        PropertyPage.__init__(self, PAGE_VECTOR, dialog, parent)
        Ui_VectorPropertiesWidget.setupUi(self, self)

        self.layer = None

        # initialize vector style widgets
        self.heightWidget = StyleWidget(StyleWidget.HEIGHT)
        self.heightWidget.setObjectName("heightWidget")
        self.verticalLayout_zCoordinate.addWidget(self.heightWidget)

        self.labelHeightWidget = StyleWidget(StyleWidget.LABEL_HEIGHT)
        self.labelHeightWidget.setObjectName("labelHeightWidget")
        self.labelHeightWidget.setEnabled(False)
        self.verticalLayout_Label.addWidget(self.labelHeightWidget)

        self.styleWidgetCount = 0
        self.styleWidgets = []
        for i in range(self.STYLE_MAX_COUNT):
            objName = "styleWidget" + str(i)

            widget = StyleWidget()
            widget.setVisible(False)
            widget.setObjectName(objName)
            self.styleWidgets.append(widget)
            self.verticalLayout_Styles.addWidget(widget)

            # assign the widget to property page attribute
            setattr(self, objName, widget)

        widgets = [self.comboBox_ObjectType, self.heightWidget
                   ] + self.styleWidgets
        widgets += [
            self.radioButton_AllFeatures,
            self.radioButton_IntersectingFeatures, self.checkBox_Clip
        ]
        widgets += [
            self.checkBox_ExportAttrs, self.comboBox_Label,
            self.labelHeightWidget
        ]
        self.registerPropertyWidgets(widgets)

        self.comboBox_ObjectType.currentIndexChanged.connect(
            self.setupStyleWidgets)
        self.heightWidget.comboBox.currentIndexChanged.connect(
            self.altitudeModeChanged)
        self.checkBox_ExportAttrs.toggled.connect(self.exportAttrsToggled)
Beispiel #2
0
def main():
    import sys

    app = QApplication(sys.argv)

    app.setApplicationName("style")
    app.setOrganizationName("QtProject")
    app.setOrganizationDomain("www.qt-project.org")

    widget = StyleWidget()
    widget.showFullScreen()

    sys.exit(app.exec_())
Beispiel #3
0
from PyQt5 import QtWidgets

from stylewidget import StyleWidget

if __name__ == "__main__":
    import sys

    app = QtWidgets.QApplication(sys.argv)
    w = StyleWidget()
    w.show()
    sys.exit(app.exec_())