-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
serve GUI and Glade file from master
1 parent
8904d96
commit db3114f
Showing
6 changed files
with
89 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class Repository: | ||
def get_data(self, filename): | ||
with open(filename) as f: | ||
return f.read() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- Generated with glade 3.18.3 --> | ||
<interface> | ||
<requires lib="gtk+" version="3.12"/> | ||
<object class="GtkAdjustment" id="F0"> | ||
<property name="lower">1000</property> | ||
<property name="upper">2000</property> | ||
<property name="value">1500</property> | ||
<property name="step_increment">1</property> | ||
<property name="page_increment">10</property> | ||
</object> | ||
<object class="GtkBox" id="top"> | ||
<property name="visible">True</property> | ||
<property name="can_focus">False</property> | ||
<child> | ||
<object class="GtkLabel" id="label1"> | ||
<property name="visible">True</property> | ||
<property name="can_focus">False</property> | ||
<property name="label" translatable="yes">Simulated flopping frequency</property> | ||
</object> | ||
<packing> | ||
<property name="expand">False</property> | ||
<property name="fill">True</property> | ||
<property name="position">0</property> | ||
</packing> | ||
</child> | ||
<child> | ||
<object class="GtkSpinButton" id="spinbutton1"> | ||
<property name="visible">True</property> | ||
<property name="can_focus">True</property> | ||
<property name="input_purpose">number</property> | ||
<property name="adjustment">F0</property> | ||
</object> | ||
<packing> | ||
<property name="expand">False</property> | ||
<property name="fill">True</property> | ||
<property name="position">1</property> | ||
</packing> | ||
</child> | ||
</object> | ||
</interface> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import asyncio | ||
|
||
from gi.repository import Gtk | ||
|
||
|
||
class Controls: | ||
@asyncio.coroutine | ||
def build(self, get_data): | ||
self.builder = Gtk.Builder() | ||
data = yield from get_data("flopping_f_simulation_gui.glade") | ||
self.builder.add_from_string(data) | ||
|
||
def get_top_widget(self): | ||
return self.builder.get_object("top") | ||
|
||
def get_arguments(self): | ||
return { | ||
"F0": self.builder.get_object("F0").get_value() | ||
} |