def __init__(self): Gtk.Window.__init__(self, title="PDF Split") self.set_size_request(200, 100) self.set_border_width(10) self.timeout_id = None vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=10) self.add(vbox) self.entry = Gtk.Entry() self.entry.set_text("Entra la ruta del archivo") vbox.pack_start(self.entry, True, True, 0) hbox = Gtk.Box(spacing=6) self.add(hbox) button = Gtk.Button.new_with_label("Click Me") button.connect("clicked", self.on_click_me_clicked) hbox.pack_start(button, True, True, 0) button = Gtk.Button.new_with_mnemonic("_Open") button.connect("clicked", self.on_open_clicked) hbox.pack_start(button, True, True, 0) button = Gtk.Button.new_with_mnemonic("_Close") button.connect("clicked", self.on_close_clicked) hbox.pack_start(button, True, True, 0)
def __init__(self): Gtk.Window.__init__(self, title="Home Window") Gtk.Window.set_default_size(self, window_w, window_h) # Set Default Window Size # FIGURE OUT MENUBAR STUFF... # mb = Gtk.MenuBar(Gtk.Window) # # homeMenuBar = Gtk.Menu() # fileMenu = Gtk.MenuItem("_File") # fileMenu.set_submenu(homeMenuBar) #newPatMenuBar = Gtk.MenuItem("New Patient") #homeMenuBar.append(newPatMenuBar) #fileMenu.append(newPatMenuBar) #openMenuBar = Gtk.MenuItem("Open...") #homeMenuBar.append(openMenuBar) #fileMenu.append(openMenuBar) #endSeshMenuBar = Gtk.MenuItem("End Session") #homeMenuBar.append(endSeshMenuBar) #fileMenu.append(endSeshMenuBar) # mb.append(fileMenu) #Gtk.Application.set_menubar(self, Gtk.MenuBar) box = Gtk.Box(spacing=6) # Box Layout Container self.add(box) # self.box.pack_start(menubar, True,True,0) aboutBox = Gtk.AboutDialog() #gtk_show_about_dialog() self.testButton = Gtk.Button(label="Click Here") self.testButton.connect("clicked", self.on_testButton_clicked) box.pack_start(self.testButton, True, True, 0) self.newPatButton = Gtk.Button(label="New Patient") self.newPatButton.connect("clicked", self.on_newPatButton_clicked) #self.newPatButton.modify_bg(Gtk.StateType.NORMAL, Gdk.Color(6400,6400,6440)) box.pack_start(self.newPatButton, True, True, 0)
def __init__(self): Gtk.Window.__init__(self, title="InitialWindow") Gtk.Window.set_default_size(self, window_w, window_h) # Set Default Window Size initGrid = Gtk.Grid() self.add(initGrid) momDisp = Gtk.Box() initGrid.add(momDisp) self.beginButton = Gtk.Button(label="Begin") self.beginButton.connect("clicked", self.on_beginButton_clicked) initGrid.add(self.beginButton) pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale( "pelvisim.png", 100, 100, True) pelvIm = Gtk.Image.new_from_pixbuf(pixbuf) initGrid.add(pelvIm)
def __init__(self): Gtk.Window.__init__(self, title="Home Window") Gtk.Window.set_default_size(self, window_w, window_h) # Set Default Window Size # FIGURE OUT MENUBAR STUFF... #menubar = Gtk.MenuBar #Gtk.Application.set_menubar(self, Gtk.MenuBar) self.box = Gtk.Box(spacing=6) # Box Layout Container self.add(self.box) # self.box.pack_start(menubar, True,True,0) self.testButton = Gtk.Button(label="Click Here") self.testButton.connect("clicked", self.on_testButton_clicked) self.box.pack_start(self.testButton, True, True, 0) self.newPatButton = Gtk.Button(label="New Patient") self.newPatButton.connect("clicked", self.on_newPatButton_clicked) self.box.pack_start(self.newPatButton, True, True, 0)
def __init__(self): Gtk.Window.__init__(self, title="Home Window") Gtk.Window.set_default_size(self, window_w, window_h) # Set Default Window Size #TODO: FIGURE OUT WINDOW STUFF self.homeVBox = Gtk.VBox() self.add(self.homeVBox) self.labelBox = Gtk.Box() self.homePageLabel = Gtk.Label("PUSH ASSIST HOME PAGE") self.labelBox.add(self.homePageLabel) self.homeVBox.add(self.labelBox) self.labelBox.props.halign = Gtk.Align.CENTER self.labelBox.props.valign = Gtk.Align.END homeButtonGrid = Gtk.Grid() # Grid Layout Container self.homeVBox.add(homeButtonGrid) homeButtonGrid.props.halign = Gtk.Align.CENTER homeButtonGrid.props.valign = Gtk.Align.END # self.box.pack_start(menubar, True,True,0) self.openButton = Gtk.Button("Open...") self.openButton.connect("clicked", self.on_openButton_clicked) homeButtonGrid.attach(self.openButton, 1, 1, 2, 2) self.newPatButton = Gtk.Button("New Patient") self.newPatButton.connect("clicked", self.on_newPatButton_clicked) homeButtonGrid.attach_next_to(self.newPatButton, self.openButton, 1, 2, 2) #left=0, r=1, t=2, b=3 self.backButton = Gtk.Button("Back") self.backButton.connect("clicked", self.on_backButton_clicked) homeButtonGrid.attach_next_to(self.backButton, self.newPatButton, 1, 1, 1)
plot_button.connect("clicked", plot) plot_button.set_sensitive(False) test_signal_plot = Gtk.Image() test_signal_plot.set_sensitive(False) test_result_image = Gtk.Image() test_result_image.set_sensitive(False) all_data_plot = Gtk.Image() set_image(all_data_plot, "data/plot_data.png", 640, 480) # vbox1 = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=3) # vbox1.pack_start(file_chooser_button, True, True, 0) # vbox1.pack_start(config_combo, True, True, 0) hbox1 = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=6) hbox1.pack_start(file_chooser_button, True, False, 0) # hbox1.pack_start(vbox1, False, False, 0) hbox1.pack_start(param_input_grid, False, False, 2) hbox1.pack_start(train_button, True, False, 1) # expand, fil, padding hbox1.pack_start(run_tests_button, True, False, 1) hbox1.pack_start(run_random_test_button, True, False, 1) hbox2 = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=1) hbox2.pack_start(test_signal_plot, False, False, 0) hbox2.pack_start(test_result_image, True, True, 0) vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0) vbox.pack_start(hbox1, False, False, 0) vbox.pack_start(results_label, True, False, 0) vbox.pack_start(hbox2, False, False, 2)