Skip to content
Browse files

Added some text to aid in useability. Added the gpl logo.

  • Loading branch information...
1 parent 3a440ae commit 119791810a13828b2349e5ec5ae2071112ea37ad @josefski committed Apr 12, 2012
Showing with 205 additions and 26 deletions.
  1. +90 −2 Observation-Deluxe.wxg
  2. +115 −24 observatory.py
View
92 Observation-Deluxe.wxg
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
-<!-- generated by wxGlade 0.6.3 on Wed Apr 4 14:50:56 2012 -->
+<!-- generated by wxGlade 0.6.3 on Thu Apr 12 13:13:41 2012 -->
-<application path="/home/josef/Desktop/observatory.py" name="behavior_observation" class="" option="0" language="python" top_window="dialog_3" encoding="UTF-8" use_gettext="0" overwrite="0" use_new_namespace="1" for_version="2.8" is_template="0">
+<application path="/home/josef/Behavior-Observatory/observatory.py" name="behavior_observation" class="" option="0" language="python" top_window="dialog_3" encoding="UTF-8" use_gettext="0" overwrite="0" use_new_namespace="1" for_version="2.8" is_template="0">
<object class="Dialog1" name="dialog_1" base="EditDialog">
<style>wxDEFAULT_DIALOG_STYLE</style>
<title>Behavior Observatory</title>
@@ -15,6 +15,14 @@
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<border>0</border>
+ <option>0</option>
+ <object class="wxStaticText" name="welcome" base="EditStaticText">
+ <attribute>1</attribute>
+ <label>Thank you for using FBA Machine. \nStart by entering the first and last \nnames of the student and then your name.</label>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <border>0</border>
<option>1</option>
<object class="wxBoxSizer" name="first_name_sz" base="EditBoxSizer">
<orient>wxHORIZONTAL</orient>
@@ -84,6 +92,14 @@
</object>
</object>
<object class="sizeritem">
+ <border>0</border>
+ <option>0</option>
+ <object class="wxStaticText" name="label_directions" base="EditStaticText">
+ <attribute>1</attribute>
+ <label>The widget underneath this message\nis the task timer. Push the "TIME" button \nand see what happens.</label>
+ </object>
+ </object>
+ <object class="sizeritem">
<flag>wxEXPAND</flag>
<border>0</border>
<option>0</option>
@@ -288,6 +304,14 @@
</object>
</object>
</object>
+ <object class="sizeritem">
+ <border>0</border>
+ <option>0</option>
+ <object class="wxStaticText" name="hint" base="EditStaticText">
+ <attribute>1</attribute>
+ <label>\nHINT: You can use\nTAB and SHIFT + TAB\nto navigate around\nthe application and "ENTER"\nto activate buttons.</label>
+ </object>
+ </object>
</object>
</object>
<object class="sizeritem">
@@ -347,6 +371,38 @@
<object class="sizeritem">
<border>0</border>
<option>0</option>
+ <object class="spacer" name="spacer" base="EditSpacer">
+ <height>20</height>
+ <width>205</width>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <border>0</border>
+ <option>0</option>
+ <object class="wxStaticText" name="setting_events" base="EditStaticText">
+ <attribute>1</attribute>
+ <label>Record Setting Events</label>
+ <font>
+ <size>14</size>
+ <family>default</family>
+ <style>normal</style>
+ <weight>normal</weight>
+ <underlined>0</underlined>
+ <face>Cantarell</face>
+ </font>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <border>0</border>
+ <option>0</option>
+ <object class="wxTextCtrl" name="setting_get" base="EditTextCtrl">
+ <style>wxTE_MULTILINE|wxTE_LINEWRAP|wxTE_WORDWRAP</style>
+ <size>205, 150</size>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <border>0</border>
+ <option>0</option>
<object class="wxButton" name="help" base="EditButton">
<label>HELP!</label>
</object>
@@ -358,6 +414,38 @@
<label>About</label>
</object>
</object>
+ <object class="sizeritem">
+ <border>0</border>
+ <option>0</option>
+ <object class="spacer" name="spacer" base="EditSpacer">
+ <height>30</height>
+ <width>205</width>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <flag>wxEXPAND</flag>
+ <border>0</border>
+ <option>1</option>
+ <object class="wxBoxSizer" name="sizer_1" base="EditBoxSizer">
+ <orient>wxHORIZONTAL</orient>
+ <object class="sizeritem">
+ <border>0</border>
+ <option>0</option>
+ <object class="wxStaticText" name="Copyright" base="EditStaticText">
+ <attribute>1</attribute>
+ <label>Josef Hoffman\n(C) 2012</label>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <border>0</border>
+ <option>0</option>
+ <object class="wxStaticBitmap" name="bitmap_1" base="EditStaticBitmap">
+ <attribute>1</attribute>
+ <bitmap>/home/josef/Behavior-Observatory/gplv3-127x51.png</bitmap>
+ </object>
+ </object>
+ </object>
+ </object>
</object>
</object>
</object>
View
139 observatory.py
@@ -41,24 +41,25 @@
class Dialog1(wx.Dialog):
def __init__(self, *args, **kwds):
# begin wxGlade: Dialog1.__init__
- kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX|wx.STAY_ON_TOP
+ kwds["style"] = wx.DEFAULT_DIALOG_STYLE
wx.Dialog.__init__(self, *args, **kwds)
-
+ self.welcome = wx.StaticText(self, -1, "Thank you for using FBA Machine. \nStart by entering the first and last \nnames of the student and then your name.")
self.first_name_txt = wx.TextCtrl(self, -1, "Enter Student First Name Here")
self.last_name_txt = wx.TextCtrl(self, -1, "Enter Student Last Name Here")
self.observer_first = wx.TextCtrl(self, -1, "Enter Your Name Here")
self.static_line_1 = wx.StaticLine(self, -1)
self.save_names = wx.Button(self, -1, "Fill Out Information Above, Then Press Here")
+ self.label_directions = wx.StaticText(self, -1, "The widget underneath this message\nis the task timer. Push the \"TIME\" button \nand see what happens.")
self.static_line_2 = wx.StaticLine(self, -1)
self.time_button = wx.Button(self, -1, "TIME")
self.notes_box = wx.TextCtrl(self, -1, "\n", style=wx.TE_MULTILINE|wx.TE_LINEWRAP|wx.TE_WORDWRAP)
self.save_quit = wx.Button(self, -1, "Save and Quit")
self.re_title = wx.StaticText(self, -1, "Record Repetitive Events")
- self.re_txt_1 = wx.TextCtrl(self, -1, "Repetitive Behavior")
+ self.re_txt_1 = wx.TextCtrl(self, -1, "Repetitive Event")
self.count_1 = wx.Button(self, -1, "Record")
- self.re_txt_2 = wx.TextCtrl(self, -1, "Repetitive Behavior")
+ self.re_txt_2 = wx.TextCtrl(self, -1, "Repetitive Event")
self.count_2 = wx.Button(self, -1, "Record")
- self.re_txt_3 = wx.TextCtrl(self, -1, "Repetitive Behavior")
+ self.re_txt_3 = wx.TextCtrl(self, -1, "Repetitive Event ")
self.count_3 = wx.Button(self, -1, "Record")
self.static_line_rep = wx.StaticLine(self, -1)
self.rd_title = wx.StaticText(self, -1, "Record Redirects")
@@ -70,16 +71,33 @@ def __init__(self, *args, **kwds):
self.tch_rd_cnt = wx.StaticText(self, -1, "0")
self.rd_pr_btn = wx.Button(self, -1, "Redirected Peer")
self.rd_pr_cnt = wx.StaticText(self, -1, "0")
+ self.hint = wx.StaticText(self, -1, "\nHINT: You can use\nTAB and SHIFT + TAB\nto navigate around\nthe application and \"ENTER\"\nto activate buttons.")
self.re_1_lbl = wx.StaticText(self, -1, "Repetive Event Count ")
self.cnt_1 = wx.StaticText(self, -1, "0")
self.re_2_lbl = wx.StaticText(self, -1, "Repetive Event Count")
self.cnt_2 = wx.StaticText(self, -1, "0")
self.re_3_lbl = wx.StaticText(self, -1, "Repetitive Event Count")
self.cnt_3 = wx.StaticText(self, -1, "0")
- self.help = wx.Button(self, -1, "HELP!")
+ self.setting_events = wx.StaticText(self, -1, "Record Setting Events")
+ self.setting_get = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE|wx.TE_LINEWRAP|wx.TE_WORDWRAP)
+ self.help = wx.Button(self, -1, "Read Me")
self.about = wx.Button(self, -1, "About")
-
- #Bindings
+ self.Copyright = wx.StaticText(self, -1, "Josef Hoffman\n(C) 2012")
+ self.bitmap_1 = wx.StaticBitmap(self, -1, wx.Bitmap("/home/josef/Behavior-Observatory/gplv3-127x51.png", wx.BITMAP_TYPE_ANY))
+
+ self.__set_properties()
+ self.__do_layout()
+ # end wxGlade
+ self.time_button.Enable(False)
+ self.save_quit.Enable(False)
+ self.slf_rd_btn.Enable(False)
+ self.tch_rd_btn.Enable(False)
+ self.rd_pr_btn.Enable(False)
+ self.count_1.Enable(False)
+ self.count_2.Enable(False)
+ self.count_3.Enable(False)
+
+#Bindings
self.Bind(wx.EVT_BUTTON, self.time_event, self.time_button)
self.Bind(wx.EVT_BUTTON, self.filefunc, self.save_quit)
self.Bind(wx.EVT_BUTTON, self.header, self.save_names)
@@ -90,13 +108,8 @@ def __init__(self, *args, **kwds):
self.Bind(wx.EVT_BUTTON, self.repeat_behavior_1, self.count_1)
self.Bind(wx.EVT_BUTTON, self.repeat_behavior_2, self.count_2)
self.Bind(wx.EVT_BUTTON, self.repeat_behavior_3, self.count_3)
+ self.Bind(wx.EVT_BUTTON, self.OnAboutBox, self.about)
- self.time_button.Enable(False)
-
- self.__set_properties()
- self.__do_layout()
- # end wxGlade
-
def __set_properties(self):
# begin wxGlade: Dialog1.__set_properties
self.SetTitle("Behavior Observatory")
@@ -110,12 +123,15 @@ def __set_properties(self):
self.re_txt_2.SetMinSize((160, 28))
self.re_txt_3.SetMinSize((160, 28))
self.static_line_rep.SetMinSize((184, 3))
+ self.setting_events.SetFont(wx.Font(14, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Cantarell"))
+ self.setting_get.SetMinSize((205, 150))
# end wxGlade
def __do_layout(self):
# begin wxGlade: Dialog1.__do_layout
sizer_main = wx.BoxSizer(wx.HORIZONTAL)
rpt_events_ct_sz = wx.BoxSizer(wx.VERTICAL)
+ sizer_1 = wx.BoxSizer(wx.HORIZONTAL)
rpt_events_sz = wx.BoxSizer(wx.VERTICAL)
rd_pr = wx.BoxSizer(wx.HORIZONTAL)
tch_rd = wx.BoxSizer(wx.HORIZONTAL)
@@ -126,6 +142,7 @@ def __do_layout(self):
observer_name_sz = wx.BoxSizer(wx.HORIZONTAL)
last_name_sz = wx.BoxSizer(wx.HORIZONTAL)
first_name_sz = wx.BoxSizer(wx.HORIZONTAL)
+ sizer_left.Add(self.welcome, 0, 0, 0)
first_name_sz.Add(self.first_name_txt, 0, 0, 0)
sizer_left.Add(first_name_sz, 1, 0, 0)
last_name_sz.Add(self.last_name_txt, 0, 0, 0)
@@ -135,6 +152,7 @@ def __do_layout(self):
sizer_left.Add(self.static_line_1, 0, wx.EXPAND, 0)
name_saver_sz.Add(self.save_names, 0, 0, 0)
sizer_left.Add(name_saver_sz, 1, wx.EXPAND, 0)
+ sizer_left.Add(self.label_directions, 0, 0, 0)
sizer_left.Add(self.static_line_2, 0, wx.EXPAND, 0)
sizer_left.Add(self.time_button, 0, 0, 0)
sizer_left.Add(self.notes_box, 0, 0, 0)
@@ -161,15 +179,23 @@ def __do_layout(self):
rd_pr.Add(self.rd_pr_btn, 0, 0, 0)
rd_pr.Add(self.rd_pr_cnt, 0, 0, 0)
rpt_events_sz.Add(rd_pr, 1, wx.EXPAND, 0)
+ rpt_events_sz.Add(self.hint, 0, 0, 0)
sizer_main.Add(rpt_events_sz, 0, wx.ALL, 3)
rpt_events_ct_sz.Add(self.re_1_lbl, 0, 0, 0)
rpt_events_ct_sz.Add(self.cnt_1, 0, 0, 0)
rpt_events_ct_sz.Add(self.re_2_lbl, 0, 0, 0)
rpt_events_ct_sz.Add(self.cnt_2, 0, 0, 0)
rpt_events_ct_sz.Add(self.re_3_lbl, 0, 0, 0)
rpt_events_ct_sz.Add(self.cnt_3, 0, 0, 0)
+ rpt_events_ct_sz.Add((205, 20), 0, 0, 0)
+ rpt_events_ct_sz.Add(self.setting_events, 0, 0, 0)
+ rpt_events_ct_sz.Add(self.setting_get, 0, 0, 0)
rpt_events_ct_sz.Add(self.help, 0, 0, 0)
rpt_events_ct_sz.Add(self.about, 0, 0, 0)
+ rpt_events_ct_sz.Add((205, 30), 0, 0, 0)
+ sizer_1.Add(self.Copyright, 0, 0, 0)
+ sizer_1.Add(self.bitmap_1, 0, 0, 0)
+ rpt_events_ct_sz.Add(sizer_1, 1, wx.EXPAND, 0)
sizer_main.Add(rpt_events_ct_sz, 0, wx.ALL, 3)
self.SetSizer(sizer_main)
sizer_main.Fit(self)
@@ -200,6 +226,13 @@ def header(self, event, **dialogOptions):
text_file.write('\n')
text_file.write('\n')
self.time_button.Enable(True)
+ self.save_quit.Enable(True)
+ self.slf_rd_btn.Enable(True)
+ self.tch_rd_btn.Enable(True)
+ self.rd_pr_btn.Enable(True)
+ self.count_1.Enable(True)
+ self.count_2.Enable(True)
+ self.count_3.Enable(True)
self.last_name_txt.Enable(False)
self.first_name_txt.Enable(False)
self.save_names.Enable(False)
@@ -217,15 +250,15 @@ def time_event(self, event):
if countfinal == 1:
on_start = time.time()
ot.append(on_start)
- #self.welcome.SetLabel("Timing On Task Event")
+ self.welcome.SetLabel("Timing On Task Event")
first = self.first_name_txt.GetValue()
- #self.label_directions.SetLabel("Timing On Task Event")
+ self.label_directions.SetLabel("Timing On Task Event\nRecord Notes Below")
self.SetBackgroundColour(wx.GREEN)
self.Refresh()
on.append(1)
- #size = 18
- #font = wx.Font(size, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
- #self.label_directions.SetFont(font)
+ size = 18
+ font = wx.Font(size, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
+ self.label_directions.SetFont(font)
self.save_quit.Enable(False)
if countfinal == 2:
@@ -236,7 +269,11 @@ def time_event(self, event):
OnTask.append(on_task)
self.SetBackgroundColour(wx.LIGHT_GREY)
self.Refresh()
- #self.label_directions.SetLabel("Click TIME to record off-task event")
+ self.welcome.SetLabel("Timed On-Task Event")
+ size = 10
+ font = wx.Font(size, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
+ self.label_directions.SetFont(font)
+ self.label_directions.SetLabel("Click TIME to record off-task event")
notes = self.notes_box.GetValue()
first = self.first_name_txt.GetValue()
last = self.last_name_txt.GetValue()
@@ -261,9 +298,12 @@ def time_event(self, event):
oft.append(start_off)
self.SetBackgroundColour(wx.RED)
self.Refresh()
+ size = 18
+ font = wx.Font(size, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
+ self.label_directions.SetFont(font)
#first = self.name_first.GetValue()
- #self.welcome.SetLabel("Timing Off Task Event")
- #self.label_directions.SetLabel("Timing off-task event.\n Record Notes Below")
+ self.welcome.SetLabel("Timing Off Task Event")
+ self.label_directions.SetLabel("Timing off-task event\nRecord Notes Below")
off.append(1)
self.save_quit.Enable(False)
@@ -276,7 +316,11 @@ def time_event(self, event):
self.SetBackgroundColour(wx.LIGHT_GREY)
self.Refresh()
notes2 = self.notes_box.GetValue()
- #self.welcome.SetLabel("Indeterminate")
+ self.welcome.SetLabel("Timed Off-Task Event")
+ size = 10
+ font = wx.Font(size, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
+ self.label_directions.SetFont(font)
+ self.label_directions.SetLabel("Click TIME to record on-task event")
first = self.first_name_txt.GetValue()
last = self.last_name_txt.GetValue()
directory = self.dirname
@@ -529,6 +573,8 @@ def filefunc(self, event): #Writes the contents of the task lists to the .csv fi
directory = self.dirname
text_file = open("%s/%s_%s.txt" % (directory, first, last), "a")
+ setting = self.setting_get.GetValue()
+ text_file.write("\nSETTING EVENTS: \n%s" % setting)
text_file.write('\n')
text_file.write('FINAL OBSERVATION NOTES:')
text_file.write('\n')
@@ -572,11 +618,56 @@ def filefunc(self, event): #Writes the contents of the task lists to the .csv fi
text_file.write("%s" % (date_time))
text_file.write("\n\n\n\nSIGNED:______________________________________\n")
text_file.write(" %s" % observer)
- print interval_labels
self.Close(True)
self.Destroy()
+ def OnAboutBox(self, e):
+
+ description = """FBA Machine is an application, written in Python,
+designed to make Time on Task and repetitive event observations more accurate
+and official looking. Its intended users are special educators and school psychologists.
+FBA Machine outputs to .csv and .txt so that the user will have access to the maximum number of
+programs in which to manipulate their data. It is recommended the .txt file
+be opened in either a word processor or text editor and that the .csv be
+opened in a spreadsheet editor.
+
+This software is intended to be freely distributed and should remain free for all to
+use and modify. It would be immoral for me to try to sell this considering I developed
+it entirely using free and open-source tools. I hope you'll find this application useful.
+And don't hold your breath waiting for this to be a smartphone app. You'd look awfully
+conspicuous poking away at your smart phone in a classroom, wouldn't you?
+"""
+
+ licence = """FBA Machine is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>."""
+
+
+ info = wx.AboutDialogInfo()
+
+
+ info.SetName('FBA Machine')
+ info.SetVersion('1.0')
+ info.SetDescription(description)
+ info.SetCopyright('(C) 2012 Josef Hoffman')
+ info.SetWebSite('http://www.puddletownindie.com')
+ info.SetLicence(licence)
+ info.AddDeveloper('Josef Hoffman\nThe Entire Open Source Community')
+ info.AddDocWriter('Josef Hoffman')
+
+
+ wx.AboutBox(info)
+
if __name__ == "__main__":
behavior_observation = wx.PySimpleApp(0)
wx.InitAllImageHandlers()

0 comments on commit 1197918

Please sign in to comment.
Something went wrong with that request. Please try again.