当前位置: 首页>>代码示例>>Python>>正文


Python QtWidgets.QWidget方法代码示例

本文整理汇总了Python中qgis.PyQt.QtWidgets.QWidget方法的典型用法代码示例。如果您正苦于以下问题:Python QtWidgets.QWidget方法的具体用法?Python QtWidgets.QWidget怎么用?Python QtWidgets.QWidget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在qgis.PyQt.QtWidgets的用法示例。


在下文中一共展示了QtWidgets.QWidget方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from qgis.PyQt import QtWidgets [as 别名]
# 或者: from qgis.PyQt.QtWidgets import QWidget [as 别名]
def __init__(self, parent=None):
        """
        Class constructor.
        :param: (QWidget) widget parent to new DatabaseFileLineEdit instance.
        """
        super(DatabaseFileLineEdit, self).__init__(parent)
        self.setupUi(self)
        self.parent = parent
        self.driver = DsgEnums.NoDriver
        self.abstractDb = None
        self.abstractDbFactory = DbFactory()
        self.serverAbstractDb = None
        self.displayDict = {'2.1.3':'EDGV 2.1.3', '2.1.3 Pro':'EDGV 2.1.3 Pro', 'FTer_2a_Ed':'EDGV FTer 2a Ed', 'Non_EDGV':self.tr('Other database model'), '3.0':'EDGV 3.0'}
        self.instantiateAbstractDb = False
        self.connectionSelectorLineEdit.lineEdit.setText(self.tr('Select datasource'))
        self.connectionSelectorLineEdit.lineEdit.setReadOnly(True) 
开发者ID:dsgoficial,项目名称:DsgTools,代码行数:18,代码来源:databaseFileLineEdit.py

示例2: __init__

# 需要导入模块: from qgis.PyQt import QtWidgets [as 别名]
# 或者: from qgis.PyQt.QtWidgets import QWidget [as 别名]
def __init__(self, parent=None, isStatic=False):
        """
        Class constructor.
        :param parent: (QWidget) widget parent to newly instantiated ConnectionComboBox.
        :param isStatic: (bool) indicates whether server selection will be static (no default).
        """
        super(ConnectionComboBox, self).__init__(parent)
        self.setupUi(self)
        self.parent = parent
        self.abstractDb = None
        self.abstractDbFactory = DbFactory()
        self.serverAbstractDb = None
        self.displayDict = {'2.1.3':'EDGV 2.1.3', '2.1.3 Pro':'EDGV 2.1.3 Pro','FTer_2a_Ed':'EDGV FTer 2a Ed', 'Non_EDGV':self.tr('Other database model'), '3.0':'EDGV 3.0'}
        self.instantiateAbstractDb = False
        self.isStatic = isStatic
        if self.isStatic:
            from DsgTools.gui.ServerTools.viewServers import ViewServersStatic
            self.viewServers = ViewServersStatic()
        else:
            from DsgTools.gui.ServerTools.viewServers import ViewServers
            self.viewServers = ViewServers()
        self.viewServers.defaultChanged.connect(self.loadServerAbstractDb)
        self.connectionSelectorComboBox.addItem(self.tr('Select database'))
        self.loadServerAbstractDb() 
开发者ID:dsgoficial,项目名称:DsgTools,代码行数:26,代码来源:connectionComboBox.py

示例3: __init__

# 需要导入模块: from qgis.PyQt import QtWidgets [as 别名]
# 或者: from qgis.PyQt.QtWidgets import QWidget [as 别名]
def __init__(self, parent=None, isStatic=False):
        """
        Class contructor.
        :param parent: (QWidget) widget parent to newly instantiated NewConnectionLineEdit.
        :param isStatic: (bool) indicates whether server selection will be static (no default).
        """
        super(NewConnectionLineEdit, self).__init__()
        self.setupUi(self)
        self.isStatic = isStatic
        if self.isStatic:
            from DsgTools.gui.ServerTools.viewServers import ViewServersStatic
            self.viewServers = ViewServersStatic()
        else:
            from DsgTools.gui.ServerTools.viewServers import ViewServers
            self.viewServers = ViewServers()
        self.fillEdgvVersions()
        self.reset() 
开发者ID:dsgoficial,项目名称:DsgTools,代码行数:19,代码来源:newConnectionLineEdit.py

示例4: getSelectionWidget

# 需要导入模块: from qgis.PyQt import QtWidgets [as 别名]
# 或者: from qgis.PyQt.QtWidgets import QWidget [as 别名]
def getSelectionWidget(source, parent=None):
        """
        Gets selection widget to be returned to user as selectionWidget attribute.
        :param parent: (QWidget) widget parent to newly instantiated selection widget.
        :param source: (DsgEnums.int) driver enum to have its widget produced.
        :return: (QWidget) selection widget for selected driver.
        """
        sourceDict = {
            DsgEnums.NoDriver : lambda : QWidget(), # returns a parent class empty object, to minimize standard distorsion
            DsgEnums.PostGIS : lambda : PostgisWidget(parent=parent),
            DsgEnums.NewPostGIS : lambda : NewPostgisWidget(parent=parent),
            DsgEnums.SpatiaLite : lambda : SpatialiteWidget(parent=parent),
            DsgEnums.NewSpatiaLite : lambda : NewSpatialiteWidget(parent=parent),
            DsgEnums.Shapefile : lambda : ShapefileWidget(parent=parent),
            DsgEnums.NewShapefile : lambda : NewShapefileWidget(parent=parent),
            DsgEnums.Geopackage : lambda : GeopackageWidget(parent=parent),
            DsgEnums.NewGeopackage : lambda : NewGeopackageWidget(parent=parent)
        }
        return sourceDict[source]() 
开发者ID:dsgoficial,项目名称:DsgTools,代码行数:21,代码来源:datasourceSelectionWidgetFactory.py

示例5: __init__

# 需要导入模块: from qgis.PyQt import QtWidgets [as 别名]
# 或者: from qgis.PyQt.QtWidgets import QWidget [as 别名]
def __init__(self, source, isInput, parent=None):
        """
        Class constructor.
        :param parent: (QWidget) widget parent to newly instantiated DataSourceManagementWidget object.
        :param source: (str) driver codename to have its widget produced.
        :param isInput: (bool) indicates whether the chosen database is supposed to be a reading/input widget or writting/output one.
        """
        super(DatasourceContainerWidget, self).__init__()
        self.setupUi(self)
        self.source = source
        self.addDatasourceSelectionWidget()
        if not isInput:
            # output widget should not have filtering options
            self.filterPushButton.hide()
        # set filtering config
        self.filterDlg = None
        self.filterPushButton.setToolTip(self.tr('Click to set datasource filter options'))
        self.removePushButton.setToolTip(self.tr('Remove this datasource widget')) 
开发者ID:dsgoficial,项目名称:DsgTools,代码行数:20,代码来源:datasourceContainerWidget.py

示例6: __init__

# 需要导入模块: from qgis.PyQt import QtWidgets [as 别名]
# 或者: from qgis.PyQt.QtWidgets import QWidget [as 别名]
def __init__(self, settings, explorer):
        self.explorer = explorer
        self.settings = settings
        self.parameters = settings.settings()
        QtWidgets.QWidget.__init__(self)
        self.setupUi() 
开发者ID:planetfederal,项目名称:qgis-geoserver-plugin,代码行数:8,代码来源:parametereditor.py

示例7: getWidget

# 需要导入模块: from qgis.PyQt import QtWidgets [as 别名]
# 或者: from qgis.PyQt.QtWidgets import QWidget [as 别名]
def getWidget(self, parent=None):
        """
        Parents class reimplementation to retrieve widget.
        :param parent: (QWidget) widget parent to new multi datasource widget.
        """
        return MultiPostgisSelector(parent=parent) 
开发者ID:dsgoficial,项目名称:DsgTools,代码行数:8,代码来源:multiPostgisSelectorWidget.py

示例8: createWidgetWithoutTabs

# 需要导入模块: from qgis.PyQt import QtWidgets [as 别名]
# 或者: from qgis.PyQt.QtWidgets import QWidget [as 别名]
def createWidgetWithoutTabs(self, formLayout):
        """
        Adjusts the scroll area to receive the buttons directly (not grouped by category)
        formLayout: Layout used to receive all the buttons
        """
        w = QtWidgets.QWidget()
        w.setLayout(formLayout)
        self.scrollArea.setWidget(w) 
开发者ID:dsgoficial,项目名称:DsgTools,代码行数:10,代码来源:field_toolbox.py

示例9: createWidgetWithTabs

# 需要导入模块: from qgis.PyQt import QtWidgets [as 别名]
# 或者: from qgis.PyQt.QtWidgets import QWidget [as 别名]
def createWidgetWithTabs(self, formLayout):
        """
        Creates a scroll area for each form layout.
        formLayout: Layout used to receive the buttons in each tab
        """
        scrollArea = QScrollArea()
        scrollArea.setWidgetResizable(True)
        scrollArea.setFrameShape(QFrame.Shape(0))  # no frame
        w = QtWidgets.QWidget()
        w.setLayout(formLayout)
        scrollArea.setWidget(w)
        return scrollArea 
开发者ID:dsgoficial,项目名称:DsgTools,代码行数:14,代码来源:field_toolbox.py

示例10: __init__

# 需要导入模块: from qgis.PyQt import QtWidgets [as 别名]
# 或者: from qgis.PyQt.QtWidgets import QWidget [as 别名]
def __init__(self, l, *args, **kwargs):
      QMessageBox.__init__(self, *args, **kwargs)
      QMessageBox.setWindowTitle(self,self.tr("opeNoise - Help CNOSSOS"))
      scroll = QScrollArea(self)
      scroll.setWidgetResizable(True)
      self.content = QWidget()
      scroll.setWidget(self.content)
      lay = QVBoxLayout(self.content)
      for item in l:
         lay.addWidget(QLabel(item, self))
      self.layout().addWidget(scroll, 0, 0, 1, self.layout().columnCount())
      self.setStyleSheet("QScrollArea{min-width:800 px; min-height: 400px}") 
开发者ID:Arpapiemonte,项目名称:openoise-map,代码行数:14,代码来源:do_SourceDetailsRoads.py


注:本文中的qgis.PyQt.QtWidgets.QWidget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。