def __init__(self): QWidget.__init__(self) self.ui = Ui_DateTimeWidget() self.ui.setupUi(self) self.timer = QTimer(self) self.from_time_updater = True self.is_date_changed = False self.current_zone = "" self.tz_dict = {} self.continents = [] self.countries = [] for country, data in yali.localedata.locales.items(): if country == ctx.lang: if data.has_key("timezone"): ctx.installData.timezone = data["timezone"] # Append continents and countries the time zone dictionary self.createTZDictionary() # Sort continent list self.sortContinents() # Append sorted continents to combobox self.loadContinents() # Load current continents country list self.getCountries(self.current_zone["continent"]) # Highlight the current zone self.index = self.ui.continentList.findText( self.current_zone["continent"]) self.ui.continentList.setCurrentIndex(self.index) self.index = self.ui.countryList.findText(self.current_zone["country"]) self.ui.countryList.setCurrentIndex(self.index) # Initialize widget signal and slots self.__initSignals__() self.ui.calendarWidget.setDate(QDate.currentDate()) self.pthread = None self.pds_messagebox = PMessageBox(self) self.pds_messagebox.enableOverlay() self.timer.start(1000) ctx.mainScreen.currentLanguageChanged.connect(self.retranslateUi) ctx.mainScreen.currentLanguageChanged.connect(self.changeCountry) ctx.mainScreen.currentLanguageChanged.connect(self.updateClock) self.ui.countryList.currentIndexChanged[int].connect( self.setWidgetDateTime)
def __init__(self): QWidget.__init__(self) self.ui = Ui_RootPassWidget() self.ui.setupUi(self) self.intf = ctx.interface self.host_valid = True self.pass_valid = False if ctx.flags.install_type == ctx.STEP_DEFAULT: self.pthread = PThread(self, self.startInit, self.dummy) self.pds_messagebox = PMessageBox(self) self.pds_messagebox.enableOverlay() self.ui.pass1.textChanged[str].connect(self.slotTextChanged) self.ui.pass2.textChanged[str].connect(self.slotTextChanged) self.ui.pass2.returnPressed.connect(self.slotReturnPressed) self.ui.hostname.textChanged[str].connect(self.slotHostnameChanged)
def __init__(self): QWidget.__init__(self) self.ui = Ui_RootPassWidget() self.ui.setupUi(self) self.intf = ctx.interface self.host_valid = True self.pass_valid = False if ctx.flags.install_type in [ctx.STEP_DEFAULT, ctx.STEP_LIVE]: self.pthread = PThread(self, self.startInit, self.dummy) self.pds_messagebox = PMessageBox(self) self.pds_messagebox.enableOverlay() self.connect(self.ui.pass1, SIGNAL("textChanged(const QString &)"), self.slotTextChanged) self.connect(self.ui.pass2, SIGNAL("textChanged(const QString &)"), self.slotTextChanged) self.connect(self.ui.pass2, SIGNAL("returnPressed()"), self.slotReturnPressed) self.connect(self.ui.hostname, SIGNAL("textChanged(const QString &)"), self.slotHostnameChanged)