Ejemplo n.º 1
0
def main():
    """Run Windows environment variable editor"""
    from src.gui.utils.qthelpers import qapplication
    app = qapplication()
    dialog = WinUserEnvDialog()
    dialog.show()
    app.exec_()
Ejemplo n.º 2
0
def test():
    from src.gui.utils.qthelpers import qapplication
    app = qapplication()
    table = ShortcutsTable()
    table.show()
    app.exec_()
    print [str(s) for s in table.model.shortcuts]
Ejemplo n.º 3
0
Archivo: environ.py Proyecto: Pyke75/ga
def main():
    """Run Windows environment variable editor"""
    from src.gui.utils.qthelpers import qapplication
    app = qapplication()
    dialog = WinUserEnvDialog()
    dialog.show()
    app.exec_()
Ejemplo n.º 4
0
def main():
    """Run web browser"""
    from src.gui.utils.qthelpers import qapplication
    app = qapplication()
    widget = PydocBrowser(None)
    widget.show()
    widget.initialize()
    sys.exit(app.exec_())
Ejemplo n.º 5
0
def test():
    from src.gui.utils.qthelpers import qapplication
    app = qapplication()
    table = ShortcutsTable()
    table.show()
    app.exec_()
    print[str(s) for s in table.model.shortcuts]
    table.check_shortcuts()
Ejemplo n.º 6
0
def main():
    """Run web browser"""
    from src.gui.utils.qthelpers import qapplication

    app = qapplication()
    widget = PydocBrowser(None)
    widget.show()
    widget.initialize()
    sys.exit(app.exec_())
Ejemplo n.º 7
0
def test():
    from src.gui.qt.QtGui import QMainWindow
    from src.gui.utils.qthelpers import qapplication
    app = qapplication()
    win = QMainWindow()
    win.setWindowTitle("Status widgets test")
    win.resize(900, 300)
    statusbar = win.statusBar()
    swidgets = []
    for klass in (ReadWriteStatus, EOLStatus, EncodingStatus,
                  CursorPositionStatus, MemoryStatus, CPUStatus):
        swidget = klass(win, statusbar)
        swidgets.append(swidget)
    win.show()
    app.exec_()
Ejemplo n.º 8
0
Archivo: status.py Proyecto: Pyke75/ga
def test():
    from src.gui.qt.QtGui import QMainWindow
    from src.gui.utils.qthelpers import qapplication
    app = qapplication()
    win = QMainWindow()
    win.setWindowTitle("Status widgets test")
    win.resize(900, 300)
    statusbar = win.statusBar()
    swidgets = []
    for klass in (ReadWriteStatus, EOLStatus, EncodingStatus,
                  CursorPositionStatus, MemoryStatus, CPUStatus):
        swidget = klass(win, statusbar)
        swidgets.append(swidget)
    win.show()
    app.exec_()
Ejemplo n.º 9
0
def getopenfilenames(parent=None, caption='', basedir='', filters='',
                     selectedfilter='', options=None):
    """Wrapper around QtGui.QFileDialog.getOpenFileNames static method
    Returns a tuple (filenames, selectedfilter) -- when dialog box is canceled,
    returns a tuple (empty list, empty string)
    Compatible with PyQt >=v4.4 (API #1 and #2) and PySide >=v1.0"""
    return _qfiledialog_wrapper('getOpenFileNames', parent=parent,
                                caption=caption, basedir=basedir,
                                filters=filters, selectedfilter=selectedfilter,
                                options=options)

def getsavefilename(parent=None, caption='', basedir='', filters='',
                    selectedfilter='', options=None):
    """Wrapper around QtGui.QFileDialog.getSaveFileName static method
    Returns a tuple (filename, selectedfilter) -- when dialog box is canceled,
    returns a tuple of empty strings
    Compatible with PyQt >=v4.4 (API #1 and #2) and PySide >=v1.0"""
    return _qfiledialog_wrapper('getSaveFileName', parent=parent,
                                caption=caption, basedir=basedir,
                                filters=filters, selectedfilter=selectedfilter,
                                options=options)

if __name__ == '__main__':
    from src.gui.utils.qthelpers import qapplication
    app = qapplication()
    print repr(getexistingdirectory())
    print repr(getopenfilename(filters='*.py;;*.txt'))
    print repr(getopenfilenames(filters='*.py;;*.txt'))
    print repr(getsavefilename(filters='*.py;;*.txt'))
    sys.exit()