scientific-programming-exer.../exam/ex03/main.py

29 lines
840 B
Python
Raw Permalink Normal View History

2019-01-31 16:51:05 +00:00
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
from callbacks import CallbackHandler
builder = Gtk.Builder()
builder.add_from_file("main.glade")
callback_handler = CallbackHandler(builder)
handlers = {
"onDestroy": Gtk.main_quit
, "on_manually_add_submit_button_clicked": callback_handler.on_manually_add_submit_button_clicked
2019-01-31 18:53:49 +00:00
, "on_load_from_file_chooser_file_set": callback_handler.on_load_from_file_chooser_file_set
, "on_save_questions_to_file_button_clicked": callback_handler.on_save_questions_to_file_button_clicked
, "on_submit_answer_button_clicked": callback_handler.on_submit_answer_button_clicked
, "on_next_question_button_clicked": callback_handler.on_next_question_button_clicked
2019-01-31 16:51:05 +00:00
}
builder.connect_signals(handlers)
window = builder.get_object("window1")
window.show_all()
Gtk.main()