コード例 #1
0
 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
コード例 #2
0
ファイル: layerstack.py プロジェクト: LimpingTwerp/volumina
 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)
コード例 #3
0
ファイル: layerstack.py プロジェクト: lfiaschi/volumina
 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)
コード例 #4
0
ファイル: widgets.py プロジェクト: marad/deadline-framework
	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))
コード例 #5
0
 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()
コード例 #6
0
 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()
コード例 #7
0
    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)
コード例 #8
0
ファイル: naming.py プロジェクト: boon-code/mp-layer
    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
コード例 #9
0
ファイル: zoneui.py プロジェクト: mananthavelu/TEASER
 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)
コード例 #10
0
ファイル: playlistmodel.py プロジェクト: Acer54/Webradio_v2
    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()
コード例 #11
0
ファイル: zoneui.py プロジェクト: RWTH-EBC/TEASER
 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)
コード例 #12
0
    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()
コード例 #13
0
ファイル: playqueue.py プロジェクト: tarmack/Pythagora
 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)
コード例 #14
0
 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)
コード例 #15
0
ファイル: layerstack.py プロジェクト: JensNRAD/volumina
 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 )
コード例 #16
0
 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)}
コード例 #17
0
ファイル: atomsview.py プロジェクト: csmm/multiase
	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)
コード例 #18
0
ファイル: models.py プロジェクト: sridharraman/synaptiks
    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()
コード例 #19
0
ファイル: layerstack.py プロジェクト: thanujadax/volumina
    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)
コード例 #20
0
ファイル: models.py プロジェクト: Ascaf0/synaptiks
    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()
コード例 #21
0
ファイル: search.py プロジェクト: diatel/microhex
    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)
コード例 #22
0
ファイル: models.py プロジェクト: elanifegnirf/Snippets
	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
コード例 #23
0
 def __init__(self, view_state):
     QAbstractListModel.__init__(self)
     self.view_state = view_state
     self.pairs = list(view_state.atoms.info['bonds'])
     view_state.updated.connect(self.changed)
     role_names = {
         self.x1role: 'x1',
         self.y1role: 'y1',
         self.z1role: 'z1',
         self.x2role: 'x2',
         self.y2role: 'y2',
         self.z2role: 'z2',
         self.element1role: 'element1',
         self.element2role: 'element2',
     }
     self.setRoleNames(role_names)
コード例 #24
0
ファイル: atomsview.py プロジェクト: csmm/multiase
	def __init__(self, view_state):
		QAbstractListModel.__init__(self)
		self.view_state = view_state
		self.pairs = list(view_state.atoms.info['bonds'])
		view_state.updated.connect(self.changed)
		role_names = {
			self.x1role: 'x1',
			self.y1role: 'y1',
			self.z1role: 'z1',
			self.x2role: 'x2',
			self.y2role: 'y2',
			self.z2role: 'z2',
			self.element1role: 'element1',
			self.element2role: 'element2',
			}
		self.setRoleNames(role_names)
コード例 #25
0
ファイル: models.py プロジェクト: KelSolaar/Umbra
	def __init__(self, parent=None, languages=None):
		"""
		Initializes the class.

		:param parent: Parent object.
		:type parent: QObject
		:param languages: Languages.
		:type languages: list
		"""

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

		QAbstractListModel.__init__(self, parent)

		# --- Setting class attributes. ---
		self.__languages = []
		self.languages = languages
コード例 #26
0
ファイル: download.py プロジェクト: boon-code/mp-layer
 def __init__(self, mplayerpgm="mplayer"):
     QAbstractListModel.__init__(self, None)
     self._mplayer_path = mplayerpgm
     self._dllist = list()
     self._idbypath = dict()
     pix = QPixmap(22, 22)
     pix.fill(QColor(0, 0, 255, 255))
     self._icon_run = QIcon(pix)
     pix = QPixmap(22, 22)
     pix.fill(QColor(255, 0, 0, 255))
     self._icon_error = QIcon(pix)
     pix = QPixmap(22, 22)
     pix.fill(QColor(0, 255, 0, 255))
     self._icon_fin = QIcon(pix)
     pix = QPixmap(22, 22)
     pix.fill(QColor(0, 0, 0, 255))
     self._icon_wait = QIcon(pix)
コード例 #27
0
    def __init__(self, parent=None, interfaces=None):
        """
		Initializes the class.

		:param parent: Parent object.
		:type parent: QObject
		:param interfaces: InterfacesModel.
		:type interfaces: 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
コード例 #28
0
ファイル: Bbox.py プロジェクト: Lax-T/Bbox
    def __init__(self, datain, headerdata, parent=None):

        QAbstractListModel.__init__(self, parent)
        self.array_data = datain
        self.header_data = headerdata
コード例 #29
0
ファイル: desktop_icon.py プロジェクト: OSUser/quickpanel
 def __init__(self, databaseFile):
     QAbstractListModel.__init__(self)
     self.db = ShortcutDatabase(databaseFile)
     self.shortcuts = self.db.selectShortcut("")
コード例 #30
0
ファイル: DevicesListModel.py プロジェクト: elemc/scod
 def __init__(self, parent=None):
     QAbstractListModel.__init__(self, parent)
     self.data_list = []
     self.load_img()
     self.update_model()
コード例 #31
0
 def __init__(self, parent, cols):
     QAbstractListModel.__init__(self, parent)
     self._cols = cols
コード例 #32
0
 def __init__(self, portfolios, parent=None, *args):
     QAbstractListModel.__init__(self, parent, *args)
     self.portfolios = portfolios
コード例 #33
0
 def __init__(self, engineMap, view):
     QAbstractListModel.__init__(self)
     self.view = view
     self.view.setModel(self)
     self.engineMap = engineMap
     self.engines = list(sorted(self.engineMap.keys()))
コード例 #34
0
ファイル: PlotListModel.py プロジェクト: bbreslauer/PySciPlot
 def __init__(self, figure=None, parent=None, *args):
     QAbstractListModel.__init__(self, parent, *args)
     self.parent = parent
     self._figure = figure 
コード例 #35
0
ファイル: khtsync_gui.py プロジェクト: khertan/khtsync
 def __init__(self):
     QAbstractListModel.__init__(self)
     self._items = []
コード例 #36
0
ファイル: MainWindow.py プロジェクト: AGMLab/python-nutch2
    def __init__(self, job_monitor, parent=None, *args):
        """ datain: a list where each item is a row
        """
        QAbstractListModel.__init__(self, parent, *args)

        self.job_monitor = job_monitor
コード例 #37
0
 def __init__(self):
     QAbstractListModel.__init__(self)
     self.shortcuts = []
コード例 #38
0
ファイル: QListModel.py プロジェクト: mplamann/PTG
 def __init__(self, parent=None):
     QAbstractListModel.__init__(self, parent)
     self.list = []
コード例 #39
0
ファイル: listmodel.py プロジェクト: mananthavelu/TEASER
 def __init__(self, parent=None, *args):
     QAbstractListModel.__init__(self, parent, *args)
     self.listOfZonesForDisplay = []
コード例 #40
0
ファイル: models.py プロジェクト: octogene/kcnrtl
 def __init__(self, datain, parent=None, *args):
     """ datain: a list where each item is a row
     """
     QAbstractListModel.__init__(self, parent, *args)
     self.listdata = datain
コード例 #41
0
ファイル: mpxgui.py プロジェクト: ChristophHaag/mpxgui
 def __init__(self, datain, parent=None, *args): 
     QAbstractListModel.__init__(self, parent, *args) 
     # we should have only one master anyway
     self.master = list(datain.keys())[0]
     self.listdata = datain[self.master]
 def __init__(self, parent=None):
     QAbstractListModel.__init__(self, parent)
     self.addons = []
コード例 #43
0
ファイル: albums.py プロジェクト: tarmack/Pythagora
 def __init__(self, library):
     QAbstractListModel.__init__(self)
     self.library = library
     self._albums = []
コード例 #44
0
ファイル: ListModel.py プロジェクト: antolu/LHCbDIRAC
 def __init__(self, datain=None, parent=None, *args):
     """initialize the class members"""
     QAbstractListModel.__init__(self, parent, *args)
     self.__listdata = datain
コード例 #45
0
ファイル: layout_editor.py プロジェクト: OSUser/quickpanel
 def __init__(self):
     QAbstractListModel.__init__(self)
     self.widgets = []
コード例 #46
0
ファイル: lista_modelo.py プロジェクト: dravix/pyventa
 def __init__(self, datain, parent=None, *args): 
     """ datain: a list where each item is a row
     """
     QAbstractListModel.__init__(self, parent, *args) 
     self.listdata = datain
コード例 #47
0
ファイル: pylint.py プロジェクト: tonal/KhtEditor
    def __init__(self):
        QAbstractListModel.__init__(self)

        # Cache the passed data list as a class member.
        self.items = []