Exemplo n.º 1
0
class coreUI(object):
    __window_app = MainWindow()

    @classmethod
    def add_plugin_ui(cls, widget):
        cls.__window_app.the_real_add_plugin_ui(widget)

    @classmethod
    def set_mainwindow(cls, mainwin):
        cls.__window_app = mainw
Exemplo n.º 2
0
def main():
    import logging
    import sys
    from pyqode.qt.QtWidgets import QApplication
    from UI import MainWindow

    # Logging
    filename = None
    if sys.platform == 'win32':
        filename = 'PyCreator.log'
        logging.basicConfig(level=logging.INFO,
                            filename=filename)  # save log to file

    app = QApplication(sys.argv)

    # ~To Do~
    # create a function to set the style by passing in the app object
    # or load style sheet from file?
    app.setStyle('Fusion')  # Needed to make dark theme look right

    win = MainWindow()
    win.show()

    sys.exit(app.exec_())
Exemplo n.º 3
0
def main(args = None):
	if args is None:
		args = sys.argv

	app = QtWidgets.QApplication(args)

	mainWindow = MainWindow(None)
	serialReader = SerialReader(None, exchangeRowsColumns = False)

	serialReader.statusString.connect(mainWindow.updateStatus)
	serialReader.serialPortsUpdated.connect(mainWindow.updateSerialPorts)
	serialReader.pressureMapUpdated.connect(mainWindow.updateMap)
	mainWindow.serialPortSelected.connect(serialReader.setSerialName)
	mainWindow.serialConnectReq.connect(serialReader.connectSerial)
	mainWindow.serialDisconnectReq.connect(serialReader.disconnectSerial)

	ports = serialReader.listSerialPorts()
	mainWindow.updateSerialPorts(ports)

	app.aboutToQuit.connect(quitEventHandler)

	serialReader.start()
	mainWindow.show()
	sys.exit(app.exec_())
Exemplo n.º 4
0
from UI import MainWindow
import os
from util.config import Config

if __name__ == "__main__":
    config = Config(os.path.join(os.path.dirname(__file__), "..", "output"))
    MainWindow.main(config)
Exemplo n.º 5
0
from sys import platform
from tkinter import Tk
import UI.MainWindow as mainWindow
import Comms.NetworkReader as NetworkReader
import sys
import faulthandler

faulthandler.enable()
root = Tk()
root.geometry("1280x800")
root.resizable(False, False)

#if platform != "win32":
#    root.overrideredirect(1)

app = mainWindow.MainWindow(root)


def on_closing():
    app.close()
    print("Connections closed")
    root.destroy()
    print("Root destroyed")


root.protocol("WM_DELETE_WINDOW", on_closing)
root.mainloop()
Exemplo n.º 6
0

if __name__ == '__main__':
    app = QApplication(sys.argv)

    # appLauncher = AppLauncher()
    # appLauncher.run()

    # Create Queue and redirect sys.stdout to this queue
    consoleLogsQueue = ConsoleLogQueue()
    queue = consoleLogsQueue.queue
    sys.stdout = StreamWriter(queue)

    # Create Main Application GUI
    # app = QApplication(sys.argv)
    mainWin = mw.MainWindow(app=app)
    mainWin.run()

    # Create thread that will listen on the other end of the queue, and send the text to the textedit in
    # main application gui
    thread = QtCore.QThread()
    appGuiLauncher = AppGuiLauncher(queue=queue)
    appGuiLauncher.consoleLogsUpdateSignal.connect(
        mainWin.appendTextToExperimentConsole)
    appGuiLauncher.moveToThread(thread)
    thread.started.connect(appGuiLauncher.run)

    mainWin.startAlgorithmsInThread()
    thread.start()

    # Start event loop
Exemplo n.º 7
0
import sys

from UI import MainWindow
import xml.etree.ElementTree as XETree
from openpyxl import load_workbook
from openpyxl.styles import PatternFill

from PyQt5.QtWidgets import QApplication, QMainWindow

if __name__ == '__main__':
    app = QApplication(sys.argv)
    #openfile.Ui_Dialog()
    w = MainWindow.MainWindow()
    sys.exit(app.exec_())

Exemplo n.º 8
0
#
import UI.MainWindow as mainWin

if __name__ == '__main__':
    #
    mainWin.run()
Exemplo n.º 9
0
import sys
from PyQt5.QtWidgets import QApplication
from UI import MainWindow

if __name__ == "__main__":
    app = QApplication(sys.argv)
    mainWindow = MainWindow()

    sys.exit(app.exec_())
Exemplo n.º 10
0
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 21 03:05:49 2018

@author: unixuser
"""
from PyQt5 import QtWidgets

import sys
sys.path.insert(0, r'.\UI')

from UI import MainWindow

if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    mainwindow = MainWindow()
    mainwindow.show()
    sys.exit(app.exec_())
Exemplo n.º 11
0
import sys
from UI import MainWindow
from PyQt5 import QtWidgets

if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    window = MainWindow()
    window.show()
    sys.exit(app.exec_())
Exemplo n.º 12
0
    '6': 30,
    '7': 31,
    '8': 31,
    '9': 30,
    '10': 31,
    '11': 30,
    '12': 31
}

# if the year is a leap year add a day to february
if calendar.isleap(datetime.today().year):
    months['2'] = 29

# if the application loaded correctly continue, otherwise display a message
if correctLoad:
    mWindow = MainWindow(months)
    loadingW.close()
    mWindow.showMaximized()

    # little Easter egg for my girlfriend
    if datetime.today().strftime('%m-%d') == '11-09':
        EG = ErrorWindow("Χρόνια πολλά μωάκι <3 <3 <3 \n (´▽`ʃ❤ƪ)", "o(^▽^)o")
        EG.show()
    app.exec_()
else:
    MessageBox(
        title='Error',
        text=
        '<p style="text-align:left;font-size:18px">Αποτυχία φόρτωσης προγράμματος',
        buttons=QMessageBox.Ok)
    loadingW.close()
Exemplo n.º 13
0
def main():
    app = QtGui.QApplication(sys.argv)
    window = MainWindow()
    window.show()
    sys.exit(app.exec_())