Labbe's distance
[iramuteq] / guiparam3d.py
1 #!/bin/env python
2 # -*- coding: utf-8 -*-
3 #Author: Pierre Ratinaud
4 #Copyright (c) 2008 Pierre Ratinaud
5 #License: GNU/GPL
6
7 import wx
8
9 # begin wxGlade: extracode
10 # end wxGlade
11
12
13
14 class param3d(wx.Panel):
15     def __init__(self, *args, **kwds):
16         wx.Panel.__init__(self, *args, **kwds)
17         self.label_2 = wx.StaticText(self, -1, u"Paramètres")
18         self.label_3 = wx.StaticText(self, -1, u"Variables")
19         self.Check1 = wx.CheckBox(self, -1, u"actives")
20         self.Check2 = wx.CheckBox(self, -1, u"supplémentaires")
21         self.Check3 = wx.CheckBox(self, -1, u"étoilées")
22         self.radio_box_2 = wx.RadioBox(self, -1, u"représentation :", choices=[u"coordonnées", u"corrélations"], majorDimension=0, style=wx.RA_SPECIFY_ROWS)
23         self.Bind(wx.EVT_RADIOBOX, self.EvtRadioBox2, self.radio_box_2)
24         self.var="both"
25         self.rep="coordonnees"
26         self.__set_properties()
27         self.__do_layout()
28         # end wxGlade
29
30     def __set_properties(self):
31         self.radio_box_2.SetSelection(0)
32         self.Check1.SetValue(True)
33         self.Check2.SetValue(False)
34         self.Check3.SetValue(True)
35         # end wxGlade
36
37     def __do_layout(self):
38         # begin wxGlade: MyFrame1.__do_layout
39         sizer_1 = wx.BoxSizer(wx.VERTICAL)
40         sizer_3 = wx.BoxSizer(wx.VERTICAL)
41         sizer_4 = wx.BoxSizer(wx.HORIZONTAL)
42         sizer_5 = wx.BoxSizer(wx.VERTICAL)
43         sizer_3.Add(self.label_2, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
44         sizer_3.Add(wx.StaticLine(self,-1), 0, wx.EXPAND,0)
45         sizer_5.Add(self.label_3, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
46         sizer_5.Add(self.Check1, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
47         sizer_5.Add(self.Check2, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
48         sizer_5.Add(self.Check3, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
49         sizer_5.Add(self.radio_box_2, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
50         #sizer_4.Add(sizer_5, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
51         #sizer_4.Add(self.radio_box_2, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
52         sizer_3.Add(sizer_5, 1, wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 0)
53         sizer_1.Add(sizer_3, 1, wx.ALIGN_CENTER_HORIZONTAL, 0)
54         self.SetSizer(sizer_1)
55         sizer_1.Fit(self)
56         self.Layout()
57         # end wxGlade
58     
59     def EvtRadioBox2(self,event):
60         nb=event.GetInt()
61         if nb==0:
62             self.rep='coordonnees'
63         elif nb==1:
64             self.rep='correlations'
65
66
67 class simi3d(wx.Panel):
68     def __init__(self, *args, **kwds):
69         wx.Panel.__init__(self, *args, **kwds)
70         self.label_2 = wx.StaticText(self, -1, u"Paramètres")
71         self.label_7 = wx.StaticText(self, -1, u"Nombre de points (0 ou 1 = tous les points)")
72         self.spin_1 = wx.SpinCtrl(self, -1, "", min=0, max=5000)
73         self.label_3 = wx.StaticText(self, -1, u"Coefficient")
74         self.Choice_1 = wx.Choice(self, -1, (100,50), choices=[u'euclidean'])
75         self.label_4 = wx.StaticText(self, -1, u"Faire apparaître des sphères")
76         self.Check_1 = wx.CheckBox(self, -1, u"")
77         self.label_5 = wx.StaticText(self,-1, u"Taille des sphères proportionnelle aux effectifs")
78         self.Check_2 = wx.CheckBox(self,-1, u"")
79         self.label_6 = wx.StaticText(self, -1, u"Transparence des sphères")
80         self.slider_1 = wx.Slider(self, -1, 10, 1, 100, size = (255,-1), style = wx.SL_HORIZONTAL | wx.SL_AUTOTICKS | wx.SL_LABELS 
81             )
82         self.label_layout = wx.StaticText(self, -1, u'layout')
83         self.Choice_2 = wx.Choice(self, -1, (100,50), choices=[u'random' ,u'cercle', u'fruchterman reingold', u'kamada kawai'])
84         self.slider_1.SetTickFreq(5, 1)
85         self.movie = wx.CheckBox(self, -1, "faire un film")
86         self.__set_properties()
87         self.__do_layout()
88         # end wxGlade
89
90     def __set_properties(self):
91         self.Check_1.SetValue(True)
92         self.Check_2.SetValue(True)
93         self.Choice_2.SetSelection(2)
94         #self.Check3.SetValue(True)
95         # end wxGlade
96
97     def __do_layout(self):
98         # begin wxGlade: MyFrame1.__do_layout
99         sizer_1 = wx.BoxSizer(wx.VERTICAL)
100         sizer_3 = wx.BoxSizer(wx.VERTICAL)
101         sizer_4 = wx.BoxSizer(wx.HORIZONTAL)
102         sizer_5 = wx.BoxSizer(wx.VERTICAL)
103         sizer_3.Add(self.label_2, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
104         sizer_3.Add(wx.StaticLine(self,-1), 0, wx.EXPAND,0)
105
106         sizer_5.Add(self.label_7, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
107         sizer_5.Add(self.spin_1, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
108         sizer_5.Add(wx.StaticLine(self,-1), 0, wx.EXPAND,0)
109         sizer_5.Add(self.label_3, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
110         sizer_5.Add(self.Choice_1, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
111         sizer_5.Add(wx.StaticLine(self,-1), 0, wx.EXPAND,0)
112         sizer_5.Add(self.label_4, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
113         sizer_5.Add(self.Check_1, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
114         sizer_5.Add(wx.StaticLine(self,-1), 0, wx.EXPAND,0)
115         sizer_5.Add(self.label_5, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
116         sizer_5.Add(self.Check_2, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
117         sizer_5.Add(wx.StaticLine(self,-1), 0, wx.EXPAND,0)
118         sizer_5.Add(self.label_6, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
119         sizer_5.Add(self.slider_1, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
120         sizer_5.Add(wx.StaticLine(self,-1), 0, wx.EXPAND,0)
121         sizer_5.Add(self.label_layout, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
122         sizer_5.Add(self.Choice_2, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
123         sizer_5.Add(self.movie, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
124
125         sizer_3.Add(sizer_5, 1, wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 0)
126         sizer_1.Add(sizer_3, 1, wx.ALIGN_CENTER_HORIZONTAL, 0)
127         self.SetSizer(sizer_1)
128         sizer_1.Fit(self)
129         self.Layout()
130         # end wxGlade