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