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


Python QObject.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PyQt4.QtCore import QObject [as 别名]
# 或者: from PyQt4.QtCore.QObject import __init__ [as 别名]
def __init__(self,DATA):
        
        self.data = DATA

        QMainWindow.__init__(self)
        # set up User Interface (widgets, layout...)
        self.setupUi(self)
        
        # --- specify graph and label objects as declared in the gui file
        self.data.pLL.graph = self.graph_LL
        self.data.pLL.label = self.label_LL
        self.data.pMC.graph = self.graph_MC
        self.data.pMC.label = self.label_MC
        
        #combo box entries, dictionary
        self.cb_scale_entries = {0:24,1:2,2:1,3:0.16}
        
        
        self.range = self._get_range()
        for p in self.data.parameters: p.range = self._get_range()
        
        self._setup_signal_slots()
        self._setup_graphs()
        
        self._start_acquisition() 
开发者ID:qkitgroup,项目名称:qkit,代码行数:27,代码来源:client_main.py

示例2: __init__

# 需要导入模块: from PyQt4.QtCore import QObject [as 别名]
# 或者: from PyQt4.QtCore.QObject import __init__ [as 别名]
def __init__(self, document, parent=None):
        """
        A wrapper class for configuration updaters. It starts the running of
        Configuration version updater that is the first updater.
        :param document: The QDomDocument of the configuration
        :type document: QDomDocument
        :param parent: The parent of the QObject, even though unused.
        :type parent: QWidget/NoneType
        """
        QObject.__init__(self, parent)
        self.file_handler = FilePaths()
        self.log_file_path = '{}/logs/migration.log'.format(
            self.file_handler.localPath()
        )
        self.base_updater = ConfigurationVersionUpdater(
            document, self.log_file_path
        )
        self.document = document 
开发者ID:gltn,项目名称:stdm,代码行数:20,代码来源:config_updaters.py

示例3: __init__

# 需要导入模块: from PyQt4.QtCore import QObject [as 别名]
# 或者: from PyQt4.QtCore.QObject import __init__ [as 别名]
def __init__(self, parent=None, context=None, slice_direction_index_source=None):
        QObject.__init__(self, parent)

        self._context = context
        self._slice_direction = slice_direction_index_source

        self._current_index_label = QLabel("")
        self._current_index_label.setDisabled(True)

        # the select-index-widgets
        self.index_s_box = self._set_up_index_widget()

        # the min max settings widgets
        self._min_active, self._min_spinbox = self._set_up_min_max_widgets()
        self._max_active, self._max_spinbox = self._set_up_min_max_widgets()

        self._initialize(self._context.slice_data_source().indexes_for_direction(self._slice_direction).tolist()) 
开发者ID:equinor,项目名称:segyviewer,代码行数:19,代码来源:_indexcontroller.py

示例4: __init__

# 需要导入模块: from PyQt4.QtCore import QObject [as 别名]
# 或者: from PyQt4.QtCore.QObject import __init__ [as 别名]
def __init__(self, canvas):
        """Constructor
        :param canvas:
        """
        QObject.__init__(self)
        self.canvas = canvas
        # Set up slots so we can mimic the behaviour of QGIS when layers
        # are added.
        LOGGER.debug('Initialising canvas...')
        # noinspection PyArgumentList
        QgsMapLayerRegistry.instance().layersAdded.connect(self.addLayers)
        # noinspection PyArgumentList
        QgsMapLayerRegistry.instance().layerWasAdded.connect(self.addLayer)
        # noinspection PyArgumentList
        QgsMapLayerRegistry.instance().removeAll.connect(self.removeAllLayers)

        # For processing module
        self.destCrs = None 
开发者ID:g-sherman,项目名称:plugin_build_tool,代码行数:20,代码来源:qgis_interface.py

示例5: __init__

# 需要导入模块: from PyQt4.QtCore import QObject [as 别名]
# 或者: from PyQt4.QtCore.QObject import __init__ [as 别名]
def __init__(self,layer, tolerance, uid, errors, unlinks):
        QObject.__init__(self)

        self.layer = layer
        self.feat_count = self.layer.featureCount()
        self.tolerance = tolerance
        self.uid = uid

        self.errors = errors
        self.errors_features = {}
        self.unlinks = unlinks
        self.unlinked_features = []
        self.unlinks_count = 0
        self.ml_keys = {}
        self.br_keys = {}

        self.features = []
        self.attributes = {}
        self.geometries = {}
        self.geometries_wkt = {}
        self.geometries_vertices = {}
        # create spatial index object
        self.spIndex = QgsSpatialIndex()
        self.layer_fields = [QgsField(i.name(), i.type()) for i in self.layer.dataProvider().fields()] 
开发者ID:SpaceGroupUCL,项目名称:qgisSpaceSyntaxToolkit,代码行数:26,代码来源:break_tools.py

示例6: __init__

# 需要导入模块: from PyQt4.QtCore import QObject [as 别名]
# 或者: from PyQt4.QtCore.QObject import __init__ [as 别名]
def __init__(self, iface, tableName, user, apiKey, owner=None, sql=None, geoJSON=None,
                 filterByExtent=False, spatiaLite=None, readonly=False, multiuser=False, isSQL=False):
        self.iface = iface
        self.user = user
        self._apiKey = apiKey
        self.layerType = 'ogr'
        self.owner = owner
        self.isSQL = isSQL
        self.multiuser = multiuser
        # SQLite available?
        driverName = "SQLite"
        sqLiteDrv = ogr.GetDriverByName(driverName)
        self.database_path = QgisCartoDB.CartoDBPlugin.PLUGIN_DIR + '/db/database.sqlite'
        self.datasource = sqLiteDrv.Open(self.database_path, True)
        self.layerName = tableName
        self.cartoTable = tableName
        self.readonly = False
        self._deletedFeatures = []
        self.sql = sql

        self.forceReadOnly = False or readonly

        if sql is None:
            sql = 'SELECT * FROM ' + self._schema() + self.cartoTable
            if filterByExtent:
                extent = self.iface.mapCanvas().extent()
                sql = sql + " WHERE ST_Intersects(ST_GeometryFromText('{}', 4326), the_geom)".format(extent.asWktPolygon())
        else:
            self.forceReadOnly = True

        self._loadData(sql, geoJSON, spatiaLite) 
开发者ID:gkudos,项目名称:qgis-cartodb,代码行数:33,代码来源:CartoDBLayer.py

示例7: __init__

# 需要导入模块: from PyQt4.QtCore import QObject [as 别名]
# 或者: from PyQt4.QtCore.QObject import __init__ [as 别名]
def __init__(self, iface):
        QObject.__init__(self)
        QgsMessageLog.logMessage('GDAL Version: ' + str(gdal.VersionInfo('VERSION_NUM')), 'CartoDB Plugin', QgsMessageLog.INFO)

        # Save reference to the QGIS interface
        self.iface = iface

        # initialize locale
        locale = QSettings().value("locale/userLocale")[0:2]
        localePath = os.path.join(CartoDBPlugin.PLUGIN_DIR, "i18n", "{}.qm".format(locale))

        if os.path.exists(localePath):
            self.translator = QTranslator()
            self.translator.load(localePath)

            if qVersion() > '4.3.3':
                QCoreApplication.installTranslator(self.translator)

        # SQLite available?
        driverName = "SQLite"
        self.sqLiteDrv = ogr.GetDriverByName(driverName)
        if self.sqLiteDrv is None:
            QgsMessageLog.logMessage('SQLite driver not found', 'CartoDB Plugin', QgsMessageLog.CRITICAL)
        else:
            QgsMessageLog.logMessage('SQLite driver is found', 'CartoDB Plugin', QgsMessageLog.INFO)
            self.databasePath = CartoDBPlugin.PLUGIN_DIR + '/db/database.sqlite'
            shutil.copyfile(CartoDBPlugin.PLUGIN_DIR + '/db/init_database.sqlite', self.databasePath)
        self.layers = []
        self.countLoadingLayers = 0
        self.countLoadedLayers = 0

        self._cdbMenu = None
        self._mainAction = None
        self._loadDataAction = None
        self._createVizAction = None
        self._addSQLAction = None
        self.toolbar = CartoDBToolbar()
        self._toolbarAction = None
        self._menu = None 
开发者ID:gkudos,项目名称:qgis-cartodb,代码行数:41,代码来源:CartoDBPlugin.py

示例8: __init__

# 需要导入模块: from PyQt4.QtCore import QObject [as 别名]
# 或者: from PyQt4.QtCore.QObject import __init__ [as 别名]
def __init__(self, test):
        QObject.__init__(self)
        self.test = test 
开发者ID:gkudos,项目名称:qgis-cartodb,代码行数:5,代码来源:cartodbapi.py

示例9: __init__

# 需要导入模块: from PyQt4.QtCore import QObject [as 别名]
# 或者: from PyQt4.QtCore.QObject import __init__ [as 别名]
def __init__(self, cartodbUser, apiKey, multiuser=False, hostname='carto.com'):
        QObject.__init__(self)
        self.multiuser = multiuser
        self.apiKey = apiKey
        self.cartodbUser = cartodbUser
        self.hostname = hostname
        self.apiUrl = "https://{}.{}/api/v1/".format(cartodbUser, hostname)
        self.returnDict = True

        self.manager = QNetworkAccessManager()
        self.manager.finished.connect(self.returnFetchContent) 
开发者ID:gkudos,项目名称:qgis-cartodb,代码行数:13,代码来源:cartodbapi.py

示例10: __init__

# 需要导入模块: from PyQt4.QtCore import QObject [as 别名]
# 或者: from PyQt4.QtCore.QObject import __init__ [as 别名]
def __init__(self, crazyflie):
        QObject.__init__(self)
        self.cf = crazyflie
        self.cf.add_port_callback(CRTPPort.SYNC, self._new_packet_cb)
        self.dif = 0
        self.cf_time = 0
        self.timer = QTimer()
        self.timer.timeout.connect(self.send_synchronisation)
        self.timer.setInterval(1000/5) #5hz
        self.initialized = False
        self.counter = 0
        self.error = 0.
        self.cpuTime = 0.
        self.flieTime = 0.
        self.t0 = rospy.Time.now().to_nsec() 
开发者ID:omwdunkley,项目名称:crazyflieROS,代码行数:17,代码来源:sync.py

示例11: __init__

# 需要导入模块: from PyQt4.QtCore import QObject [as 别名]
# 或者: from PyQt4.QtCore.QObject import __init__ [as 别名]
def __init__(self):
		QObject.__init__(self)
		self._objectToBeDeleted = None 
开发者ID:blurstudio,项目名称:cross3d,代码行数:5,代码来源:abstractapplication.py

示例12: __init__

# 需要导入模块: from PyQt4.QtCore import QObject [as 别名]
# 或者: from PyQt4.QtCore.QObject import __init__ [as 别名]
def __init__(self):
		QObject.__init__(self)

		# create custom properties
		self._materialCache		 = None
		self._mapCache			 = None
		self._metaData 		     = None
		self._buffer             = {}
		self._state		    	 = {}

	#------------------------------------------------------------------------------------------------------------------------
	# 												protected methods
	#------------------------------------------------------------------------------------------------------------------------ 
开发者ID:blurstudio,项目名称:cross3d,代码行数:15,代码来源:abstractscene.py

示例13: __init__

# 需要导入模块: from PyQt4.QtCore import QObject [as 别名]
# 或者: from PyQt4.QtCore.QObject import __init__ [as 别名]
def __init__(self):
		QObject.__init__(self) 
开发者ID:blurstudio,项目名称:cross3d,代码行数:4,代码来源:dispatch.py

示例14: __init__

# 需要导入模块: from PyQt4.QtCore import QObject [as 别名]
# 或者: from PyQt4.QtCore.QObject import __init__ [as 别名]
def __init__(self,parent,container, actionRef=None, register=False):
        from stdm.security.authorization import Authorizer

        QObject.__init__(self,parent)
        self._container = container
        self._register = register
        self._actionReference = actionRef
        self._contentGroups = OrderedDict()
        self._widgets = []
        self._userName = stdm.data.app_dbconn.User.UserName
        self._authorizer = Authorizer(stdm.data.app_dbconn.User.UserName)
        self._iter = 0
        self._separatorAction = None 
开发者ID:gltn,项目名称:stdm,代码行数:15,代码来源:container_loader.py

示例15: __init__

# 需要导入模块: from PyQt4.QtCore import QObject [as 别名]
# 或者: from PyQt4.QtCore.QObject import __init__ [as 别名]
def __init__(self, username, containerItem=None, parent=None):
        from stdm.security.authorization import Authorizer

        QObject.__init__(self,parent)
        HashableMixin.__init__(self)
        self._username = username
        self._contentItems = []
        self._authorizer = Authorizer(self._username)
        self._containerItem = containerItem 
开发者ID:gltn,项目名称:stdm,代码行数:11,代码来源:content_group.py


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