Exemple #1
0
def gui():
    """Run the Sound Speed Settings gui"""

    app = QtWidgets.QApplication(sys.argv)
    app.setStyleSheet(AppStyle.load_stylesheet())

    lib = SoundSpeedLibrary()
    main = MainWin(lib=lib)
    main.show()

    sys.exit(app.exec_())
Exemple #2
0
def gui():
    """Create the application and show the SSM-SIS gui"""
    from hyo2.ssm_sis.mainwin import MainWin

    app = QtWidgets.QApplication([])
    app.setStyleSheet(AppStyle.load_stylesheet())

    main_win = MainWin()
    main_win.show()

    sys.exit(app.exec_())
Exemple #3
0
def gui():
    """Create the application and show the Sound Speed Manager gui"""
    from hyo2.soundspeedmanager.mainwin import MainWin

    app = QtWidgets.QApplication([])
    app.setStyleSheet(AppStyle.load_stylesheet())

    main_win = MainWin()
    sys.excepthook = main_win.exception_hook  # install the exception hook
    main_win.show()
    main_win.do()

    sys.exit(app.exec_())
Exemple #4
0
def gui():
    """Run the Sound Speed Settings gui"""
    from hyo2.soundspeedsettings.mainwin import MainWin
    from hyo2.soundspeed.soundspeed import SoundSpeedLibrary

    app = QtWidgets.QApplication(sys.argv)
    app.setStyleSheet(AppStyle.load_stylesheet())

    lib = SoundSpeedLibrary()
    main = MainWin(lib=lib)
    main.show()

    sys.exit(app.exec_())
Exemple #5
0
def gui():
    """Run the QC Tools gui"""

    # sys.argv.append(["--disable-web-security"])  # temporary fix for CORS warning (QTBUG-70228)
    app = QtWidgets.QApplication()
    app.setStyleSheet(AppStyle.load_stylesheet())

    main_win = MainWin()
    sys.excepthook = main_win.exception_hook  # install the exception hook
    main_win.show()
    # main.do()

    sys.exit(app.exec_())
Exemple #6
0
def gui():
    """Create the application and show the Sound Speed Manager gui"""

    sys.argv.append("--disable-web-security"
                    )  # temporary fix for CORS warning (QTBUG-70228)
    app = QtWidgets.QApplication(sys.argv)
    app.setStyleSheet(AppStyle.load_stylesheet())

    main_win = MainWin()
    sys.excepthook = main_win.exception_hook  # install the exception hook
    main_win.show()
    main_win.do()

    sys.exit(app.exec_())
    def __init__(self, lib_info: LibInfo, parent: QtWidgets.QWidget = None):
        super().__init__(parent)
        self._li = lib_info

        self.layout = QtWidgets.QVBoxLayout()
        self.setLayout(self.layout)

        self.text = QtWidgets.QTextBrowser()
        self.text.setReadOnly(True)
        self.text.setMinimumWidth(200)
        self.text.setOpenLinks(True)
        self.text.setOpenExternalLinks(True)
        self.text.document().setDefaultStyleSheet(AppStyle.html_css())
        self.text.setHtml(Helper(lib_info=lib_info).package_info(qt_html=True))
        self.layout.addWidget(self.text)
Exemple #8
0
def gui(dev_mode=False):
    """Run the QAX gui"""

    sys.argv.append("--disable-web-security"
                    )  # temporary fix for CORS warning (QTBUG-70228)
    app = QtWidgets.QApplication(sys.argv)
    app.setStyleSheet(AppStyle.load_stylesheet())

    main_win = MainWin()
    sys.excepthook = main_win.exception_hook  # install the exception hook
    main_win.show()
    if dev_mode:
        main_win.do()

    sys.exit(app.exec_())
Exemple #9
0
def main():

    # noinspection PyUnresolvedReferences,PyArgumentList
    QtGui.QGuiApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling)

    sys.argv.append("--disable-web-security")  # temporary fix for CORS warning (QTBUG-70228)
    app = QtWidgets.QApplication(sys.argv)
    app.setApplicationName('%s' % app_name)
    app.setOrganizationName("HydrOffice")
    app.setOrganizationDomain("hydroffice.org")
    app.setStyleSheet(AppStyle.load_stylesheet())

    main_win = MainWindow()
    main_win.show()

    sys.excepthook = main_win.exception_hook  # install the exception hook

    main_win.raise_()  # to raise the window on OSX

    sys.exit(app.exec_())
Exemple #10
0
import sys
import logging
from PySide2 import QtWidgets

from hyo2.abc.lib.logging import set_logging
from hyo2.abc.app.app_style import AppStyle
from hyo2.openbst.app.dialogs.setup_dialog import SetupDialog
from hyo2.openbst.lib.openbst import OpenBST

logger = logging.getLogger(__name__)
set_logging(ns_list=[
    "hyo2.openbst",
])

app = QtWidgets.QApplication([])
app.setStyleSheet(AppStyle.load_stylesheet())

mw = QtWidgets.QMainWindow()
mw.show()

dlg = SetupDialog(lib=OpenBST(), parent=mw)
dlg.exec_()

sys.exit(app.exec_())
Exemple #11
0
 def test_html_css(self):
     css_str = AppStyle.html_css()
     self.assertIsInstance(css_str, str)
     self.assertGreater(len(css_str), 0)
Exemple #12
0
 def test_load_stylesheet(self):
     ss_str = AppStyle.load_stylesheet()
     self.assertIsInstance(ss_str, str)
     self.assertGreater(len(ss_str), 0)