Example #1
0
 def view_html(self):
     '''
     view the displayed html in plain text
     '''
     html = self.browser.page().currentFrame().toHtml()
     text_browser = QtGui.QTextEdit()
     text_browser.setReadOnly(True)
     text_browser.setFont(QtGui.QFont("courier", 10))
     text_browser.setLineWrapMode(QtGui.QTextEdit.NoWrap)
     text_browser.setPlainText(html)
     dl = BaseDialog(self, remove_stretch=True)
     dl.setWindowTitle("html source view")
     dl.insertWidget(text_browser)
     dl.setMinimumWidth(600)
     dl.cancel_but.hide()
     dl.set_accept_button_text(_("Ok"))
     dl.enableApply()
     dl.exec_()
Example #2
0
 def enableApply(self, enable=True):
     '''
     call this to enable the apply button (which is disabled by default)
     '''
     BaseDialog.enableApply(self, enable)
     self.schedule_now_button.setEnabled(enable)
Example #3
0
 def enableApply(self, enable=True):
     '''
     call this to enable the apply button (which is disabled by default)
     '''
     BaseDialog.enableApply(self, enable)
     self.schedule_now_button.setEnabled(enable)