示例#1
0
    def __init__(self, parent, id):
        self.plotController = []
        self.current_plotController = 0
        self.loadFlag = False
        self.mainView = MainView(parent, -1)
        self.timer = wx.Timer(self.mainView)
        self.currentVolume = 5
        self.toolbar = []

        fig1 = plt.figure(1, figsize=(16, 4.3), dpi=80)
        fig2 = plt.figure(2, figsize=(16, 4.3), dpi=80)
        self.valence_canvas = FigureCanvasWxAgg(self.mainView.valencePanel, -1,
                                                fig1)
        self.arousal_canvas = FigureCanvasWxAgg(self.mainView.arousalPanel, -1,
                                                fig2)
        fig1.canvas.mpl_connect('button_press_event', self.onClick)
        fig2.canvas.mpl_connect('button_press_event', self.onClick)
        #will be moved to main view
        #self.mainView.sizer.Add(self.canvas, (1,6), span=(8,5))
        # self.mainView.valencePanel.Fit()
        # self.mainView.arousalPanel.Fit()

        self.connect(parent)
        self.timer.Start(100)
        self.fps = 1
        self.previewImage = []
        self.vid_path = ""
示例#2
0
    def __init__(self, list_of_str, *__args):
        super(Controller, self).__init__(list_of_str, *__args)
        self.mainView = MainView()
        self.profiles = {}

        view = self.mainView.getSubView('result_view')
        if view is not None:
            profile = ResultProfile("result_view", view)
            self.profiles[profile.whoAmI()] = profile
            self.mainView.currentView.append(profile)

        view = self.mainView.getSubView('PX_view')
        if view is not None:
            profile = PXBoardProfile("PX_view", view)
            self.profiles[profile.whoAmI()] = profile
            self.mainView.currentView.append(profile)

        view = self.mainView.getSubView('PG_view')
        if view is not None:
            profile = PGBoardProfile("PG_view", view)
            self.profiles[profile.whoAmI()] = profile
            self.mainView.currentView.append(profile)

        view = self.mainView.getSubView('audio_view')
        if view is not None:
            profile = AudioProfile("audio_view", view)
            self.profiles[profile.whoAmI()] = profile
            self.mainView.currentView.append(profile)

        self.bindHandlers()
示例#3
0
 def main_view(self, games):
     self.window_resize(_WIDTH, _HEIGHT)
     self.empty_frame(self.frame_container)
     self.existing_main_view = MV.MainView(self.frame_container, self,
                                           games)
     self.get_games()
示例#4
0
from MainView import *
from CurrencyModule import *

app = MainView()
示例#5
0
from MainView import *

if __name__ == '__main__':
    root = Tkinter.Tk()
    MainView(root).place()
    root.title("Bench by Krzysztof Kapitan & Jan Badura")
    root.resizable(0, 0)
    root.geometry("500x900")

    root.mainloop()
示例#6
0
    def __init__(self):
        # Using num_popup to count how many
        # popup windows do we have
        self.num_popup = 0
        self.aboutme_popup = None
        self.fontsize_popup = None
        self.not_found_popup = None
        self.overwrite_popup = None

        # The root window
        self.root = Tk()
        self.root.title("Cold Caller")
        self.root.geometry("500x500")

        # Adaptive view setting
        rows = 0
        while rows <= 50:
            self.root.rowconfigure(rows, weight=1)
            self.root.columnconfigure(rows, weight=1)
            rows += 1

        # Add MainView Frame into the root window
        self.mainView = MainView(self.root)
        # Let it occupy all the window
        self.mainView.grid(row=0,
                           column=0,
                           columnspan=50,
                           rowspan=50,
                           sticky=(N, W, S, E))
        # Get 2 tab views from the MainView Frame
        self.cold_caller_tab_view = self.mainView.get_cold_caller_tab_view()
        self.log_tab_view = self.mainView.get_log_tab_view()

        # Bind button/keystrokes to Cold Caller Service APIs
        self.cold_caller_tab_view.createWidgets_bottom_Frame()
        self.cold_caller_tab_view.good_btns[1].bind(
            "<Button-1>", lambda e: self.remove(e, 0))
        self.cold_caller_tab_view.concern_btns[1].bind(
            "<Button-1>", lambda e: self.remove(e, 0, True))

        self.cold_caller_tab_view.good_btns[2].bind(
            "<Button-1>", lambda e: self.remove(e, 1))
        self.cold_caller_tab_view.concern_btns[2].bind(
            "<Button-1>", lambda e: self.remove(e, 1, True))

        self.cold_caller_tab_view.good_btns[3].bind(
            "<Button-1>", lambda e: self.remove(e, 2))
        self.cold_caller_tab_view.concern_btns[3].bind(
            "<Button-1>", lambda e: self.remove(e, 2, True))
        # Keystrokes mapping
        global CONCERN_1A, CONCERN_1B, CONCERN_2, CONCERN_3
        global REMOVE_1A, REMOVE_1B, REMOVE_2, REMOVE_3
        self.root.bind(CONCERN_1A, lambda e: self.remove(e, 0, True))
        self.root.bind(CONCERN_1B, lambda e: self.remove(e, 0, True))
        self.root.bind(CONCERN_2, lambda e: self.remove(e, 1, True))
        self.root.bind(CONCERN_3, lambda e: self.remove(e, 2, True))
        self.root.bind(CONCERN_4, lambda e: self.remove(e, 2, True))

        self.root.bind(REMOVE_1A, lambda e: self.remove(e, 0))
        self.root.bind(REMOVE_1B, lambda e: self.remove(e, 0))
        self.root.bind(REMOVE_2, lambda e: self.remove(e, 1))
        self.root.bind(REMOVE_3, lambda e: self.remove(e, 2))

        # Binding buttons in the log-tab-view
        self.log_tab_view.refresh_log.config(
            command=lambda: self.log_tab_view.set_text(getDailyLog()))
        self.log_tab_view.export_summary.config(
            command=self.export_summary_file_target_path_with_name)

        # Create the top-bar menu
        self.createMenu()

        # When closing the app, save the queue
        def onclosing():
            IO.instance().set_curr_queue()
            self.root.destroy()

        self.root.protocol('WM_DELETE_WINDOW', onclosing)

        # Call Cold Caller Service to get the first 3 students
        self.update_students_info()
示例#7
0
import re

import CassandraClass
import MainView

path = []



path=['C:/python/Logs/3502/before-AFO-i-3502-15.txt',\
      'C:/python/Logs/3503/before-AFO-i-3503-16.txt',\
      'C:/python/Logs/3504/before-AFO.txt',\
      'C:/python/Logs/3505/before-AFO.txt',\
      'C:/python/Logs/4171/before-AFO.txt'
      ]

cassandraclusterinstance = CassandraClass.cassandraCluster('folder1')
for idx, pathrow in enumerate(path):
    file = open(pathrow, 'r')
    cassandrainstance = CassandraClass.Cassandra()
    cassandrainstance.populate(file)
    cassandraclusterinstance.add_cassandraNode(cassandrainstance)

clusterlist = {}
clusterlist['folder1'] = cassandraclusterinstance

mainviewinst5ance = MainView.MainView(clusterlist)
示例#8
0
from MainView import *
if __name__ == '__main__':
    app = QApplication(sys.argv)

    downloadThreads = []
    requestPath = 1
    ui = MainView()
    # ui.setupUi(mainWindow)
    ui.show()
    sys.exit(app.exec_())