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


Python Qt.Unchecked方法代码示例

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


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

示例1: reloadPlayers

# 需要导入模块: from PyQt4.QtCore import Qt [as 别名]
# 或者: from PyQt4.QtCore.Qt import Unchecked [as 别名]
def reloadPlayers(self, *args):
        self.players = []
        for p in self.controller.available.keys():
            ignored = (p in self.controller.ignored) and Qt.Checked or Qt.Unchecked
            self.players.append([PlayerModelState.AVAILABLE,
                                 p, self.getPlayerStat(p, 'ping'),
                                 '', ignored,
                                 self.getPlayerStat(p, 'cc'), ''])
        for p, p2 in self.controller.playing.items():
            ignored = (p in self.controller.ignored) and Qt.Checked or Qt.Unchecked
            self.players.append([PlayerModelState.PLAYING,
                                 p, self.getPlayerStat(p, 'ping'),
                                 p2, ignored,
                                 self.getPlayerStat(p, 'cc'),
                                 self.getPlayerStat(p2, 'cc')])
        for p in self.controller.awayfromkb.keys():
            ignored = (p in self.controller.ignored) and Qt.Checked or Qt.Unchecked
            self.players.append([PlayerModelState.AFK,
                                 p, self.getPlayerStat(p, 'ping'),
                                 '', ignored,
                                 self.getPlayerStat(p, 'cc'), ''])
        self.sort(self.lastSort, self.lastSortOrder)
        # idx1 = self.createIndex(0, 0)
        # idx2 = self.createIndex(len(self.players) - 1, PlayerModel.N_DISPLAY_COLS-1)
        # self.dataChanged.emit(idx1, idx2) 
开发者ID:doctorguile,项目名称:pyqtggpo,代码行数:27,代码来源:playermodel.py

示例2: childStateChanged

# 需要导入模块: from PyQt4.QtCore import Qt [as 别名]
# 或者: from PyQt4.QtCore.Qt import Unchecked [as 别名]
def childStateChanged(self, child, newState):
        if self.checkState(0) == Qt.Unchecked:
            #print "Child Changed while not logging"
            QtGui.QTreeWidgetItem.setData(child, 0, Qt.CheckStateRole, newState)
        elif self.checkState(0) == Qt.PartiallyChecked:
            pass
            #print "Waiting for log callback"
        elif self.checkState(0) == Qt.Checked:
            QtGui.QTreeWidgetItem.setData(child, 0, Qt.CheckStateRole, newState)
            if self.noneSelected():
                #print "Last child unselected, remove logger"
                self.stopLog()
            elif self.allSelected():
                #print "All children selected while logging, update logger"
                self.requestLog()
            else:
                #print "Child Changed while logging, update logger"
                self.requestLog() 
开发者ID:omwdunkley,项目名称:crazyflieROS,代码行数:20,代码来源:logManager.py

示例3: _remove_plot_widgets

# 需要导入模块: from PyQt4.QtCore import Qt [as 别名]
# 或者: from PyQt4.QtCore.Qt import Unchecked [as 别名]
def _remove_plot_widgets(self, closeAll = False):
        # helper func to close widgets
        def close_ds(ds):
            if ds in self.open_ds:
                window_id = self.open_ds[ds]
                window_id.setCheckState(0,Qt.Unchecked)

                # make sure data is consitent
                if str(window_id) in self.open_plots:
                    self.open_plots[str(window_id)].deleteLater()
                    self.open_plots.pop(str(window_id))


                if ds in self.open_ds:
                    self.open_ds.pop(ds)

        if closeAll:
            for ds in list(self.open_ds.keys()):
                close_ds(ds)
        else:
            for ds in self.toBe_deleted:
                close_ds(ds)

        self.toBe_deleted = [] 
开发者ID:qkitgroup,项目名称:qkit,代码行数:26,代码来源:main.py

示例4: _initialize

# 需要导入模块: from PyQt4.QtCore import Qt [as 别名]
# 或者: from PyQt4.QtCore.Qt import Unchecked [as 别名]
def _initialize(self, indexes):
        self._indexes = indexes
        # set up initial min max values
        self.current_index = 0
        self.min_index = 0
        self.max_index = len(self._indexes) - 1

        self.index_s_box.update_view(self._indexes, self.current_index)

        self._min_spinbox.update_view(self._indexes, self.min_index)
        self._max_spinbox.update_view(self._indexes, self.max_index)

        self._min_spinbox.setMaximum(self.max_index - 1)
        self._max_spinbox.setMinimum(self.min_index + 1)

        self._max_active.setCheckState(Qt.Unchecked)
        self._min_active.setCheckState(Qt.Unchecked)

        self._update_label()
        self._min_max_value_changed() 
开发者ID:equinor,项目名称:segyviewer,代码行数:22,代码来源:_indexcontroller.py

示例5: __init__

# 需要导入模块: from PyQt4.QtCore import Qt [as 别名]
# 或者: from PyQt4.QtCore.Qt import Unchecked [as 别名]
def __init__(self, parent, name, children, hz=50):
        super(LogGroup, self).__init__(parent)
        self.name = name
        self.setFlags(self.flags() | Qt.ItemIsEditable | Qt.ItemIsUserCheckable)

        # Keep track of if all/none of the children are active
        self.cAll = True
        self.cNone = True
        self.validHZ = list(OrderedDict.fromkeys([round(100/floor(100/x),2) for x in range(1,100)]))
        self.hzTarget = hz

        # Monitor the incoming frequency
        self.fm = None
        self.fmOn = True

        # log config
        self.lg = None

        # Show text
        QtGui.QTreeWidgetItem.setData(self, 0, Qt.DisplayRole, QVariant(name))
        QtGui.QTreeWidgetItem.setData(self, 0, Qt.CheckStateRole, Qt.Unchecked)
        QtGui.QTreeWidgetItem.setData(self, 1, Qt.DisplayRole, "Off")
        QtGui.QTreeWidgetItem.setData(self, 3, Qt.DisplayRole, QVariant(0))
        #QtGui.QTreeWidgetItem.setData(self, 4, Qt.CheckStateRole, Qt.Unchecked)
        self.readSettings()

        # Initialise Children
        for c in sorted(children.keys()):
            self.addChild(LogItem(self, children[c]))

        self.c = 0


        # Now everything is initialised except the logging
        # Start logging if active
        if self.checkState(0) == Qt.Checked:
            self.requestLog() 
开发者ID:omwdunkley,项目名称:crazyflieROS,代码行数:39,代码来源:logManager.py

示例6: readSettings

# 需要导入模块: from PyQt4.QtCore import Qt [as 别名]
# 或者: from PyQt4.QtCore.Qt import Unchecked [as 别名]
def readSettings(self):
        """ Read the HZ and selected things to log from previous session """
        settings = QSettings("omwdunkley", "flieROS")

        # Read target HZ
        hzQv = settings.value("log_"+self.name+"_hz",QVariant(20))
        QtGui.QTreeWidgetItem.setData(self, 2, Qt.DisplayRole, hzQv)
        self.hzTarget = self.getValidHZ(hzQv.toFloat()[0])

        # Read if checked. If partially checked, uncheck
        onQv = settings.value("log_"+self.name+"_on", QVariant(Qt.Unchecked))
        QtGui.QTreeWidgetItem.setData(self, 0, Qt.CheckStateRole, onQv if onQv.toInt()[0]!=Qt.PartiallyChecked else Qt.Unchecked)

        #onRos = settings.value("ros_"+self.name+"_on", QVariant(Qt.Unchecked))
        #QtGui.QTreeWidgetItem.setData(self, 0, Qt.CheckStateRole, onRos) 
开发者ID:omwdunkley,项目名称:crazyflieROS,代码行数:17,代码来源:logManager.py

示例7: logStartedCB

# 需要导入模块: from PyQt4.QtCore import Qt [as 别名]
# 或者: from PyQt4.QtCore.Qt import Unchecked [as 别名]
def logStartedCB(self, on):
        """ Called when we actually start logging """
        self.c+=1
        #print "counter[%s]"%self.name, self.c
        #if self.c % 2 == 1:
         #   return


        if on:
            rospy.loginfo( "[%d: %s @ %.2fhz] LogCB STARTED" % (self.lg.id, self.name, self.hzTarget))
            QtGui.QTreeWidgetItem.setData(self, 0, Qt.CheckStateRole, Qt.Checked)
            QtGui.QTreeWidgetItem.setData(self, 1, Qt.DisplayRole, "On")
            self.setAllState(Qt.Checked, activeOnly=True)
        else:
            rospy.loginfo( "[%s] LogCB STOPPED" % ( self.name))
            #print "[%s]LogCB ENDED(%d) " % (self.name, self.c)
            #if self.allSelected():
            #    self.setAllState(Qt.Unchecked)
            ##else:
            ##    self.setAllState(Qt.Checked, activeOnly=True)
            #QtGui.QTreeWidgetItem.setData(self, 0, Qt.CheckStateRole, Qt.Unchecked)
            #QtGui.QTreeWidgetItem.setData(self, 1, Qt.DisplayRole, "Off")

    # def logAddedCB(self, l):
    #     """ Called when log added """
    #     print "LogCB added"
    #     QtGui.QTreeWidgetItem.setData(self, 0, Qt.CheckStateRole, Qt.Checked)
    #     QtGui.QTreeWidgetItem.setData(self, 1, Qt.DisplayRole, "Added") 
开发者ID:omwdunkley,项目名称:crazyflieROS,代码行数:30,代码来源:logManager.py

示例8: stopLog

# 需要导入模块: from PyQt4.QtCore import Qt [as 别名]
# 或者: from PyQt4.QtCore.Qt import Unchecked [as 别名]
def stopLog(self):
        """ User request halt """
        #print "Requested log stop"
        if self.lg:
            self.lg.delete() #Invokes logStarted(False)
            self.lg = None
        if self.allSelected():
            self.setAllState(Qt.Unchecked)
        #else:
        #    self.setAllState(Qt.Checked, activeOnly=True)
        QtGui.QTreeWidgetItem.setData(self, 0, Qt.CheckStateRole, Qt.Unchecked)
        QtGui.QTreeWidgetItem.setData(self, 1, Qt.DisplayRole, "Off")
        self.treeWidget().sig_logStatus.emit(self.name, -1)
        self.fm = None 
开发者ID:omwdunkley,项目名称:crazyflieROS,代码行数:16,代码来源:logManager.py

示例9: errorLog

# 需要导入模块: from PyQt4.QtCore import Qt [as 别名]
# 或者: from PyQt4.QtCore.Qt import Unchecked [as 别名]
def errorLog(self, block, msg):
        """ When a log error occurs """
        #print "Log error: %s:", msg
        QtGui.QTreeWidgetItem.setData(self, 1, Qt.DisplayRole, "Err: %s"%msg)
        QtGui.QTreeWidgetItem.setData(self, 0, Qt.CheckStateRole, Qt.Unchecked)
        if self.allSelected():
            self.setAllState(Qt.Unchecked)
        else:
            self.setAllState(Qt.Checked, activeOnly=True)
        self.fm = None 
开发者ID:omwdunkley,项目名称:crazyflieROS,代码行数:12,代码来源:logManager.py

示例10: setCheckBoxVulnerableChecked

# 需要导入模块: from PyQt4.QtCore import Qt [as 别名]
# 或者: from PyQt4.QtCore.Qt import Unchecked [as 别名]
def setCheckBoxVulnerableChecked(self, checked=True):
        """
        This function changes checkbox's state
        :param checked: True or False
        :return: None
        """
        if checked:
            self.checkBoxVulnerable.setCheckState(Qt.Checked)
        else:
            self.checkBoxVulnerable.setCheckState(Qt.Unchecked) 
开发者ID:danilabs,项目名称:rexploit,代码行数:12,代码来源:widget.py

示例11: data

# 需要导入模块: from PyQt4.QtCore import Qt [as 别名]
# 或者: from PyQt4.QtCore.Qt import Unchecked [as 别名]
def data(self, index, role = Qt.DisplayRole):
        if not index.isValid():
            return None

        if role not in [Qt.DisplayRole, Qt.ToolTipRole, Qt.EditRole]:
            return None

        data = None
        c = index.column()
        if c == 0:
            if self.utxo_script:
                data = self.utxo_script.get_human()
        elif c == 1:
            if self.tx:
                data = b2x(self.tx.serialize())
        elif c == 2:
            data = self.inIdx
        elif c == 3:
            data = sighash_types_by_value[self.sighash_type]
        elif c == 4:
            if role == Qt.CheckStateRole:
                data = Qt.Checked if self.anyone_can_pay else Qt.Unchecked
            else:
                data = self.anyone_can_pay
        elif c == self.SigHashName:
            data = sig_hash_name(self.sighash_type | SIGHASH_ANYONECANPAY if self.anyone_can_pay else self.sighash_type)
        elif c == self.SigHashExplanation:
            data = sig_hash_explanation(self.sighash_type | SIGHASH_ANYONECANPAY if self.anyone_can_pay else self.sighash_type)

        return data 
开发者ID:mazaclub,项目名称:hashmal,代码行数:32,代码来源:tx_builder.py


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