示例#1
0
    def make_extra_widgets(self):
        """create - ULIB.TextWindow for help messages, scrip and warnings
                - gvars.browser for web links"""

        # text window (if None (for now), new windows will be created)
        # self.gvars.Text_help = None
        self.gvars.Text_help = QLIB.TextWindow(parent=self)
        self.gvars.Text_script = QLIB.TextWindow(parent=self)

        # note whether we have a browser via import
        self.gvars.browser = None
        try:
            import webbrowser
            self.gvars.browser = webbrowser
            if self.verb > 1: print('++ have browser')
        except:
            if self.verb > 1: print('-- NO browser')
示例#2
0
    def uberHelp(self):

        # rcr - make permanent?  (allow edit, save, reset text?)
        win = QLIB.TextWindow(text=UPROC.g_help_string,
                              title='uber_proc.py help',
                              parent=self)
        if win.status: del (win)
        else: win.show()
示例#3
0
 def update_help_window(self, text, title=''):
     # if no permanent window, make a new one each time
     if self.gvars.Text_help == None:
         if self.verb > 2: print('++ opening new TextWindow')
         win = QLIB.TextWindow(text=text, title=title, parent=self)
         win.setAttribute(QtCore.Qt.WA_DeleteOnClose)
         win.show()
     else:
         if title != '': self.gvars.Text_help.setWindowTitle(title)
         self.gvars.Text_help.editor.setText(text)
         self.gvars.Text_help.show()