예제 #1
0
    def __init__(self, mname):
        #
        QtGui.QWidget.__init__(self)
        self.i18n()
        self.__setupui__()
        self.status()
        self.mname = mname

        self.onInstall = eventHandler()
        self.onUpdate = eventHandler()
        self.onRemove = eventHandler()
        self.onConfigure = eventHandler()

        self.__installButtonStyle = self.installButtonWidget.styleSheet()
        self.__updateButtonStyle = self.updateButtonWidget.styleSheet()
        self.__removeButtonStyle = self.removeButtonWidget.styleSheet()
        QtCore.QObject.connect(self.installButtonWidget,  QtCore.SIGNAL("clicked (bool)"),  self.__installClicked)
        QtCore.QObject.connect(self.updateButtonWidget,  QtCore.SIGNAL("clicked (bool)"),  self.__updateClicked)
        QtCore.QObject.connect(self.removeButtonWidget,  QtCore.SIGNAL("clicked (bool)"),  self.__removeClicked)
        QtCore.QObject.connect(self.configureButtonWidget,  QtCore.SIGNAL("clicked (bool)"),  self.__configureClicked)

        self.style = self.styleSheet()
예제 #2
0
def start_event_handler():

    print('hallo!')

    eh = eventhandler.eventHandler({'a': 1, 'b': 2}, clock.Clock())

    print(eh.is_alive())

    print('hallo!')
    eh.start()
    print(eh.is_alive())

    for i in range(10):
        eh.send_message('a')
        print(eh.is_alive())
        time.sleep(0.5)
    eh.shutdown()

    return eh
예제 #3
0
    def __init__(self, parent, fileList, plugins):
        #
        QtGui.QWidget.__init__(self, parent)
        self.setupUi(self)
        self.plugins = plugins

        self.onClick = eventHandler()
        self.layoutWidget.mousePressEvent = self.__click
        self.sourceListWiget.mousePressEvent = self.__click
        #self.pluginComboWiget.mousePressEvent = self.__click
        #self.confButtonWiget.mousePressEvent = self.__click
        QtCore.QObject.connect(self.pluginComboWiget,  QtCore.SIGNAL("currentIndexChanged (const QString&)"),  self.pluginChanged)
        QtCore.QObject.connect(self.confButtonWiget,  QtCore.SIGNAL("released ()"),  self.pluginCustomize)


        self.style = self.sourceListWiget.styleSheet()

        self.activePlugin = ""
        self.pluginDataList = {}

        self.jobItem = EJobItem(fileList)
        self.sourceListWiget.addItems(self.jobItem.getFiles())
        self.__updatePluginList()
예제 #4
0
# -*- coding: utf-8 -*-
"""
Created on Wed Sep  5 20:45:57 2018

@author: User
"""

import psychopy
import eventhandler
from psychopy import clock

if __name__ == "__main__":
    eh = eventhandler.eventHandler({'a': 1, 'b': 2}, clock.Clock())

    eh.start()

    eh.send_message('a')
예제 #5
0
import traceback
import time
import glob
import eventhandler
import visualHelper

# import pyglet
from psychopy import visual, clock, data, event, logging, sound, parallel, monitors
import numpy as np

# the assync stuff:
import trollius as asyncio
from trollius import From

if __name__ == "__main__":
    eh = eventhandler.eventHandler(clock.Clock(), {'a': 1, 'b': 2})
    eh.start()
    for x in range(5):
        time.sleep(2)
        eh.send_message('a')
        time.sleep(2)
        eh.send_message('b')

    eh.shutdown()
    eh.join()
# if __name__ != "__main__":
# run in 'called' fashion using from efl.efl_v6 import *
# om . import eventhandler
# from . import visualHelper
# else:
# run as script with green 'Play' button in Spyder: