Beispiel #1
0
    def __init__(self):
        QApplication.__init__(self, sys.argv)
        self.setOrganizationName("Khertan Software")
        self.setOrganizationDomain("khertan.net")
        self.setApplicationName("KhtNotes")

        self.view = QtDeclarative.QDeclarativeView()
        self.glw = QGLWidget()
        self.view.setViewport(self.glw)
        self.notesModel = NotesModel()
        self.note = Note()
        self.conboyImporter = TomboyImporter()
        self.syncer = Sync()
        self.rootContext = self.view.rootContext()
        self.rootContext.setContextProperty("argv", sys.argv)
        self.rootContext.setContextProperty("__version__", __version__)
        self.rootContext.setContextProperty("__upgrade__", __upgrade__
                                            .replace('\n', '<br>'))
        self.rootContext.setContextProperty("Settings", Settings())
        self.rootContext.setContextProperty("Sync", self.syncer)
        self.rootContext.setContextProperty("Importer", self.conboyImporter)
        self.rootContext.setContextProperty("QmlDirReaderWriter",
                                             QmlDirReaderWriter())
        self.rootContext.setContextProperty('notesModel', self.notesModel)
        self.rootContext.setContextProperty('Note', self.note)
        self.view.setSource(QUrl.fromLocalFile(
                os.path.join(os.path.dirname(__file__),
                             'qml', 'Harmattan_main.qml')))
        self.rootObject = self.view.rootObject()
        self.view.showFullScreen()
        self.note.on_error.connect(self.rootObject.onError)
        self.syncer.on_error.connect(self.rootObject.onError)
        self.syncer.on_finished.connect(self.notesModel.reload)
        self.conboyImporter.on_finished.connect(self.notesModel.reload)
Beispiel #2
0
    def __init__(self):
        QApplication.__init__(self, sys.argv)
        self.setOrganizationName("Khertan Software")
        self.setOrganizationDomain("khertan.net")
        self.setApplicationName("KhtSimpleText")

        self.view = QtDeclarative.QDeclarativeView()

        #Are we on mer ? So don't use opengl
        #As it didn't works on all devices
        if not os.path.exists('/etc/mer-release'):
            self.glformat = QGLFormat().defaultFormat()
            self.glformat.setSampleBuffers(False)
            self.glw = QGLWidget(self.glformat)
            self.glw.setAutoFillBackground(False)
            self.view.setViewport(self.glw)

        self.document = Document('~')
        self.documentsModel= DocumentsModel(currentDoc=self.document)

        self.rootContext = self.view.rootContext()
        self.rootContext.setContextProperty("argv", sys.argv)
        self.rootContext.setContextProperty("__version__", __version__)
        self.rootContext.setContextProperty("__upgrade__", __upgrade__
                                            .replace('\n', '<br>'))
        self.rootContext.setContextProperty("Settings", Settings())
        self.rootContext.setContextProperty("DocumentsModel",
                                            self.documentsModel)
        self.rootContext.setContextProperty("Document",
                                            self.document)
        self.view.setSource(QUrl.fromLocalFile(
                os.path.join(os.path.dirname(__file__), 'qml',  'main.qml')))
        self.rootObject = self.view.rootObject()
        self.view.showFullScreen()
Beispiel #3
0
    def __init__(self, number=1):
        QApplication.__init__(self, sys.argv)
        self.setApplicationName("SphereTest")
        self.mainWindow = QMainWindow()
        self.gl_widget = proPixx480_1440test()
        self.mainWindow.setCentralWidget(self.gl_widget)
        self.mainWindow.setGeometry(
            QtGui.QDesktopWidget().availableGeometry(1))
        self.mainWindow.showFullScreen()
        self.curr_time = time.time()
        self.timer = QTimer()
        self.timer.setInterval(0)
        self.timer.timeout.connect(self.gl_widget.update)
        self.timer.start()
        self.timer2 = QTimer()
        self.timer2.setInterval(3000)
        self.timer2.timeout.connect(self.printFrames)
        self.timer2.start()
        self.gl_widget.mode = number
        self.gl_widget.mouseDoubleClickEvent = lambda x: self.mainWindow.close(
        )
        self.previous_time = 0
        self.previous_total = 0

        my_device = PROPixx()
        if number is 0:  # 480 Hz
            my_device.setDlpSequencerProgram('QUAD4X')
        else:  # 1440 Hz
            my_device.setDlpSequencerProgram('QUAD12X')
        my_device.updateRegisterCache()

        sys.exit(self.exec_())  # Start Qt main loop
    def __init__(self):
        QApplication.__init__(self, sys.argv)
        self.setOrganizationName("Khertan Software")
        self.setOrganizationDomain("khertan.net")
        self.setApplicationName("PyQmlTalk")

        self.window = Window()
        self.window.view.setResizeMode(QtDeclarative.QDeclarativeView.SizeRootObjectToView)
        self.window.showFullScreen()
Beispiel #5
0
 def __init__(self, *args, **kwargs):
     QApplication.__init__(self, *args, **kwargs)
     self.settings = QSettings('everpad', 'everpad-pad')
     self.translator = QTranslator()
     if not self.translator.load('../../i18n/%s' % QLocale.system().name()):
         self.translator.load('/usr/share/everpad/i18n/%s' % QLocale.system().name())
     self.installTranslator(self.translator)
     self.indicator = Indicator(self)
     self.update_icon()
     self.indicator.show()
Beispiel #6
0
 def __init__(self, *args, **kwargs):
     QApplication.__init__(self, *args, **kwargs)
     self.settings = QSettings("everpad", "everpad-pad")
     self.translator = QTranslator()
     if not self.translator.load("../../i18n/%s" % QLocale.system().name()):
         self.translator.load("/usr/share/everpad/i18n/%s" % QLocale.system().name())
     self.installTranslator(self.translator)
     self.icon = QIcon.fromTheme("everpad-mono", QIcon("../../everpad-mono.png"))
     self.indicator = Indicator(self, self.icon)
     self.indicator.show()
Beispiel #7
0
 def __init__(self, *args, **kwargs):
     QApplication.__init__(self, *args, **kwargs)
     self.settings = QSettings('everpad', 'everpad-pad')
     self.translator = QTranslator()
     if not self.translator.load('../../i18n/%s' % QLocale.system().name()):
         self.translator.load('/usr/share/everpad/i18n/%s' %
                              QLocale.system().name())
     self.installTranslator(self.translator)
     self.indicator = Indicator(self)
     self.update_icon()
     self.indicator.show()
Beispiel #8
0
    def __init__(self):
        QApplication.__init__(self, sys.argv)
        self.setOrganizationName("Khertan Software")
        self.setOrganizationDomain("khertan.net")
        self.setApplicationName("BitPurse")

        self.view = QtDeclarative.QDeclarativeView()
        # Are we on mer ? So don't use opengl
        # As it didn't works on all devices
        if os.path.exists('/etc/mer-release'):
            fullscreen = True
        elif os.path.exists('/etc/aegis'):
            fullscreen = True
            self.glformat = QGLFormat().defaultFormat()
            self.glformat.setSampleBuffers(False)
            self.glw = QGLWidget(self.glformat)
            self.glw.setAutoFillBackground(False)
            self.view.setViewport(self.glw)
        else:
            fullscreen = False

        self.walletController = WalletController()
        self.rootContext = self.view.rootContext()
        self.rootContext.setContextProperty("argv", sys.argv)
        self.rootContext.setContextProperty("__version__", __version__)
        self.rootContext.setContextProperty("__upgrade__", __upgrade__
                                            .replace('\n', '<br />'))
        self.rootContext.setContextProperty('WalletController',
                                            self.walletController)
        self.rootContext.setContextProperty('AddressesModel',
                                            self.walletController
                                            .addressesModel)
        self.rootContext.setContextProperty('TransactionsModel',
                                            self.walletController
                                            .transactionsModel)
        self.rootContext.setContextProperty('Settings',
                                            self.walletController
                                            .settings)

        self.view.setSource(QUrl.fromLocalFile(
            os.path.join(os.path.dirname(__file__),
                         'qml', 'main.qml')))

        self.rootObject = self.view.rootObject()
        if fullscreen:
            self.view.showFullScreen()
        else:
            self.view.show()
        # self.loginPage = self.rootObject.findChild(QObject, "loginPage")
        self.sendPage = self.rootObject.findChild(QObject, "sendPage")
        self.aboutPage = self.rootObject.findChild(QObject, "aboutPage")
        self.walletController.onError.connect(self.rootObject.onError)
        # self.walletController.onConnected.connect(self.loginPage.onConnected)
        self.walletController.onTxSent.connect(self.sendPage.onTxSent)
Beispiel #9
0
    def __init__(self):
        QApplication.__init__(self, sys.argv)
        self.setOrganizationName("Khertan Software")
        self.setOrganizationDomain("khertan.net")
        self.setApplicationName("KhtNotes")

        self.settings = Settings()
        self.view = FilteredDeclarativeView(settings=self.settings)
        if os.path.exists('/etc/mer-release'):
            fullscreen = True
        elif os.path.exists('/etc/aegis'):
            fullscreen = True
            self.glformat = QGLFormat().defaultFormat()
            self.glformat.setSampleBuffers(False)
            self.glw = QGLWidget(self.glformat)
            self.glw.setAutoFillBackground(False)
            self.view.setViewport(self.glw)
        else:
            fullscreen = False

        self.notesModel = NotesModel()
        self.note = Note(settings=self.settings)
        self.conboyImporter = TomboyImporter()
        self.syncer = Sync()
        self.rootContext = self.view.rootContext()
        self.rootContext.setContextProperty("argv", sys.argv)
        self.rootContext.setContextProperty("__version__", __version__)
        self.rootContext.setContextProperty("__upgrade__", __upgrade__
                                            .replace('\n', '<br />'))
        self.rootContext.setContextProperty("Settings", self.settings)
        self.rootContext.setContextProperty("Sync", self.syncer)
        self.rootContext.setContextProperty("Importer", self.conboyImporter)
        self.rootContext.setContextProperty('notesModel', self.notesModel)
        self.rootContext.setContextProperty('Note', self.note)

        try:
            self.view.setSource(QUrl.fromLocalFile(
                os.path.join(os.path.dirname(__file__),
                             'qml', 'Harmattan_main.qml')))
        except:
            self.view.setSource(QUrl.fromLocalFile(
                os.path.join(os.path.dirname(__file__),
                             'qml', 'Desktop_main.qml')))

        self.rootObject = self.view.rootObject()
        if fullscreen:
            self.view.showFullScreen()
        else:
            self.view.show()
        self.note.on_error.connect(self.rootObject.onError)
        self.syncer.on_error.connect(self.rootObject.onError)
        self.syncer.on_finished.connect(self.rootObject.refresh)
        self.conboyImporter.on_finished.connect(self.notesModel.reload)
Beispiel #10
0
 def __init__(self, renderer, title):
     QApplication.__init__(self, sys.argv)
     self.window = QMainWindow()
     self.window.setWindowTitle(title)
     self.window.resize(800,600)
     # Get OpenGL 4.1 context
     glformat = QGLFormat()
     glformat.setVersion(4, 1)
     glformat.setProfile(QGLFormat.CoreProfile)
     glformat.setDoubleBuffer(False)
     self.glwidget = MyGlWidget(renderer, glformat, self)
     self.window.setCentralWidget(self.glwidget)
     self.window.show()
 def __init__(self, renderer, title):
     QApplication.__init__(self, sys.argv)
     self.window = QMainWindow()
     self.window.setWindowTitle(title)
     self.window.resize(800, 600)
     # Get OpenGL 4.1 context
     glformat = QGLFormat()
     glformat.setVersion(4, 1)
     glformat.setProfile(QGLFormat.CoreProfile)
     glformat.setDoubleBuffer(False)
     self.glwidget = MyGlWidget(renderer, glformat, self)
     self.window.setCentralWidget(self.glwidget)
     self.window.show()
Beispiel #12
0
 def __init__(self, *args, **kwargs):
     QApplication.__init__(self, *args, **kwargs)
     self.settings = QSettings("everpad", "everpad-pad")
     self.translator = QTranslator()
     if not self.translator.load("../../i18n/%s" % QLocale.system().name()):
         self.translator.load("/usr/share/everpad/i18n/%s" % QLocale.system().name())
     # This application string can be localized to 'RTL' to switch the application layout
     # direction. See for example i18n/ar_EG.ts
     QT_TRANSLATE_NOOP("QApplication", "QT_LAYOUT_DIRECTION")
     self.installTranslator(self.translator)
     self.indicator = Indicator(self)
     self.update_icon()
     self.indicator.show()
Beispiel #13
0
 def __init__(self, *args, **kwargs):
     QApplication.__init__(self, *args, **kwargs)
     self.settings = QSettings('everpad', 'everpad-pad')
     self.translator = QTranslator()
     if not self.translator.load('../../i18n/%s' % QLocale.system().name()):
         self.translator.load('/usr/share/everpad/i18n/%s' % QLocale.system().name())
     # This application string can be localized to 'RTL' to switch the application layout
     # direction. See for example i18n/ar_EG.ts
     QT_TRANSLATE_NOOP('QApplication', 'QT_LAYOUT_DIRECTION')
     self.installTranslator(self.translator)
     QNetworkProxyFactory.setUseSystemConfiguration(True)
     self.indicator = Indicator(self)
     self.update_icon()
     self.indicator.show()
Beispiel #14
0
 def __init__(self,args):
     QApplication.__init__(self,args)
     
     def updateStyle():
         def update(old,new):
             for k, v in new.iteritems():
                 if isinstance(v, collections.Mapping):
                     r = update(old.get(k, {}), v)
                     old[k] = r
                 else:
                     old[k] = new[k]
             return old
         
         self.styledict = update(OxideStyle.styledict, getConfigStyleDict())
     updateStyle()
Beispiel #15
0
 def __init__(self, *args, **kwargs):
     """Init app"""
     QApplication.__init__(self, *args, **kwargs)
     self.sync_thread = SyncThread()
     self.sync_thread.start()
     self.translator = QTranslator()
     if not self.translator.load('i18n/%s' % QLocale.system().name()):
         self.translator.load('/usr/share/everpad/lang/%s' % QLocale.system().name())
     self.provider_obj = dbus.SessionBus().get_object("com.everpad.Provider", '/EverpadProvider')
     self.provider = dbus.Interface(self.provider_obj, "com.everpad.Provider")
     self.installTranslator(self.translator)
     self.icon = QIcon.fromTheme('everpad', QIcon('../everpad.png'))
     indicator = Indicator(self, self.icon)
     indicator.show()
     self.opened = {}
     self.setApplicationName('everpad')
     self.settings = gconf.client_get_default()
Beispiel #16
0
 def __init__(self, *args, **kwargs):
     QApplication.__init__(self, *args, **kwargs)
     self.settings = QSettings('everpad', 'everpad-pad')
     locale = QLocale.system().name()
     self.qtTranslator = QTranslator()
     self.qtTranslator.load("qt_" + locale, QLibraryInfo.location(QLibraryInfo.TranslationsPath))
     self.installTranslator(self.qtTranslator)
     self.appTranslator = QTranslator()
     if not self.appTranslator.load(locale, os.path.join(os.path.dirname(__file__), '../../i18n')):
         self.appTranslator.load(locale, resource_filename('share/everpad/i18n'))
     # This application string can be localized to 'RTL' to switch the application layout
     # direction. See for example i18n/ar_EG.ts
     QT_TRANSLATE_NOOP('QApplication', 'QT_LAYOUT_DIRECTION')
     self.installTranslator(self.appTranslator)
     QNetworkProxyFactory.setUseSystemConfiguration(True)
     self.indicator = Indicator()
     self.update_icon()
     self.indicator.show()
Beispiel #17
0
    def __init__(self):
        QApplication.__init__(self, sys.argv)
        self.setOrganizationName("Khertan Software")
        self.setOrganizationDomain("khertan.net")
        self.setApplicationName("KhtBMA")

        self.view = QtDeclarative.QDeclarativeView()
        self.glw = QGLWidget()
        self.view.setViewport(self.glw)
        self.auth = Authenticator()
        self.rootContext = self.view.rootContext()
        self.rootContext.setContextProperty("argv", sys.argv)
        self.rootContext.setContextProperty("__version__", __version__)
        self.rootContext.setContextProperty('Authenticator',self.auth)
        self.view.setSource(QUrl.fromLocalFile(
                os.path.join(os.path.dirname(__file__), 'qml',  'main.qml')))
        self.rootObject = self.view.rootObject()
        self.auth.on_error.connect(self.rootObject.onError)
        self.view.showFullScreen()
Beispiel #18
0
    def __init__(self):
        QApplication.__init__(self, sys.argv)
        self.setOrganizationName("Khertan Software")
        self.setOrganizationDomain("khertan.net")
        self.setApplicationName("Wleux")

        self.view = QtDeclarative.QDeclarativeView()
        self.glw = QGLWidget()
        self.view.setViewport(self.glw)
        self.wallpapersModel = WallpapersModel()
        self.wallpaper = Wallpaper()
        self.rootContext = self.view.rootContext()
        self.rootContext.setContextProperty("argv", sys.argv)
        self.rootContext.setContextProperty("__version__", __version__)
        self.rootContext.setContextProperty('wallpapersModel', self.wallpapersModel)
        self.rootContext.setContextProperty('wallpaper', self.wallpaper)
        self.view.setSource(QUrl.fromLocalFile( \
                os.path.join(os.path.dirname(__file__), 'qml', 'main.qml')))
        self.rootObject = self.view.rootObject()
        self.view.showFullScreen()
        self.wallpapersModel.on_error.connect(self.rootObject.onError)
Beispiel #19
0
 def __init__(self, *args, **kwargs):
     QApplication.__init__(self, *args, **kwargs)
     self.settings = QSettings('everpad', 'everpad-pad')
     locale = QLocale.system().name()
     self.qtTranslator = QTranslator()
     self.qtTranslator.load(
         "qt_" + locale,
         QLibraryInfo.location(QLibraryInfo.TranslationsPath))
     self.installTranslator(self.qtTranslator)
     self.appTranslator = QTranslator()
     if not self.appTranslator.load(
             locale, os.path.join(os.path.dirname(__file__), '../../i18n')):
         self.appTranslator.load(locale,
                                 resource_filename('share/everpad/i18n'))
     # This application string can be localized to 'RTL' to switch the application layout
     # direction. See for example i18n/ar_EG.ts
     QT_TRANSLATE_NOOP('QApplication', 'QT_LAYOUT_DIRECTION')
     self.installTranslator(self.appTranslator)
     QNetworkProxyFactory.setUseSystemConfiguration(True)
     self.indicator = Indicator()
     self.update_icon()
     self.indicator.show()
Beispiel #20
0
    def __init__(self):
        QApplication.__init__(self, sys.argv)
        self.setOrganizationName("Khertan Software")
        self.setOrganizationDomain("khertan.net")
        self.setApplicationName("BitPurse")

        self.view = QtDeclarative.QDeclarativeView()
        # Are we on mer ? So don't use opengl
        # As it didn't works on all devices
        if os.path.exists('/etc/mer-release'):
            fullscreen = True
        elif os.path.exists('/etc/aegis'):
            fullscreen = True
            self.glformat = QGLFormat().defaultFormat()
            self.glformat.setSampleBuffers(False)
            self.glw = QGLWidget(self.glformat)
            self.glw.setAutoFillBackground(False)
            self.view.setViewport(self.glw)
        else:
            fullscreen = False

        self.walletController = WalletController()
        self.rootContext = self.view.rootContext()
        self.rootContext.setContextProperty("argv", sys.argv)
        self.rootContext.setContextProperty("__version__", __version__)
        self.rootContext.setContextProperty("__upgrade__", __upgrade__
                                            .replace('\n', '<br />'))
        self.rootContext.setContextProperty('WalletController',
                                            self.walletController)
        self.rootContext.setContextProperty('AddressesModel',
                                            self.walletController
                                            .addressesModel)
        self.rootContext.setContextProperty('TransactionsModel',
                                            self.walletController
                                            .transactionsModel)
        self.rootContext.setContextProperty('Settings',
                                            self.walletController
                                            .settings)

        self.view.setSource(QUrl.fromLocalFile(
            os.path.join(os.path.dirname(__file__),
                         'qml', 'main.qml')))

        self.rootObject = self.view.rootObject()
        if fullscreen:
            self.view.showFullScreen()
        else:
            self.view.show()
        self.sendPage = self.rootObject.findChild(QObject, "sendPage")
        self.aboutPage = self.rootObject.findChild(QObject, "aboutPage")
        self.walletController.onError.connect(self.rootObject.onError)
        self.walletController.onTxSent.connect(self.sendPage.onTxSent)
        if len(sys.argv) >= 2:
            if sys.argv[1].startswith('bitcoin:'):
                params = sys.argv[1][8:].split('?')
                addr = params[0].strip('/')
                amount = 0
                if params > 1:
                    for param in params:
                        if param.startswith('amount='):
                            if len(param.split('=')) > 1:
                                amount = param.split('=')[1]
                self.rootObject.sendTo(addr, amount)
        if self.walletController.settings.numberOfLaunch == 25:
            self.rootObject.showDonation()
        self.walletController.settings.numberOfLaunch += 1
Beispiel #21
0
 def __init__(self, *args, **kwargs):
     QApplication.__init__(self, *args, **kwargs)
     self.setApplicationName(APP_NAME)
Beispiel #22
0
 def __init__(self):
     QApplication.__init__(self, [])
Beispiel #23
0
 def __init__(self):
     QApplication.__init__(self, sys.argv)
     self.setApplicationName("Viewer app")
     self.setup()
     self.main.setFixedSize(1264, 768)
     self.main.show()
Beispiel #24
0
 def __init__(self, blockDevice, baudRate):
     QApplication.__init__(self, sys.argv)
     self.radio = Radio(blockDevice, baudRate)
Beispiel #25
0
 def __init__(self, blockDevice, baudRate):
   QApplication.__init__(self, sys.argv)
   self.radio = Radio(blockDevice, baudRate)
Beispiel #26
0
    def __init__(self):
        QApplication.__init__(self, sys.argv)
        self.setOrganizationName("Khertan Software")
        self.setOrganizationDomain("khertan.net")
        self.setApplicationName("BitPurse")

        self.view = QtDeclarative.QDeclarativeView()
        # Are we on mer ? So don't use opengl
        # As it didn't works on all devices
        if os.path.exists('/etc/mer-release'):
            fullscreen = True
        elif os.path.exists('/etc/aegis'):
            fullscreen = True
            self.glformat = QGLFormat().defaultFormat()
            self.glformat.setSampleBuffers(False)
            self.glw = QGLWidget(self.glformat)
            self.glw.setAutoFillBackground(False)
            self.view.setViewport(self.glw)
        else:
            fullscreen = False

        self.walletController = WalletController()
        self.rootContext = self.view.rootContext()
        self.rootContext.setContextProperty("argv", sys.argv)
        self.rootContext.setContextProperty("__version__", __version__)
        self.rootContext.setContextProperty(
            "__upgrade__", __upgrade__.replace('\n', '<br />'))
        self.rootContext.setContextProperty('WalletController',
                                            self.walletController)
        self.rootContext.setContextProperty(
            'AddressesModel', self.walletController.addressesModel)
        self.rootContext.setContextProperty(
            'TransactionsModel', self.walletController.transactionsModel)
        self.rootContext.setContextProperty('Settings',
                                            self.walletController.settings)

        self.view.setSource(
            QUrl.fromLocalFile(
                os.path.join(os.path.dirname(__file__), 'qml', 'main.qml')))

        self.rootObject = self.view.rootObject()
        if fullscreen:
            self.view.showFullScreen()
        else:
            self.view.show()
        self.sendPage = self.rootObject.findChild(QObject, "sendPage")
        self.aboutPage = self.rootObject.findChild(QObject, "aboutPage")
        self.walletController.onError.connect(self.rootObject.onError)
        self.walletController.onTxSent.connect(self.sendPage.onTxSent)
        if len(sys.argv) >= 2:
            if sys.argv[1].startswith('bitcoin:'):
                params = sys.argv[1][8:].split('?')
                addr = params[0].strip('/')
                amount = 0
                if params > 1:
                    for param in params:
                        if param.startswith('amount='):
                            if len(param.split('=')) > 1:
                                amount = param.split('=')[1]
                self.rootObject.sendTo(addr, amount)
        if self.walletController.settings.numberOfLaunch == 25:
            self.rootObject.showDonation()
        self.walletController.settings.numberOfLaunch += 1
Beispiel #27
0
 def __init__(self, argv):
     QApplication.__init__(self, argv)
     self.setApplicationName('Text editor')
     self.setOrganizationName('lunaryorn')
     self.setOrganizationDomain('lunaryorn.de')
     self.setApplicationVersion(__version__)