Ejemplo n.º 1
0
    def __init__(self, db, parent):
        QWizardPage.__init__(self, parent)
        self.db = db
        self.register = parent.register
        self.setupUi(self)

        self.do_init()
Ejemplo n.º 2
0
    def __init__(self, db, parent):
        QWizardPage.__init__(self, parent)
        self.db = db
        self.register = parent.register
        self.setupUi(self)

        self.do_init()
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
 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)
Ejemplo n.º 5
0
 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)
Ejemplo n.º 6
0
 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)
Ejemplo n.º 7
0
 def __init__(self):
     QWizardPage.__init__(self)
     self.setupUi(self)
Ejemplo n.º 8
0
 def __init__(self):
     QWizardPage.__init__(self)
     self.setupUi(self)
     self.registerField("manufacturer", self.manufacturer_view)
     self.registerField("device", self.device_view)
Ejemplo n.º 9
0
 def __init__(self):
     QWizardPage.__init__(self)
     self.setupUi(self)
     self.content_server.stateChanged[(int)].connect(self.set_port)
Ejemplo n.º 10
0
 def __init__(self):
     QWizardPage.__init__(self)
     self.setupUi(self)
Ejemplo n.º 11
0
 def __init__(self):
     QWizardPage.__init__(self)
     self.setupUi(self)
     self.registerField("manufacturer", self.manufacturer_view)
     self.registerField("device", self.device_view)
Ejemplo n.º 12
0
 def __init__(self):
     QWizardPage.__init__(self)
     self.setupUi(self)
     self.connect(self.content_server, SIGNAL('stateChanged(int)'), self.set_port)
Ejemplo n.º 13
0
 def __init__(self):
     QWizardPage.__init__(self)
     self.setupUi(self)
     self.connect(self.content_server, SIGNAL('stateChanged(int)'), self.set_port)
Ejemplo n.º 14
0
 def __init__(self):
     QWizardPage.__init__(self)
     self.setupUi(self)
     self.content_server.stateChanged[(int)].connect(self.set_port)
Ejemplo n.º 15
0
        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)