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


Python QtCore.QAbstractListModel类代码示例

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


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

示例1: __init__

 def __init__(self, parent = None):
     QAbstractListModel.__init__(self, parent)
     self._layerStack = []
     self.selectionModel = QItemSelectionModel(self)
     self.selectionModel.selectionChanged.connect(self.updateGUI)
     self._movingRows = False
     QTimer.singleShot(0, self.updateGUI)
开发者ID:LimpingTwerp,项目名称:volumina,代码行数:7,代码来源:layerstack.py

示例2: __init__

 def __init__(self, model, view):
     QAbstractListModel.__init__(self)
     self._updating = False
     self.view = view
     self.model = model
     self.view.setModel(self)
     self.model.view = self
开发者ID:glasmasin,项目名称:moneyguru,代码行数:7,代码来源:selectable_list.py

示例3: __init__

	def __init__(self, parent = None):
		QAbstractListModel.__init__(self, parent)
		self.list = []
		self.strategies = parent
		self.play = QPixmap()
		self.play.load("img/Play.png")
		self.none = QPixmap(32, 32)
		self.none.fill(QColor(0, 0, 0, 0))
开发者ID:marad,项目名称:deadline-framework,代码行数:8,代码来源:widgets.py

示例4: __init__

 def __init__(self, outcome_var=None, parent=None, checkeable=False):
     QAbstractListModel.__init__(self, parent)
     self.variables_list = []
     self.header = "Variable"
     self.outcome = outcome_var
     self.checkeable = checkeable
     self.checked_set = None
     if checkeable:
         self.checked_set = set()
开发者ID:diego0020,项目名称:correlation_viewer,代码行数:9,代码来源:qt_models.py

示例5: __init__

    def __init__(self, waveNames=[], parent=None, *args):
        QAbstractListModel.__init__(self, parent, *args)
        self._app = QApplication.instance().window

        self._orderedWaveNames = []
        for w in waveNames:
            self.appendRow(w)

        # Connect signals
        self.appWaves().waveRemoved[Wave].connect(self.removeWave)
开发者ID:bbreslauer,项目名称:PySciPlot,代码行数:10,代码来源:WavesListModel.py

示例6: __init__

    def __init__(self, storage_file):
        """Creates a series storage object

        :param storage_file: The default file where to store the JSON
                             represenation of this object.
        """
        QAbstractListModel.__init__(self, None)
        self._series = list()
        self._idbyname = dict()
        self.safeToExit = True
        self._def_path = storage_file
开发者ID:boon-code,项目名称:mp-layer,代码行数:11,代码来源:naming.py

示例7: __init__

    def __init__(self, parent = None):
        QAbstractListModel.__init__(self, parent)
        self.server = "localhost"
        self.port = 6600
        # prepare client
        self.client = mpd.MPDClient()
        self.client.timeout = None
        self.client.idletimeout = None
        self.client.connect(self.server, self.port)

        self.__updatePlaylist()
        self.__updateCurrent()
开发者ID:Acer54,项目名称:Webradio_v2,代码行数:12,代码来源:playlistmodel.py

示例8: __init__

 def __init__(self, parent=None, *args):
     QAbstractListModel.__init__(self, parent, *args)
     self.Zonenliste = []
     ctrl = Controller()
     # gets all usages for the zone paired with the usage times
     self.listOFUsages = ctrl.fillBoundaryConditions()
     self.usageTimes = ctrl.fillUsageTimes()
     self.selectionOfZones = []
     for index, wert in enumerate(self.listOFUsages):
         usage = wert.Nutzung
         nutzungDecoded = usage.decode("iso-8859-1")
         self.selectionOfZones.append(nutzungDecoded)
开发者ID:RWTH-EBC,项目名称:TEASER,代码行数:12,代码来源:zoneui.py

示例9: __init__

 def __init__(self, mpdclient, library, config):
     QAbstractListModel.__init__(self)
     self.lastEdit = time()
     self._boldFont = QFont()
     self._boldFont.setBold(True)
     self._stdFont = QFont()
     self.playing = None
     self._clear()
     self._oneLine = config.oneLinePlaylist
     self.mpdclient = mpdclient
     self.library = library
     self.config = config
     self.retriever = iconretriever.ThreadedRetriever(config.coverPath)
开发者ID:tarmack,项目名称:Pythagora,代码行数:13,代码来源:playqueue.py

示例10: __init__

 def __init__(self, backend, data = []):
     '''
     @type backend: L{src.backends.backend.backend}
     @type data: dict
     '''
     QAbstractListModel.__init__(self, parent = None)
     self.__backend = backend
     self.__data = data
     self.__dates = {}
     
     pix = QPixmap(350, 64)
     pix.fill()
    
     self.__loadedimages = {None: QIcon(pix)}
开发者ID:aleximplode,项目名称:Show-Tracker,代码行数:14,代码来源:dataclasses.py

示例11: __init__

	def __init__(self, view_state):
		QAbstractListModel.__init__(self)
		self.view_state = view_state
		view_state.updated.connect(self.changed)
		role_names = {
			self.xrole: 'atomx',
			self.yrole: 'atomy',
			self.zrole: 'atomz',
			self.elementrole: 'element',
			self.covradiusrole: 'covalentRadius',
			self.typerole: 'type',
			self.descriptionrole: 'description'
			}
		self.setRoleNames(role_names)
开发者ID:csmm,项目名称:multiase,代码行数:14,代码来源:atomsview.py

示例12: __init__

 def __init__(self, parent = None):
     QAbstractListModel.__init__(self, parent)
     self._layerStack = []
     self.selectionModel = QItemSelectionModel(self)
     self.selectionModel.selectionChanged.connect(self.updateGUI)
     self.selectionModel.selectionChanged.connect(self._onSelectionChanged)
     self._movingRows = False
     QTimer.singleShot(0, self.updateGUI)
     
     def _handleRemovedLayer(layer):
         # Layerstacks *own* the layers they hold, and thus are 
         #  responsible for cleaning them up when they are removed:
         layer.clean_up()
     self.layerRemoved.connect( _handleRemovedLayer )
开发者ID:JensNRAD,项目名称:volumina,代码行数:14,代码来源:layerstack.py

示例13: __init__

    def __init__(self, parent=None):
        """
        Create a model.

        ``parent`` is the parent :class:`~PyQt4.QtCore.QObject`.
        """
        QAbstractListModel.__init__(self, parent)
        self._monitor = MouseDevicesMonitor(self)
        self._monitor.mousePlugged.connect(self._mouse_plugged)
        self._monitor.mouseUnplugged.connect(self._mouse_unplugged)
        self._resume_monitor = create_resume_monitor(self)
        if self._resume_monitor:
            self._resume_monitor.resuming.connect(self._reset_device_index)
        self._device_index = list(self._monitor.plugged_devices)
        self._checked_devices = set()
开发者ID:Ascaf0,项目名称:synaptiks,代码行数:15,代码来源:models.py

示例14: __init__

	def __init__(self, parent=None, interfaces=None):
		"""
		This method initializes the class.

		:param parent: Parent object. ( QObject )
		:param interfaces: InterfacesModel. ( List )
		"""

		LOGGER.debug("> Initializing '{0}()' class.".format(self.__class__.__name__))

		QAbstractListModel.__init__(self, parent)

		# --- Setting class attributes. ---
		self.__interfaces = []
		self.interfaces = interfaces or self.__interfaces
开发者ID:elanifegnirf,项目名称:Snippets,代码行数:15,代码来源:models.py

示例15: __init__

    def __init__(self, hex_widget, match_operation):
        QAbstractListModel.__init__(self)
        self._lock = threading.RLock()
        self._newResults = []
        self._matchOperation = match_operation
        self._hexWidget = hex_widget
        self._results = []
        if self._matchOperation is not None:
            with self._matchOperation.lock:
                self._matchOperation.newResults.connect(self._onNewMatches, Qt.DirectConnection)
                self._matchOperation.finished.connect(self._onMatchFinished, Qt.QueuedConnection)

                for match in self._matchOperation.state.results.values():
                    self._results.append((match, self._createRange(match)))
        self.startTimer(400)
开发者ID:diatel,项目名称:microhex,代码行数:15,代码来源:search.py


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