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


Python QWizardPage.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PyQt4.Qt import QWizardPage [as 别名]
# 或者: from PyQt4.Qt.QWizardPage import __init__ [as 别名]
    def __init__(self, db, parent):
        QWizardPage.__init__(self, parent)
        self.db = db
        self.register = parent.register
        self.setupUi(self)

        self.do_init()
开发者ID:089git,项目名称:calibre,代码行数:9,代码来源:__init__.py

示例2: __init__

# 需要导入模块: from PyQt4.Qt import QWizardPage [as 别名]
# 或者: from PyQt4.Qt.QWizardPage import __init__ [as 别名]
 def __init__(self):
     QWizardPage.__init__(self)
     self.setupUi(self)
     self.registerField('library_location', self.location)
     self.button_change.clicked[()].connect(self.change)
     self.init_languages()
     self.language.currentIndexChanged[int].connect(self.change_language)
     self.location.textChanged.connect(self.location_text_changed)
开发者ID:Hainish,项目名称:calibre,代码行数:10,代码来源:__init__.py

示例3: __init__

# 需要导入模块: from PyQt4.Qt import QWizardPage [as 别名]
# 或者: from PyQt4.Qt.QWizardPage import __init__ [as 别名]
 def __init__(self):
     QWizardPage.__init__(self)
     self.setupUi(self)
     self.registerField('library_location', self.location)
     self.connect(self.button_change, SIGNAL('clicked()'), self.change)
     self.init_languages()
     self.language.currentIndexChanged[int].connect(self.change_language)
     self.connect(self.location, SIGNAL('textChanged(QString)'),
             self.location_text_changed)
开发者ID:yeyanchao,项目名称:calibre,代码行数:11,代码来源:__init__.py

示例4: __init__

# 需要导入模块: from PyQt4.Qt import QWizardPage [as 别名]
# 或者: from PyQt4.Qt.QWizardPage import __init__ [as 别名]
        def __init__(self, dirname, purrlogs, parent=None, create=None, message=None):
            QWizardPage.__init__(self, parent)
            self.dirname = dirname
            self.purrlogs = purrlogs or []
            bg = QButtonGroup(self)
            lo = QVBoxLayout()
            self.setLayout(lo)
            # set page titles
            self.setTitle("Starting PURR")
            message and self.setSubTitle(message)
            if not purrlogs:
                self.rbs_log = []
            else:
                # add options for existing purrlogs
                self.rbs_log = [QRadioButton("Load %s" % Kittens.utils.collapseuser(log)) for log in purrlogs]
                for rb in self.rbs_log:
                    lo.addWidget(rb)
                    bg.addButton(rb)
                    QObject.connect(rb, SIGNAL("toggled(bool)"), self.checkCompleteness)
                self.rbs_log[0].setChecked(True)
            # add option to load another purrlog
            lo1 = QHBoxLayout()
            self.rb_other = QRadioButton("Load purrlog from:")
            lo1.addWidget(self.rb_other)
            bg.addButton(self.rb_other)
            self.wother = QLineEdit()
            self.wother.setReadOnly(True)
            lo1.addWidget(self.wother, 1)
            pb = QPushButton(pixmaps.folder_open.icon(), "")
            QObject.connect(pb, SIGNAL("clicked()"), self._select_other_dialog)
            QObject.connect(self.rb_other, SIGNAL("toggled(bool)"), pb.setEnabled)
            QObject.connect(self.rb_other, SIGNAL("toggled(bool)"), self.wother.setEnabled)
            QObject.connect(self.rb_other, SIGNAL("toggled(bool)"), self.checkCompleteness)
            pb.setEnabled(False)
            self.wother.setEnabled(False)
            lo1.addWidget(pb)
            lo.addLayout(lo1)
            self.load_path = None

            # add option to create new purrlog
            lo1 = QHBoxLayout()
            self.rb_create = QRadioButton("Create new purrlog:")
            lo1.addWidget(self.rb_create)
            bg.addButton(self.rb_create)
            self.wcreate = QLineEdit()
            lo1.addWidget(self.wcreate, 1)
            pb = QPushButton(pixmaps.folder_open.icon(), "")
            QObject.connect(pb, SIGNAL("clicked()"), self._select_create_dialog)
            QObject.connect(self.rb_create, SIGNAL("toggled(bool)"), pb.setEnabled)
            QObject.connect(self.rb_create, SIGNAL("toggled(bool)"), self.wcreate.setEnabled)
            QObject.connect(self.rb_create, SIGNAL("toggled(bool)"), self.checkCompleteness)
            QObject.connect(self.wcreate, SIGNAL("editingFinished()"), self._validate_create_filename)
            pb.setEnabled(False)
            self.wcreate.setEnabled(False)
            # this holds the last validated name
            self._validated_create_path = None
            self._validated_result = False
            # generate default name for a new purrlog
            self.create_path = os.path.join(dirname, "purrlog")
            num = 0
            while os.path.exists(self.create_path):
                self.create_path = os.path.join(dirname, "purrlog.%d" % num)
                num += 1
            # This will be not None as long as a valid name is entered
            self.create_path = Kittens.utils.collapseuser(os.path.normpath(self.create_path))
            if create:
                self.wcreate.setText(create or Kittens.utils.collapseuser(create))
                # this will emit checkCompleteness(), causing a _validate_create_filename() call, causing the content of the wcreate widget
                # to be validated and copied to create_path if valid, or reset from create_path if invalid
                self.rb_create.setChecked(True)
            else:
                self.wcreate.setText(self.create_path)

            lo1.addWidget(pb)
            lo.addLayout(lo1)

            # make create option default, if no purrlogs
            if not purrlogs:
                self.rb_create.setChecked(True)
开发者ID:kernsuite-debian,项目名称:purr,代码行数:81,代码来源:Startup.py


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