def __init__(self):
        Gtk.Window.__init__(self, title="New Patient Window")
        Gtk.Window.set_default_size(self, window_w,
                                    window_h)  # Set Default Window Size

        patGrid = Gtk.Grid()  # Grid Layout Container
        self.add(patGrid)
        patGrid.props.valign = Gtk.Align.CENTER
        patGrid.props.halign = Gtk.Align.CENTER

        self.firstNameLabel = Gtk.Label("First Name: ")
        self.firstNameEntry = Gtk.Entry()

        patGrid.attach(self.firstNameLabel, 1, 1, 2, 2)
        patGrid.attach_next_to(self.firstNameEntry, self.firstNameLabel, 1, 2,
                               2)  #left=0, r=1, t=2, b=3

        self.lastNameLabel = Gtk.Label("Last Name: ")
        self.lastNameEntry = Gtk.Entry()

        patGrid.attach_next_to(self.lastNameLabel, self.firstNameLabel, 3, 2,
                               2)
        patGrid.attach_next_to(self.lastNameEntry, self.lastNameLabel, 1, 2, 2)

        self.submitButton = Gtk.Button(label="Submit")
        self.submitButton.connect("clicked", self.on_submitButton_clicked)
        patGrid.attach_next_to(self.submitButton, self.lastNameLabel, 3, 4, 2)
Exemple #2
0
    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)
Exemple #3
0
    def __init__(self):
        Gtk.Window.__init__(self, title="Clipboard Example")

        table = Gtk.Table(2, 2)

        self.clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
        self.entry = Gtk.Entry()
        self.image = Gtk.Image.new_from_icon_name("process-stop",
                                                  Gtk.IconSize.MENU)

        button_acept_text = Gtk.Button("Aceptar")
        button_cancel_text = Gtk.Button("Cancelar")
        button_close_text = Gtk.Button("Cerrar")
        #button_copy_image = Gtk.Button("Copy Image")
        #button_paste_image = Gtk.Button("Paste Image")

        table.attach(self.entry, 0, 4, 0, 1)
        #table.attach(self.image, 0, 1, 0, 2)
        table.attach(button_acept_text, 1, 2, 1, 2)
        table.attach(button_cancel_text, 2, 3, 1, 2)
        table.attach(button_close_text, 3, 1, 1, 2)
        #table.attach(button_copy_image, 1, 2, 1, 2)
        #table.attach(button_paste_image, 2, 3, 1, 2)

        button_acept_text.connect("clicked", self.copy_text)
        button_cancel_text.connect("clicked", self.paste_text)
        button_close_text.connect("clicked", self.paste_text)
        #button_copy_image.connect("clicked", self.copy_image)
        #button_paste_image.connect("clicked", self.paste_image)

        self.add(table)
    def __init__(self):
        Gtk.Window.__init__(self, title="New Patient Window")
        Gtk.Window.set_default_size(self, window_w,
                                    window_h)  # Set Default Window Size

        self.grid = Gtk.Grid()  # Grid Layout Container
        self.add(self.grid)

        self.firstNameLabel = Gtk.Label("First Name: ")
        self.firstNameEntry = Gtk.Entry()

        self.grid.add(self.firstNameLabel)
        self.grid.add(self.firstNameEntry)

        self.lastNameLabel = Gtk.Label("Last Name: ")
        self.lastNameEntry = Gtk.Entry()

        self.grid.add(self.lastNameLabel)
        self.grid.add(self.lastNameEntry)

        self.submitButton = Gtk.Button(label="Submit")
        self.submitButton.connect("clicked", self.on_submitButton_clicked)
        self.grid.add(self.submitButton)
Exemple #5
0
    def newPatWin(self, widget):
        """
        """
        self.patGrid = Gtk.Grid()  # Grid Layout Container
        self.homeGrid.add(self.patGrid)
        patGrid.props.valign = Gtk.Align.CENTER
        patGrid.props.halign = Gtk.Align.CENTER

        self.firstNameLabel = Gtk.Label("First Name: ")
        self.firstNameEntry = Gtk.Entry()

        patGrid.attach(self.firstNameLabel, 1, 1, 2, 2)
        patGrid.attach_next_to(self.firstNameEntry, self.firstNameLabel, 1, 2,
                               2)  #left=0, r=1, t=2, b=3
Exemple #6
0
import pgi
pgi.require_version('Gtk', '3.0')
from pgi.repository import Gtk

window = Gtk.Window()
entry = Gtk.Entry()
button_ok = Gtk.Button("OK")
button_cancel = Gtk.Button("Cancel")
vbox = Gtk.VBox()
vbox.pack_start(entry)
hbox = Gtk.HBox()
hbox.pack_start(button_ok)
hbox.pack_start(button_cancel)
vbox.pack_start(hbox)
window.add(vbox)
window.show_all()

Exemple #7
0
# config_combo = Gtk.ComboBoxText()
# config_combo.set_entry_text_column(0)
# config_combo.connect("changed", on_config_combo_changed)
# for key, value in configs.items():
# 	config_combo.append_text(str(key))
# config_combo.set_sensitive(False)

c_label = Gtk.Label(label="C: ")
c_label.set_alignment(0, 0.5)
gamma_label = Gtk.Label(label="Gamma: ")
gamma_label.set_alignment(0, 0.5)
split_label = Gtk.Label(label="Split: ")
split_label.set_alignment(0, 0.5)
classes_label = Gtk.Label(label="Classes: ")
split_label.set_alignment(0, 0.5)
c_entry = Gtk.Entry()
c_entry.set_placeholder_text("C")
gamma_entry = Gtk.Entry()
gamma_entry.set_placeholder_text("Gamma")
split_entry = Gtk.Entry()
split_entry.set_placeholder_text("Split")
classes_entry = Gtk.Entry()
classes_entry.set_placeholder_text("Classes")

c_entry.set_width_chars(10)
gamma_entry.set_width_chars(10)
split_entry.set_width_chars(10)
classes_entry.set_width_chars(10)

set_parameters_button = Gtk.Button(label="Установить параметры")
set_parameters_button.connect("clicked", set_parameters)