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


Python qt.QLabel类代码示例

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


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

示例1: BootStrapperWidget

class BootStrapperWidget(QWidget):
    def __init__(self, parent, suite, name="RunnerWidget"):
        QWidget.__init__(self, parent, name)
        self.app = get_application_pointer()
        cfg = self.app.umlcfg
        basefile = make_base_filesystem(suite, "%s.base" % suite, cfg=cfg, size=300, mkfs="mke2fs")
        self.bootstrapper = UmlBootstrapper(suite, basefile, cfg=self.cfg)
        self._mainbox = QVBoxLayout(self, 5, 7)
        # add label
        self.mainlabel = QLabel(self)
        self.mainlabel.setText("Bootstrapping suite %s" % suite)
        self._mainbox.addWidget(self.mainlabel)
        # add stdout viewer
        logfile = self.umlmachines.stdout_logfile.name
        self.logbrowser = LogBrowser(self, logfile)
        self._mainbox.addWidget(self.logbrowser)
        self.timer = QTimer(self)
        self.connect(self.timer, SIGNAL("timeout()"), self.update_progress)
        self.timer.startTimer(1000)

    def update_progress(self):
        # retval = self.proc.poll()
        # print retval
        retval = None
        if retval is not None:
            print retval
            self.close()
开发者ID:joelsefus,项目名称:paella,代码行数:27,代码来源:bootstrapper.py

示例2: __init__

 def __init__(self, parent, umlmachines, name="InstallerWidget"):
     QWidget.__init__(self, parent, name)
     self.resize(600, 600)
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.umlmachines = umlmachines
     self.machine = self.umlmachines.current
     self.current_machine_process = "start"
     self.current_profile = None
     self.current_trait = None
     self.traitlist = []
     self.curenv = CurrentEnvironment(self.conn, self.machine)
     self.curenv["current_profile"] = "None"
     self.curenv["current_trait"] = "None"
     self.curenv["current_machine_process"] = self.current_machine_process
     self.timer = QTimer(self)
     self.connect(self.timer, SIGNAL("timeout()"), self.update_progress)
     self.timer.startTimer(1000)
     self.grid = QGridLayout(self, 4, 1, 5, 7)
     self.main_label = QLabel(self)
     self.main_label.setText(self._msg())
     self.grid.addWidget(self.main_label, 0, 0)
     self.profile_progress_lbl = QLabel(self)
     self.grid.addWidget(self.profile_progress_lbl, 1, 0)
     self.profile_progress = KProgress(self)
     self.grid.addWidget(self.profile_progress, 2, 0)
     self.logview = LogBrowser(self, "/tmp/uml-installer.log")
     self.grid.addWidget(self.logview, 3, 0)
     # self.console_view = StdOutBrowser(self)
     # self.console_view = KTextBrowser(self)
     # self.grid.addWidget(self.console_view, 4, 0)
     self.console_text = ""
开发者ID:joelsefus,项目名称:paella,代码行数:32,代码来源:installer.py

示例3: __init__

 def __init__(self, wind=None, roundsFinished=0, parent=None):
     QLabel.__init__(self, parent)
     self.__wind = None
     if wind is None:
         wind = East
     self.__roundsFinished = roundsFinished
     self.wind = wind
开发者ID:KDE,项目名称:kajongg,代码行数:7,代码来源:board.py

示例4: RunnerWidget

class RunnerWidget(QWidget):
    def __init__(self, parent, umlmachines, name='RunnerWidget'):
        QWidget.__init__(self, parent, name)
        self.app = get_application_pointer()
        self.umlmachines = umlmachines
        self.proc = self.umlmachines.run_machine()
        self._mainbox = QVBoxLayout(self, 5, 7)
        # add label
        self.mainlabel = QLabel(self)
        self.mainlabel.setText('Running Umlmachine %s' % self.umlmachines.current)
        self._mainbox.addWidget(self.mainlabel)
        # add stdout viewer
        logfile = self.umlmachines.stdout_logfile.name
        self.logbrowser = LogBrowser(self, logfile)
        self._mainbox.addWidget(self.logbrowser)
        self.timer = QTimer(self)
        self.connect(self.timer, SIGNAL('timeout()'), self.update_progress)
        self.timer.startTimer(1000)
        
    def update_progress(self):
        #retval = self.proc.poll()
        #print retval
        retval = None
        if retval is not None:
            print retval
            self.close()
开发者ID:joelsefus,项目名称:paella,代码行数:26,代码来源:runner.py

示例5: __init__

 def __init__(self, *args):
     QLabel.__init__(self, *args)
     
     self.setFrameShape(QLabel.Panel)
     self.setSizePolicy(QSizePolicy(1, 0,
                                    self.sizePolicy().hasHeightForWidth()))
     self.setFont(QFont(guiConf.widgetfontfamily, guiConf.widgetfontsize))
开发者ID:boudewijnrempt,项目名称:kura,代码行数:7,代码来源:kurastatusbar.py

示例6: _make_box

 def _make_box(self, text, choices):
     lbl = QLabel(self.frame)
     lbl.setText(text)
     box = KComboBox(self.frame)
     box.insertStrList(choices)
     self.vbox.addWidget(lbl)
     self.vbox.addWidget(box)
     return lbl, box
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:8,代码来源:base.py

示例7: WidgetSeleccionCaja

class WidgetSeleccionCaja(QVBox):
    """El elemento de seleccion más sencillo.
    Solo contiene una caja"""
    def __init__(self, nombre, parent = None):
        from Driza.iuqt3.widgetsqt import WidgetListaListBox
        QVBox.__init__(self, parent)
        self.label = QLabel(self)
        self.label.setText(nombre)
        self.caja = WidgetListaListBox(self)
开发者ID:,项目名称:,代码行数:9,代码来源:

示例8: __init_widgets_categorias

 def __init_widgets_categorias(self):
     """Inicializa los widgets de cada categoria"""
     from sets import ImmutableSet
     for categoria in self.__gestorcategorias.listacategorias:
         tmpset = ImmutableSet(categoria.etiquetas)
         label = QLabel(None, "")
         label.setAlignment(QLabel.WordBreak)
         label.setText(categoria.descripcion)
         self.__diccionariowidgets["categorias"][tmpset] = label
         self.widgetStack1.addWidget(label)
开发者ID:,项目名称:,代码行数:10,代码来源:

示例9: NewMachineDialog

class NewMachineDialog(BaseMachineDialog):
    def __init__(self, parent, handler):
        BaseMachineDialog.__init__(self, parent, handler)
        self.machnameLbl = QLabel(self.frame)
        self.machnameLbl.setText('Machine Name')
        self.machnameEntry = KLineEdit(self.frame)
        self.vbox.addWidget(self.machnameLbl)
        self.vbox.addWidget(self.machnameEntry)
        self._make_common_boxes()
        self.dbaction = 'insert'
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:10,代码来源:base.py

示例10: MachineParentDialog

class MachineParentDialog(BaseMachineDialog):
    def __init__(self, parent, handler):
        BaseMachineDialog.__init__(self, parent, handler)
        self.parentLbl = QLabel(self.frame)
        self.parentLbl.setText("parent")
        self.parentEntry = KLineEdit(self.frame)
        self.vbox.addWidget(self.parentLbl)
        self.vbox.addWidget(self.parentEntry)

    def slotOkClicked(self):
        pass
开发者ID:joelsefus,项目名称:paella,代码行数:11,代码来源:base.py

示例11: addressidSelected

 def addressidSelected(self, url):
     addressid = int(str(url).split('.')[2])
     self.enableButtonOK(True)
     self.dialogs['address'].done(0)
     self.grid.selButton.close()
     n = self.grid.fields.index('addressid') + 1
     text = AddressLink(self.db, addressid).toxml()
     lbl = QLabel(text, self.page)
     lbl.show()
     self.grid.addMultiCellWidget(lbl, n, n, 1, 1)
     self.addressid = addressid
开发者ID:BackupTheBerlios,项目名称:konsultant-svn,代码行数:11,代码来源:gui.py

示例12: AuditGameDialog

class AuditGameDialog(BaseDialogWindow):
    def __init__(self, parent, name='AuditGameDialog'):
        BaseDialogWindow.__init__(self, parent, name=name)
        #self.grid = QGridLayout(self, 2, 1, 5, 7)
        self.frame = KTextBrowser(self)
        self.frame.setNotifyClick(True)
        self.frame.setSource = self.setSource
        self.doc = AuditGameDocument(self.app)
        #self.grid.addWidget(self.frame, 0, 0)
        self.progress_label = QLabel(self)
        self.progress = KProgress(self)
        #self.grid.addWidget(self.progress, 1, 0)
        self.setMainWidget(self.frame)
        layout = self.layout()
        # we use insertWidget instead of
        # addWidget here so the widgets
        # are above the dialog buttons
        # self frame should be at 0 index in the layout
        # we set the progress and label below this
        layout.insertWidget(1, self.progress)
        # inserting into index 1 here knocks self.progress down to 2
        layout.insertWidget(1, self.progress_label)
        # disable and hide extra buttons
        self.enableButtonApply(False)
        self.showButtonApply(False)
        self.enableButtonCancel(False)
        self.showButtonCancel(False)
        # the dialog should be a little taller than what
        # it defaults to
        self.resize(0, 300)
        
    def report_md5check(self, filename, count):
        self.progress_label.setText('checking %s' % filename)
        self.progress.setProgress(count)
        self.app.processEvents()
    
    def audit_game(self, name, from_install=True, time='now'):
        filehandler = self.app.make_new_fileshandler()
        total = len(filehandler.datahandler.get_installed_files(name))
        self.progress.setTotalSteps(total)
        filehandler.archivehelper.report_installed_file_handled = self.report_md5check
        unchanged, changed, extra = filehandler.audit_game_files(name,
                                                                 from_install=from_install, time=time)
        self.doc.set_info(unchanged, changed, extra)
        self.frame.setText(self.doc.output())
        self.progress_label.setText('Audit Completed')

    def setSource(self, url):
        print url
        if url == 'show':
            self.doc.append_unchanged_files()
            self.frame.setText(self.doc.output())
开发者ID:BackupTheBerlios,项目名称:dosbox-pykde-svn,代码行数:52,代码来源:infobrowser.py

示例13: NewKernelDialog

class NewKernelDialog(BaseMachineDialog):
    def __init__(self, parent, handler):
        BaseMachineDialog.__init__(self, parent, handler)
        self.kernelLbl = QLabel(self.frame)
        self.kernelLbl.setText('Name of kernel package')
        self.kernelEntry = KLineEdit(self.frame)
        self.vbox.addWidget(self.kernelLbl)
        self.vbox.addWidget(self.kernelEntry)
        self.dbaction = 'insert'

    def slotOkClicked(self):
        kernel = str(self.kernelEntry.text())
        self.handler.add_kernel(kernel)
开发者ID:joelsefus,项目名称:paella,代码行数:13,代码来源:base.py

示例14: NewMachineDialog

class NewMachineDialog(BaseMachineDialog):
    def __init__(self, parent, handler):
        BaseMachineDialog.__init__(self, parent, handler)
        self.machnameLbl = QLabel(self.frame)
        self.machnameLbl.setText('Machine Name')
        self.machnameEntry = KLineEdit(self.frame)
        self.vbox.addWidget(self.machnameLbl)
        self.vbox.addWidget(self.machnameEntry)
        self.dbaction = 'insert'

    def slotOkClicked(self):
        machine = str(self.machnameEntry.text())
        print "slotOkClicked", machine
        self.handler.make_a_machine(machine)
开发者ID:joelsefus,项目名称:paella,代码行数:14,代码来源:base.py

示例15: __init__

 def __init__(self, parent, handler):
     VboxDialog.__init__(self, parent)
     self.diskconfig = handler
     self.diskconfigLbl = QLabel(self.frame)
     self.diskconfigLbl.setText('DiskConfig Name')
     self.diskconfigEntry = KLineEdit(self.frame)
     self.contentLbl = QLabel(self.frame)
     self.contentLbl.setText('DiskConfig Content')
     self.contentEntry = KTextEdit(self.frame)
     self.vbox.addWidget(self.diskconfigLbl)
     self.vbox.addWidget(self.diskconfigEntry)
     self.vbox.addWidget(self.contentLbl)
     self.vbox.addWidget(self.contentEntry)
     self.connect(self, SIGNAL('okClicked()'), self.slotOkClicked)
开发者ID:joelsefus,项目名称:paella,代码行数:14,代码来源:base.py


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