예제 #1
0
def main():
    QCoreApplication.setOrganizationName("Oleg Evseev")
    QCoreApplication.setOrganizationDomain("x3n.me")
    QCoreApplication.setApplicationName("BCI")

    app = App(sys.argv)
    return app.exec_()
예제 #2
0
def main():
    app = QApplication([])
    QCoreApplication.setOrganizationName(APPLICATION_NAME)
    QCoreApplication.setApplicationName(APPLICATION_NAME)
    widget = WarmuppyWindow()
    widget.show()
    sys.exit(app.exec_())
예제 #3
0
파일: App.py 프로젝트: goph-R/NodeEditor
 def __init__(self, args):
     super(App, self).__init__()
     QCoreApplication.setOrganizationName('Dynart')
     QCoreApplication.setApplicationName('NodeEditor')
     self._qApp = QApplication(args)
     self._qApp.setStyle(Style())
     self._mainWindow = MainWindow(self)
     self._mainWindow.show()
예제 #4
0
def main():
    """The main routine."""
    # Define the names of the organization and the application
    # The value is used by the QSettings class when it is constructed using
    # the empty constructor. This saves having to repeat this information
    # each time a QSettings object is created.
    # The default scope is QSettings::UserScope
    QCoreApplication.setOrganizationName("labsquare")
    QCoreApplication.setApplicationName("cutevariant")
    QCoreApplication.setApplicationVersion(__version__)

    # Process command line arguments
    app = QApplication(sys.argv)
    process_arguments(app)

    # Load app styles
    load_styles(app)

    # # Uncomment those line to clear settings
    # settings = QSettings()
    # settings.clear()

    # Set icons set
    setFontPath(cm.FONT_FILE)

    # Translations
    load_translations(app)

    # debug settings
    # from cutevariant.gui.settings import *
    # w = SettingsWidget()
    # w.show()

    # Splash screen
    splash = QSplashScreen()
    splash.setPixmap(QPixmap(cm.DIR_ICONS + "splash.png"))
    splash.showMessage(f"Version {__version__}")
    splash.show()
    app.processEvents()

    #  Drop settings if old version
    settings = QSettings()
    settings_version = settings.value("version", None)
    if settings_version is None or parse_version(
            settings_version) < parse_version(__version__):
        settings.clear()
        settings.setValue("version", __version__)

    # Display
    w = MainWindow()

    # STYLES = cm.DIR_STYLES + "frameless.qss"
    # with open(STYLES,"r") as file:
    #     w.setStyleSheet(file.read())

    w.show()
    splash.finish(w)
    app.exec_()
예제 #5
0
def temp_settings():
    temp_home = tempfile.TemporaryDirectory()
    os.environ['HOME'] = temp_home.name
    os.environ['WARMUPPY_DEBUG'] = 'TRUE'
    QCoreApplication.setOrganizationName(APPLICATION_NAME)
    QCoreApplication.setApplicationName(APPLICATION_NAME)
    app = Warmuppy()
    app.settings.sync()
    yield app, temp_home.name
예제 #6
0
파일: TilePad.py 프로젝트: goph-R/TilePad
 def __init__(self):
     QCoreApplication.setOrganizationName('DynArt')
     QCoreApplication.setApplicationName('TilePad')
     QCoreApplication.setApplicationVersion('0.4.0')
     if getattr(sys, 'frozen', False):
         self.dir = os.path.dirname(sys.executable)
     else:
         self.dir = os.path.dirname(__file__)
     self.dir = self.dir.replace('\\', '/')
     self.qApp = QApplication(sys.argv)
     self.mainWindow = MainWindow(self)
예제 #7
0
def temp_settings():
    temp_home = tempfile.TemporaryDirectory()
    os.environ['HOME'] = temp_home.name
    QCoreApplication.setOrganizationName(APPLICATION_NAME)
    QCoreApplication.setApplicationName(APPLICATION_NAME)
    q_settings = QSettings()
    q_settings.setValue('instrument', 123)
    q_settings.beginWriteArray('exercises')
    q_settings.setValue('sample1', ['1', '2', '3'])
    q_settings.setValue('sample2', ['4', '5', '6'])
    q_settings.endArray()
    q_settings.sync()
    settings = Settings()
    yield settings
예제 #8
0
파일: main.py 프로젝트: psavery/hexrdgui
def main():
    # Kill the program when ctrl-c is used
    signal.signal(signal.SIGINT, signal.SIG_DFL)

    QCoreApplication.setAttribute(Qt.AA_ShareOpenGLContexts)

    QCoreApplication.setOrganizationName('hexrd')
    QCoreApplication.setApplicationName('hexrd')

    app = QApplication(sys.argv)

    window = MainWindow()
    window.ui.show()

    sys.exit(app.exec_())
예제 #9
0
파일: main.py 프로젝트: qt4cpp/Pype_player
    def __init__(self, parent=None):
        super(PypePlayer, self).__init__(parent)

        QCoreApplication.setOrganizationName('Ted')
        QCoreApplication.setApplicationName('PypePlayer')
        self.setting_dialog = settings_widget()
        self.setting_dialog.settings_saved.connect(self.read_settings)

        self.player = Player(parent=self)
        self.setCentralWidget(self.player)
        self.viewer = Viewer(parent=self)

        self.menu_controller = MenuController(self, self.menuBar())
        self._create_menu()
        self.update_actions()

        self.player.media_loaded.connect(self.set_window_title)
        self.player.stopped.connect(self.set_window_title)

        self.read_settings()
        self.set_window_title('')
        self.show()
        self.adjust_header_act.trigger()
예제 #10
0
def main():
    # Kill the program when ctrl-c is used
    signal.signal(signal.SIGINT, signal.SIG_DFL)

    QCoreApplication.setAttribute(Qt.AA_ShareOpenGLContexts)

    QCoreApplication.setOrganizationName('hexrd')
    QCoreApplication.setApplicationName('hexrd')

    app = QApplication(sys.argv)

    data = resource_loader.load_resource(hexrd.ui.resources.icons,
                                         'hexrd.ico',
                                         binary=True)
    pixmap = QPixmap()
    pixmap.loadFromData(data, 'ico')
    icon = QIcon(pixmap)
    app.setWindowIcon(icon)

    window = MainWindow()
    window.set_icon(icon)
    window.show()

    sys.exit(app.exec_())
예제 #11
0
파일: musync.py 프로젝트: chusopr/musync
from PySide2.QtWidgets import QApplication, QMessageBox
from PySide2.QtGui import QDesktopServices
from PySide2.QtCore import QUrl, QCoreApplication
from os import environ, pathsep
import sys

import gui

from selenium import webdriver
from selenium.common.exceptions import WebDriverException

app = QApplication(sys.argv)

QCoreApplication.setOrganizationName("muSync")
QCoreApplication.setOrganizationDomain("musync.link")
QCoreApplication.setApplicationName("muSync")
QCoreApplication.setApplicationVersion("0.5.0")

try:
    chrome_options = webdriver.ChromeOptions()
    chrome_options.add_argument("headless")
    chrometest = webdriver.Chrome(executable_path="chromedriver",
                                  options=chrome_options)
    chrometest.quit()
except WebDriverException as e:
    if "executable needs to be in PATH" in e.msg:
        d = QMessageBox(
            QMessageBox.Critical, "Chromedriver not found",
            """Chromedriver was not found in the path.

Please download Chromedriver from the following address and unzip it in any directory in the system PATH:
예제 #12
0
# This Python file uses the following encoding: utf-8
import sys
from PySide2.QtWidgets import QApplication
from PySide2.QtCore import QSettings, QCoreApplication
from opengene.views.main_window import MainWindow

if __name__ == "__main__":
    app = QApplication([])
    QCoreApplication.setApplicationName("OpenGene")
    QCoreApplication.setOrganizationName("MininuxDev")
    main_window = MainWindow()
    sys.exit(app.exec_())
예제 #13
0
# -*- coding: utf-8 -*-
import sys
from PySide2.QtWidgets import QApplication
from PySide2.QtCore import QCoreApplication

from notepad import Notepad

if __name__ == '__main__':
    QCoreApplication.setOrganizationName('AdanMercado')
    QCoreApplication.setOrganizationDomain('https://github.com/adanmercado')
    QCoreApplication.setApplicationName('Notepad')
    QCoreApplication.setApplicationVersion('1.0.0')
    app = QApplication(sys.argv)

    notepad = Notepad()
    notepad.showMaximized()

    sys.exit(app.exec_())
예제 #14
0
import sys
import struct

if os.name == 'nt':
    import PySide2

    dirname = os.path.dirname(PySide2.__file__)
    plugin_path = os.path.join(dirname, 'plugins', 'platforms')
    os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = plugin_path

from PySide2.QtCore import QCoreApplication
from PySide2.QtWidgets import QApplication

QCoreApplication.setOrganizationName("UFAL")
QCoreApplication.setOrganizationDomain("ufal.ms.mff.cuni.cz")
QCoreApplication.setApplicationName("Alignmeet")

if os.name == 'nt':
    arch = struct.calcsize('P') * 8

    if arch == 64 and os.path.exists("""C:\Program Files\VideoLAN\VLC"""):
        os.environ[
            'PYTHON_VLC_MODULE_PATH'] = """C:\Program Files\VideoLAN\VLC"""
    elif arch == 32 and os.path.exists(
            """C:\Program Files (x86)\VideoLAN\VLC"""):
        os.environ[
            'PYTHON_VLC_MODULE_PATH'] = """C:\Program Files (x86)\VideoLAN\VLC"""
    else:
        os.environ['PYTHON_VLC_MODULE_PATH'] = """program/vlc-3.0.9.2"""

from .annotations import Annotations
예제 #15
0
__appname__ = "Easy File Renamer"
__module__ = "main"

__author__ = "Jose Ivan Lopez Romo"
__copyright__ = "Copyright 2018"
__license__ = "MIT"
__version__ = "1.0.0"
__email__ = "*****@*****.**"

if __name__ == "__main__":
    logging.basicConfig(
        handlers=[logging.FileHandler(LOG_FILE_PATH, encoding='utf-8')],
        level=logging.INFO,
        format="%(asctime)s -- %(levelname)s -- %(message)s")

    QCoreApplication.setApplicationName("EasyFileRenamer")
    QCoreApplication.setApplicationVersion("1.0")
    QCoreApplication.setOrganizationName("EasyFileRenamer")
    QCoreApplication.setOrganizationDomain("www.ivanlopezr.com")

    logging.info("--- APPLICATION STARTED ---")

    QApplication.setStyle("fusion")
    app = QApplication(sys.argv)

    form = GUI()
    form.show()

    sys.exit(app.exec_())
finally:
    try:
        from PySide2.QtCore import QSettings, QCoreApplication
        from PySide2.QtWidgets import QApplication
    except ImportError:
        import tkinter.messagebox as tkmb

        tkmb.showerror('Errore!', 'Non è possibile importare le librerie esterne necessarie per il funzionamento del '
                                  'programma.\nSi prega di installarle con il seguente comando:\npip install -r '
                                  'requirements.txt')
        exit()

from src.windows.MainWindow import MainWindow

# Set info
QCoreApplication.setApplicationName('Risolutore approssimativo di equazioni')
QCoreApplication.setApplicationVersion('1.0')
QCoreApplication.setOrganizationName('maicol07')
QCoreApplication.setOrganizationDomain('maicol07.it')

app = QApplication(sys.argv)

# Load style

settings = QSettings('settings.ini', QSettings.IniFormat)
theme = settings.value('appearance/style')
if theme:
    app.setStyle(theme)
font = settings.value('appearance/font')
if font:
    app.setFont(font)
예제 #17
0
파일: main.py 프로젝트: rk-exxec/MAEsure
        self.ui = Ui_main()
        self.window.ui = self.ui
        self.ui.setupUi(self.window)
        self.window.show()

        splash.finish(self.window)


if __name__ == "__main__":
    # compile python qt form.ui into python file
    os.system('pyside2-uic -o src/ui_form.py qt_resources/form.ui')

    from ui_form import Ui_main

    # setup logging
    initialize_logger("./log")

    # pysde2 settings config
    QCoreApplication.setOrganizationName("OTH Regensburg")
    QCoreApplication.setApplicationName("MAEsure")

    # init application
    app = App(sys.argv)
    app.processEvents()

    app.ui.actionAbout_MAEsure.triggered.connect(
        lambda: AboutDialog(app.window))

    # execute qt main loop
    sys.exit(app.exec_())
예제 #18
0
    if (c != old):
        dial_map[0].setValue(c.red())
        dial_map[1].setValue(c.green())
        dial_map[2].setValue(c.blue())


color_button = QPushButton("color")
color_button.clicked.connect(color_button_clicked)

group_leds.layout().addWidget(led_mode_combo, 3, 1)
group_leds.layout().addWidget(commit_led_button, 3, 2)
group_leds.layout().addWidget(color_button, 3, 0)

#dsp.refresh()

#timer = QtCore.QTimer()
#timer.setInterval(5000)
#timer.timeout.connect(timer_timeout)
#timer.start()

main_window = MainWindow()

#tx_worker.start()
main_window.show()
#GUI = Window()
QCoreApplication.setOrganizationName("Julian Schick")
QCoreApplication.setApplicationName("FlipUI")

app.exec_()
예제 #19
0
파일: main.py 프로젝트: breitburg/typetific
        self.repaint()

    def reset(self) -> None:
        self.events = []
        self.text = ' '.join([
            choice(list(self.config['dictionary'])).lower()
            for _ in range(self.settings.value('wordsCount', 20))
        ])
        self.pointer = 0

    def setupWindow(self) -> None:
        self.setWindowTitle('Typetific')
        self.setMinimumSize(1100, 620)
        self.setUnifiedTitleAndToolBarOnMac(True)
        self.setStyleSheet('background: {}; color: {};'.format(
            self.config['background_color'].name(),
            self.config['primary_color'].name()))


if __name__ == '__main__':
    app = QApplication()

    window = TypingWindow()
    QCoreApplication.setApplicationName(window.windowTitle())
    QCoreApplication.setOrganizationName('Breitburg Ilya')
    QCoreApplication.setOrganizationDomain('breitburg.com')
    window.show()

    app.exec_()
예제 #20
0
import os
import logging
import importlib.util

from PySide2.QtGui import QGuiApplication
from PySide2.QtQml import QQmlApplicationEngine
from PySide2.QtCore import QUrl, QAbstractListModel, QModelIndex, Qt, Slot, QSortFilterProxyModel, QCoreApplication

from ..zmq_client import ZmqClient
from ..zmq_server import ZmqServer
from ..csv import generateFilename

if __name__ == '__main__':
    QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
    QCoreApplication.setAttribute(Qt.AA_UseHighDpiPixmaps)
    QCoreApplication.setApplicationName("Embedded Debugger visu")

    parser = argparse.ArgumentParser(description='ZMQ visu', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
    parser.add_argument('-s', dest='server', type=str, default='localhost', help='ZMQ server to connect to')
    parser.add_argument('-p', dest='port', type=int, default=ZmqServer.default_port, help='port')
    parser.add_argument('-v', dest='verbose', default=False, help='Enable verbose output', action='store_true')
    parser.add_argument('-f', dest='csv', default=None, nargs='?',
        help='Log auto-refreshed data to csv file. ' +
            'The file is truncated upon startup and when the set of auto-refreshed objects change. ' +
            'The file name may include strftime() format codes.', const='')
    parser.add_argument('-t', dest='timestamp', default=False, help='Append time stamp in csv file name', action='store_true')
    parser.add_argument('-m', dest='multi', default=False,
        help='Enable multi-mode; allow multiple simultaneous connections to the same target, ' +
            'but it is less efficient.', action='store_true')
    parser.add_argument('rcc', type=str, nargs=1, help='rcc file with ":/main.qml" visu')
예제 #21
0
from scihub_eva.globals.versions import *
from scihub_eva.globals.preferences import *
from scihub_eva.utils.preferences_utils import *
from scihub_eva.utils.sys_utils import *
from scihub_eva.utils.path_utils import *
from scihub_eva.ui.scihub_eva import UISciHubEVA

if __name__ == '__main__':
    app_path = os.path.abspath(os.path.dirname(sys.argv[0]))
    os.environ['QT_QUICK_CONTROLS_CONF'] = (
        PREFERENCES_DIR / 'qtquickcontrols2.conf').resolve().as_posix()

    QCoreApplication.setOrganizationName(ORGANIZATION_NAME)
    QCoreApplication.setOrganizationDomain(ORGANIZATION_DOMAIN)
    QCoreApplication.setApplicationName(APPLICATION_NAME)

    QGuiApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
    QGuiApplication.setAttribute(Qt.AA_UseHighDpiPixmaps)
    QGuiApplication.setAttribute(Qt.AA_ShareOpenGLContexts)

    app = QGuiApplication(sys.argv)

    lang = Preferences.get_or_default(SYSTEM_LANGUAGE_KEY, SYSTEM_LANGUAGE)
    lang_file_path = (
        I18N_DIR /
        'SciHubEVA_{lang}.qm'.format(lang=lang)).resolve().as_posix()
    translator = QTranslator()
    translator.load(lang_file_path)
    app.installTranslator(translator)