mailFwd: r10253 - /branches/bieri_gui/gui_bieri/relax_gui.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on January 19, 2010 - 17:50:
Hi Michael,

Please have a look at the following change.  This is a test for me to
start to understand your current designs, and can be reverted back to
the original '+' buttons, if you wish.  I am trying to replace or
modify GUI elements to really stress test your code.  You'll see in
the commit message a few of the issues I encountered.  This also
relates to my post at
https://mail.gna.org/public/relax-devel/2010-01/msg00035.html.  I'll
continue to play with this.

Cheers,

Edward


---------- Forwarded message ----------
From:  <edward@xxxxxxxxxxxxx>
Date: 2010/1/19
Subject: r10253 - /branches/bieri_gui/gui_bieri/relax_gui.py
To: relax-commits@xxxxxxx


Author: bugman
Date: Tue Jan 19 17:46:23 2010
New Revision: 10253

URL: http://svn.gna.org/viewcvs/relax?rev=10253&view=rev
Log:
Changed text bottons to bitmap icons for the file opening in the
model-free analysis GUI section.

This is mainly to test code manageability and design.  The '+' buttons
have been replaced by oxygen
bitmap icons.  Note this is test code and can be reverted!  Issues
found are as follows:

1)  The code for one GUI element is located in 3 places in the module,
in 2 places in __init__()
(creation and event binding), and in __set_properties() to define
sizes.  This makes GUI changes
difficult.

2)  The sizes in __set_properties() are hardcoded and repeated many,
many times.  There should be
a variable defining x and y at the start for all these buttons.  These
should be local variables of
a method containing the relaxation data input GUI element for model-free.

3)  I can't find how to modify the size of the box for the relaxation
data input?!  This is visible
in the current revision.  The size of this box should be defined as
the sum of the x and y lengths
of all the elements (not including a margin).


Modified:
   branches/bieri_gui/gui_bieri/relax_gui.py

Modified: branches/bieri_gui/gui_bieri/relax_gui.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/relax_gui.py?rev=10253&r1=10252&r2=10253&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/relax_gui.py (original)
+++ branches/bieri_gui/gui_bieri/relax_gui.py Tue Jan 19 17:46:23 2010
@@ -128,6 +128,10 @@
 paramfiles2 = ["","",""]
 paramfiles3 = ["","",""]
 results_dir_model = getcwd()
+
+# GUI icons.
+OPEN_ICON = 
sys.path[0]+sep+'gui_bieri'+sep+'oxygen_icons'+sep+'16x16'+sep+'actions'+sep+'document-open.png'
+

 #####################################################################################################################
 #####################################################################################################################
@@ -605,35 +609,35 @@
        self.modelfreefreq1 = wx.TextCtrl(self.panel_4, -1, "")
        self.label_8 = wx.StaticText(self.panel_4, -1, "NOE")
        self.m_noe_1 = wx.TextCtrl(self.panel_4, -1, "")
-        self.model_noe_1 = wx.Button(self.panel_4, -1, "+")
+        self.model_noe_1 = wx.BitmapButton(self.panel_4, -1,
wx.Bitmap(OPEN_ICON, wx.BITMAP_TYPE_ANY))
        self.label_8_copy = wx.StaticText(self.panel_4, -1, "R1")
        self.m_r1_1 = wx.TextCtrl(self.panel_4, -1, "")
-        self.model_r1_1 = wx.Button(self.panel_4, -1, "+")
+        self.model_r1_1 = wx.BitmapButton(self.panel_4, -1,
wx.Bitmap(OPEN_ICON, wx.BITMAP_TYPE_ANY))
        self.label_8_copy_copy = wx.StaticText(self.panel_4, -1, "R2")
        self.m_r2_1 = wx.TextCtrl(self.panel_4, -1, "")
-        self.model_r2_1 = wx.Button(self.panel_4, -1, "+")
+        self.model_r2_1 = wx.BitmapButton(self.panel_4, -1,
wx.Bitmap(OPEN_ICON, wx.BITMAP_TYPE_ANY))
        self.label_7_copy = wx.StaticText(self.panel_4_copy, -1, "NMR freq 
2:")
        self.modelfreefreq2 = wx.TextCtrl(self.panel_4_copy, -1, "")
        self.label_8_copy_1 = wx.StaticText(self.panel_4_copy, -1, "NOE")
        self.m_noe_2 = wx.TextCtrl(self.panel_4_copy, -1, "")
-        self.model_noe_2 = wx.Button(self.panel_4_copy, -1, "+")
+        self.model_noe_2 = wx.BitmapButton(self.panel_4_copy, -1,
wx.Bitmap(OPEN_ICON, wx.BITMAP_TYPE_ANY))
        self.label_8_copy_copy_1 = wx.StaticText(self.panel_4_copy, -1, "R1")
        self.m_r1_2 = wx.TextCtrl(self.panel_4_copy, -1, "")
-        self.model_r1_2 = wx.Button(self.panel_4_copy, -1, "+")
+        self.model_r1_2 = wx.BitmapButton(self.panel_4_copy, -1,
wx.Bitmap(OPEN_ICON, wx.BITMAP_TYPE_ANY))
        self.label_8_copy_copy_copy = wx.StaticText(self.panel_4_copy, -1, 
"R2")
        self.m_r2_2 = wx.TextCtrl(self.panel_4_copy, -1, "")
-        self.model_r2_2 = wx.Button(self.panel_4_copy, -1, "+")
+        self.model_r2_2 = wx.BitmapButton(self.panel_4_copy, -1,
wx.Bitmap(OPEN_ICON, wx.BITMAP_TYPE_ANY))
        self.label_7_copy_copy = wx.StaticText(self.panel_4_copy_1,
-1, "NMR freq 3:")
        self.modelfreefreq3 = wx.TextCtrl(self.panel_4_copy_1, -1, "")
        self.label_8_copy_1_copy = wx.StaticText(self.panel_4_copy_1, -1, 
"NOE")
        self.m_noe_3 = wx.TextCtrl(self.panel_4_copy_1, -1, "")
-        self.model_noe_3 = wx.Button(self.panel_4_copy_1, -1, "+")
+        self.model_noe_3 = wx.BitmapButton(self.panel_4_copy_1, -1,
wx.Bitmap(OPEN_ICON, wx.BITMAP_TYPE_ANY))
        self.label_8_copy_copy_1_copy =
wx.StaticText(self.panel_4_copy_1, -1, "R1")
        self.m_r1_3 = wx.TextCtrl(self.panel_4_copy_1, -1, "")
-        self.model_r1_3 = wx.Button(self.panel_4_copy_1, -1, "+")
+        self.model_r1_3 = wx.BitmapButton(self.panel_4_copy_1, -1,
wx.Bitmap(OPEN_ICON, wx.BITMAP_TYPE_ANY))
        self.label_8_copy_copy_copy_copy =
wx.StaticText(self.panel_4_copy_1, -1, "R2")
        self.m_r2_3 = wx.TextCtrl(self.panel_4_copy_1, -1, "")
-        self.model_r2_3 = wx.Button(self.panel_4_copy_1, -1, "+")
+        self.model_r2_3 = wx.BitmapButton(self.panel_4_copy_1, -1,
wx.Bitmap(OPEN_ICON, wx.BITMAP_TYPE_ANY))
        self.label_9 = wx.StaticText(self.modelfree, -1, "Select
Model-free models (default = all):")
        self.m0 = wx.ToggleButton(self.modelfree, -1, "m0")
        self.m1 = wx.ToggleButton(self.modelfree, -1, "m1")
@@ -1066,48 +1070,47 @@
        self.label_7.SetMinSize((80, 17))
        self.modelfreefreq1.SetMinSize((80, 20))
        self.label_8.SetMinSize((80, 17))
-        self.m_noe_1.SetMinSize((120, 20))
-        self.model_noe_1.SetMinSize((20, 20))
-        self.model_noe_1.SetFont(wx.Font(6, wx.DEFAULT, wx.NORMAL,
wx.NORMAL, 0, ""))
+        self.m_noe_1.SetMinSize((120, 26))
+        self.model_noe_1.SetMinSize((26, 26))
        self.label_8_copy.SetMinSize((80, 17))
-        self.m_r1_1.SetMinSize((120, 20))
-        self.model_r1_1.SetMinSize((20, 20))
+        self.m_r1_1.SetMinSize((120, 26))
+        self.model_r1_1.SetMinSize((26, 26))
        self.model_r1_1.SetFont(wx.Font(6, wx.DEFAULT, wx.NORMAL,
wx.NORMAL, 0, ""))
        self.label_8_copy_copy.SetMinSize((80, 17))
-        self.m_r2_1.SetMinSize((120, 20))
-        self.model_r2_1.SetMinSize((20, 20))
+        self.m_r2_1.SetMinSize((120, 26))
+        self.model_r2_1.SetMinSize((26, 26))
        self.model_r2_1.SetFont(wx.Font(6, wx.DEFAULT, wx.NORMAL,
wx.NORMAL, 0, ""))
        self.panel_4.SetMinSize((230, 85))
        self.panel_4.SetBackgroundColour(wx.Colour(192, 192, 192))
        self.label_7_copy.SetMinSize((80, 17))
        self.modelfreefreq2.SetMinSize((80, 20))
        self.label_8_copy_1.SetMinSize((80, 17))
-        self.m_noe_2.SetMinSize((120, 20))
-        self.model_noe_2.SetMinSize((20, 20))
+        self.m_noe_2.SetMinSize((120, 26))
+        self.model_noe_2.SetMinSize((26, 26))
        self.model_noe_2.SetFont(wx.Font(6, wx.DEFAULT, wx.NORMAL,
wx.NORMAL, 0, ""))
        self.label_8_copy_copy_1.SetMinSize((80, 17))
-        self.m_r1_2.SetMinSize((120, 20))
-        self.model_r1_2.SetMinSize((20, 20))
+        self.m_r1_2.SetMinSize((120, 26))
+        self.model_r1_2.SetMinSize((26, 26))
        self.model_r1_2.SetFont(wx.Font(6, wx.DEFAULT, wx.NORMAL,
wx.NORMAL, 0, ""))
        self.label_8_copy_copy_copy.SetMinSize((80, 17))
-        self.m_r2_2.SetMinSize((120, 20))
-        self.model_r2_2.SetMinSize((20, 20))
+        self.m_r2_2.SetMinSize((120, 26))
+        self.model_r2_2.SetMinSize((26, 26))
        self.model_r2_2.SetFont(wx.Font(6, wx.DEFAULT, wx.NORMAL,
wx.NORMAL, 0, ""))
        self.panel_4_copy.SetMinSize((230, 85))
        self.panel_4_copy.SetBackgroundColour(wx.Colour(176, 176, 176))
        self.label_7_copy_copy.SetMinSize((80, 17))
        self.modelfreefreq3.SetMinSize((80, 20))
        self.label_8_copy_1_copy.SetMinSize((80, 17))
-        self.m_noe_3.SetMinSize((120, 20))
-        self.model_noe_3.SetMinSize((20, 20))
+        self.m_noe_3.SetMinSize((120, 26))
+        self.model_noe_3.SetMinSize((26, 26))
        self.model_noe_3.SetFont(wx.Font(6, wx.DEFAULT, wx.NORMAL,
wx.NORMAL, 0, ""))
        self.label_8_copy_copy_1_copy.SetMinSize((80, 17))
-        self.m_r1_3.SetMinSize((120, 20))
-        self.model_r1_3.SetMinSize((20, 20))
+        self.m_r1_3.SetMinSize((120, 26))
+        self.model_r1_3.SetMinSize((26, 26))
        self.model_r1_3.SetFont(wx.Font(6, wx.DEFAULT, wx.NORMAL,
wx.NORMAL, 0, ""))
        self.label_8_copy_copy_copy_copy.SetMinSize((80, 17))
-        self.m_r2_3.SetMinSize((120, 20))
-        self.model_r2_3.SetMinSize((20, 20))
+        self.m_r2_3.SetMinSize((120, 26))
+        self.model_r2_3.SetMinSize((26, 26))
        self.model_r2_3.SetFont(wx.Font(6, wx.DEFAULT, wx.NORMAL,
wx.NORMAL, 0, ""))
        self.panel_4_copy_1.SetMinSize((230, 85))
        self.panel_4_copy_1.SetBackgroundColour(wx.Colour(192, 192, 192))


_______________________________________________
relax (http://nmr-relax.com)

This is the relax-commits mailing list
relax-commits@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits



Related Messages


Powered by MHonArc, Updated Fri Jan 22 00:00:10 2010