import wx.lib.sized_controls as sc
import wx.lib.filebrowsebutton as filebrowse
import locale
+from functions import DoConf
import os
import sys
-#from listlex import *
from KeyFrame import AlcOptFrame
-#from listlex import ListForSpec
#---------------------------------------------------------------------------
provider = wx.SimpleHelpProvider()
wx.HelpProvider_Set(provider)
self.PostCreate(pre)
sizer = wx.BoxSizer(wx.VERTICAL)
- grid_sizer = wx.FlexGridSizer(5, 2, 2, 2)
+ grid_sizer = wx.FlexGridSizer(0, 2, 2, 2)
##############################
label = wx.StaticText(self, -1, u"La première ligne contient les noms de colonne")
if locale.getpreferredencoding().lower() == 'mac-roman' :
enc = self.le.index('macroman')
else :
- enc = self.le.index(locale.getpreferredencoding().lower())
+ try :
+ enc = self.le.index(sys.getdefaultencoding().lower())
+ except ValueError:
+ enc = self.le.index('utf-8')
self.list_encodages.SetSelection(enc)
grid_sizer.Add(self.list_encodages, 1, wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 5)
elif sheet :
LIST_CLASSE_OK.append(str(i))
else :
LIST_CLASSE_OK.append(str(LIST_CLASSE))
- print str(LIST_CLASSE_OK)
self.list_box_1 = wx.ListBox(self, -1, choices=LIST_CLASSE_OK, style=wx.LB_SINGLE | wx.LB_HSCROLL)
self.list_box_1.SetHelpText("Here's some help text for field #1")
box.Add(self.list_box_1, 1, wx.ALIGN_CENTRE | wx.ALL, 5)
bSizer1 = wx.BoxSizer( wx.VERTICAL )
- fgSizer1 = wx.FlexGridSizer( 4, 3, 0, 0 )
+ fgSizer1 = wx.FlexGridSizer( 0, 3, 0, 0 )
fgSizer1.SetFlexibleDirection( wx.BOTH )
fgSizer1.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
self.m_radioBox2 = wx.RadioBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, m_radioBox2Choices, 1, wx.RA_SPECIFY_COLS )
self.m_radioBox2.SetSelection( 0 )
fgSizer1.Add( self.m_radioBox2, 0, wx.ALIGN_RIGHT|wx.ALL, 5 )
+
+ msg = u"""Langue de l'interface"""
+ self.m_staticText45 = wx.StaticText( self, wx.ID_ANY, msg, wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText45.Wrap( -1 )
+ fgSizer1.Add( self.m_staticText45, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+ self.m_staticText46 = wx.StaticText( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText46.Wrap( -1 )
+ fgSizer1.Add( self.m_staticText46, 0, wx.ALL, 5 )
+
+ self.listlangues = [ u"french", u"english" ]
+ self.langues = wx.Choice( self, wx.ID_ANY, (200, -1), choices = self.listlangues)
+ #self.langues.SetSelection( 0 )
+ fgSizer1.Add( self.langues, 0, wx.ALIGN_RIGHT|wx.ALL, 5 )
msg = u"""Vérifier l'installation des
bibliothèques de R"""
m_sdbSizer1.AddButton( self.m_sdbSizer1OK )
self.m_sdbSizer1Cancel = wx.Button( self, wx.ID_CANCEL )
m_sdbSizer1.AddButton( self.m_sdbSizer1Cancel )
- m_sdbSizer1.Realize();
+ m_sdbSizer1.Realize()
bSizer1.Add( m_sdbSizer1, 0, wx.EXPAND, 5 )
self.SetSizer( bSizer1 )
if self.parent.pref.getboolean('iramuteq', 'checkupdate') : val2 = 0
else : val2 = 1
self.m_radioBox2.SetSelection(val2)
+ self.langues.SetSelection(self.listlangues.index(self.parent.pref.get('iramuteq', 'guilanguage')))
if sys.platform == 'win32' :
if self.parent.pref.getboolean('iramuteq', 'R_mem') :
self.m_checkBox1.SetValue(True)
if self.m_radioBox2.GetSelection() == 0 : valcheck = 'true'
else : valcheck = 'false'
parent.pref.set('iramuteq', 'checkupdate', valcheck)
+ parent.pref.set('iramuteq', 'guilanguage', self.listlangues[self.langues.GetSelection()])
if sys.platform == 'win32' :
if self.m_checkBox1.GetValue() :
parent.pref.set('iramuteq', 'R_mem', 'true')
self.paramgraph=paramgraph
self.labeltype = wx.StaticText(self, -1, u'Type de graph')
if self.paramgraph['clnb'] <= 3 :
- choix = [u'2D']
+ choix = [u'2D', 'web 2D']
else :
- choix=[u'2D' ,u'3D']
+ choix=[u'2D' ,u'3D', 'web 2D', 'web 3D']
self.choicetype = wx.Choice(self, -1, (100,50), choices=choix)
+ self.label_format = wx.StaticText(self, -1, u"Format de l'image")
+ self.choix_format = wx.Choice(self, -1, (100,50), choices = ['png', 'svg'])
self.label_1 = wx.StaticText(self, -1, u'Largeur')
self.spin1 = wx.SpinCtrl(self, -1, '',size = (100,30), min=100, max=5000)
self.label_2 = wx.StaticText(self, -1, u'Hauteur')
self.label_6 = wx.StaticText(self, -1, u'Eliminer les recouvrements')
self.check3 = wx.CheckBox(self, -1)
txt = u"""Taille du texte proportionnel
-à la masse de la forme"""
+à l'effectif de la forme"""
self.label_7 = wx.StaticText(self, -1, txt)
self.check4 = wx.CheckBox(self, -1)
self.label_min = wx.StaticText(self, -1, 'min')
def __set_properties(self):
self.choicetype.SetSelection(self.paramgraph['typegraph'])
- if self.paramgraph['typegraph'] == 0 :
+ if self.paramgraph['typegraph'] == 0 or self.paramgraph['typegraph'] == 2:
self.film.Enable(False)
self.spin_f3.Enable(False)
self.slider_sphere.Enable(False)
+ self.choix_format.SetSelection(self.paramgraph['svg'])
self.choice1.SetSelection(self.paramgraph['what'])
self.choice2.SetSelection(self.paramgraph['qui'])
self.spin_chi.SetValue(self.paramgraph['select_nb'])
def __do_layout(self):
sizer_2 = wx.BoxSizer(wx.VERTICAL)
- fsizer = wx.FlexGridSizer(12,2,0,5)
- grid_min = wx.FlexGridSizer(1, 2, 0, 0)
- grid_max = wx.FlexGridSizer(1, 2, 0, 0)
- grid_minmax = wx.FlexGridSizer(1, 2, 0, 0)
- grid_min_tchi = wx.FlexGridSizer(1, 2, 0, 0)
- grid_max_tchi = wx.FlexGridSizer(1, 2, 0, 0)
- grid_minmax_tchi = wx.FlexGridSizer(1, 2, 0, 0)
+ fsizer = wx.FlexGridSizer(0,2,0,5)
+ grid_min = wx.FlexGridSizer(0, 2, 0, 0)
+ grid_max = wx.FlexGridSizer(0, 2, 0, 0)
+ grid_minmax = wx.FlexGridSizer(0, 2, 0, 0)
+ grid_min_tchi = wx.FlexGridSizer(0, 2, 0, 0)
+ grid_max_tchi = wx.FlexGridSizer(0, 2, 0, 0)
+ grid_minmax_tchi = wx.FlexGridSizer(0, 2, 0, 0)
sizer_3 = wx.BoxSizer(wx.VERTICAL)
fsizer.Add(wx.StaticLine(self, -1), 0, wx.EXPAND, 0)
fsizer.Add(wx.StaticLine(self, -1), 0, wx.EXPAND, 0)
+ fsizer.Add(self.label_format, 0, wx.ALL | wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 5)
+ fsizer.Add(self.choix_format, 0, wx.ALL | wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 5)
+ fsizer.Add(wx.StaticLine(self, -1), 0, wx.EXPAND, 0)
+ fsizer.Add(wx.StaticLine(self, -1), 0, wx.EXPAND, 0)
+
fsizer.Add(self.label_what, 0, wx.ALL | wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 5)
fsizer.Add(self.choice1, 0, wx.ALL | wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 5)
fsizer.Add(wx.StaticLine(self, -1), 0, wx.EXPAND, 0)
sizer_2.Add(fsizer, 0, wx.EXPAND, 0)
- bsizer_1 = wx.FlexGridSizer(3,3,0,0)
+ bsizer_1 = wx.FlexGridSizer(0,3,0,0)
bsizer_1.Add(self.label_7, 0, wx.ALL | wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 5)
bsizer_1.Add(self.check4, 0, wx.ALL | wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 5)
grid_min.Add(self.label_min, 0,wx.ALL | wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL, 5)
sizer_2.Add(wx.StaticLine(self, -1), 0, wx.EXPAND, 5)
- fsizer2 = wx.FlexGridSizer(2,2,0,0)
+ fsizer2 = wx.FlexGridSizer(0,2,0,0)
fsizer2.Add(self.label_sphere, 0, wx.ALL | wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 5)
fsizer2.Add(self.slider_sphere, 0, wx.ALL | wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 5)
fsizer2.Add(wx.StaticLine(self, -1), 0, wx.EXPAND, 0)
self.slider_sphere.Enable(False)
def OnPass(self,evt) :
- if evt.GetString() != u'actives' :
+ if evt.GetString() == u'classes' :
self.check4.SetValue(False)
self.check4.Enable(False)
self.OnNorm(wx.EVT_CHECKBOX)
wx.Dialog.__init__(self, *args, **kwds)
self.fileout = ""
self.parent = parent
- #box = wx.BoxSizer(wx.HORIZONTAL)
self.label_lem = wx.StaticText(self, -1, u"Lemmatisation")
self.radio_lem = wx.RadioBox(self, -1, u"", choices=['oui', 'non'], majorDimension=0, style=wx.RA_SPECIFY_ROWS)
- #sizer.Add(box, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT, 5)
- #box2 = wx.BoxSizer(wx.HORIZONTAL)
- #self.txt_exp = wx.StaticText(self, -1, u"Utiliser le Dict. des expressions")
- #self.exp = wx.RadioBox(self, -1, u"", choices=['oui', 'non'], majorDimension=0, style=wx.RA_SPECIFY_ROWS)
- #self.label_uce = wx.StaticText(self, -1, u"Construire des UCE")
- #self.check_uce = wx.CheckBox(self, -1)
- #txt = """Nombre d'occurrences par uce"""
- #self.label_occuce = wx.StaticText(self, -1, txt)
- #self.spin_ctrl_4 = wx.SpinCtrl(self, -1, "",size = (100,30), min=10, max=1000, initial = 35)
#txt = u"""Fréquence minimum d'une forme
#analysée (0 = non utilisé)"""
#self.label_8 = wx.StaticText(self, -1, txt)
def __do_layout(self) :
first = wx.BoxSizer(wx.VERTICAL)
- sizer = wx.FlexGridSizer(4,2,0,0)
+ sizer = wx.FlexGridSizer(0,2,0,0)
sizer.Add(self.label_lem, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
sizer.Add(self.radio_lem, 0, wx.ALIGN_LEFT, 5)
sizer.Add(wx.StaticLine(self),0, wx.ALIGN_LEFT, 5)
def __set_properties(self) :
self.SetTitle(u'Préférences')
- #self.spin_ctrl_4.Enable(False)
- #self.spin_ctrl_5.Enable(False)
- #self.spin_max_actives.Enable(False)
-
-# def OnCheckUce(self, evt) :
-# if self.check_uce.GetValue() :
-# self.spin_ctrl_4.Enable(True)
-# self.spin_ctrl_5.Enable(True)
-# if self.spin_ctrl_5.GetValue() > 0 :
-# self.spin_max_actives.Enable(False)
-# else :
-# self.spin_max_actives.Enable(True)
-# else :
-# self.spin_ctrl_4.Enable(False)
-# self.spin_ctrl_5.Enable(False)
-# self.spin_max_actives.Enable(False)
-
-# def OnSpin(self, evt) :
-# if self.spin_ctrl_5.GetValue() > 0 :
-# self.spin_max_actives.Enable(False)
-# else :
-# self.spin_max_actives.Enable(True)
def OnKeys(self, evt):
- dial = AlcOptFrame(self.parent, self)
+ dial = AlcOptFrame(self, self.parent.parent)
dial.CenterOnParent()
- val = dial.ShowModal()
+ dial.ShowModal()
+ for i in range(0,len(dial.listlabel)):
+ dial.keys[dial.listcle[i]] = dial.listspin[i].GetValue()
+ DoConf().makeoptions(['KEY'], [dial.keys], outfile = self.parent.parent.ConfigPath['key'])
+ dial.Destroy()
class LexDialog( wx.Dialog ):
bSizer2 = wx.BoxSizer( wx.VERTICAL )
- fgSizer2 = wx.FlexGridSizer( 2, 2, 0, 0 )
+ fgSizer2 = wx.FlexGridSizer( 0, 2, 0, 0 )
fgSizer2.SetFlexibleDirection( wx.BOTH )
fgSizer2.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
class PrefUCECarac(wx.Dialog):
def __init__(self, parent, *args, **kwds):
kwds['style'] = wx.DEFAULT_DIALOG_STYLE
- kwds['title'] = u"UCE caractéristiques"
+ kwds['title'] = u"Segments de texte caractéristiques"
wx.Dialog.__init__(self, *args, **kwds)
self.parent = parent
first = wx.BoxSizer(wx.VERTICAL)
- sizer = wx.FlexGridSizer(2,2,0,0)
+ sizer = wx.FlexGridSizer(0,2,0,0)
self.label_type = wx.StaticText(self, -1, u"Score de classement")
sizer.Add(self.label_type, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
- self.radio_type = wx.RadioBox(self, -1, u"", choices=[u'absolu (somme des chi2 des formes marquées de l\'UCE)', u'relatif (moyenne des chi2 des formes marquées de l\'UCE)'], majorDimension=0, style=wx.RA_SPECIFY_ROWS)
+ self.radio_type = wx.RadioBox(self, -1, u"", choices=[u'absolu (somme des chi2 des formes marquées du segment)', u'relatif (moyenne des chi2 des formes marquées du segment)'], majorDimension=0, style=wx.RA_SPECIFY_ROWS)
sizer.Add(self.radio_type, 0, wx.ALIGN_RIGHT, 5)
- self.txt_eff = wx.StaticText(self, -1, u"Nombre d\'UCE maximum")
+ self.txt_eff = wx.StaticText(self, -1, u"Nombre maximum de segments de texte")
sizer.Add(self.txt_eff, 0, wx.ALIGN_CENTRE, 5)
self.spin_eff = wx.SpinCtrl(self, -1, '', size = (100, 30), min = 1, max = 100000, initial = 50)
+ self.spin_eff.SetValue(50)
sizer.Add(self.spin_eff, 0, wx.ALIGN_CENTRE|wx.ALL, 5)
first.Add(sizer, 0, wx.ALL, 5)
btnsizer = wx.StdDialogButtonSizer()
self.label = wx.StaticText( self, wx.ID_ANY, txt, wx.DefaultPosition, wx.DefaultSize, 0 )
bSizer1.Add( self.label, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5 )
- fgSizer1 = wx.FlexGridSizer( 2, 2, 0, 0 )
+ fgSizer1 = wx.FlexGridSizer( 0, 2, 0, 0 )
fgSizer1.SetFlexibleDirection( wx.BOTH )
fgSizer1.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
#---------------------------------------------------------------
bSizer2 = wx.BoxSizer( wx.VERTICAL )
- fgSizer1 = wx.FlexGridSizer( 2, 2, 0, 0 )
+ fgSizer1 = wx.FlexGridSizer( 0, 2, 0, 0 )
fgSizer1.SetFlexibleDirection( wx.BOTH )
fgSizer1.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
# begin wxGlade: MyFrame.__init__
wx.Frame.__init__(self, parent, id)
self.spanel = wx.ScrolledWindow(self, -1, style=wx.TAB_TRAVERSAL)
- self.sizer1 = wx.FlexGridSizer(len(result)+1,4,0,0)
+ self.sizer1 = wx.FlexGridSizer(0,4,0,0)
self.parent = parent
self.formes = {}
txt = [u'forme',u'classe',u'chi2',u'voir']
def OnCloseWindow(self, evt):
self.Destroy()
-class SearchDial ( wx.Dialog ):
+class SearchDial ( wx.Frame ):
def __init__( self, parent, listctrl, col, shown):
- wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE )
+ wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_FRAME_STYLE )
self.parent = parent
self.listctrl = listctrl
self.col = col
cl = first_forme[1] - 1
profile.ProfNB.SetSelection(cl)
profile.ProfNB.GetPage(cl).SetFocus()
- print profile.ProfNB.GetPage(cl)
UnSelectList(profile.ProfNB.GetPage(cl))
datas = dict([[profile.ProfNB.GetPage(cl).getColumnText(i,6),i] for i in range(profile.ProfNB.GetPage(cl).GetItemCount())])
profile.ProfNB.GetPage(cl).SetItemState(datas[first_forme[0]], wx.LIST_STATE_SELECTED, wx.LIST_STATE_SELECTED)
self.search.Clear()
def UnSelectList(liste) :
- print liste
if liste.GetFirstSelected() != -1 :
last = liste.GetFirstSelected()
liste.Select(liste.GetFirstSelected(), False)
class OptLexi(wx.Dialog):
- def __init__(self, *args, **kwds):
+ def __init__(self, parent, force_chi = False):
# begin wxGlade: MyDialog.__init__
- kwds["style"] = wx.DEFAULT_DIALOG_STYLE
- wx.Dialog.__init__(self, *args, **kwds)
+ #kwds["style"] = wx.DEFAULT_DIALOG_STYLE
+ wx.Dialog.__init__(self, parent, style = wx.DEFAULT_DIALOG_STYLE)
self.listet = None
self.variables = None
+ self.force_chi = force_chi
#self.labellem = wx.StaticText(self, -1, u"Lemmatisation : ")
#self.checklem = wx.CheckBox(self, -1)
+ if not self.force_chi :
+ self.label_typeformes = wx.StaticText(self, -1, u"Formes retenues")
+ typeformeschoiceChoices = [ u"actives et supplémentaires", u"actives", u"supplémentaires"]
+ self.typeformes = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, typeformeschoiceChoices, 0 )
+ self.typeformes.SetSelection( 0 )
+
self.label_var = wx.StaticText(self, -1, u"Sélection par :")
self.choice = wx.Choice(self, -1, (100,50), choices = [u'variables', u'modalités'])
self.label1 = wx.StaticText(self, -1, u"Choix")
self.list_box_1 = wx.ListBox(self, -1, choices=[], size = wx.Size( 150,200 ), style=wx.LB_EXTENDED | wx.LB_HSCROLL)
self.button_2 = wx.Button(self, wx.ID_CANCEL, "")
self.button_1 = wx.Button(self, wx.ID_OK, "")
+ if not self.force_chi :
+ indices = [u'loi hypergéométique', u'chi2']
+ else :
+ indices = [u'chi2']
self.label_indice = wx.StaticText(self, -1, u"indice")
- self.choice_indice = wx.Choice(self, -1, (100,50), choices = [u'loi hypergéométique', u'chi2'])
- self.label = wx.StaticText(self, -1, u"effectif minimum")
- self.spin = wx.SpinCtrl(self, -1, min = 1, max = 10000)
+ self.choice_indice = wx.Choice(self, -1, (100,50), choices = indices)
+ if not self.force_chi :
+ self.label = wx.StaticText(self, -1, u"effectif minimum")
+ self.spin = wx.SpinCtrl(self, -1, min = 1, max = 10000, initial = 10)
self.Bind(wx.EVT_CHOICE, self.onselect, self.choice)
self.__set_properties()
self.__do_layout()
def __set_properties(self):
# begin wxGlade: MyDialog.__set_properties
self.SetTitle("Choix des variables")
- self.spin.SetValue(10)
+ if not self.force_chi :
+ self.spin.SetValue(10)
self.choice.SetSelection(0)
+ self.choice_indice.SetSelection(0)
#self.SetMinSize(wx.Size(300, 400))
# end wxGlade
def __do_layout(self):
# begin wxGlade: MyDialog.__do_layout
sizer_1 = wx.BoxSizer(wx.VERTICAL)
- sizer_2 = wx.FlexGridSizer(2,2,0,0)
+ sizer_2 = wx.FlexGridSizer(0,2,0,0)
sizer_3 = wx.BoxSizer(wx.HORIZONTAL)
#sizer_2.Add(self.labellem, 0, wx.ALIGN_CENTER_VERTICAL, 3)
#sizer_2.Add(self.checklem, 0, wx.ALIGN_CENTER_VERTICAL, 3)
+ if not self.force_chi :
+ sizer_2.Add(self.label_typeformes, 0, wx.ALIGN_CENTER_VERTICAL, 3)
+ sizer_2.Add(self.typeformes, 0, wx.ALIGN_CENTER_VERTICAL, 3)
sizer_2.Add(self.label_var, 0, wx.ALIGN_CENTER_VERTICAL, 3)
sizer_2.Add(self.choice, 0, wx.ALIGN_CENTER_VERTICAL, 3)
sizer_2.Add(self.label1, 0, wx.ALIGN_CENTER_VERTICAL, 3)
sizer_3.Add(self.button_1, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL, 3)
sizer_2.Add(self.label_indice, 0, wx.ALIGN_CENTER_VERTICAL, 3)
sizer_2.Add(self.choice_indice, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL, 3)
- sizer_2.Add(self.label, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL, 3)
- sizer_2.Add(self.spin, 0, wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
+ if not self.force_chi :
+ sizer_2.Add(self.label, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL, 3)
+ sizer_2.Add(self.spin, 0, wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
sizer_1.Add(sizer_2, 0, wx.ALIGN_CENTER_HORIZONTAL, 3)
sizer_1.Add(sizer_3, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_RIGHT, 3)
self.SetSizer(sizer_1)
class PrefWordCloud ( wx.Dialog ):
- def __init__( self, parent ):
+ def __init__( self, parent, fromcluster = False ):
wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u"Préférences wordcloud", pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE )
self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
bSizer1.Add( self.m_staticText3, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT|wx.ALL, 5 )
self.spin_H = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size( 100,30 ), wx.SP_ARROW_KEYS, 0, 10000, 600 )
+ self.spin_H.SetValue( 800 )
bSizer1.Add( self.spin_H, 0, wx.ALL, 5 )
fgSizer1.Add( bSizer1, 1, wx.EXPAND, 5 )
bSizer3.Add( self.m_staticText4, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT|wx.ALL, 5 )
self.spin_L = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size( 100,30 ), wx.SP_ARROW_KEYS, 0, 10000, 600 )
+ self.spin_L.SetValue( 800 )
bSizer3.Add( self.spin_L, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
fgSizer1.Add( bSizer3, 1, wx.EXPAND, 5 )
self.m_staticline4 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
fgSizer1.Add( self.m_staticline4, 0, wx.EXPAND |wx.ALL, 5 )
+ self.m_staticText11 = wx.StaticText( self, wx.ID_ANY, u"Format de l'image", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText11.Wrap( -1 )
+ fgSizer1.Add( self.m_staticText11, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+ formatChoices = [ u"png", u"svg" ]
+ self.format = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, formatChoices, 0 )
+ self.format.SetSelection( 0 )
+ fgSizer1.Add( self.format, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+ if fromcluster :
+ self.m_staticText111 = wx.StaticText( self, wx.ID_ANY, u"Taille des mots en fonction de ...", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText11.Wrap( -1 )
+ fgSizer1.Add( self.m_staticText111, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+ IndiceChoices = [ u"chi2", u"fréquence" ]
+ self.indice = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, IndiceChoices, 0 )
+ self.indice.SetSelection( 0 )
+ fgSizer1.Add( self.indice, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+ self.m_staticline13 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
+ fgSizer1.Add( self.m_staticline13, 0, wx.EXPAND |wx.ALL, 5 )
+
+ self.m_staticline14 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
+ fgSizer1.Add( self.m_staticline14, 0, wx.EXPAND |wx.ALL, 5 )
+
self.m_staticText5 = wx.StaticText( self, wx.ID_ANY, u"Nombre maximum de formes", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_staticText5.Wrap( -1 )
fgSizer1.Add( self.m_staticText5, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT|wx.ALL, 5 )
self.spin_maxword = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 10000, 600 )
+ self.spin_maxword.SetValue( 600 )
fgSizer1.Add( self.spin_maxword, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
self.m_staticline5 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
bSizer5.Add( self.m_staticText7, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
self.spin_mincex = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 1000, 5 )
+ self.spin_mincex.SetValue( 5 )
bSizer5.Add( self.spin_mincex, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 )
bSizer4.Add( bSizer5, 1, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 5 )
bSizer6.Add( self.m_staticText8, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
self.spin_maxcex = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 1000, 50 )
+ self.spin_maxcex.SetValue( 50 )
bSizer6.Add( self.spin_maxcex, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT|wx.ALL, 5 )
bSizer4.Add( bSizer6, 1, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 5 )
def __init__( self, parent, parametres ):
wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u"Préférences", pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE )
self.parent = parent
- langues_n = [u'français', u'english', u'german (expérimentale)', u'italian (expérimentale)', u'swedish (exp.)', u'portuguese (exp.)', 'greek', 'other...']
- self.langues = [u'french', u'english', u'german', 'italian', 'swedish', u'portuguese', 'greek', 'other']
+ langues_n = [u'français', u'english', u'german (expérimentale)', u'italian', u'swedish (expérimentale)', u'portuguese (expérimentale)', u'spanish (expérimentale)', u'greek (expériementale)', u'autre...']
+ self.langues = [u'french', u'english', u'german', u'italian', u'swedish', u'portuguese', u'spanish', u'greek', u'other']
self.encodages = [enc[0].lower() for enc in encodages]
ucimark = [u'****', u'0000']
- ucemethod = [u'charactères', u'occurrences', u'paragraphe']
+ ucemethod = [u'charactères', u'occurrences', u'paragraphes']
self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
fgSizer1.Add( fgSizer41, 1, wx.EXPAND, 5 )
- self.m_staticText12 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Marqueur d'UCI", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText12 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Marqueur de texte", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_staticText12.Wrap( -1 )
fgSizer1.Add( self.m_staticText12, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT|wx.ALL, 5 )
self.check_expressions.SetValue(True)
fgSizer1.Add( self.check_expressions, 0, wx.ALL, 5 )
- self.m_staticText9 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Construire des UCE", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText9 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Construire des segments de texte", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_staticText9.Wrap( -1 )
fgSizer1.Add( self.m_staticText9, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT|wx.ALL, 5 )
self.check_makeuce.SetValue(True)
fgSizer1.Add( self.check_makeuce, 0, wx.ALL, 5 )
- self.m_staticText10 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Mode de construction des UCE", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText10 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Mode de construction des segments de texte", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_staticText10.Wrap( -1 )
fgSizer1.Add( self.m_staticText10, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT|wx.ALL, 5 )
self.uce_mode.SetSelection( 0 )
fgSizer1.Add( self.uce_mode, 0, wx.ALL, 5 )
- self.m_staticText13 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Taille des UCE", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText13 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Taille des segments de texte", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_staticText13.Wrap( -1 )
fgSizer1.Add( self.m_staticText13, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT|wx.ALL, 5 )
fgSizer4.Add( self.check_charact, 0, wx.ALL, 5 )
self.txt_charact = wx.TextCtrl( self.m_panel2, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
- self.txt_charact.SetMinSize( wx.Size( 200,-1 ) )
+ self.txt_charact.SetMinSize( wx.Size( 400,-1 ) )
fgSizer4.Add( self.txt_charact, 0, wx.ALL|wx.EXPAND, 5 )
if locale.getpreferredencoding().lower() == 'mac-roman' :
enc = self.encodages.index('macroman')
else :
- enc = self.encodages.index(locale.getpreferredencoding().lower())
+ try :
+ enc = self.encodages.index(locale.getpreferredencoding().lower())
+ except ValueError :
+ enc = self.encodages.index('utf-8')
self.encodage_choices.SetSelection(enc)
self.lang_choices.SetSelection(0)
self.repout_choices.SetValue(parametres['pathout'])
else :
parametres[val] = 0
return parametres
+
+class message(wx.Dialog):
+ def __init__(self, parent, title, size, save = True):
+ wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = title, pos = wx.DefaultPosition, size = size, style = wx.DEFAULT_DIALOG_STYLE )
+ self.save = save
+ self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
+
+ self.html = ""
+ self.HtmlPage=wx.html.HtmlWindow(self, -1)
+ self.HtmlPage.SetMinSize( size )
+ if "gtk2" in wx.PlatformInfo:
+ self.HtmlPage.SetStandardFonts()
+ self.HtmlPage.SetFonts('Courier','Courier')
+
+ self.button_1 = wx.Button(self, wx.ID_CANCEL)
+
+ self.Bind(wx.EVT_BUTTON, self.OnCloseMe, self.button_1)
+ if self.save :
+ self.button_2 = wx.Button(self, wx.ID_SAVE)
+ self.Bind(wx.EVT_BUTTON, self.OnSavePage, self.button_2)
+ self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
+ self.__do_layout()
+
+ def __do_layout(self):
+ sizer_2 = wx.BoxSizer(wx.VERTICAL)
+ sizer_2.Add(self.HtmlPage, 0, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+ m_sdbSizer1 = wx.StdDialogButtonSizer()
+ m_sdbSizer1.AddButton( self.button_1 )
+ if self.save :
+ m_sdbSizer1.AddButton( self.button_2 )
+ m_sdbSizer1.Realize()
+ sizer_2.Add(m_sdbSizer1, 1, wx.EXPAND, 5)
+ self.SetSizer(sizer_2)
+ self.Layout()
+ sizer_2.Fit( self )
+
+ def OnSavePage(self, evt) :
+ dlg = wx.FileDialog(
+ self, message="Enregistrer sous...", defaultDir=os.getcwd(),
+ defaultFile="concordancier.html", wildcard="html|*.html", style=wx.SAVE | wx.OVERWRITE_PROMPT
+ )
+ dlg.SetFilterIndex(2)
+ dlg.CenterOnParent()
+ if dlg.ShowModal() == wx.ID_OK:
+ path = dlg.GetPath()
+ with open(path, 'w') as f :
+ f.write(self.html)
+
+ def OnCloseMe(self, event):
+ self.Close(True)
+
+ def OnCloseWindow(self, event):
+ self.Destroy()
+
+class ExtractDialog ( wx.Dialog ):
+
+ def __init__( self, parent, option ):
+ wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE )
+
+ self.option = option
+
+ self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
+
+ fgSizer1 = wx.FlexGridSizer( 0, 2, 0, 0 )
+ fgSizer1.SetFlexibleDirection( wx.BOTH )
+ fgSizer1.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
+
+ self.m_staticText1 = wx.StaticText( self, wx.ID_ANY, u"Corpus", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText1.Wrap( -1 )
+ fgSizer1.Add( self.m_staticText1, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT|wx.ALL, 5 )
+
+ self.corpusfile = wx.FilePickerCtrl( self, wx.ID_ANY, wx.EmptyString, u"Select a file", u"*.txt", wx.DefaultPosition, wx.Size( -1,-1 ), wx.FLP_DEFAULT_STYLE|wx.FLP_FILE_MUST_EXIST|wx.FLP_OPEN )
+ self.corpusfile.SetMinSize( wx.Size( 500,-1 ) )
+
+ fgSizer1.Add( self.corpusfile, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND, 5 )
+
+ self.m_staticText2 = wx.StaticText( self, wx.ID_ANY, u"Encodage", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText2.Wrap( -1 )
+ fgSizer1.Add( self.m_staticText2, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+ encodageChoices = [' - '.join(encodage) for encodage in encodages]
+ self.encodage = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, encodageChoices, 0 )
+ self.encodage.SetSelection( 0 )
+ self.encodage.SetMinSize( wx.Size( 200,-1 ) )
+
+ fgSizer1.Add( self.encodage, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND, 5 )
+
+ if option == 'splitvar' :
+ self.m_staticText3 = wx.StaticText( self, wx.ID_ANY, u"Variable (avec * mais sans le _ )", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText3.Wrap( -1 )
+ fgSizer1.Add( self.m_staticText3, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+ self.txtvar = wx.TextCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.txtvar.SetMinSize( wx.Size( 200,-1 ) )
+
+ fgSizer1.Add( self.txtvar, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND, 5 )
+
+ if option == 'mods' :
+ self.m_staticText4 = wx.StaticText( self, wx.ID_ANY, u"Modalités (une par ligne, avec * )", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText4.Wrap( -1 )
+ fgSizer1.Add( self.m_staticText4, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+ self.txtmods = wx.TextCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.TE_MULTILINE )
+ self.txtmods.SetMinSize( wx.Size( 200,150 ) )
+
+ fgSizer1.Add( self.txtmods, 0, wx.ALL|wx.EXPAND, 5 )
+
+ self.m_staticText5 = wx.StaticText( self, wx.ID_ANY, u"Format de l'extraction", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText5.Wrap( -1 )
+ fgSizer1.Add( self.m_staticText5, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+ extractformatChoices = [ u"Un seul fichier", u"Un fichier par modalité" ]
+ self.extractformat = wx.RadioBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, extractformatChoices, 1, wx.RA_SPECIFY_COLS )
+ self.extractformat.SetSelection( 0 )
+ fgSizer1.Add( self.extractformat, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+
+ fgSizer1.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )
+
+ m_sdbSizer1 = wx.StdDialogButtonSizer()
+ self.m_sdbSizer1OK = wx.Button( self, wx.ID_OK )
+ m_sdbSizer1.AddButton( self.m_sdbSizer1OK )
+ self.m_sdbSizer1Cancel = wx.Button( self, wx.ID_CANCEL )
+ m_sdbSizer1.AddButton( self.m_sdbSizer1Cancel )
+ m_sdbSizer1.Realize();
+
+ fgSizer1.Add( m_sdbSizer1, 1, wx.EXPAND, 5 )
+
+
+ self.SetSizer( fgSizer1 )
+ self.Layout()
+ fgSizer1.Fit( self )
+
+ self.Centre( wx.BOTH )
+
+ def make_param(self) :
+ parametres = {}
+ le = [enc[0].lower() for enc in encodages]
+ parametres['filein'] = self.corpusfile.GetPath()
+ encodage = le[self.encodage.GetSelection()]
+ parametres['encodein'] = encodage
+ if self.option == 'splitvar' :
+ parametres['var'] = self.txtvar.GetValue()
+ if self.option == 'mods' :
+ parametres['mods'] = self.txtmods.GetValue().splitlines()
+ if self.extractformat.GetSelection() == 0 :
+ parametres['onefile'] = True
+ else :
+ parametres['onefile'] = False
+ parametres['encodeout'] = locale.getpreferredencoding()
+ return parametres
+
+ def __del__( self ):
+ pass
+
+class FreqDialog(wx.Dialog):
+ def __init__(self, parent, ID, listcol, title, size) :
+ wx.Dialog.__init__(self, parent, ID, title, size=size, pos=wx.DefaultPosition,style=wx.DEFAULT_DIALOG_STYLE | wx.CANCEL | wx.OK )
+ pre = wx.PreDialog()
+ pre.SetExtraStyle(wx.DIALOG_EX_CONTEXTHELP)
+ pre.Create(parent, ID, title, wx.DefaultPosition, size, wx.DEFAULT_DIALOG_STYLE | wx.CANCEL | wx.OK)
+ self.PostCreate(pre)
+ self.parent = parent
+ sizer = wx.BoxSizer(wx.VERTICAL)
+ #self.content = parent.content
+ self.header = listcol
+ #LABELLIST = []
+ #for i in self.header:
+ # forme = i
+ # if len(forme) > 60 :
+ # LABELLIST.append(i[0:60])
+ # else:
+ # LABELLIST.append(i)
+ self.list_box_1 = wx.ListBox(self, -1, choices=self.header, style=wx.LB_EXTENDED | wx.LB_HSCROLL)
+ sizer.Add(self.list_box_1, 0, 5)
+
+ btnsizer = wx.BoxSizer(wx.HORIZONTAL)
+
+ btn = wx.Button(self, wx.ID_CANCEL)
+ btn.SetHelpText("Annuler")
+ btnsizer.Add(btn)
+
+ btn = wx.Button(self, wx.ID_OK)
+ btn.SetHelpText("Valider")
+ btn.SetDefault()
+ btnsizer.Add(btn)
+
+ sizer.Add(btnsizer, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5)
+ self.SetSizer(sizer)
+ sizer.Fit(self)
+ self.SetTitle(u"Sélection")
+
+ # end wxGlade
+
+class ProtoDial ( wx.Dialog ):
+
+ def __init__( self, parent, headers ):
+ wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u'Préférences', pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE )
+
+ self.SetSizeHintsSz( wx.Size( 200,300 ), wx.DefaultSize )
+
+ bSizer1 = wx.BoxSizer( wx.VERTICAL )
+
+ fgSizer1 = wx.FlexGridSizer( 0, 2, 0, 0 )
+ fgSizer1.SetFlexibleDirection( wx.BOTH )
+ fgSizer1.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
+
+ self.m_staticText1 = wx.StaticText( self, wx.ID_ANY, u"Variables", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText1.Wrap( -1 )
+ fgSizer1.Add( self.m_staticText1, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALL, 5 )
+
+ self.m_staticText2 = wx.StaticText( self, wx.ID_ANY, u"Rangs", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText2.Wrap( -1 )
+ fgSizer1.Add( self.m_staticText2, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALL, 5 )
+
+ variablesChoices = headers
+ self.variables = wx.ListBox( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, variablesChoices, wx.LB_MULTIPLE )
+ self.variables.SetMinSize( wx.Size( 150,-1 ) )
+
+ fgSizer1.Add( self.variables, 0, wx.ALL|wx.EXPAND, 5 )
+
+ rangsChoices = headers
+ self.rangs = wx.ListBox( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, rangsChoices, wx.LB_MULTIPLE )
+ self.rangs.SetMinSize( wx.Size( 150,-1 ) )
+
+ fgSizer1.Add( self.rangs, 0, wx.ALL|wx.EXPAND, 5 )
+
+
+ bSizer1.Add( fgSizer1, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 5 )
+
+ fgSizer3 = wx.FlexGridSizer( 0, 2, 0, 0 )
+ fgSizer3.SetFlexibleDirection( wx.BOTH )
+ fgSizer3.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
+
+ self.m_staticText3 = wx.StaticText( self, wx.ID_ANY, u"Limite fréquence", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText3.Wrap( -1 )
+ fgSizer3.Add( self.m_staticText3, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+ bSizer2 = wx.BoxSizer( wx.HORIZONTAL )
+
+ choix_freqChoices = [ u"automatique (moyenne)", u"manuelle" ]
+ self.choix_freq = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, choix_freqChoices, 0 )
+ self.choix_freq.SetSelection( 0 )
+ bSizer2.Add( self.choix_freq, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+ self.freqlim = wx.TextCtrl( self, wx.ID_ANY, u"0", wx.DefaultPosition, wx.DefaultSize, wx.TE_CENTRE )
+ self.freqlim.Enable( False )
+ self.freqlim.SetMinSize( wx.Size( 100,-1 ) )
+
+ bSizer2.Add( self.freqlim, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+
+ fgSizer3.Add( bSizer2, 1, wx.EXPAND, 5 )
+
+ self.m_staticText4 = wx.StaticText( self, wx.ID_ANY, u"Limite rang", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText4.Wrap( -1 )
+ fgSizer3.Add( self.m_staticText4, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+ bSizer21 = wx.BoxSizer( wx.HORIZONTAL )
+
+ choix_rangChoices = [ u"automatique (moyenne)", u"manuelle" ]
+ self.choix_rang = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, choix_rangChoices, 0 )
+ self.choix_rang.SetSelection( 0 )
+ bSizer21.Add( self.choix_rang, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+ self.ranglim = wx.TextCtrl( self, wx.ID_ANY, u"0", wx.DefaultPosition, wx.DefaultSize, wx.TE_CENTRE )
+ self.ranglim.Enable( False )
+ self.ranglim.SetMinSize( wx.Size( 100,-1 ) )
+
+ bSizer21.Add( self.ranglim, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+
+ fgSizer3.Add( bSizer21, 1, wx.EXPAND, 5 )
+
+ self.m_staticText5 = wx.StaticText( self, wx.ID_ANY, u"Fréquence minimum", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText5.Wrap( -1 )
+ fgSizer3.Add( self.m_staticText5, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
+
+ self.m_textCtrl4 = wx.TextCtrl( self, wx.ID_ANY, u"2", wx.DefaultPosition, wx.DefaultSize, wx.TE_CENTRE )
+ fgSizer3.Add( self.m_textCtrl4, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALL, 5 )
+
+
+ bSizer1.Add( fgSizer3, 1, wx.EXPAND, 5 )
+
+ m_sdbSizer1 = wx.StdDialogButtonSizer()
+ self.m_sdbSizer1OK = wx.Button( self, wx.ID_OK )
+ m_sdbSizer1.AddButton( self.m_sdbSizer1OK )
+ self.m_sdbSizer1Cancel = wx.Button( self, wx.ID_CANCEL )
+ m_sdbSizer1.AddButton( self.m_sdbSizer1Cancel )
+ m_sdbSizer1.Realize();
+
+ bSizer1.Add( m_sdbSizer1, 0, wx.EXPAND, 5 )
+
+ self.SetSizer( bSizer1 )
+ self.Layout()
+ bSizer1.Fit( self )
+
+ self.Centre( wx.BOTH )
+
+ # Connect Events
+ self.choix_freq.Bind( wx.EVT_CHOICE, self.UpdateText )
+ self.choix_rang.Bind( wx.EVT_CHOICE, self.UpdateText )
+
+ def __del__( self ):
+ pass
+
+
+ # Virtual event handlers, overide them in your derived class
+ def UpdateText( self, event ):
+ event.Skip()
+
+class SimpleDialog ( wx.Dialog ):
+
+ def __init__( self, parent ):
+ wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE )
+
+ self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
+
+ bSizer1 = wx.BoxSizer( wx.VERTICAL )
+
+ self.m_panel1 = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
+ bSizer2 = wx.BoxSizer( wx.VERTICAL )
+
+ self.m_staticText1 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Export terminé. Ouvrez le lien suivant dans un navgateur :", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText1.Wrap( -1 )
+ bSizer2.Add( self.m_staticText1, 0, wx.ALL, 5 )
+
+ self.link = wx.HyperlinkCtrl( self.m_panel1, wx.ID_ANY, u"wxFB Website", u"http://www.wxformbuilder.org", wx.DefaultPosition, wx.DefaultSize, wx.HL_DEFAULT_STYLE )
+ bSizer2.Add( self.link, 0, wx.ALL, 5 )
+
+
+ self.m_panel1.SetSizer( bSizer2 )
+ self.m_panel1.Layout()
+ bSizer2.Fit( self.m_panel1 )
+ bSizer1.Add( self.m_panel1, 1, wx.EXPAND |wx.ALL, 5 )
+
+ m_sdbSizer1 = wx.StdDialogButtonSizer()
+ self.m_sdbSizer1OK = wx.Button( self, wx.ID_OK )
+ m_sdbSizer1.AddButton( self.m_sdbSizer1OK )
+ m_sdbSizer1.Realize();
+
+ bSizer1.Add( m_sdbSizer1, 0, wx.EXPAND, 5 )
+
+
+ self.SetSizer( bSizer1 )
+ self.Layout()
+ bSizer1.Fit( self )
+
+ self.Centre( wx.BOTH )
+
+ def __del__( self ):
+ pass