From 26be08e37d736e3c81888e326cef1c5d022faa60 Mon Sep 17 00:00:00 2001 From: Michael Dryden Date: Fri, 18 Apr 2014 03:19:53 -0400 Subject: [PATCH] More interface work. --- dstatInterface/dstatInterface.glade | 409 ++++++++++++++++++ .../dstatInterface.xcodeproj/project.pbxproj | 6 +- .../UserInterfaceState.xcuserstate | Bin 18040 -> 17648 bytes dstatInterface/glade1.py | 85 +++- dstatInterface/test1.glade | 282 ++++-------- dstatInterface/test2.py | 106 +++++ 6 files changed, 686 insertions(+), 202 deletions(-) create mode 100644 dstatInterface/dstatInterface.glade create mode 100644 dstatInterface/test2.py diff --git a/dstatInterface/dstatInterface.glade b/dstatInterface/dstatInterface.glade new file mode 100644 index 0000000..1f44d93 --- /dev/null +++ b/dstatInterface/dstatInterface.glade @@ -0,0 +1,409 @@ + + + + + + + + + + + + + + 0 + Chronoamperometry + + + 1 + Linear Sweep Voltammetry + + + 2 + Cyclic Voltammetry + + + 3 + Square Wave Voltammetry + + + 4 + AC Voltammetry + + + 5 + Photodiode + + + + + False + 5 + dialog + Dstat Interface + 0.1 + © Michael Dryden 2014 + GNU + Michael Dryden + + + True + False + 2 + + + True + False + end + + + True + True + 0 + + + + + + + + + + + True + False + 0.47999998927116394 + gtk-missing-image + + + False + 6 + Main + 800 + 500 + + + + True + False + + + True + False + + + True + False + _File + True + + + True + False + + + gtk-new + True + False + True + True + + + + + + gtk-open + True + False + True + True + + + + + gtk-save + True + False + True + True + + + + + gtk-save-as + True + False + True + True + + + + + gtk-quit + True + False + True + True + + + + + + + + + + True + False + _Edit + True + + + True + False + + + gtk-copy + True + False + True + True + + + + + gtk-paste + True + False + True + True + + + + + + + + + True + False + _View + True + + + True + False + + + Push Status + True + False + False + + + + + + Pop Status + True + False + False + + + + + + Clear Status + True + False + False + + + + + + + + + + True + False + _Help + True + + + True + False + + + gtk-about + True + False + True + True + + + + + + + + + + False + True + 0 + + + + + True + True + + + True + False + + + True + False + + + True + False + Experiment + + + True + True + 10 + 0 + + + + + True + False + ExpComboListStore + + + True + True + 1 + + + + + False + True + 0 + + + + + True + True + never + automatic + + + + + + True + True + 1 + + + + + False + True + + + + + True + True + + + True + False + label + + + + + True + False + page 1 + + + False + + + + + True + True + automatic + automatic + + + True + True + False + databuffer1 + + + + + 1 + + + + + True + False + page 2 + + + 1 + False + + + + + + + + + + + True + True + + + + + True + True + 1 + + + + + True + False + 2 + + + False + True + 2 + + + + + + diff --git a/dstatInterface/dstatInterface.xcodeproj/project.pbxproj b/dstatInterface/dstatInterface.xcodeproj/project.pbxproj index 457e665..f497925 100644 --- a/dstatInterface/dstatInterface.xcodeproj/project.pbxproj +++ b/dstatInterface/dstatInterface.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXFileReference section */ + 5FAED9CD1900FBDA00A9DDD4 /* dstatInterface.glade */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = dstatInterface.glade; sourceTree = ""; }; + 5FAED9CE1900FE6B00A9DDD4 /* test2.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = test2.py; sourceTree = ""; }; 5FDC0DFD18FDAD79003F857A /* main.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = main.py; sourceTree = ""; }; 5FDC1E4218FF9572007AD04D /* glade1.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = glade1.py; sourceTree = ""; }; 5FDC1E4318FF9A95007AD04D /* test1.glade */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = test1.glade; sourceTree = ""; }; @@ -16,9 +18,11 @@ 5FDC0DF218FDACDA003F857A = { isa = PBXGroup; children = ( + 5FAED9CE1900FE6B00A9DDD4 /* test2.py */, + 5FAED9CD1900FBDA00A9DDD4 /* dstatInterface.glade */, 5FDC1E4318FF9A95007AD04D /* test1.glade */, - 5FDC1E4218FF9572007AD04D /* glade1.py */, 5FDC0DFD18FDAD79003F857A /* main.py */, + 5FDC1E4218FF9572007AD04D /* glade1.py */, ); sourceTree = ""; }; diff --git a/dstatInterface/dstatInterface.xcodeproj/project.xcworkspace/xcuserdata/mdryden.xcuserdatad/UserInterfaceState.xcuserstate b/dstatInterface/dstatInterface.xcodeproj/project.xcworkspace/xcuserdata/mdryden.xcuserdatad/UserInterfaceState.xcuserstate index 5731221d71119316c5583725e7466c79515969aa..fe0af0358b47f2512401f9914dc1138dfb5ba042 100644 GIT binary patch delta 7159 zcmai133wA#*PfeuZ<01?_C0BmNoKM&X_hugS!7>CcFSU=PzqFJhf)wIC3680l|9NL zg0w|s6GcE)*%c8HWfw(IWRZ_mKxF?Xl+Ew+dH$wPlF2>u-ZSTY&$;LPJqcWS6HL>= z+xX6OqZh1Q+4uxVsG$*NLK-@t59Y$!us&=Ao5E)B1=tqm!_Ke^EQY<|5I79J0h90@ z_%56Y--nfOA^Z?7hD+eba0UDXu7YdfI=C5bfji;1a4-B09)?HYQTQ|b9iE0~;3aq& z-h%fKKo|*;0%?#7MNkgPO`s^MgBqa5s2OUGTB25{HENGKqE2Wa8iWR;A*d7$MP+Ch z8jfB=BhXkh4vj~zqseGGnt|q{56}Wsi9SXv&?o3q^f}sqHlp3=8?*;~i}s@L&^~ks z9YepNQ|Nbe0bN9w(4XjUbPEG4zz`#xz&IVtunAkS4LdP|J=lw*IELdm4>!S0aWmW; z=i?5zBkqKI;GVb_F2MuvKs*Q!#zXLHcmy7a$Kmn#bvyx2#MAJp2(} zjF;f0cr{*wKgS#JX8axAhrh=^;QjajK7xsFZ|AQ~%EBHFTfo~-b!1|!} zDm7XG)Pb_2u4jyVq-)wic8iqt_N3>wOu`volJFgg0H|&g0BU;xgWV> z+;7}PZU%RWyPV8&tVq6KUT9hm(nd9}+r6+noD<9S+as}9t%`#3oJb_LN?<7gpi$Ds z)PCy0$C>lfUMec;Gq6utQBm@EmMPtEe~#osfYnZ|dT4Jy_>}+e-?hbd4yKzWxR&b7z2>uY9hfx?4 zTohcQT5z|y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#Kt>7DtvvRz|*z zd==Ri*&W#zIT-mNax8K@@>}F|%aV`1<&k z_<{JL_;2xx@hkCb@f-06*{p1w&CTX#3$ou5WlOW=*_Lcuwj 0): +# self.statusbar.pop(self.context_id) +# self.status_count -= 1 + + def on_sfm_button_clicked(self, button, data=None): + # create an instance of the entry objects + # so we can get and set the text values + self.entry1 = self.builder.get_object("entry1") + self.entry2 = self.builder.get_object("entry2") + self.result1 = self.builder.get_object("result1") + + # get the text from the GtkEntry widget and convert + # it to a float value so we can calculate the result + self.sfm = float(self.entry1.get_text()) + self.diameter = float(self.entry2.get_text()) + + # calculate the result convert to an int to round the number + # then convert to a string to set the text in our label + # notice the math.pi constant is used in the calculation + self.rpm = str(int(self.sfm * ((12/math.pi)/self.diameter))) + + # debugging print + print "calculate rpm clicked" + + # set the result label with our results + self.result1.set_text(self.rpm) + + def on_gtk_new_activate(self, menuitem, data=None): + # debugging message + print 'File New selected' + + # create a label for the tab and using get_n_pages() to find out how + # many pages there is so the next page has a sequential number. + self.label1 = gtk.Label('Page ' + str(self.notebook.get_n_pages() + 1)) + + # create a label to put into the page + self.label2 = gtk.Label('Hello World') + # If you don't show the contents of the tab it won't show up + self.label2.show() + + # append a page with label5 as the contents and label5 as the tab + self.notebook.append_page(self.label2, self.label1) + + def on_notebook1_switch_page(self, notebook, page, page_num, data=None): + self.tab = notebook.get_nth_page(page_num) + self.label = notebook.get_tab_label(self.tab).get_label() + self.message_id = self.statusbar.push(0, self.label) + + + # This is our init part where we connect the signals def __init__(self): self.gladefile = "test1.glade" # store the file name @@ -34,12 +110,17 @@ class Buglump: # you use this line to connect the signals. self.builder.connect_signals(self) - #get windows + #get widgets self.window = self.builder.get_object("window1") self.aboutdialog = self.builder.get_object("aboutdialog1") + self.statusbar = self.builder.get_object("statusbar") + self.notebook = self.builder.get_object("notebook1") self.window.show() # this shows the 'window1' object + self.context_id = self.statusbar.get_context_id("status") #register and get statusbar context_id for description "status" + self.status_count = 0 #count of messages pushed + # If this is run stand alone execute the following after the 'if' # If this class is imported into another program the code after the 'if' will # not run. This makes the code more flexible. diff --git a/dstatInterface/test1.glade b/dstatInterface/test1.glade index 16afb80..18fc7f5 100644 --- a/dstatInterface/test1.glade +++ b/dstatInterface/test1.glade @@ -34,6 +34,12 @@ + + True + False + 0.47999998927116394 + gtk-missing-image + False 6 @@ -60,12 +66,13 @@ True False - + gtk-new True False True True + @@ -142,11 +149,44 @@ - + True False _View True + + + True + False + + + Push Status + True + False + False + + + + + + Pop Status + True + False + False + + + + + + Clear Status + True + False + False + + + + + @@ -193,223 +233,67 @@ - + True - False + True + - + True - True - never - automatic - - - True - True - - + False + label + + + + + True + False + page 1 - True - True - 0 + False - + True False - 2 - True - center - - - gtk-goto-top - True - True - True - True - - - False - False - 0 - - - - - gtk-go-up - True - True - True - True - - - False - False - 1 - - - - - gtk-add - True - True - True - True - - - False - False - 2 - - - - - gtk-remove - True - True - True - True - - - False - False - 3 - - - - - gtk-go-down - True - True - True - True - - - False - False - 4 - - - - - gtk-goto-bottom - True - True - True - True - - - False - False - 5 - - + label - False - True 1 + + + True + False + page 2 + + + 1 + False + + - + True False - - - True - True - automatic - automatic - - - True - False - - - True - False - 0 - 0 - - - True - False - 0 - in - - - 300 - 200 - True - False - - - - - - - - - - - - - - True - True - 0 - - - - - True - False - 2 - True - center - - - Show points - True - True - False - True - - - False - False - 0 - - - - - Show lines - True - True - False - True - - - False - False - 1 - - - - - False - True - 1 - - + label + + + 2 + + + + + True + False + page 3 - True - True 2 + False @@ -420,7 +304,7 @@ - + True False 2 diff --git a/dstatInterface/test2.py b/dstatInterface/test2.py new file mode 100644 index 0000000..558c52b --- /dev/null +++ b/dstatInterface/test2.py @@ -0,0 +1,106 @@ +#!/usr/bin/env python + +import sys +try: + import pygtk + pygtk.require('2.0') +except: + pass +try: + import gtk +except: + print('GTK not available') + sys.exit(1) +try: + import math +except: + print('math lib missing') + sys.exit(1) + +# we can call it just about anything we want +class Buglump: + + # This first define is for our on_window1_destroy signal we created in the + # Glade designer. The print message does just that and prints to the terminal + # which can be useful for debugging. The 'object' if you remember is the signal + # class we picked from GtkObject. + def on_window1_destroy(self, object, data=None): + print "quit with cancel" + gtk.main_quit() + + # This is the same as above but for our menu item. + def on_gtk_quit_activate(self, menuitem, data=None): + print "quit from menu" + gtk.main_quit() + + def on_gtk_about_activate(self, menuitem, data=None): + print "help about selected" + self.response = self.aboutdialog.run() #waits for user to click close - could test response with if + self.aboutdialog.hide() + + def on_push_status_activate(self, menuitem, data=None): #adds message to top of stack + self.status_count += 1 #increment status_count + self.statusbar.push(self.context_id, "Message number %s" % str(self.status_count)) + + def on_pop_status_activate(self, menuitem, data=None): #removes top message from stack + self.status_count -= 1 + self.statusbar.pop(self.context_id) + + def on_clear_status_activate(self, menuitem, data=None): #clears status stack + self.statusbar.remove_all(self.context_id) + self.status_count = 0 + # while (self.status_count > 0): + # self.statusbar.pop(self.context_id) + # self.status_count -= 1 + + def on_expcombobox_changed(self, widget, data=None): + # get the index of the changed row + self.index = widget.get_active() + + # get the model + self.model = widget.get_model() + + # retrieve the item from column 1 + self.item = self.model[self.index][1] + + # debugging print statements + print "ComboBox Active Text is", self.item + print "ComboBox Active Index is", self.index + + # This is our init part where we connect the signals + def __init__(self): + self.gladefile = "dstatInterface.glade" # store the file name + self.builder = gtk.Builder() # create an instance of the gtk.Builder + self.builder.add_from_file(self.gladefile) # add the xml file to the Builder + + # This line does the magic of connecting the signals created in the Glade3 + # builder to our defines above. You must have one def for each signal if + # you use this line to connect the signals. + self.builder.connect_signals(self) + + #expcombobox + self.expcombobox = self.builder.get_object("expcombobox") + self.cell = gtk.CellRendererText() + self.expcombobox.pack_start(self.cell, True) #pack CellRenderer into beginning of combobox cell + self.expcombobox.add_attribute(self.cell, 'text', 1) # text in column 1 + self.expcombobox.set_active(0) #set initial value + + + + #get widgets + self.window = self.builder.get_object("window1") + self.aboutdialog = self.builder.get_object("aboutdialog1") + self.statusbar = self.builder.get_object("statusbar") + + + self.window.show() # this shows the 'window1' object + + self.context_id = self.statusbar.get_context_id("status") #register and get statusbar context_id for description "status" + self.status_count = 0 #count of messages pushed + +# If this is run stand alone execute the following after the 'if' +# If this class is imported into another program the code after the 'if' will +# not run. This makes the code more flexible. +if __name__ == "__main__": + main = Buglump() # create an instance of our class + gtk.main() # run the darn thing \ No newline at end of file -- GitLab