def __init__(self): assert self._instance == None Config._instance = self QCoreApplication.setOrganizationName("nicolas.carrier") QCoreApplication.setApplicationVersion(version) QCoreApplication.setApplicationName("gem") self.__settings = QSettings()
def __init__(self): assert self._instance == None Config._instance = self QCoreApplication.setOrganizationName("nicolas.carrier") QCoreApplication.setApplicationVersion(version) QCoreApplication.setApplicationName("gem") self.__settings = QSettings()
val_str = self.convert_val_to_str(setting.value) setting_field.setText(setting.filter_name(val_str)) if setting.type == 'check': setting_field.setChecked(setting.value) if setting.type == 'list': val_str = self.convert_val_to_str(setting.value) index = setting_field.findText(val_str) if index != -1: setting_field.setCurrentIndex(index) if setting.type == 'range': setting_field.setValue(setting.value) self.ex_button.setEnabled(self.required_settings_filled()) def show_and_raise(self): self.show() self.raise_() if __name__ == '__main__': app = QApplication(sys.argv) QCoreApplication.setApplicationName("Web2Executable") QCoreApplication.setApplicationVersion(__gui_version__) QCoreApplication.setOrganizationName("SimplyPixelated") QCoreApplication.setOrganizationDomain("simplypixelated.com") frame = MainWindow(1000, 500) frame.show_and_raise() sys.exit(app.exec_())
#!/usr/bin/env python3 # Copyright © 2015-20 Qtrac Ltd. All rights reserved. import os import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) import unittest from PySide.QtCore import QCoreApplication QCoreApplication.setApplicationVersion("0.8.0") import Lib import Xix import Xix.Util import Output import tests.Util from Const import IndentKind, LanguageKind, SeeAlsoPositionKind PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "../tests/data")) def reportProgress(message): pass class TestOutputXML(unittest.TestCase): def setUp(self): self.maxDiff = None self.username = "******" self.args = (LanguageKind.AMERICAN, "wordByWordCMS16",
import argparse import sys from PySide.QtGui import QApplication from PySide.QtCore import QCoreApplication import syrup from syrup.main_window import MainWindow # The QSettings default constructor uses the application's organizationName # and applicationName properties. QCoreApplication.setOrganizationName('NHM') QCoreApplication.setApplicationName('syrup') # No obvious benefit to also setting these but neither is there any obvious harm QCoreApplication.setApplicationVersion(syrup.__version__) QCoreApplication.setOrganizationDomain('nhm.ac.uk') def main(args): parser = argparse.ArgumentParser(description=syrup.__doc__) parser.add_argument('-v', '--version', action='version', version='%(prog)s ' + syrup.__version__) parsed = parser.parse_args(args[1:]) app = QApplication(args) window = MainWindow(app) window.show_from_geometry_settings() sys.exit(app.exec_())
val_str = self.convert_val_to_str(setting.value) setting_field.setText(setting.filter_name(val_str)) if setting.type == 'check': setting_field.setChecked(setting.value) if setting.type == 'list': val_str = self.convert_val_to_str(setting.value) index = setting_field.findText(val_str) if index != -1: setting_field.setCurrentIndex(index) if setting.type == 'range': setting_field.setValue(setting.value) self.ex_button.setEnabled(self.required_settings_filled()) def show_and_raise(self): self.show() self.raise_() if __name__ == '__main__': app = QApplication(sys.argv) QCoreApplication.setApplicationName("Web2Executable") QCoreApplication.setApplicationVersion(__gui_version__) QCoreApplication.setOrganizationName("SimplyPixelated") QCoreApplication.setOrganizationDomain("simplypixelated.com") frame = MainWindow(1000, 500) frame.show_and_raise() sys.exit(app.exec_())
from PySide.QtCore import QSettings, QLocale, QCoreApplication from PySide.QtGui import QApplication import inselect from inselect.lib.utils import debug_print from inselect.gui.app import MainWindow # The QSettings default constructor uses the application's organizationName # and applicationName properties. QCoreApplication.setOrganizationName('NHM') QCoreApplication.setApplicationName('inselect') # No obvious benefit to also setting these but neither is there any obvious harm QCoreApplication.setApplicationVersion(inselect.__version__) QCoreApplication.setOrganizationDomain('nhm.ac.uk') def main(): parser = argparse.ArgumentParser( description='Runs the inselect user-interface') parser.add_argument("file", help='The inselect document to open', nargs='?') parser.add_argument('-d', '--debug', action='store_true', help='Show debug messages') parser.add_argument('-l', '--locale',
import locale import sys from PySide import QtGui from PySide.QtCore import QSettings, QLocale, QCoreApplication import inselect from inselect.lib.utils import debug_print from inselect.gui.main_window import MainWindow # Values used by several important parts of Qt's machinery including the GUI # and QSettings. QCoreApplication.setOrganizationName('NHM') QCoreApplication.setApplicationName('Inselect') QCoreApplication.setApplicationVersion(inselect.__version__) QCoreApplication.setOrganizationDomain('nhm.ac.uk') def main(args): parser = argparse.ArgumentParser(description='Runs the inselect user-interface') parser.add_argument("file", help='The inselect document to open', nargs='?') parser.add_argument('-d', '--debug', action='store_true', help='Show debug messages') parser.add_argument('-l', '--locale', action='store', help='Use LOCALE; intended for testing purposes only') parser.add_argument('-v', '--version', action='version', version='%(prog)s ' + inselect.__version__) parsed = parser.parse_args(args[1:]) # TODO LH A command-line switch to clear all QSettings
import argparse import sys from PySide.QtGui import QApplication from PySide.QtCore import QCoreApplication import syrup from syrup.main_window import MainWindow # The QSettings default constructor uses the application's organizationName # and applicationName properties. QCoreApplication.setOrganizationName('NHM') QCoreApplication.setApplicationName('syrup') # No obvious benefit to also setting these but neither is there any obvious harm QCoreApplication.setApplicationVersion(syrup.__version__) QCoreApplication.setOrganizationDomain('nhm.ac.uk') def main(args): parser = argparse.ArgumentParser(description=syrup.__doc__) parser.add_argument('-v', '--version', action='version', version='%(prog)s ' + syrup.__version__) parsed = parser.parse_args(args[1:]) app = QApplication(args) window = MainWindow(app) window.show_from_geometry_settings() sys.exit(app.exec_())