コード例 #1
0
 def __init__(self, parent, names):
     Frame.__init__(self, parent)
     self.parent = parent
     shuffle(names)
     self.names = names
     self.create_myButton()
     self.create_myLabel()
コード例 #2
0
 def __init__(self, parent):
     self.y = 240
     self.pozycjoner = pozycjoner.Pozycjoner(self.y)
     Frame.__init__(self, parent)
     self.parent = parent
     self.initUI()
     self.parent.bind('<Key>', self.steruj)
コード例 #3
0
 def __init__(self, searcher, master=None):
     """
     Creates a window with a quit button and a ListFrame
     for each search term list, all linked to the given searcher.
     """
     Frame.__init__(self, master)
     self.pack()
     self.exit = Button(self)
     self.exit['text'] = "Quit"
     self.exit['command'] = self.quit
     self.exit.grid(row=0)
     self.hashtags = ListFrame("Hashtags",
                               searcher.add_hashtag,
                               searcher.remove_hashtag,
                               master=self)
     self.hashtags.grid(row=1, column=0, padx=5)
     self.users = ListFrame("Users",
                            searcher.add_user,
                            searcher.remove_user,
                            master=self)
     self.users.grid(row=1, column=1, padx=5)
     self.excluded_words = ListFrame("Excluded Words",
                                     searcher.exclude_word,
                                     searcher.remove_excluded_word,
                                     master=self)
     self.excluded_words.grid(row=1, column=2, padx=5)
     self.excluded_words = ListFrame("Excluded Users",
                                     searcher.exclude_user,
                                     searcher.remove_excluded_user,
                                     master=self)
     self.excluded_words.grid(row=1, column=3, padx=5)
コード例 #4
0
 def __init__(self, parent):
     Frame.__init__(self, 
                    parent)
     
     self.parent = parent
     
     self.initUI()
コード例 #5
0
 def __init__(self, parent):
     Frame.__init__(self, parent)
     self.parent = parent
     self.quote = "I was supposed to be a cool quote . But then internet abandoned me !"
     self.author = "Aditya"
     self.project = [{"name":"Portfolio","location": "F:\git\portfolio","command": "http://localhost:8080"},{"name":"JStack","location":"F:\git\JStack" ,"command": "http://localhost:8080"},{"name":"GPS_Track","location": "F:\git\GPS_Track","command": "http://localhost:8080"}]
     self.getQuote()
コード例 #6
0
ファイル: layout.py プロジェクト: rcolasanti/python_how_to
    def __init__(self, master, d_list, a_function):
        Frame.__init__(self, master)

        scrl_bar = Scrollbar(self)
        self.listbox = Listbox(self)

        scrl_bar.config(command=self.listbox.yview)
        scrl_bar.pack(side=RIGHT, fill=Y)

        self.listbox.config(yscrollcommand=scrl_bar.set)
        self.listbox.pack(side=LEFT, expand=YES, fill=BOTH)

        #load the listbox
        idx = 0
        for item in d_list:
            fparts = item.split('.')
            # DEBUG print fparts
            if fparts[-1] == 'csv':
                self.listbox.insert(idx, item)
                idx += 1

        # link double click to the processList
        self.listbox.bind('<Double-1>', self.processList)
        # attach a function passed form the master
        # not this si done as passd function so it could be anything
        self.passed_function = a_function
コード例 #7
0
ファイル: Interface.py プロジェクト: codybe/whiteboarder
 def __init__(self,master=Tk()):
     Frame.__init__(self,master)
     self.grid()
     self.llbutton = Button(self,text="Linked List", command = self.createLL)
     self.llbutton.grid()
     self.canvas = Canvas(master,bg="white",height=750,width=1000)
     self.canvas.pack()
コード例 #8
0
    def __init__(self, parent,multiplayer=False,HOST="99.66.147.56",PORT=3478,player=''):
        self.activeCard = 0
        self.startTime = -1
        self.multiplayer = multiplayer
        if self.multiplayer:
            self.client = KarutaClient(HOST, int(PORT), player)
            cards = self.client.cards
            self.cardsLeft = self.client.order

        else:
            self.client = KarutaSingleClient()
            cards = range(1,101)
            self.cardsLeft = range(1,101)
            random.shuffle(cards)
            random.shuffle(self.cardsLeft)
        self.queue = deque([])
        self.fgrid = [[None for col in range(NUM_COLS)] for row in range(6)]
        self.model = [[None for col in range(NUM_COLS)] for row in range(6)]
        self.faultCount = 0
        self.faults = [0,0]
        Frame.__init__(self, parent)   
        self.parent = parent
        self.initUI(cards)
        self.changeState('waiting') 
        if self.multiplayer:
            self.client.next = 0


            self.opponentReady = False
        else:
            self.opponentReady = True
        self.client.nextMove = 0
        self.pollForUpdates()
        self.processUpdates()
コード例 #9
0
ファイル: controller.py プロジェクト: sdsc/sandbox-tweeteor
 def __init__(self, searcher, master=None):
     """
     Creates a window with a quit button and a ListFrame
     for each search term list, all linked to the given searcher.
     """
     Frame.__init__(self, master)
     self.pack()
     self.exit = Button(self)
     self.exit['text'] = "Quit"
     self.exit['command'] = self.quit
     self.exit.grid(row=0)
     self.hashtags = ListFrame(
         "Hashtags",
         searcher.add_hashtag,
         searcher.remove_hashtag,
         master=self)
     self.hashtags.grid(row=1, column=0, padx=5)
     self.users = ListFrame(
         "Users",
         searcher.add_user,
         searcher.remove_user,
         master=self)
     self.users.grid(row=1, column=1, padx=5)
     self.excluded_words = ListFrame(
         "Excluded Words",
         searcher.exclude_word,
         searcher.remove_excluded_word,
         master=self)
     self.excluded_words.grid(row=1, column=2, padx=5)
     self.excluded_words = ListFrame(
         "Excluded Users",
         searcher.exclude_user,
         searcher.remove_excluded_user,
         master=self)
     self.excluded_words.grid(row=1, column=3, padx=5)
コード例 #10
0
 def __init__(self, parent, screen_size):
     Frame.__init__(self, parent)   
     self.screen_size = screen_size
     self.parent = parent
     self.pack(fill=BOTH, expand=1)
     # self.centerWindow()
     self.initUI()
コード例 #11
0
 def __init__(self, parent, dict, enlist):
     Frame.__init__(self, parent)
     self.parent = parent
     self.dict = dict
     print self.dict
     self.enlist = enlist
     self.initUI()
コード例 #12
0
ファイル: gui.py プロジェクト: Tianwei-Li/DS-Bus-Tracker
    def __init__(self, parent):
        Frame.__init__(self, parent)
        self.parent = parent
        self.initUI()

        # define options for opening or saving a file
        self.file_opt = options_file = {}
        options_file['defaultextension'] = '.txt'
        options_file['filetypes'] = [('all files', '.*'),
                                     ('text files', '.txt')]
        options_file['initialdir'] = '../'
        options_file['initialfile'] = 'testFile'
        options_file['parent'] = self.parent
        options_file['title'] = 'Choose configuration file'

        # define options for asking local name
        self.ask_localname_opt = options_localName = {}
        options_localName['parent'] = self.parent
        options_localName['initialvalue'] = "alice"

        conf = tkFileDialog.askopenfilename(**self.file_opt)
        localName = tkSimpleDialog.askstring("local name",
                                             "Please enter your name:",
                                             **self.ask_localname_opt)

        MessagePasser.initialize(conf, localName)
コード例 #13
0
 def __init__(self, master=Tk()):
     Frame.__init__(self, master)
     self.grid()
     self.llbutton = Button(self, text="Linked List", command=self.createLL)
     self.llbutton.grid()
     self.canvas = Canvas(master, bg="white", height=750, width=1000)
     self.canvas.pack()
コード例 #14
0
 def __init__(self, parent, screen_size):
     Frame.__init__(self, parent)
     self.screen_size = screen_size
     self.parent = parent
     self.pack(fill=BOTH, expand=1)
     # self.centerWindow()
     self.initUI()
コード例 #15
0
ファイル: interface.py プロジェクト: victoraaa/exame-cci36
    def __init__(self, parent):
        Frame.__init__(self, parent)

        self.parent = parent
        self.initUI()

        self.img_labels = [Label(self), Label(self)]
コード例 #16
0
ファイル: pySAD.py プロジェクト: AlbMA/PySAD
	def __init__(self, parent):

		Frame.__init__(self, parent)   
		 
		self.parent = parent

		# Spiral parameters (defined as StringVars for convenience)
		self.a = StringVar()
		self.a.set('0')

		self.b = StringVar()
		self.b.set('0.5')

		self.c = StringVar()
		self.c.set('1')

		self.lMax = StringVar()
		self.lMax.set(158)

		self.frec = StringVar()
		self.frec.set(500)

		self.StringLongitud = StringVar()
		self.StringRadio = StringVar()

		# Help mode flag
		self.ayuda = False

		# Figure object
		self.f = Figure(figsize=(5,5))
		
		self.initUI()
コード例 #17
0
ファイル: test.py プロジェクト: hjuinj/Typer
 def __init__(self, parent):
     Frame.__init__(self, parent)
     self.parent = parent
     
     self.submit_tog = True
     self.initUI()
     self.text.bind_class("Text","<Control-a>", self.selectall)
コード例 #18
0
ファイル: gui.py プロジェクト: ncyrcus/tareas-lp
 def __init__(self,parent,api,id):
     Frame.__init__(self, parent)
     self.parent = parent
     self.api = api
     self.id = id
     self.anySearch = False
     self.initUI()
コード例 #19
0
    def __init__(self, master, name=None, scrollregion=(0, 0, '5i', '5i'),
                 items=[], window_size=[160, 30], **canvaskw):
        Frame.__init__(self, master, name=name)

        self.scrollcanvas = Canvas(self, name='scrollcanvas',
                                   scrollregion=scrollregion, **canvaskw)
        self.yscroll = Scrollbar(self, name='yscroll',
                                 command=self.scrollcanvas.yview)
        self.scrollcanvas['yscrollcommand'] = self.yscroll.set
        self.yscroll.pack(side=RIGHT, fill=Y)
        self.scrollcanvas.pack(side=LEFT, fill=BOTH, expand=YES)
        self.items = dict.fromkeys(items)
        for n, i in enumerate(items):
            self.items[i] = {'frame': Frame(self, name=(i.lower() + '_frame'))}
            self.items[i]['frame'].config(relief=GROOVE, padding=5)
            self.items[i]['chbx'] = Checkbutton(self.items[i]['frame'],
                                                    name=(i.lower() + '_chbx'))
            self.items[i]['chbx']['text'] = i
            self.items[i]['chbx'].pack(side=LEFT, fill=X)
            y = window_size[1] / 2 + window_size[1] * n
            self.items[i]['window'] = self.scrollcanvas.create_window(0, y)
            self.scrollcanvas.itemconfigure(self.items[i]['window'],
                                            window=self.items[i]['frame'],
                                            anchor=W, width=window_size[0],
                                            height=window_size[1])
コード例 #20
0
    def __init__(self, master):

        Frame.__init__(self, master)

        self.master = master
        self.initGUI()
        self.usbport = USBport()
コード例 #21
0
 def __init__(self, parent):
     Frame.__init__(self, parent)
     self.button_frame = None
     self.__minefield = None
     self.parent = parent
     self.buttons = list()
     self.initUI()
コード例 #22
0
ファイル: recipe-580717.py プロジェクト: zlrs/code-1
    def __init__(self, master, item_width, item_height, item_relief=None, item_borderwidth=None, item_padding=None, item_style=None, offset_x=0, offset_y=0, gap=0, **kwargs):
        kwargs["width"] = item_width+offset_x*2
        kwargs["height"] = offset_y*2

        Frame.__init__(self, master, **kwargs)

        self._item_borderwidth = item_borderwidth
        self._item_relief = item_relief
        self._item_padding = item_padding
        self._item_style= item_style
        self._item_width = item_width
        self._item_height = item_height
        
        self._offset_x = offset_x
        self._offset_y = offset_y
               
        self._left = offset_x
        self._top = offset_y
        self._right = self._offset_x + self._item_width
        self._bottom = self._offset_y

        self._gap = gap

        self._index_of_selected_item = None
        self._index_of_empty_container = None

        self._list_of_items = []
        self._position = {}

        self._new_y_coord_of_selected_item = None
コード例 #23
0
ファイル: form.py プロジェクト: Sheldan/screenPaper
 def __init__(self, parent):
     Frame.__init__(self, parent)
     self.parent = parent
     self.gui_elements = {}
     self.init_gui()
     self.sc = ScreenPaper()
     self.image = None
コード例 #24
0
ファイル: app.py プロジェクト: claudemuller/pydle
    def __init__(self, parent):
        Frame.__init__(self, parent)
        self.parent = parent

        self.py = pydle()

        self._initUI()
コード例 #25
0
ファイル: booru.py プロジェクト: Reyuu/abd
 def __init__(self, parent):
     Frame.__init__(self, parent)
     self.parent = parent
     self.current_image = posts[0]
     self.posts = posts
     self.initUI()
     self.current_booru = None
コード例 #26
0
    def __init__(self, parent, agent):
        Frame.__init__(self, parent)
        self.parent = parent
        self.agent = agent

        self.parent.title("Hunt The Wumpus - F. Liuzzi")

        self.button = Button(parent, text="Step Agent", command=self.moveAgent)
        self.button.pack()


        self.canvas_height = 64 * (self.agent.rows+1) + 64

        self.canvas_width = 64 * (self.agent.cols+1)
        #if self.agent.rows == self.agent.cols:
        #    self.canvas_height += 64
        self.canvas = Canvas(parent, width=self.canvas_width, height=self.canvas_height)
        #traverse agent map to display appropriate pictures


        self.drawGameGrid()

        self.canvas.pack()

        self.pack()
コード例 #27
0
    def __init__(self, parent):
        Frame.__init__(self, parent)

        self.parent = parent

        self.parent.title("Twitter Judge")
        self.style = Style()
        self.style.theme_use("default")

        output_frame = Frame(self, relief = RIDGE, borderwidth = 1)
        output_frame.pack(anchor = N, fill = BOTH, expand = True)

        output_text = ScrolledText(output_frame)
        self.output_text = output_text
        output_text.pack(fill = BOTH, expand = True)

        input_frame = Frame(self, height = 32)
        input_frame.pack(anchor = S, fill = X, expand = False)

        user_label = Label(input_frame, text = "Enter username:"******"Judge!", command = lambda: judge(user_entry.get(), self))
        judge_button.pack(side = RIGHT)
        user_entry = Entry(input_frame)
        user_entry.pack(fill = X, padx = 5, pady = 5, expand = True)

        self.pack(fill = BOTH, expand = True)
コード例 #28
0
    def __init__(self, parent):
        Frame.__init__(self, parent)
        self.parent = parent
        self.style = Style()
        self.style.theme_use("default")

        self._initUI()
コード例 #29
0
ファイル: Battleship.py プロジェクト: arnibarnason/Battleship
 def __init__(self, parent):
     Frame.__init__(self, parent)   
     self.parent = parent
     self.player1 = Player()
     self.player2 = ComputerPlayer()
     self.isOver = True
     self.initUI()
コード例 #30
0
ファイル: LED.py プロジェクト: ajdevaux/lowmag
    def __init__(self, parent, sys):
        Frame.__init__(self, parent)

        self.parent = parent
        self.sys = sys
        # attach handle to this window class to main sys class
        self.sys.c_led = self

        self.sn = ""
        self.status = ""

        self.sys.hw.reload_led()

        # get window configurations
        self.parent.geometry(self.sys.win_cfg.wLED)
        self.parent.title(self.sys.win_cfg.sLED)

        # draw window
        self.initUI()

        # window defaults
        self.led_off()

        # LED Advanced Panel
        self.w_LEDAdv = Toplevel(self.parent)
        self.c_LEDAdv = NGA_Window_LED_Advanced(self.w_LEDAdv, self.sys)
        self.c_LEDAdv.close_window()
コード例 #31
0
    def __init__(self, parent):
        
        self.serialStatus = False

        #create variables
        self.startmotor = BooleanVar()
        self.logstate = BooleanVar()
        self.loggedData = []
        self.throttlevar = StringVar()
        self.throttleval = IntVar()

        #default values
        self.throttlevar.set("0%")
        self.throttleval.set(0)

        #base frame init
        Frame.__init__(self, parent)   
        self.parent = parent
        self.initUI()
        self.centerWindow()

        self.PERIOD_LENGTH_Log = 100 #milliseconds
        self.PERIOD_LENGTH_Scan = 1000 #milliseconds
        self.PERIOD_LENGTH_Refresh = 300 #milliseconds

        self.parent.after(0, self.runScan)
        self.parent.after(0, self.runLog)
        self.parent.after(0, self.runRefresh)
コード例 #32
0
    def __init__(self, parent, controller):
        Frame.__init__(self, parent)
        self.selected = "";
        self.controller = controller
        label = Label(self, text="Select server", font=TITLE_FONT, justify=CENTER, anchor=CENTER)
        label.pack(side="top", fill="x", pady=10)
        
        self.button1 = Button(self, text="Next",state="disabled", command=self.callback_choose)
        button2 = Button(self, text="Refresh", command=self.callback_refresh)        
        button3 = Button(self, text="Back", command=self.callback_start)
        
        scrollbar = Scrollbar(self)
        self.mylist = Listbox(self, width=100, yscrollcommand = scrollbar.set )
        self.mylist.bind("<Double-Button-1>", self.twoClick)

        self.button1.pack()
        button2.pack()
        button3.pack()
        # create list with a scroolbar
        scrollbar.pack( side = "right", fill="y" )
        self.mylist.pack( side = "top", fill = "x", ipadx=20, ipady=20, padx=20, pady=20 )
        scrollbar.config( command = self.mylist.yview )
        # create a progress bar
        label2 = Label(self, text="Refresh progress bar", justify='center', anchor='center')
        label2.pack(side="top", fill="x")
        
        self.bar_lenght = 200
        self.pb = Progressbar(self, length=self.bar_lenght, mode='determinate')
        self.pb.pack(side="top", anchor='center', ipadx=20, ipady=20, padx=10, pady=10)
        self.pb.config(value=0)
コード例 #33
0
    def __init__(self, parent, controller):
        Frame.__init__(self, parent)
        self.controller = controller
        ChooseType.socket = None
        ChooseType.create_player = None
        
        self.plx_name = "PLAYER"
        ChooseType.plx_type = "SPECTATOR"
        ChooseType.start_game = None
        label_1 = Label(self, text="Create character", font=TITLE_FONT, justify=CENTER, anchor=CENTER)
        label_2 = Label(self, text="Name: ")
        self.entry_1 = Entry(self)
        self.entry_1.insert(0, 'Player_')

        label_3 = Label(self, text="Join as: ")
        button1 = Button(self, text="FROG", command=self.callback_frog)
        button2 = Button(self, text="FLY", command=self.callback_fly)
        button3 = Button(self, text="SPECTATOR", command=self.callback_spec)
        ChooseType.button4 = Button(self, text="Back", command=lambda: controller.show_frame("StartPage"))

        label_1.pack(side="top", fill="x", pady=10)
        label_2.pack()       
        self.entry_1.pack()
        label_3.pack()
        button1.pack()
        button2.pack()
        button3.pack()
        ChooseType.button4.pack(pady=20)
コード例 #34
0
 def __init__(self, parent, controller):
     Frame.__init__(self, parent)
     self.controller = controller
     label = Label(self, text="About", font=TITLE_FONT, justify=CENTER, anchor=CENTER)
     label.pack(side="top", fill="x", pady=10)
     label_2 = Label(self, text=
     """        Frogs vs Flies is a cool on-line multi-player game.
     It consists of hungry frogs, trying to catch some darn
     tasty flies to eat and not starve to death, and terrified,
     but playful flies that try to live as long as possible 
     to score points by not being eaten by nasty frogs.
     ----------------------------------------------------------------------------------------
     When the game has been selected or created, and your
     class selected, click in the game field to start feeling your
     limbs. To move, use your keyboard's arrows.
     By this point, you should know where they are located, 
     don't you? Great! Now you can start playing the game!
     ----------------------------------------------------------------------------------------
     Frogs, being cocky little things, have the ability to
     do a double jump, holding SHIFT while moving with cursors.
     And flies, being so fly, that the air can't catch up with
     them, have a greater field of view, so they can see frogs
     before they can see them.
     ----------------------------------------------------------------------------------------
     Have a wonderful time playing this awesome game!
     ----------------------------------------------------------------------------------------
     
     Created by Kristaps Dreija and Egils Avots in 2015 Fall
     """, font=ABOUT_FONT, anchor=CENTER, justify=CENTER)
     label_2.pack()
     button1 = Button(self, text="\nBack\n", command=lambda: controller.show_frame("StartPage"))
     button1.pack(ipadx=20,pady=10)
コード例 #35
0
ファイル: test.py プロジェクト: hjuinj/Typer
    def __init__(self, parent):
        Frame.__init__(self, parent)
        self.parent = parent

        self.submit_tog = True
        self.initUI()
        self.text.bind_class("Text", "<Control-a>", self.selectall)
コード例 #36
0
 def __init__(self, parent):
     Frame.__init__(self, parent)   
     self.lock = threading.Lock() 
     self.parent = parent
     self.NUM_SPEAKERS = 5       
     self.initUI()
     self.num_inserted = []
コード例 #37
0
 def __init__(self, parent):
     Frame.__init__(self, parent)   
      
     self.parent = parent
     
     self.centerWindow()
     self.initUI()
コード例 #38
0
	def __init__(self, parent, controller):
		Frame.__init__(self, parent)
		self.controller = controller
		self.parent = parent

		Style().configure("TButton", padding=(0, 5, 0, 5), font='serif 10')

		self.columnconfigure(0, pad=10)
		self.columnconfigure(1, pad=10)

		self.rowconfigure(0, pad=10)
		self.rowconfigure(1, pad=10)
		self.rowconfigure(2, pad=10)

		self.btn_wifi = Button(self,
			text="Wifi Connection Demo",
			command=lambda: controller.show_frame("Test_Wifi"), width=BTN_WIDTH)
		self.btn_wifi.grid(row=1, column=0)

		self.btn_gps_3g = Button(self,
			text="3G + GPS Demo",
			command=lambda: controller.show_frame("Test_GPS3G"), width=BTN_WIDTH)
		self.btn_gps_3g.grid(row=1, column=1)

		self.btn_cepas = Button(self,
			text="Cepas Reader Demo",
			command=lambda: controller.show_frame("Test_Cepas"), width=BTN_WIDTH)
		self.btn_cepas.grid(row=2, column=0)

		self.btn_zebra_scanner = Button(self,
			text="Zebra Scanner Demo",
			command=lambda: controller.show_frame("Test_ZebraScanner"), width=BTN_WIDTH)
		self.btn_zebra_scanner.grid(row=2, column=1)

		self.pack()
コード例 #39
0
ファイル: pySAD.py プロジェクト: AlbMA/PySAD
    def __init__(self, parent):

        Frame.__init__(self, parent)

        self.parent = parent

        # Spiral parameters (defined as StringVars for convenience)
        self.a = StringVar()
        self.a.set('0')

        self.b = StringVar()
        self.b.set('0.5')

        self.c = StringVar()
        self.c.set('1')

        self.lMax = StringVar()
        self.lMax.set(158)

        self.frec = StringVar()
        self.frec.set(500)

        self.StringLongitud = StringVar()
        self.StringRadio = StringVar()

        # Help mode flag
        self.ayuda = False

        # Figure object
        self.f = Figure(figsize=(5, 5))

        self.initUI()
コード例 #40
0
ファイル: canvas.py プロジェクト: pigboysid/myat
 def __init__(self, parent):
     Frame.__init__(self, parent)
     self.parent = parent
     self.u = utils('atoutput.pkl')
     self.km = dict()
     self.price = dict()
     self.km[0] = (min(self.u.all_km), max(self.u.all_km))
     self.price[0] = (min(self.u.all_price), max(self.u.all_price))
     self.zoom_level = 0
     try:
         self.parent.title("Auto trader results")
         self.is_standalone = True
     except:
         self.is_standalone = False
     self.style = Style()
     self.style.theme_use("classic")
     # Assume the parent is the root widget; make the frame take up the
     # entire widget size.
     print self.is_standalone
     if self.is_standalone:
         self.w, self.h = map(int,
             self.parent.geometry().split('+')[0].split('x'))
         self.w, self.h = 800, 800
     else:
         self.w, self.h = 600, 600
     self.c = None
     # Are they hovering over a data point?
     self.is_hovering = False
     # Filter the description strings: lower and whiten any non-matching
     # data point.
     self.filter = ''
     self.re = list()
     self.replot()
コード例 #41
0
ファイル: gui-ubuntu.py プロジェクト: superizer/Python-
    def __init__(self, parent):
        Frame.__init__(self, parent)

        self.parent = parent
        self.quote = "I was supposed to be a cool quote . But then internet abandoned me !"
        self.author = "Aditya"
        self.initUI()
コード例 #42
0
ファイル: modules.py プロジェクト: PolinaNik/moxa_monitoring
 def __init__(self, parent):
     Frame.__init__(self, parent)
     self.hourstr = tk.StringVar(self, datetime.datetime.today().hour)
     self.hour = tk.Spinbox(self,
                            from_=0,
                            to=23,
                            wrap=True,
                            textvariable=self.hourstr,
                            width=4,
                            font=tkFont.Font(family=main_font,
                                             size=size_font),
                            state="readonly")
     self.minstr = tk.StringVar(self, datetime.datetime.today().minute)
     self.minstr.trace("w", self.trace_var)
     self.last_value = ""
     self.min = tk.Spinbox(self,
                           from_=0,
                           to=59,
                           wrap=True,
                           textvariable=self.minstr,
                           width=4,
                           font=tkFont.Font(family=main_font,
                                            size=size_font),
                           state="readonly")
     self.hour.grid()
     self.min.grid(row=0, column=1)
コード例 #43
0
 def __init__(self, parent):
     Frame.__init__(self, parent)   
     self.parent = parent
     self.initUI()
     
     #Clear the ROI counter
     self.roiIdx = 0
コード例 #44
0
    def __init__(self, master, sequencer):
        Frame.__init__(self, master)
        self.sequencer = sequencer

        self.control_panel = MainControlFrame(self, sequencer)
        self.control_panel.grid(row=0, column=0, sticky='ns')

        self.instrument_panel = Frame(self)
        self.instrument_panel.grid(row=0, column=1)

        self.rythm_track_frames = []

        for id, instrument in enumerate(sequencer.instruments):
            instrument_frame = get_instrument_frame(self.instrument_panel, instrument)
            instrument_frame.grid(row=id, column=0, sticky="NSEW")

            instrument_track_frame = Frame(self.instrument_panel)
            instrument_track_frame.grid(row=id, column=1, sticky="NSEW", padx=3, pady=3)

            tracks = [track for track in sequencer.tracks if track.instrument_id == id]
            for row, track in enumerate(tracks):
                rt_frame = RhythmTrackFrame(instrument_track_frame, track, sequencer)
                rt_frame.grid(row=row, column=0, sticky="EW")
                self.rythm_track_frames.append(rt_frame)

        self.events = []
        sequencer.add_observer(self)

        self.running = True
        self.consume()
コード例 #45
0
ファイル: visualizer.py プロジェクト: Edelweiss35/StarVisual
    def __init__(self, parent, tile_size, grid_vm=None):
        Frame.__init__(self, parent, relief=RAISED, borderwidth=1)
        self.parent = parent
        self.tile_size = tile_size
        self.grid_vm = grid_vm
        self.columnconfigure(0, weight=1)
        self.columnconfigure(1, pad=3)
        self.rowconfigure(0, weight=1)
        self.rowconfigure(1, pad=3)
        hbar = Scrollbar(self, orient=HORIZONTAL)
        vbar = Scrollbar(self, orient=VERTICAL)
        canvas = Canvas(self, xscrollcommand=hbar.set, yscrollcommand=vbar.set)
        self.canvas = canvas
        self.lines = []

        canvas.bind_all("<MouseWheel>", self._on_mousewheel_vertical)
        canvas.bind_all("<Shift-MouseWheel>", self._on_mousewheel_horizontal)

        # Set up scroll bars
        hbar.pack(side=BOTTOM, fill=X)
        hbar.config(command=canvas.xview)
        vbar.pack(side=RIGHT, fill=Y)
        vbar.config(command=canvas.yview)

        canvas.grid(column=0, row=0, sticky=N + W + E + S)
        hbar.grid(column=0, row=1, sticky=W + E)
        vbar.grid(column=1, row=0, sticky=N + S)

        if grid_vm:
            self.set_vm(grid_vm)
コード例 #46
0
    def __init__(self, isapp=True, name='bleepit'):

        Frame.__init__(self, name=name)
        self.pack(expand=Y, fill=BOTH)
        self.master.title('BleepIt')
        self.isapp = isapp
        self._creat_top_panel()
        self._create_main_panel()
コード例 #47
0
ファイル: main.py プロジェクト: OanaRatiu/Licenta
    def __init__(self, parent, controller, listener):
        Frame.__init__(self, parent)

        self.parent = parent
        self.controller = controller
        self.listener = listener
        self.controller.add_listener(self.listener)
        self.initUI()
コード例 #48
0
ファイル: text_canvas.py プロジェクト: graingert/shim
 def __init__(self, parent, font_size, input_handler, filename):
     Frame.__init__(self, parent)
     self.parent = parent
     self.text_font = tkFont.Font(family='Monaco', size=font_size, weight='bold')
     self.filename = filename
     self.cheight, self.cwidth, self.line_num_spacing = font_size, self.text_font.measure('c'), 50
     self.line_height = ((self.winfo_screenheight() - self.cheight)/(self.cheight + 2) - 4)
     self.init_UI(input_handler)
コード例 #49
0
 def __init__(self, parent):
     Frame.__init__(self, parent)#,background="white")   
      
     self.parent = parent
     self.parent.title("Centered window")
     self.pack(fill=BOTH, expand=1)
     self.centerWindow()
     self.initUI()
コード例 #50
0
    def __init__(self, parent):
        Frame.__init__(self, parent)

        top = self.top = Toplevel(parent)

        self.parent = parent

        self.initUI()
コード例 #51
0
ファイル: guirunner.py プロジェクト: PietroTotis/ArgProblog
 def __init__(self, parent, parser, scriptname, progname=None):
     Frame.__init__(self, parent)
     self.scriptname = scriptname
     self.progname = progname
     self.function = []
     self.variables = []
     self.parent = parent
     self.initUI(parser)
コード例 #52
0
    def __init__(self, parent):
        Frame.__init__(self, parent)

        self.parent = parent
        self.initUI()

        # State attributes
        self.room = False
コード例 #53
0
ファイル: start.py プロジェクト: ofer515/project
    def __init__(self, parent, window_type):
        Frame.__init__(self, parent, msg = None)

        self.parent = parent
        if window_type == "main":
            self.initUI_main()
        if window_type == "err":
            self.initUI_err()
コード例 #54
0
ファイル: facs-gui.py プロジェクト: Findrajive/FACS
    def __init__(self, parent):
        Frame.__init__(self, parent)         
        self.parent = parent        
        self.initUIConstants()
        self.initUI()

        self.inputDirectory = ""
        self.outputDirectory = ""
コード例 #55
0
ファイル: start.py プロジェクト: ofer515/project
    def __init__(self, parent, window_type):
        Frame.__init__(self, parent, msg=None)

        self.parent = parent
        if window_type == "main":
            self.initUI_main()
        if window_type == "err":
            self.initUI_err()
コード例 #56
0
    def __init__(self, parent, instructor):
        Frame.__init__(self, parent)

        self.instructor = instructor
        self.parent = parent
        self.centerWindow()
        self.initUI()
        self.command = "hi"