def main(): """Run Windows environment variable editor""" from src.gui.utils.qthelpers import qapplication app = qapplication() dialog = WinUserEnvDialog() dialog.show() app.exec_()
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]
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_())
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()
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_()
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()