示例#1
0
class Gstyle(object):
    def __init__(self):
        #Vérification de la config du system
        config.check_config()
        #Instanciation des objet metier
        #Icon
        print "start icons scan"
        self.icon_dict  =  IconDict()
        #Emerald
        print "start emerald scan"
        self.emerald_dict = EmeraldDict()
        #Metacity
        print "start metacity scan"
        self.metacity_dict = MetacityDict()
        #Mouse
        print "start mouse scan"
        self.mouse_dict = MouseDict()
        #Gtk
        print "start gtk scan"
        self.gtk_dict = GtkDict()
        #Wallpaper
        self.wallpapers_dict = WallPaperDict()
        print "start wallpapers scan"
        #Cubemodel
        print "start cubemodels scan"
        self.cubemodels_dict = CubemodelsDict()
        #Fullpack
        print "start fullpacks scan"
        self.fullpack_dict = FullPackDict()
        
        #Instanciation de l'interface graphique
        self.gtk_gui = MainWindow()
        self.gtk_gui.initialisation_gui(self)
        
        gtk.main()
示例#2
0
 def __init__(self):
     #Vérification de la config du system
     config.check_config()
     #Instanciation des objet metier
     #Icon
     print "start icons scan"
     self.icon_dict  =  IconDict()
     #Emerald
     print "start emerald scan"
     self.emerald_dict = EmeraldDict()
     #Metacity
     print "start metacity scan"
     self.metacity_dict = MetacityDict()
     #Mouse
     print "start mouse scan"
     self.mouse_dict = MouseDict()
     #Gtk
     print "start gtk scan"
     self.gtk_dict = GtkDict()
     #Wallpaper
     self.wallpapers_dict = WallPaperDict()
     print "start wallpapers scan"
     #Cubemodel
     print "start cubemodels scan"
     self.cubemodels_dict = CubemodelsDict()
     #Fullpack
     print "start fullpacks scan"
     self.fullpack_dict = FullPackDict()
     
     #Instanciation de l'interface graphique
     self.gtk_gui = MainWindow()
     self.gtk_gui.initialisation_gui(self)
     
     gtk.main()
示例#3
0
def main():
    """Creates application and main window and sets application icon."""
    app = QApplication(sys.argv)
    app.setWindowIcon(QIcon('resources/img/icon.svg'))
    window = MainWindow()
    window.show()
    sys.exit(app.exec_())
示例#4
0
文件: main.py 项目: azuer88/dike
def main():
    app = QApplication(sys.argv)

    window = MainWindow()

    window.show()
    window.raise_()

    return app.exec_()
def run_slpa():
    app = QApplicationMessaging(sys.argv)
    if app.isRunning():
        if len(sys.argv) > 1:
            app.sendMessage(sys.argv[1])
        else:
            app.sendMessage('ARISE')
    else:
        slpaGUI = MainWindow(app)
        app.aboutToQuit.connect(slpaGUI.cleanUp)

        app.setActiveWindow(slpaGUI)
        slpaGUI.show()
        sys.exit(app.exec_())
示例#6
0
def gui(args):

    # Create applicatin
    app = QApplication(args)

    # Show main window
    mainWindow = MainWindow(args)
    mainWindow.show()

    app.setActiveWindow(mainWindow)

    # Close application if there's no window
    app.connect(app, SIGNAL('lastWindowClosed()'), app.quit)

    # Go go go!
    app.exec_()
示例#7
0
文件: __init__.py 项目: Tayyib/uludag
def gui(args):

    # Create applicatin
    app = QApplication(args)

    # Show main window
    mainWindow = MainWindow(args)
    mainWindow.show()

    app.setActiveWindow(mainWindow)

    # Close application if there's no window
    app.connect(app, SIGNAL('lastWindowClosed()'), app.quit)

    # Go go go!
    app.exec_()
示例#8
0
def main():
    """Creates application and main window and sets application icon."""
    app = QApplication(sys.argv)
    app.setWindowIcon(QIcon('resources/img/icon.svg'))
    window = MainWindow()
    screen = QRect(app.desktop().availableGeometry())
    x = screen.left() + (screen.width() - window.width()) / 2
    y = screen.top() + (screen.height() - window.height()) / 2
    window.move(x, y)
    window.show()
    sys.exit(app.exec_())
示例#9
0
def main(args): 
    """
    This is the main method of Stat466. It inits the logger and creates
    the QApplication. Furthermore it loads and installs translators for
    Qt and Stat466. Finally it shows the MainWindow and enters the main
    loop of the app.
    """
    if len(args) == 1 and ( args[0] == '-d' or args[0] == '--debug'):
        logging.basicConfig(
            format='%(asctime)s %(levelname)s: %(message)s',
            level=logging.DEBUG)
    elif len(args) == 0:
        dir = os.path.expanduser('~/.stat466')
        if not os.path.exists(dir):
            os.makedirs(dir)
        db.PATH = dir + '/'
        logging.basicConfig(
            format='%(asctime)s %(levelname)s: %(message)s',
            filename=(dir + '/main.log'), 
            level=logging.INFO)
    else:
        print 'Stat466 - Statistics for Bauernschnapsen\n'
        print 'usage: stat466.py [-d | --debug]\n'
        return 0
        
    logging.info('Start of Stat466')
    app = QtGui.QApplication(sys.argv)
    
    locale = QtCore.QLocale.system().name()
    qt_translator = QtCore.QTranslator()
    if qt_translator.load("qt_" + locale, 
                          QtCore.QLibraryInfo.location(
                          QtCore.QLibraryInfo.TranslationsPath)):
        app.installTranslator(qt_translator)
        
    translator = QtCore.QTranslator()
    if translator.load("stat466_" + locale + ".qm", "./resources/lang/"):
        app.installTranslator(translator)
        
    main = MainWindow()
    main.show()
    exit_status = app.exec_()
    logging.info('Stop of Stat466')
    return exit_status
示例#10
0
def main():
    app = QApplication(sys.argv)

    window = MainWindow()

    window.show()
    window.raise_()

    return app.exec_()
示例#11
0
import sys
from gui.main import MainWindow
from PyQt5 import QtWidgets

app = QtWidgets.QApplication(sys.argv)
win = MainWindow()
sys.exit(app.exec_())
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QApplication, QMessageBox

from definitions import DATA_DIR
from core import server
from gui.main import MainWindow
from gui import fonts

if __name__ == "__main__":
    app = QApplication([])
    app.setWindowIcon(QIcon(DATA_DIR + 'img/dog_icon.ico'))

    port_blocker_name = server.get_port_blocker_name()
    if port_blocker_name:
        QMessageBox().warning(
            None, 'Port already in use!',
            f'This app requires a specific local port to be open,\n'
            f'but it seems to be taken by {port_blocker_name}.\n'
            f"If it's safe to do so, stop the process and try again.")
        sys.exit(-1)

    server_thread = Thread(target=server.run, daemon=True)
    server_thread.start()

    with open(DATA_DIR + 'styles/default.qss') as stylesheet:
        app.setStyleSheet(stylesheet.read())
    fonts.init()
    main_window = MainWindow()
    main_window.show()
    sys.exit(app.exec())
示例#13
0
def main():
    root = MainWindow()
    root.mainloop()