class Widget(QtGui.QWidget, ScreenWidget): title = i18n("Summary") desc = i18n("Welcome to Migration Tool Wizard :)") def __init__(self, *args): QtGui.QWidget.__init__(self, None) self.ui = Ui_summaryWidget() self.ui.setupUi(self) def shown(self): subject = "<p><li><b>%s</b></li><ul>" item = "<li>%s</li>" end = "</ul></p>" content = QString("") content.append("""<html><body><ul>""") # Selected User content.append(subject % ki18n("User Settings").toString()) content.append(item % ki18n("Selected User: <b>%s</b>").toString() % ctx.user[2]) content.append(end) # Selected Options content.append(subject % ki18n("Options Settings").toString()) for key, value in ctx.options.items(): content.append(item % ki18n("Option %1 : <b>%2</b>").toString() % (key, value)) content.append(end) if ctx.filesOptions: #Selected Files Destinations content.append(subject % ki18n("Destination Settings").toString()) if ctx.filesOptions.has_key("links"): for link in ctx.filesOptions["links"]: content.append( item % ki18n("Linked Destination to: <b> %s </b>").toString() % link) elif ctx.filesOptions.has_key("copy destination"): content.append( item % ki18n("Copied Destination to: <b> %s </b>").toString() % ctx.filesOptions["copy destination"]) content.append(end) content.append("""</ul></body></html>""") self.ui.textSummary.setHtml(content) def execute(self): return (True, None)
class Widget(QtGui.QWidget, ScreenWidget): title = i18n("Summary") desc = i18n("Welcome to Migration Tool Wizard :)") def __init__(self, *args): QtGui.QWidget.__init__(self,None) self.ui = Ui_summaryWidget() self.ui.setupUi(self) def shown(self): subject = "<p><li><b>%s</b></li><ul>" item = "<li>%s</li>" end = "</ul></p>" content = QString("") content.append("""<html><body><ul>""") # Selected User content.append(subject % i18n("User Settings")) content.append(item % i18n("Selected User: <b>%s</b>") % ctx.user[2]) content.append(end) # Selected Options content.append(subject % i18n("Options Settings")) for key,value in ctx.options.items(): print "YOOO:", key, value content.append(item % i18n("Option %1 : <b>%2</b>", key, value)) content.append(end) if ctx.filesOptions: #Selected Files Destinations content.append(subject % i18n("Destination Settings")) if ctx.filesOptions.has_key("links"): for link in ctx.filesOptions["links"]: content.append(item % i18n("Linked Destination to: <b> %s </b>") % link) elif ctx.filesOptions.has_key("copy destination"): content.append(item % i18n("Copied Destination to: <b> %s </b>") % ctx.filesOptions["copy destination"]) content.append(end) content.append("""</ul></body></html>""") self.ui.textSummary.setHtml(content) def execute(self): return (True, None)
def __init__(self, *args): QtGui.QWidget.__init__(self,None) self.ui = Ui_summaryWidget() self.ui.setupUi(self)
def __init__(self, *args): QtGui.QWidget.__init__(self, None) self.ui = Ui_summaryWidget() self.ui.setupUi(self)