From 1f82fb8e9ed83b8524b00039f1a8c51c2b12a8be Mon Sep 17 00:00:00 2001 From: Pierre Date: Sun, 30 Dec 2012 16:53:57 +0100 Subject: [PATCH] ... --- PrintRScript.py | 91 ++-- Rscripts/Rgraph.R | 8 +- Rscripts/simi.R | 3 +- analysetxt.py | 31 +- corpusNG.py | 11 + dialog.py | 636 +-------------------------- functions.py | 141 +++--- guifunct.py | 1226 ++++++++++++++++++++++++++++++++++++++++++++++++++++- iramuteq.py | 6 +- layout.py | 45 +- openanalyse.py | 101 +---- tabsimi.py | 3 +- textsimi.py | 46 +- tree.py | 34 +- 14 files changed, 1471 insertions(+), 911 deletions(-) diff --git a/PrintRScript.py b/PrintRScript.py index 8d85e71..d4d3275 100644 --- a/PrintRScript.py +++ b/PrintRScript.py @@ -374,10 +374,10 @@ write.csv2(gbcluster,file="%s") txt += """ PARCEX<-%s - xmin <- min(afc$rowcoord[,1]) + (0.1 * min(afc$rowcoord[,1])) - xmax <- max(afc$rowcoord[,1]) + (0.1 * max(afc$rowcoord[,1])) - ymin <- min(afc$rowcoord[,2]) + (0.1 * min(afc$rowcoord[,2])) - ymax <- max(afc$rowcoord[,2]) + (0.1 * max(afc$rowcoord[,2])) + xmin <- min(afc$rowcoord[,1], na.rm = TRUE) + (0.1 * min(afc$rowcoord[,1], na.rm = TRUE)) + xmax <- max(afc$rowcoord[,1], na.rm = TRUE) + (0.1 * max(afc$rowcoord[,1], na.rm = TRUE)) + ymin <- min(afc$rowcoord[,2], na.rm = TRUE) + (0.1 * min(afc$rowcoord[,2], na.rm = TRUE)) + ymax <- max(afc$rowcoord[,2], na.rm = TRUE) + (0.1 * max(afc$rowcoord[,2], na.rm = TRUE)) """ % taillecar txt += """ PlotAfc2dCoul(afc, as.data.frame(chistabletot), "%s", what='coord', deb=1, fin=(debsup-1), xlab = xlab, ylab = ylab, xmin=xmin, xmax=xmax, ymin = ymin, ymax=ymax) @@ -644,29 +644,37 @@ class PrintSimiScript(PrintRScript) : self.txtgraph = '' self.packages(['igraph', 'proxy', 'Matrix']) self.sources([self.analyse.parent.RscriptsPath['simi'], self.analyse.parent.RscriptsPath['Rgraph']]) - txt = """ - dm.path <- "%s" - cn.path <- "%s" - selected.col <- "%s" - """ % (self.pathout['mat01.csv'], self.pathout['actives.csv'], self.pathout['selected.csv']) - txt += """ - dm <-readMM(dm.path) - cn <- read.table(cn.path, sep=';', quote='"') - colnames(dm) <- cn[,1] - sel.col <- read.csv2(selected.col) - dm <- dm[, sel.col[,1] + 1] - """ - - if self.parametres['coeff'] == 0 : - method = 'cooc' + txt = '' + if not self.parametres['keep_coord'] : + txt += """ + dm.path <- "%s" + cn.path <- "%s" + selected.col <- "%s" + """ % (self.pathout['mat01.csv'], self.pathout['actives.csv'], self.pathout['selected.csv']) txt += """ - method <- 'cooc' - mat <- make.a(dm) + dm <-readMM(dm.path) + cn <- read.table(cn.path, sep=';', quote='"') + colnames(dm) <- cn[,1] + sel.col <- read.csv2(selected.col) + dm <- dm[, sel.col[,1] + 1] """ else : txt += """ - dm <- as.matrix(dm) - """ + load("%s") + """ % self.pathout['RData.RData'] + + if self.parametres['coeff'] == 0 : + method = 'cooc' + if not self.parametres['keep_coord'] : + txt += """ + method <- 'cooc' + mat <- make.a(dm) + """ + else : + if not self.parametres['keep_coord'] : + txt += """ + dm <- as.matrix(dm) + """ if self.parametres['coeff'] == 1 : method = 'prcooc' txt += """ @@ -675,27 +683,31 @@ class PrintSimiScript(PrintRScript) : """ elif self.analyse.indices[self.parametres['coeff']] == 'binomial' : method = 'binomial' - txt += """ - method <- 'binomial' - mat <- binom.sim(dm) - """ + if not self.parametres['keep_coord'] : + txt += """ + method <- 'binomial' + mat <- binom.sim(dm) + """ elif self.parametres['coeff'] != 0 : method = self.analyse.indices[self.parametres['coeff']] + if not self.parametres['keep_coord'] : + txt += """ + method <-"%s" + mat <- simil(dm, method = method, diag = TRUE, upper = TRUE, by_rows = FALSE) + """ % self.analyse.indices[self.parametres['coeff']] + if not self.parametres['keep_coord'] : txt += """ - method <-"%s" - mat <- simil(dm, method = method, diag = TRUE, upper = TRUE, by_rows = FALSE) - """ % self.analyse.indices[self.parametres['coeff']] - txt += """ - mat <- as.matrix(stats::as.dist(mat,diag=TRUE,upper=TRUE)) - mat[is.na(mat)] <- 0 - mat[is.infinite(mat)] <- 0 - """ + mat <- as.matrix(stats::as.dist(mat,diag=TRUE,upper=TRUE)) + mat[is.na(mat)] <- 0 + mat[is.infinite(mat)] <- 0 + """ if self.parametres['layout'] == 0 : layout = 'random' if self.parametres['layout'] == 1 : layout = 'circle' if self.parametres['layout'] == 2 : layout = 'frutch' if self.parametres['layout'] == 3 : layout = 'kawa' if self.parametres['layout'] == 4 : layout = 'graphopt' + self.filename='' if self.parametres['type_graph'] == 0 : type = 'tkplot' if self.parametres['type_graph'] == 1 : @@ -793,14 +805,13 @@ class PrintSimiScript(PrintRScript) : txt += """ et <- list() """ - print self.parametres - for i,et in enumerate(self.parametres['stars']) : + for i, line in enumerate(self.parametres['listet']) : txt+= """ et[[%i]] <- c(%s) - """ % (i+1, ','.join(et[1:])) + """ % (i+1, ','.join([`val + 1` for val in line])) txt+= """ unetoile <- c('%s') - """ % ("','".join([val[0] for val in self.tableau.etline])) + """ % ("','".join([val for val in self.parametres['selectedstars']])) txt += """ fsum <- NULL rs <- rowSums(dm) @@ -825,7 +836,7 @@ class PrintSimiScript(PrintRScript) : cols <- vertex.label.color chivertex.size <- norm.vec(toblack, vcexminmax[1], vcexminmax[2]) - """ % (self.parent.RscriptsPath['chdfunct']) + """ % (self.analyse.parent.RscriptsPath['chdfunct']) else : txt += """ vertex.label.color <- 'black' diff --git a/Rscripts/Rgraph.R b/Rscripts/Rgraph.R index ffbee4c..c38f0b4 100644 --- a/Rscripts/Rgraph.R +++ b/Rscripts/Rgraph.R @@ -265,12 +265,12 @@ make_dendro_cut_tuple <- function(dendro_in, coordok, classeuce, x, nbt = 9) { dendro <- gsub('a','',dendro) dendro_tot_cl <- read.tree(text = dendro) #FIXME - for (i in 1:10) { + for (i in 1:100) { for (cl in 1:clnb) { dendro <- gsub(paste('\\(',cl,',',cl,'\\)',sep=''),cl,dendro) } } - for (i in 1:10) { + for (i in 1:100) { dendro <- gsub(paste('\\(',0,',',0,'\\)',sep=''),0,dendro) for (cl in 1:clnb) { dendro <- gsub(paste('\\(',0,',',cl,'\\)',sep=''),cl,dendro) @@ -429,10 +429,10 @@ create_afc_table <- function(x) { make_afc_graph <- function(toplot, classes, clnb, xlab, ylab, cex.txt = NULL, leg = FALSE, cmd = FALSE, black = FALSE, xminmax=NULL, yminmax=NULL) { if (is.null(xminmax)) { - xminmax <- c(min(toplot[,1]) + (0.1 * min(toplot[,1])), max(toplot[,1]) + (0.1 * max(toplot[,1]))) + xminmax <- c(min(toplot[,1], na.rm = TRUE) + (0.1 * min(toplot[,1], na.rm = TRUE)), max(toplot[,1], na.rm = TRUE) + (0.1 * max(toplot[,1], na.rm = TRUE))) } if (is.null(yminmax)) { - yminmax <- c(min(toplot[,2]) + (0.1 * min(toplot[,2])), max(toplot[,2]) + (0.1 * max(toplot[,2]))) + yminmax <- c(min(toplot[,2], na.rm = TRUE) + (0.1 * min(toplot[,2], na.rm = TRUE)), max(toplot[,2], na.rm = TRUE) + (0.1 * max(toplot[,2], na.rm = TRUE))) } rain <- rainbow(clnb) compt <- 1 diff --git a/Rscripts/simi.R b/Rscripts/simi.R index 12c0b45..98bacf7 100644 --- a/Rscripts/simi.R +++ b/Rscripts/simi.R @@ -239,7 +239,8 @@ plot.simi <- function(graph.simi, p.type = 'tkplot',filename=NULL, vertex.col = par(mar=c(2,2,1,0)) } par(pch=' ') - plot(g.toplot,vertex.label='', edge.width=we.width, vertex.size=vertex.size, vertex.color=vertex.col, vertex.label.color='white', edge.label=we.label, edge.label.cex=cex, edge.color=edge.col, vertex.label.cex = 0, layout=lo) + plot(g.toplot,vertex.label='', edge.width=we.width, vertex.size=vertex.size, vertex.color=vertex.col, vertex.label.color='white', edge.label=we.label, edge.label.cex=cex, edge.color=edge.col, vertex.label.cex = 0, layout=lo)#, rescale = FALSE) + #txt.layout <- lo txt.layout <- layout.norm(lo, -1, 1, -1, 1, -1, 1) #txt.layout <- txt.layout[order(label.cex),] #vertex.label.color <- vertex.label.color[order(label.cex)] diff --git a/analysetxt.py b/analysetxt.py index aa562f2..60b0e05 100644 --- a/analysetxt.py +++ b/analysetxt.py @@ -74,19 +74,24 @@ class AnalyseText : #if self.corpus.lems is None : self.corpus.make_lems(lem = self.parametres['lem']) corpus.parse_active(gramact, gramsup) - self.doanalyse() - self.time = time() - self.t1 - minutes, seconds = divmod(self.time, 60) - hours, minutes = divmod(minutes, 60) - self.parametres['time'] = '%.0fh %.0fm %.0fs' % (hours, minutes, seconds) - self.parametres['ira'] = self.pathout['Analyse.ira'] - DoConf().makeoptions([self.parametres['type']], [self.parametres], self.pathout['Analyse.ira']) - self.ira.history.add(self.parametres) - if dlg : - dlg.Destroy() - OpenAnalyse(self.parent, self.parametres['ira']) - self.ira.tree.AddAnalyse(self.parametres) - self.val = 5100 + result_analyse = self.doanalyse() + if result_analyse is None : + self.time = time() - self.t1 + minutes, seconds = divmod(self.time, 60) + hours, minutes = divmod(minutes, 60) + self.parametres['time'] = '%.0fh %.0fm %.0fs' % (hours, minutes, seconds) + self.parametres['ira'] = self.pathout['Analyse.ira'] + DoConf().makeoptions([self.parametres['type']], [self.parametres], self.pathout['Analyse.ira']) + self.ira.history.add(self.parametres) + if dlg : + dlg.Destroy() + OpenAnalyse(self.parent, self.parametres['ira']) + self.ira.tree.AddAnalyse(self.parametres) + self.val = 5100 + else : + self.val = False + if dlg : + dlg.Destroy() else : if dlg : dlg.Destroy() diff --git a/corpusNG.py b/corpusNG.py index 11961e1..19cfd29 100644 --- a/corpusNG.py +++ b/corpusNG.py @@ -527,6 +527,17 @@ class Corpus : det[et[0]] = 1 return det + def make_etline(self, listet) : + etuces = [[] for et in listet] + for uci in self.ucis : + get = list(set(uci.etoiles).intersection(listet)) + if len(get) > 1 : + return '2 variables sur la meme ligne' + elif get != [] : + etuces[listet.index(get[0])] += [uce.ident for uce in uci.uces] + return etuces + + def make_and_write_profile_et(self, ucecl, fileout) : log.info('etoiles/classes') etoiles = self.make_etoiles() diff --git a/dialog.py b/dialog.py index e97d19e..1b01aa3 100755 --- a/dialog.py +++ b/dialog.py @@ -12,6 +12,7 @@ import os import sys #from listlex import * from KeyFrame import AlcOptFrame +#from listlex import ListForSpec #--------------------------------------------------------------------------- provider = wx.SimpleHelpProvider() wx.HelpProvider_Set(provider) @@ -902,630 +903,6 @@ au chi2 d'association de la forme""" else : self.check4.Enable() -class PrefSimi ( wx.Dialog ): - - def __init__( self, parent, ID, paramsimi, indices ): - wx.Dialog.__init__ ( self, None, id = wx.ID_ANY, title = u"Paramètres", pos = wx.DefaultPosition, size = wx.Size( -1,-1 ), style = wx.DEFAULT_DIALOG_STYLE ) - self.parent = parent - self.paramsimi=paramsimi - self.indices = indices - - - self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize ) - - fgSizer5 = wx.FlexGridSizer( 0, 3, 0, 0 ) - fgSizer5.SetFlexibleDirection( wx.BOTH ) - fgSizer5.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) - - fgSizer3 = wx.FlexGridSizer( 0, 2, 0, 0 ) - fgSizer3.SetFlexibleDirection( wx.BOTH ) - fgSizer3.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) - - self.m_staticText1 = wx.StaticText( self, wx.ID_ANY, u"Sélectionner les colonnes", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText1.Wrap( -1 ) - fgSizer3.Add( self.m_staticText1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.check_colch = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) - fgSizer3.Add( self.check_colch, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.m_staticline29 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline29, 0, wx.EXPAND, 5 ) - - self.m_staticline291 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline291, 0, wx.EXPAND, 5 ) - if not self.paramsimi['first'] : - - self.m_staticText271 = wx.StaticText( self, wx.ID_ANY, u"Utiliser les coordonnées\nprécédentes", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText271.Wrap( -1 ) - fgSizer3.Add( self.m_staticText271, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.check_coord = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) - fgSizer3.Add( self.check_coord, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.m_staticline36 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline36, 0, wx.EXPAND, 5 ) - - self.m_staticline37 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline37, 0, wx.EXPAND, 5 ) - - self.m_staticText3 = wx.StaticText( self, wx.ID_ANY, u"Indice", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText3.Wrap( -1 ) - fgSizer3.Add( self.m_staticText3, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - choice1Choices = [] - self.choice1 = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, self.indices, 0 ) - self.choice1.SetSelection( 0 ) - fgSizer3.Add( self.choice1, 0, wx.ALL, 5 ) - - self.m_staticline293 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline293, 0, wx.EXPAND, 5 ) - - self.m_staticline292 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline292, 0, wx.EXPAND, 5 ) - - self.m_staticText4 = wx.StaticText( self, wx.ID_ANY, u"Layout", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText4.Wrap( -1 ) - fgSizer3.Add( self.m_staticText4, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - choice2Choices = [u"random", u"cercle", u"fruchterman reingold", u"kamada kawai", u"graphopt"] - self.choice2 = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, choice2Choices, 0 ) - self.choice2.SetSelection( 0 ) - fgSizer3.Add( self.choice2, 0, wx.ALL, 5 ) - - self.m_staticline294 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline294, 0, wx.EXPAND, 5 ) - - self.m_staticline295 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline295, 0, wx.EXPAND, 5 ) - - self.m_staticText5 = wx.StaticText( self, wx.ID_ANY, u"Type de graph", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText5.Wrap( -1 ) - fgSizer3.Add( self.m_staticText5, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - choice3Choices = [u"dynamique", u"statique", u"3D"] - self.choice3 = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, choice3Choices, 0 ) - self.choice3.SetSelection( 0 ) - fgSizer3.Add( self.choice3, 0, wx.ALL, 5 ) - - self.m_staticline296 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline296, 0, wx.EXPAND, 5 ) - - self.m_staticline297 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline297, 0, wx.EXPAND, 5 ) - - self.m_staticText8 = wx.StaticText( self, wx.ID_ANY, u"Arbre maximum", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText8.Wrap( -1 ) - fgSizer3.Add( self.m_staticText8, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.check1 = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) - fgSizer3.Add( self.check1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.m_staticline298 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline298, 0, wx.EXPAND, 5 ) - - self.m_staticline299 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline299, 0, wx.EXPAND, 5 ) - - self.m_staticText91 = wx.StaticText( self, wx.ID_ANY, u"Graph à seuil", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText91.Wrap( -1 ) - fgSizer3.Add( self.m_staticText91, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - bSizer21 = wx.BoxSizer( wx.HORIZONTAL ) - - self.check_seuil = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) - bSizer21.Add( self.check_seuil, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.spin_seuil = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 1, 10000, 1 ) - bSizer21.Add( self.spin_seuil, 0, wx.ALL, 5 ) - - fgSizer3.Add( bSizer21, 1, wx.EXPAND, 5 ) - - self.m_staticline2910 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline2910, 0, wx.EXPAND, 5 ) - - self.m_staticline2911 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline2911, 0, wx.EXPAND, 5 ) - - self.m_staticText19 = wx.StaticText( self, wx.ID_ANY, u"Texte sur les sommets", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText19.Wrap( -1 ) - fgSizer3.Add( self.m_staticText19, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.check_vlab = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) - fgSizer3.Add( self.check_vlab, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.m_staticline2912 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline2912, 0, wx.EXPAND, 5 ) - - self.m_staticline2913 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline2913, 0, wx.EXPAND, 5 ) - - self.m_staticText20 = wx.StaticText( self, wx.ID_ANY, u"Indices sur les arêtes", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText20.Wrap( -1 ) - fgSizer3.Add( self.m_staticText20, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.check_elab = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) - fgSizer3.Add( self.check_elab, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.m_staticline2914 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline2914, 0, wx.EXPAND, 5 ) - - self.m_staticline2915 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline2915, 0, wx.EXPAND, 5 ) - - self.m_staticText27 = wx.StaticText( self, wx.ID_ANY, u"Taille du texte", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText27.Wrap( -1 ) - fgSizer3.Add( self.m_staticText27, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.spin_cex = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 10 ) - fgSizer3.Add( self.spin_cex, 0, wx.ALL, 5 ) - - self.m_staticline2916 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline2916, 0, wx.EXPAND, 5 ) - - self.m_staticline2917 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline2917, 0, wx.EXPAND, 5 ) - - if 'bystar' in self.paramsimi : - self.m_staticText40 = wx.StaticText( self, wx.ID_ANY, u"Sélectionner une variable", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText40.Wrap( -1 ) - fgSizer3.Add( self.m_staticText40, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.check_bystar = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) - fgSizer3.Add( self.check_bystar, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.m_staticline3200 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline3200, 0, wx.EXPAND, 5 ) - self.m_staticline3201 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer3.Add( self.m_staticline3201, 0, wx.EXPAND, 5 ) - - fgSizer5.Add( fgSizer3, 1, wx.EXPAND, 5 ) - - self.m_staticline5 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_VERTICAL ) - self.m_staticline5.SetForegroundColour( wx.Colour( 0, 0, 0 ) ) - - fgSizer5.Add( self.m_staticline5, 0, wx.EXPAND|wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 ) - - fgSizer51 = wx.FlexGridSizer( 0, 2, 0, 0 ) - fgSizer51.SetFlexibleDirection( wx.BOTH ) - fgSizer51.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) - - self.m_staticText6 = wx.StaticText( self, wx.ID_ANY, u"Taille du graphique", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText6.Wrap( -1 ) - fgSizer51.Add( self.m_staticText6, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - fgSizer31 = wx.FlexGridSizer( 0, 2, 0, 0 ) - fgSizer31.SetFlexibleDirection( wx.BOTH ) - fgSizer31.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) - - self.m_staticText9 = wx.StaticText( self, wx.ID_ANY, u"hauteur", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText9.Wrap( -1 ) - fgSizer31.Add( self.m_staticText9, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - self.spin_height = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 10, 100000, 800 ) - fgSizer31.Add( self.spin_height, 0, wx.ALL, 5 ) - - self.m_staticText10 = wx.StaticText( self, wx.ID_ANY, u"largeur", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText10.Wrap( -1 ) - fgSizer31.Add( self.m_staticText10, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - self.spin_width = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 10, 100000, 800 ) - fgSizer31.Add( self.spin_width, 0, wx.ALL, 5 ) - - fgSizer51.Add( fgSizer31, 1, wx.EXPAND, 5 ) - - self.m_staticline3 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer51.Add( self.m_staticline3, 0, wx.EXPAND, 5 ) - - self.m_staticline4 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer51.Add( self.m_staticline4, 0, wx.EXPAND, 5 ) - - self.m_staticText101 = wx.StaticText( self, wx.ID_ANY, u"Taille des sommets \nproportionnelle à l'effectif\n(les scores sont normalisés)", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText101.Wrap( -1 ) - fgSizer51.Add( self.m_staticText101, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - bSizer7 = wx.BoxSizer( wx.HORIZONTAL ) - - bSizer9 = wx.BoxSizer( wx.VERTICAL ) - - self.check2 = wx.CheckBox( self, wx.ID_ANY, u"eff.", wx.DefaultPosition, wx.DefaultSize, 0 ) - bSizer9.Add( self.check2, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - if 'sfromchi' in self.paramsimi : - self.checki = wx.CheckBox( self, wx.ID_ANY, u"chi2", wx.DefaultPosition, wx.DefaultSize, 0 ) - bSizer9.Add( self.checki, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - bSizer7.Add( bSizer9, 0, wx.ALIGN_CENTER_VERTICAL, 5 ) - - fgSizer7 = wx.FlexGridSizer( 0, 2, 0, 0 ) - fgSizer7.SetFlexibleDirection( wx.BOTH ) - fgSizer7.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) - - self.m_staticText11 = wx.StaticText( self, wx.ID_ANY, u"min", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText11.Wrap( -1 ) - fgSizer7.Add( self.m_staticText11, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - self.spin_tvmin = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) - fgSizer7.Add( self.spin_tvmin, 0, wx.ALL, 5 ) - - self.m_staticText12 = wx.StaticText( self, wx.ID_ANY, u"max", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText12.Wrap( -1 ) - fgSizer7.Add( self.m_staticText12, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - self.spin_tvmax = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) - fgSizer7.Add( self.spin_tvmax, 0, wx.ALL, 5 ) - - bSizer7.Add( fgSizer7, 1, wx.EXPAND, 5 ) - - fgSizer51.Add( bSizer7, 1, wx.EXPAND, 5 ) - - self.m_staticline31 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer51.Add( self.m_staticline31, 0, wx.EXPAND, 5 ) - - self.m_staticline32 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer51.Add( self.m_staticline32, 0, wx.EXPAND, 5 ) - - self.m_staticText1011 = wx.StaticText( self, wx.ID_ANY, u"Taille du texte des sommets \nproportionnelle à l'effectif\n(les scores sont normalisés)", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText1011.Wrap( -1 ) - fgSizer51.Add( self.m_staticText1011, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - bSizer71 = wx.BoxSizer( wx.HORIZONTAL ) - - bSizer8 = wx.BoxSizer( wx.VERTICAL ) - - self.check_vcex = wx.CheckBox( self, wx.ID_ANY, u"eff.", wx.DefaultPosition, wx.DefaultSize, 0 ) - bSizer8.Add( self.check_vcex, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - if 'cexfromchi' in self.paramsimi : - - self.checkit = wx.CheckBox( self, wx.ID_ANY, u"chi2", wx.DefaultPosition, wx.DefaultSize, 0 ) - bSizer8.Add( self.checkit, 0, wx.ALL, 5 ) - - bSizer71.Add( bSizer8, 0, wx.ALIGN_CENTER_VERTICAL, 5 ) - - fgSizer71 = wx.FlexGridSizer( 0, 2, 0, 0 ) - fgSizer71.SetFlexibleDirection( wx.BOTH ) - fgSizer71.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) - - self.m_staticText111 = wx.StaticText( self, wx.ID_ANY, u"min", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText111.Wrap( -1 ) - fgSizer71.Add( self.m_staticText111, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - self.spin_vcexmin = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) - fgSizer71.Add( self.spin_vcexmin, 0, wx.ALL, 5 ) - - self.m_staticText121 = wx.StaticText( self, wx.ID_ANY, u"max", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText121.Wrap( -1 ) - fgSizer71.Add( self.m_staticText121, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - self.spin_vcexmax = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) - fgSizer71.Add( self.spin_vcexmax, 0, wx.ALL, 5 ) - - bSizer71.Add( fgSizer71, 1, wx.EXPAND, 5 ) - - fgSizer51.Add( bSizer71, 1, wx.EXPAND, 5 ) - - self.m_staticline321 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer51.Add( self.m_staticline321, 0, wx.EXPAND, 5 ) - - self.m_staticline322 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer51.Add( self.m_staticline322, 0, wx.EXPAND, 5 ) - - self.m_staticText10111 = wx.StaticText( self, wx.ID_ANY, u"Largeur des arêtes\nproportionnelle à l'indice", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText10111.Wrap( -1 ) - fgSizer51.Add( self.m_staticText10111, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - bSizer711 = wx.BoxSizer( wx.HORIZONTAL ) - - self.check3 = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) - bSizer711.Add( self.check3, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - fgSizer711 = wx.FlexGridSizer( 0, 2, 0, 0 ) - fgSizer711.SetFlexibleDirection( wx.BOTH ) - fgSizer711.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) - - self.m_staticText1111 = wx.StaticText( self, wx.ID_ANY, u"min", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText1111.Wrap( -1 ) - fgSizer711.Add( self.m_staticText1111, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - self.spin_temin = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) - fgSizer711.Add( self.spin_temin, 0, wx.ALL, 5 ) - - self.m_staticText1211 = wx.StaticText( self, wx.ID_ANY, u"max", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText1211.Wrap( -1 ) - fgSizer711.Add( self.m_staticText1211, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - self.spin_temax = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) - fgSizer711.Add( self.spin_temax, 0, wx.ALL, 5 ) - - bSizer711.Add( fgSizer711, 1, wx.EXPAND, 5 ) - - fgSizer51.Add( bSizer711, 1, wx.EXPAND, 5 ) - - self.m_staticline33 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer51.Add( self.m_staticline33, 0, wx.EXPAND, 5 ) - - self.m_staticline34 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer51.Add( self.m_staticline34, 0, wx.EXPAND, 5 ) - - self.m_staticText28 = wx.StaticText( self, wx.ID_ANY, u"Gradiant de gris sur les textes en fonction \nde l'effectif (du chi2) (0=noir; 1=blanc)", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText28.Wrap( -1 ) - fgSizer51.Add( self.m_staticText28, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - bSizer10 = wx.BoxSizer( wx.HORIZONTAL ) - - self.m_checkBox14 = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) - bSizer10.Add( self.m_checkBox14, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - bSizer11 = wx.BoxSizer( wx.VERTICAL ) - - bSizer12 = wx.BoxSizer( wx.HORIZONTAL ) - - self.m_staticText31 = wx.StaticText( self, wx.ID_ANY, u"min", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText31.Wrap( -1 ) - bSizer12.Add( self.m_staticText31, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - self.m_spinCtrl14 = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 10, 0 ) - bSizer12.Add( self.m_spinCtrl14, 0, wx.ALL, 5 ) - - bSizer11.Add( bSizer12, 1, wx.EXPAND, 5 ) - - bSizer13 = wx.BoxSizer( wx.HORIZONTAL ) - - self.m_staticText32 = wx.StaticText( self, wx.ID_ANY, u"max", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText32.Wrap( -1 ) - bSizer13.Add( self.m_staticText32, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - self.m_spinCtrl15 = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 10, 10 ) - bSizer13.Add( self.m_spinCtrl15, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - bSizer11.Add( bSizer13, 1, wx.EXPAND, 5 ) - - bSizer10.Add( bSizer11, 1, wx.EXPAND, 5 ) - - fgSizer51.Add( bSizer10, 1, wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 5 ) - - self.m_staticline3311 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer51.Add( self.m_staticline3311, 0, wx.EXPAND |wx.ALL, 5 ) - - self.m_staticline33111 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer51.Add( self.m_staticline33111, 0, wx.EXPAND |wx.ALL, 5 ) - bSizer5 = wx.BoxSizer( wx.HORIZONTAL ) - - self.m_staticText21 = wx.StaticText( self, wx.ID_ANY, u"Couleur des sommets", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText21.Wrap( -1 ) - bSizer5.Add( self.m_staticText21, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.cols = wx.ColourPickerCtrl( self, wx.ID_ANY, wx.Colour( 255, 0, 0 ), wx.DefaultPosition, wx.Size( 10,10 ), wx.CLRP_DEFAULT_STYLE ) - bSizer5.Add( self.cols, 0, wx.ALL, 5 ) - - fgSizer51.Add( bSizer5, 1, wx.EXPAND, 5 ) - - bSizer6 = wx.BoxSizer( wx.HORIZONTAL ) - - self.m_staticText22 = wx.StaticText( self, wx.ID_ANY, u"Couleur des arêtes", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText22.Wrap( -1 ) - bSizer6.Add( self.m_staticText22, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.cola = wx.ColourPickerCtrl( self, wx.ID_ANY, wx.Colour( 208, 208, 208 ), wx.DefaultPosition, wx.DefaultSize, wx.CLRP_DEFAULT_STYLE ) - bSizer6.Add( self.cola, 0, wx.ALL, 5 ) - - fgSizer51.Add( bSizer6, 1, wx.EXPAND, 5 ) - - self.m_staticline331 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer51.Add( self.m_staticline331, 0, wx.EXPAND, 5 ) - - self.m_staticline332 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer51.Add( self.m_staticline332, 0, wx.EXPAND, 5 ) - - self.m_staticText23 = wx.StaticText( self, wx.ID_ANY, u"Taille des sommets unique", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText23.Wrap( -1 ) - fgSizer51.Add( self.m_staticText23, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - bSizer72 = wx.BoxSizer( wx.HORIZONTAL ) - - self.check_s_size = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) - bSizer72.Add( self.check_s_size, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.spin_tv = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 10 ) - bSizer72.Add( self.spin_tv, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - fgSizer51.Add( bSizer72, 1, wx.EXPAND, 5 ) - - self.m_staticline333 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer51.Add( self.m_staticline333, 0, wx.EXPAND, 5 ) - - self.m_staticline334 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer51.Add( self.m_staticline334, 0, wx.EXPAND, 5 ) - - self.m_staticText24 = wx.StaticText( self, wx.ID_ANY, u"Transparence des sphères", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText24.Wrap( -1 ) - fgSizer51.Add( self.m_staticText24, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.slider_sphere = wx.Slider( self, wx.ID_ANY, 10, 0, 100, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL|wx.SL_LABELS ) - fgSizer51.Add( self.slider_sphere, 0, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.m_staticline335 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer51.Add( self.m_staticline335, 0, wx.EXPAND, 5 ) - - self.m_staticline336 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer51.Add( self.m_staticline336, 0, wx.EXPAND, 5 ) - - self.m_staticText25 = wx.StaticText( self, wx.ID_ANY, u"Faire un film", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText25.Wrap( -1 ) - fgSizer51.Add( self.m_staticText25, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.film = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) - fgSizer51.Add( self.film, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - - self.m_staticline2918 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer51.Add( self.m_staticline2918, 0, wx.EXPAND, 5 ) - - self.m_staticline2919 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - fgSizer51.Add( self.m_staticline2919, 0, wx.EXPAND, 5 ) - - - fgSizer51.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 ) - - m_sdbSizer2 = wx.StdDialogButtonSizer() - self.m_sdbSizer2OK = wx.Button( self, wx.ID_OK ) - m_sdbSizer2.AddButton( self.m_sdbSizer2OK ) - self.m_sdbSizer2Cancel = wx.Button( self, wx.ID_CANCEL ) - m_sdbSizer2.AddButton( self.m_sdbSizer2Cancel ) - m_sdbSizer2.Realize(); - fgSizer51.Add( m_sdbSizer2, 1, wx.EXPAND, 5 ) - - fgSizer5.Add( fgSizer51, 1, wx.EXPAND, 5 ) - - self.SetSizer( fgSizer5 ) - self.__set_properties() - - self.Layout() - fgSizer5.Fit( self ) - - self.Centre( wx.BOTH ) - - # Connect Events - if not self.paramsimi['first'] : - self.check_coord.Bind( wx.EVT_CHECKBOX, self.OnKeepCoords ) - self.choice3.Bind( wx.EVT_CHOICE, self.OnChangeType ) - self.check2.Bind( wx.EVT_CHECKBOX, self.OnCheck2 ) - if 'cexfromchi' in self.paramsimi : - self.checkit.Bind( wx.EVT_CHECKBOX, self.OnCheckit ) - if 'sfromchi' in self.paramsimi : - self.checki.Bind( wx.EVT_CHECKBOX, self.OnChecki ) - self.check_vcex.Bind( wx.EVT_CHECKBOX, self.OnCheck_vcex ) - self.check_s_size.Bind( wx.EVT_CHECKBOX, self.OnCheck_s_size ) - - def __set_properties(self): - self.choice1.SetSelection(self.paramsimi['coeff']) - self.choice2.SetSelection(self.paramsimi['layout']) - self.choice3.SetSelection(self.paramsimi['type_graph']) - if self.paramsimi['type'] != 2 : - self.film.Enable(False) - self.slider_sphere.Enable(False) - else : - self.film.Enable(True) - self.slider_sphere.Enable(True) - self.check1.SetValue(self.paramsimi['arbremax']) - self.check_vlab.SetValue(self.paramsimi['label_v']) - self.check_elab.SetValue(self.paramsimi['label_e']) - self.check2.SetValue(self.paramsimi['tvprop']) - self.spin_tv.SetValue(self.paramsimi['coeff_tv_nb']) - self.check_s_size.SetValue(self.paramsimi['coeff_tv']) - self.spin_tvmin.SetValue(self.paramsimi['tvmin']) - self.spin_tvmax.SetValue(self.paramsimi['tvmax']) - self.check3.SetValue(self.paramsimi['coeff_te']) - self.spin_temin.SetValue(self.paramsimi['coeff_temin']) - self.spin_temax.SetValue(self.paramsimi['coeff_temax']) - self.check_vcex.SetValue(self.paramsimi['vcex']) - self.spin_vcexmin.SetValue(self.paramsimi['vcexmin']) - self.spin_vcexmax.SetValue(self.paramsimi['vcexmax']) - self.spin_cex.SetValue(self.paramsimi['cex']) - self.check_seuil.SetValue(self.paramsimi['seuil_ok']) - self.spin_seuil.SetValue(self.paramsimi['seuil']) - self.cols.SetColour(self.paramsimi['cols']) - self.cola.SetColour(self.paramsimi['cola']) - self.spin_width.SetValue(self.paramsimi['width']) - self.spin_height.SetValue(self.paramsimi['height']) - if 'cexfromchi' in self.paramsimi : - self.checkit.SetValue(self.paramsimi['cexfromchi']) - if 'sfromchi' in self.paramsimi : - self.checki.SetValue(self.paramsimi['sfromchi']) - if not self.paramsimi['first'] : - self.check_coord.SetValue(self.paramsimi['keep_coord']) - self.OnKeepCoords(wx.EVT_CHECKBOX) - if self.paramsimi.get('bystar', False) : - self.check_bystar.SetValue(True) - self.stars = self.paramsimi['stars'] - self.slider_sphere.SetValue(self.paramsimi['alpha']) - self.film.SetValue(self.paramsimi['film']) - - def OnCheck_s_size(self, evt): - if self.check_s_size.GetValue() : - if 'cexfromchi' in self.paramsimi : - self.checki.SetValue(False) - self.check2.SetValue(False) - self.spin_tvmin.Enable(False) - self.spin_tvmax.Enable(False) - self.spin_tv.Enable(True) - else : - self.check2.SetValue(True) - self.spin_tvmin.Enable(True) - self.spin_tvmax.Enable(True) - self.spin_tv.Enable(False) - - def OnCheck2(self, evt): - if self.check2.GetValue(): - self.check_s_size.SetValue(False) - if 'cexfromchi' in self.paramsimi : - self.checki.SetValue(False) - self.spin_tvmin.Enable(True) - self.spin_tvmax.Enable(True) - self.spin_tv.Enable(False) - else : - self.check_s_size.SetValue(True) - self.spin_tvmin.Enable(False) - self.spin_tvmax.Enable(False) - self.spin_tv.Enable(True) - - def OnChecki(self, evt): - if 'sfromchi' in self.paramsimi : - if self.checki.GetValue() : - self.check_s_size.SetValue(False) - self.check2.SetValue(False) - self.spin_tvmin.Enable(True) - self.spin_tvmax.Enable(True) - self.spin_tv.Enable(False) - else : - self.check_s_size.SetValue(True) - #self.check2.SetValue(True) - self.spin_tvmin.Enable(False) - self.spin_tvmax.Enable(False) - self.spin_tv.Enable(True) - - def OnCheckit(self,evt) : - if 'cexfromchi' in self.paramsimi : - if self.checkit.GetValue() : - if self.check_vcex.GetValue() : - self.check_vcex.SetValue(False) - - def OnCheck_vcex(self, evt): - if self.check_vcex.GetValue() : - if 'checkit' in dir(self) : - if self.checkit.GetValue() : - self.checkit.SetValue(False) - - def OnChangeType(self, event) : - if event.GetInt() != 1 : - self.spin_width.Enable(False) - self.spin_height.Enable(False) - else : - self.spin_width.Enable(True) - self.spin_height.Enable(True) - if event.GetInt() != 2 : - self.film.Enable(False) - self.slider_sphere.Enable(False) - else : - self.film.Enable(True) - self.slider_sphere.Enable(True) - - def OnKeepCoords(self, event): - if self.check_coord.GetValue() : - self.choice1.SetSelection(self.paramsimi['coeff']) - self.choice2.SetSelection(self.paramsimi['layout']) - self.check_seuil.SetValue(self.paramsimi['seuil_ok']) - self.spin_seuil.SetValue(self.paramsimi['seuil']) - self.choice1.Disable() - self.choice2.Disable() - self.check_seuil.Disable() - self.spin_seuil.Disable() - self.check_colch.SetValue(False) - self.check_colch.Disable() - else : - self.choice1.Enable(True) - self.choice2.Enable(True) - self.check_seuil.Enable(True) - self.spin_seuil.Enable(True) - self.check_colch.Enable(True) class SelectColDial ( wx.Dialog ): @@ -1540,7 +917,8 @@ class SelectColDial ( wx.Dialog ): #bSizer2.Add( self.m_checkList2, 2, wx.ALL|wx.EXPAND, 5 ) self.m_sdbSizer2 = wx.StdDialogButtonSizer() - self.m_sdbSizer2OK = wx.Button( self, wx.ID_OK ) + self.m_sdbSizer2OK = wx.Button( self, wx.ID_CANCEL) + self.butok = wx.Button( self, wx.ID_OK) #m_sdbSizer2.AddButton( self.m_sdbSizer2OK ) #self.m_sdbSizer2Cancel = wx.Button( self, wx.ID_CANCEL ) #m_sdbSizer2.AddButton( self.m_sdbSizer2Cancel ) @@ -2333,8 +1711,8 @@ class OptLexi(wx.Dialog): wx.Dialog.__init__(self, *args, **kwds) self.listet = None self.variables = None - self.labellem = wx.StaticText(self, -1, u"Lemmatisation : ") - self.checklem = wx.CheckBox(self, -1) + #self.labellem = wx.StaticText(self, -1, u"Lemmatisation : ") + #self.checklem = wx.CheckBox(self, -1) 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") @@ -2363,8 +1741,8 @@ class OptLexi(wx.Dialog): sizer_1 = wx.BoxSizer(wx.VERTICAL) sizer_2 = wx.FlexGridSizer(2,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) + #sizer_2.Add(self.labellem, 0, wx.ALIGN_CENTER_VERTICAL, 3) + #sizer_2.Add(self.checklem, 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) diff --git a/functions.py b/functions.py index b76de83..e575359 100644 --- a/functions.py +++ b/functions.py @@ -20,6 +20,7 @@ import locale import datetime from copy import copy from shutil import copyfile +import shelve #from dialog import BugDialog import logging @@ -35,76 +36,116 @@ class History : self.syscoding = syscoding self.corpora = {} self.openedcorpus = {} + self.orph = [] self.analyses = {} - self.history = {} + self.history = [] self.opened = {} self.read() def read(self) : - self.conf = DoConf(self.filein) - self.order = {} - self.ordera = {} - for i, section in enumerate(self.conf.conf.sections()) : - if self.conf.conf.has_option(section, 'corpus_name') : - self.corpora[section] = self.conf.getoptions(section) - self.order[len(self.order)] = section - else : - self.analyses[section] = self.conf.getoptions(section) - self.ordera[len(self.ordera)] = section - todel = [] - for corpus in self.corpora : - self.history[corpus] = copy(self.corpora[corpus]) - for analyse in self.analyses : - if self.analyses[analyse]['corpus'] in self.corpora : - if 'analyses' in self.history[self.analyses[analyse]['corpus']] : - self.history[self.analyses[analyse]['corpus']]['analyses'].append(self.analyses[analyse]) - todel.append(analyse) - else : - self.history[self.analyses[analyse]['corpus']]['analyses'] = [self.analyses[analyse]] - todel.append(analyse) - else : - self.history[analyse] = self.analyses[analyse] - #for analyse in todel : - # del self.analyses[analyse] - + d = shelve.open(self.filein) + self.history = d.get('history', []) + self.ordercorpus = dict([[corpus['uuid'], i] for i, corpus in enumerate(self.history)]) + self.corpus = dict([[corpus['uuid'], corpus] for i, corpus in enumerate(self.history)]) + self.analyses = dict([[analyse['uuid'], analyse] for corpus in self.history for analyse in corpus.get('analyses', [])]) + #corpusorder = d.get('corpusorder',[]) + #self.analyseorder = d['analyseorder'] + #self.order = [uuid for uuid in self.history] + #self.order = dict([[i, uuid] for i, uuid in enumerate(self.order)]) + #self.order = dict([[i, corpus] for i, corpus in enumerate(corpusorder)]) + #for uuid in self.history : + # if 'corpus_name' in self.history[uuid] : + # self.corpora[uuid] = self.history[uuid] + d.close() + +# def read(self) : +# self.conf = DoConf(self.filein) +# self.order = {} +# self.ordera = {} +# for i, section in enumerate(self.conf.conf.sections()) : +# if self.conf.conf.has_option(section, 'corpus_name') : +# self.corpora[section] = self.conf.getoptions(section) +# self.order[len(self.order)] = section +# else : +# self.analyses[section] = self.conf.getoptions(section) +# self.ordera[len(self.ordera)] = section +# todel = [] +# for corpus in self.corpora : +# self.history[corpus] = copy(self.corpora[corpus]) +# for analyse in self.analyses : +# if self.analyses[analyse]['corpus'] in self.corpora : +# if 'analyses' in self.history[self.analyses[analyse]['corpus']] : +# self.history[self.analyses[analyse]['corpus']]['analyses'].append(self.analyses[analyse]) +# todel.append(analyse) +# else : +# self.history[self.analyses[analyse]['corpus']]['analyses'] = [self.analyses[analyse]] +# todel.append(analyse) +# else : +# self.history[analyse] = self.analyses[analyse] +# #for analyse in todel : +# # del self.analyses[analyse] def write(self) : - sections = self.corpora.keys() + self.analyses.keys() - parametres = [self.corpora[key] for key in self.corpora.keys()] + [self.analyses[key] for key in self.analyses.keys()] - self.conf.makeoptions(sections, parametres) - log.info('write history') + d = shelve.open(self.filein) + d['history'] = self.history + #order = [i for i in self.order] + #order.sort() + #d['corpusorder'] = [self.order[i] for i in order] + d.close() + +# def write(self) : +# sections = self.corpora.keys() + self.analyses.keys() +# parametres = [self.corpora[key] for key in self.corpora.keys()] + [self.analyses[key] for key in self.analyses.keys()] +# self.conf.makeoptions(sections, parametres) +# log.info('write history') +# def add(self, analyse) : + log.info('add to history %s' % analyse.get('corpus_name', 'pas un corpus')) tosave = {'uuid' : analyse['uuid'], 'ira': analyse['ira'], 'type' : analyse['type']} if analyse.get('corpus', False) : + if analyse['uuid'] in self.analyses : + return tosave['corpus'] = analyse['corpus'] tosave['name'] = analyse['name'] acorpus_uuid = analyse['corpus'] - if acorpus_uuid in self.corpora : - if 'analyses' in self.history[acorpus_uuid] : - self.history[acorpus_uuid]['analyses'].append(tosave) + if acorpus_uuid in self.ordercorpus : + if 'analyses' in self.history[self.ordercorpus[acorpus_uuid]] : + self.history[self.ordercorpus[acorpus_uuid]]['analyses'].append(tosave) else : - self.history[acorpus_uuid]['analyses'] = [tosave] - self.analyses[analyse['uuid']] = tosave + self.history[self.ordercorpus[acorpus_uuid]]['analyses'] = [tosave] + #self.analyses[analyse['uuid']] = tosave else : - self.analyses[analyse['uuid']] = tosave - elif 'corpus_name' in analyse : + self.orph.append(tosave) + #self.order[len(self.order)] = analyse['uuid'] + #self.analyses[analyse['uuid']] = tosave + else : tosave['corpus_name'] = analyse['corpus_name'] - self.history[analyse['uuid']] = tosave - self.corpora[analyse['uuid']] = tosave + self.history.append(tosave) + #self.order[len(self.order)] = analyse['uuid'] + #self.corpora[analyse['uuid']] = tosave self.write() + self.read() - def delete(self, uuid, corpus = False) : + def delete(self, analyse, corpus = False) : if corpus : - del self.corpora[uuid] - self.conf.conf.remove_section(uuid) - for analyse in self.history[uuid].get('analyses', [False]) : - if analyse : - del self.analyses[analyse['uuid']] - self.conf.conf.remove_section(analyse['uuid']) + #del self.history[uuid] + self.history.pop(self.ordercorpus[analyse['uuid']]) + #todel = [i for i in self.order if self.order[i] == uuid] + #del self.order[todel[0]] + #del self.corpora[uuid] + #del self.corpora[uuid] + #self.conf.conf.remove_section(uuid) + #for analyse in self.history[uuid].get('analyses', [False]) : + # if analyse : + # del self.analyses[analyse['uuid']] + # self.conf.conf.remove_section(analyse['uuid']) else : - del self.analyses[uuid] - self.conf.conf.remove_section(uuid) + todel = [i for i, ana in enumerate(self.corpus[analyse['corpus']]['analyses']) if ana['uuid'] == analyse['uuid']][0] + self.history[self.ordercorpus[analyse['corpus']]]['analyses'].pop(todel) + #del self.analyses[uuid] + #self.conf.conf.remove_section(uuid) self.write() + self.read() def addtab(self, analyse) : self.opened[analyse['uuid']] = analyse @@ -144,6 +185,8 @@ class DoConf : parametres[option] = True elif self.conf.get(section, option).startswith('(') and self.conf.get(section, option).endswith(')') : parametres[option] = ast.literal_eval(self.conf.get(section, option)) + elif self.conf.get(section, option).startswith('[') and self.conf.get(section, option).endswith(']') : + parametres[option] = ast.literal_eval(self.conf.get(section, option)) else : parametres[option] = self.conf.get(section, option) if 'type' not in parametres : diff --git a/guifunct.py b/guifunct.py index 981f58b..1302fbc 100644 --- a/guifunct.py +++ b/guifunct.py @@ -122,6 +122,7 @@ class SelectColumn : listcol = ListForSpec(dial, self, dictcol, ['forme', 'eff']) dial.bSizer2.Add( listcol, 2, wx.ALL|wx.EXPAND, 5 ) dial.m_sdbSizer2.AddButton( dial.m_sdbSizer2OK ) + dial.m_sdbSizer2.AddButton( dial.butok) dial.m_sdbSizer2.Realize() dial.bSizer2.Add( dial.m_sdbSizer2, 0, wx.EXPAND, 5 ) dial.Layout() @@ -134,26 +135,1192 @@ class SelectColumn : listcol.Select(orderlex[actives[row]]) dial.CenterOnParent() val = dial.ShowModal() - last = listcol.GetFirstSelected() - lastl = [listcol.GetFirstSelected()] - indexes = [listcol.getColumnText(listcol.GetFirstSelected(),0)] - while listcol.GetNextSelected(last) != -1: - last = listcol.GetNextSelected(last) - lastl.append(last) - indexes.append(listcol.getColumnText(last,0)) - dial.Destroy() - column = [actives.index(val) for val in indexes] - column.sort() - with open(pathout, 'w') as f : - f.write('\n'.join([`val` for val in column])) + if val == wx.ID_OK : + last = listcol.GetFirstSelected() + lastl = [listcol.GetFirstSelected()] + indexes = [listcol.getColumnText(listcol.GetFirstSelected(),0)] + while listcol.GetNextSelected(last) != -1: + last = listcol.GetNextSelected(last) + lastl.append(last) + indexes.append(listcol.getColumnText(last,0)) + dial.Destroy() + column = [actives.index(val) for val in indexes] + column.sort() + with open(pathout, 'w') as f : + f.write('\n'.join([`val` for val in column])) + self.ok = True + else : + self.ok = False else : + if selected is None : + selected = [i for i in range(0, len(actives))] with open(pathout, 'w') as f : - f.write('\n'.join([`i` for i in range(0,len(actives))])) + f.write('\n'.join([`i` for i in selected])) + + +class PrefSimi ( wx.Dialog ): + + def __init__( self, parent, ID, paramsimi, indices, wordlist = None, selected = None, actives = None): + wx.Dialog.__init__ ( self, None, id = wx.ID_ANY, title = u"Paramètres", pos = wx.DefaultPosition, size = wx.Size( -1,-1 ), style = wx.DEFAULT_DIALOG_STYLE ) + self.parent = parent + self.ira = parent + self.paramsimi=paramsimi + self.indices = indices + + self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize ) + + bSizer16 = wx.BoxSizer( wx.HORIZONTAL ) + if wordlist is not None : + self.listcol = ListForSpec(self, self, wordlist, ['forme', 'eff']) + self.listcol.SetMinSize( wx.Size( 270,-1 ) ) + bSizer16.Add( self.listcol, 0, wx.ALL|wx.EXPAND, 5 ) + if selected is None : + for row in xrange(self.listcol.GetItemCount()): + self.listcol.Select(row) + else : + self.orderlex = dict([[self.listcol.getColumnText(i,0),i] for i in range(0,self.listcol.GetItemCount())]) + for row in selected : + self.listcol.Select(self.orderlex[actives[row]]) + + + fgSizer10 = wx.FlexGridSizer( 2, 1, 0, 0 ) + fgSizer10.SetFlexibleDirection( wx.BOTH ) + fgSizer10.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) + + self.m_notebook1 = wx.Notebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_panel2 = wx.Panel( self.m_notebook1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL ) + bSizer18 = wx.BoxSizer( wx.VERTICAL ) + + fgSizer3 = wx.FlexGridSizer( 0, 2, 0, 0 ) + fgSizer3.SetFlexibleDirection( wx.BOTH ) + fgSizer3.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) + + if not self.paramsimi['first'] : + + self.m_staticText271 = wx.StaticText( self.m_panel2, wx.ID_ANY, u"Utiliser les coordonnées\nprécédentes", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText271.Wrap( -1 ) + fgSizer3.Add( self.m_staticText271, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.check_coord = wx.CheckBox( self.m_panel2, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + fgSizer3.Add( self.check_coord, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.m_staticline36 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline36, 0, wx.EXPAND, 5 ) + + self.m_staticline37 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline37, 0, wx.EXPAND, 5 ) + + self.m_staticText3 = wx.StaticText( self.m_panel2, wx.ID_ANY, u"Indice", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText3.Wrap( -1 ) + fgSizer3.Add( self.m_staticText3, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + choice1Choices = [] + self.choice1 = wx.Choice( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, self.indices, 0 ) + self.choice1.SetSelection( 0 ) + fgSizer3.Add( self.choice1, 0, wx.ALL, 5 ) + + self.m_staticline293 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline293, 0, wx.EXPAND, 5 ) + + self.m_staticline292 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline292, 0, wx.EXPAND, 5 ) + + self.m_staticText4 = wx.StaticText( self.m_panel2, wx.ID_ANY, u"Layout", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText4.Wrap( -1 ) + fgSizer3.Add( self.m_staticText4, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + choice2Choices = [ u"random", u"cercle", u"fruchterman reingold", u"kamada kawai", u"graphopt" ] + self.choice2 = wx.Choice( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, choice2Choices, 0 ) + self.choice2.SetSelection( 0 ) + fgSizer3.Add( self.choice2, 0, wx.ALL, 5 ) + + self.m_staticline294 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline294, 0, wx.EXPAND, 5 ) + + self.m_staticline295 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline295, 0, wx.EXPAND, 5 ) + + self.m_staticText5 = wx.StaticText( self.m_panel2, wx.ID_ANY, u"Type de graph", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText5.Wrap( -1 ) + fgSizer3.Add( self.m_staticText5, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + choice3Choices = [ u"dynamique", u"statique", u"3D" ] + self.choice3 = wx.Choice( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, choice3Choices, 0 ) + self.choice3.SetSelection( 0 ) + fgSizer3.Add( self.choice3, 0, wx.ALL, 5 ) + + self.m_staticline296 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline296, 0, wx.EXPAND, 5 ) + + self.m_staticline297 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline297, 0, wx.EXPAND, 5 ) + + self.m_staticText8 = wx.StaticText( self.m_panel2, wx.ID_ANY, u"Arbre maximum", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText8.Wrap( -1 ) + fgSizer3.Add( self.m_staticText8, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.check1 = wx.CheckBox( self.m_panel2, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + fgSizer3.Add( self.check1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.m_staticline298 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline298, 0, wx.EXPAND, 5 ) + + self.m_staticline299 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline299, 0, wx.EXPAND, 5 ) + + self.m_staticText91 = wx.StaticText( self.m_panel2, wx.ID_ANY, u"Graph à seuil", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText91.Wrap( -1 ) + fgSizer3.Add( self.m_staticText91, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + bSizer21 = wx.BoxSizer( wx.HORIZONTAL ) + + self.check_seuil = wx.CheckBox( self.m_panel2, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + bSizer21.Add( self.check_seuil, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.spin_seuil = wx.SpinCtrl( self.m_panel2, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 1, 10000, 1 ) + bSizer21.Add( self.spin_seuil, 0, wx.ALL, 5 ) + + + fgSizer3.Add( bSizer21, 1, wx.EXPAND, 5 ) + + self.m_staticline2910 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline2910, 0, wx.EXPAND, 5 ) + + self.m_staticline2911 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline2911, 0, wx.EXPAND, 5 ) + + self.m_staticText19 = wx.StaticText( self.m_panel2, wx.ID_ANY, u"Texte sur les sommets", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText19.Wrap( -1 ) + fgSizer3.Add( self.m_staticText19, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.check_vlab = wx.CheckBox( self.m_panel2, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + fgSizer3.Add( self.check_vlab, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.m_staticline2912 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline2912, 0, wx.EXPAND, 5 ) + + self.m_staticline2913 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline2913, 0, wx.EXPAND, 5 ) + + self.m_staticText20 = wx.StaticText( self.m_panel2, wx.ID_ANY, u"Indices sur les arêtes", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText20.Wrap( -1 ) + fgSizer3.Add( self.m_staticText20, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.check_elab = wx.CheckBox( self.m_panel2, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + fgSizer3.Add( self.check_elab, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.m_staticline2914 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline2914, 0, wx.EXPAND, 5 ) + + self.m_staticline2915 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline2915, 0, wx.EXPAND, 5 ) + + self.m_staticText27 = wx.StaticText( self.m_panel2, wx.ID_ANY, u"Taille du texte", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText27.Wrap( -1 ) + fgSizer3.Add( self.m_staticText27, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.spin_cex = wx.SpinCtrl( self.m_panel2, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 10 ) + fgSizer3.Add( self.spin_cex, 0, wx.ALL, 5 ) + + self.m_staticline2916 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline2916, 0, wx.EXPAND, 5 ) + + self.m_staticline2917 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline2917, 0, wx.EXPAND, 5 ) + + if 'bystar' in self.paramsimi : + self.m_staticText40 = wx.StaticText( self.m_panel2, wx.ID_ANY, u"Sélectionner une variable", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText40.Wrap( -1 ) + fgSizer3.Add( self.m_staticText40, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.check_bystar = wx.CheckBox( self.m_panel2, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + fgSizer3.Add( self.check_bystar, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.m_staticline3200 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline3200, 0, wx.EXPAND, 5 ) + self.m_staticline3201 = wx.StaticLine( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer3.Add( self.m_staticline3201, 0, wx.EXPAND, 5 ) + + + bSizer18.Add( fgSizer3, 0, wx.EXPAND, 5 ) + + + self.m_panel2.SetSizer( bSizer18 ) + self.m_panel2.Layout() + bSizer18.Fit( self.m_panel2 ) + self.m_notebook1.AddPage( self.m_panel2, u"Paramètres du graph", True ) + self.m_panel3 = wx.Panel( self.m_notebook1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL ) + fgSizer5 = wx.FlexGridSizer( 0, 3, 0, 0 ) + fgSizer5.SetFlexibleDirection( wx.BOTH ) + fgSizer5.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) + + fgSizer51 = wx.FlexGridSizer( 0, 2, 0, 0 ) + fgSizer51.SetFlexibleDirection( wx.BOTH ) + fgSizer51.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) + + self.m_staticText6 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"Taille du graphique", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText6.Wrap( -1 ) + fgSizer51.Add( self.m_staticText6, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + fgSizer31 = wx.FlexGridSizer( 0, 2, 0, 0 ) + fgSizer31.SetFlexibleDirection( wx.BOTH ) + fgSizer31.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) + + self.m_staticText9 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"hauteur", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText9.Wrap( -1 ) + fgSizer31.Add( self.m_staticText9, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + self.spin_height = wx.SpinCtrl( self.m_panel3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 10, 100000, 800 ) + fgSizer31.Add( self.spin_height, 0, wx.ALL, 5 ) + + self.m_staticText10 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"largeur", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText10.Wrap( -1 ) + fgSizer31.Add( self.m_staticText10, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + self.spin_width = wx.SpinCtrl( self.m_panel3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 10, 100000, 800 ) + fgSizer31.Add( self.spin_width, 0, wx.ALL, 5 ) + + + fgSizer51.Add( fgSizer31, 1, wx.EXPAND, 5 ) + + self.m_staticline3 = wx.StaticLine( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer51.Add( self.m_staticline3, 0, wx.EXPAND, 5 ) + + self.m_staticline4 = wx.StaticLine( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer51.Add( self.m_staticline4, 0, wx.EXPAND, 5 ) + + self.m_staticText101 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"Taille des sommets \nproportionnelle à l'effectif\n(les scores sont normalisés)", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText101.Wrap( -1 ) + fgSizer51.Add( self.m_staticText101, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + bSizer7 = wx.BoxSizer( wx.HORIZONTAL ) + + bSizer9 = wx.BoxSizer( wx.VERTICAL ) + + self.check2 = wx.CheckBox( self.m_panel3, wx.ID_ANY, u"eff.", wx.DefaultPosition, wx.DefaultSize, 0 ) + bSizer9.Add( self.check2, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + self.checki = wx.CheckBox( self.m_panel3, wx.ID_ANY, u"chi2", wx.DefaultPosition, wx.DefaultSize, 0 ) + bSizer9.Add( self.checki, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + + bSizer7.Add( bSizer9, 0, wx.ALIGN_CENTER_VERTICAL, 5 ) + + fgSizer7 = wx.FlexGridSizer( 0, 2, 0, 0 ) + fgSizer7.SetFlexibleDirection( wx.BOTH ) + fgSizer7.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) + + self.m_staticText11 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"min", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText11.Wrap( -1 ) + fgSizer7.Add( self.m_staticText11, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + self.spin_tvmin = wx.SpinCtrl( self.m_panel3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) + fgSizer7.Add( self.spin_tvmin, 0, wx.ALL, 5 ) + + self.m_staticText12 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"max", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText12.Wrap( -1 ) + fgSizer7.Add( self.m_staticText12, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + self.spin_tvmax = wx.SpinCtrl( self.m_panel3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) + fgSizer7.Add( self.spin_tvmax, 0, wx.ALL, 5 ) + + + bSizer7.Add( fgSizer7, 1, wx.EXPAND, 5 ) + + + fgSizer51.Add( bSizer7, 1, wx.EXPAND, 5 ) + + self.m_staticline31 = wx.StaticLine( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer51.Add( self.m_staticline31, 0, wx.EXPAND, 5 ) + + self.m_staticline32 = wx.StaticLine( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer51.Add( self.m_staticline32, 0, wx.EXPAND, 5 ) + + self.m_staticText1011 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"Taille du texte des sommets \nproportionnelle à l'effectif\n(les scores sont normalisés)", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText1011.Wrap( -1 ) + fgSizer51.Add( self.m_staticText1011, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + bSizer71 = wx.BoxSizer( wx.HORIZONTAL ) + + bSizer8 = wx.BoxSizer( wx.VERTICAL ) + + self.check_vcex = wx.CheckBox( self.m_panel3, wx.ID_ANY, u"eff.", wx.DefaultPosition, wx.DefaultSize, 0 ) + bSizer8.Add( self.check_vcex, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + self.checkit = wx.CheckBox( self.m_panel3, wx.ID_ANY, u"chi2", wx.DefaultPosition, wx.DefaultSize, 0 ) + bSizer8.Add( self.checkit, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + + bSizer71.Add( bSizer8, 0, wx.ALIGN_CENTER_VERTICAL, 5 ) + + fgSizer71 = wx.FlexGridSizer( 0, 2, 0, 0 ) + fgSizer71.SetFlexibleDirection( wx.BOTH ) + fgSizer71.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) + + self.m_staticText111 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"min", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText111.Wrap( -1 ) + fgSizer71.Add( self.m_staticText111, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + self.spin_vcexmin = wx.SpinCtrl( self.m_panel3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) + fgSizer71.Add( self.spin_vcexmin, 0, wx.ALL, 5 ) + + self.m_staticText121 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"max", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText121.Wrap( -1 ) + fgSizer71.Add( self.m_staticText121, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + self.spin_vcexmax = wx.SpinCtrl( self.m_panel3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) + fgSizer71.Add( self.spin_vcexmax, 0, wx.ALL, 5 ) + + + bSizer71.Add( fgSizer71, 1, wx.EXPAND, 5 ) + + + fgSizer51.Add( bSizer71, 1, wx.EXPAND, 5 ) + + self.m_staticline321 = wx.StaticLine( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer51.Add( self.m_staticline321, 0, wx.EXPAND, 5 ) + + self.m_staticline322 = wx.StaticLine( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer51.Add( self.m_staticline322, 0, wx.EXPAND, 5 ) + + self.m_staticText10111 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"Largeur des arêtes\nproportionnelle à l'indice", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText10111.Wrap( -1 ) + fgSizer51.Add( self.m_staticText10111, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + bSizer711 = wx.BoxSizer( wx.HORIZONTAL ) + + self.check3 = wx.CheckBox( self.m_panel3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + bSizer711.Add( self.check3, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + fgSizer711 = wx.FlexGridSizer( 0, 2, 0, 0 ) + fgSizer711.SetFlexibleDirection( wx.BOTH ) + fgSizer711.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) + + self.m_staticText1111 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"min", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText1111.Wrap( -1 ) + fgSizer711.Add( self.m_staticText1111, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + self.spin_temin = wx.SpinCtrl( self.m_panel3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) + fgSizer711.Add( self.spin_temin, 0, wx.ALL, 5 ) + + self.m_staticText1211 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"max", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText1211.Wrap( -1 ) + fgSizer711.Add( self.m_staticText1211, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + self.spin_temax = wx.SpinCtrl( self.m_panel3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) + fgSizer711.Add( self.spin_temax, 0, wx.ALL, 5 ) + + + bSizer711.Add( fgSizer711, 1, wx.EXPAND, 5 ) + + + fgSizer51.Add( bSizer711, 1, wx.EXPAND, 5 ) + + self.m_staticline33 = wx.StaticLine( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer51.Add( self.m_staticline33, 0, wx.EXPAND, 5 ) + + self.m_staticline34 = wx.StaticLine( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer51.Add( self.m_staticline34, 0, wx.EXPAND, 5 ) + + self.m_staticText28 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"Gradiant de gris sur les textes en fonction \nde l'effectif (du chi2) (0=noir; 1=blanc)", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText28.Wrap( -1 ) + fgSizer51.Add( self.m_staticText28, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + bSizer10 = wx.BoxSizer( wx.HORIZONTAL ) + + self.m_checkBox14 = wx.CheckBox( self.m_panel3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + bSizer10.Add( self.m_checkBox14, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + bSizer11 = wx.BoxSizer( wx.VERTICAL ) + + bSizer12 = wx.BoxSizer( wx.HORIZONTAL ) + + self.m_staticText31 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"min", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText31.Wrap( -1 ) + bSizer12.Add( self.m_staticText31, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + self.m_spinCtrl14 = wx.SpinCtrl( self.m_panel3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) + bSizer12.Add( self.m_spinCtrl14, 0, wx.ALL, 5 ) + + + bSizer11.Add( bSizer12, 1, wx.EXPAND, 5 ) + + bSizer13 = wx.BoxSizer( wx.HORIZONTAL ) + + self.m_staticText32 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"max", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText32.Wrap( -1 ) + bSizer13.Add( self.m_staticText32, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + + self.m_spinCtrl15 = wx.SpinCtrl( self.m_panel3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 10 ) + bSizer13.Add( self.m_spinCtrl15, 0, wx.ALL, 5 ) + + + bSizer11.Add( bSizer13, 1, wx.EXPAND, 5 ) + + + bSizer10.Add( bSizer11, 1, wx.EXPAND, 5 ) + + + fgSizer51.Add( bSizer10, 1, wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 5 ) + + self.m_staticline3311 = wx.StaticLine( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer51.Add( self.m_staticline3311, 0, wx.EXPAND |wx.ALL, 5 ) + + self.m_staticline33111 = wx.StaticLine( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer51.Add( self.m_staticline33111, 0, wx.EXPAND |wx.ALL, 5 ) + + bSizer5 = wx.BoxSizer( wx.HORIZONTAL ) + + self.m_staticText21 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"Couleur des sommets", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText21.Wrap( -1 ) + bSizer5.Add( self.m_staticText21, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.cols = wx.ColourPickerCtrl( self.m_panel3, wx.ID_ANY, wx.Colour( 255, 0, 0 ), wx.DefaultPosition, wx.Size( 10,10 ), wx.CLRP_DEFAULT_STYLE ) + bSizer5.Add( self.cols, 0, wx.ALL, 5 ) + + + fgSizer51.Add( bSizer5, 1, wx.EXPAND, 5 ) + + bSizer6 = wx.BoxSizer( wx.HORIZONTAL ) + + self.m_staticText22 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"Couleur des arêtes", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText22.Wrap( -1 ) + bSizer6.Add( self.m_staticText22, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.cola = wx.ColourPickerCtrl( self.m_panel3, wx.ID_ANY, wx.Colour( 208, 208, 208 ), wx.DefaultPosition, wx.DefaultSize, wx.CLRP_DEFAULT_STYLE ) + bSizer6.Add( self.cola, 0, wx.ALL, 5 ) + + + fgSizer51.Add( bSizer6, 1, wx.EXPAND, 5 ) + + self.m_staticline331 = wx.StaticLine( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer51.Add( self.m_staticline331, 0, wx.EXPAND, 5 ) + + self.m_staticline332 = wx.StaticLine( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer51.Add( self.m_staticline332, 0, wx.EXPAND, 5 ) + + self.m_staticText23 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"Taille des sommets unique", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText23.Wrap( -1 ) + fgSizer51.Add( self.m_staticText23, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + bSizer72 = wx.BoxSizer( wx.HORIZONTAL ) + + self.check_s_size = wx.CheckBox( self.m_panel3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + bSizer72.Add( self.check_s_size, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.spin_tv = wx.SpinCtrl( self.m_panel3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 10 ) + bSizer72.Add( self.spin_tv, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + + fgSizer51.Add( bSizer72, 1, wx.EXPAND, 5 ) + + self.m_staticline333 = wx.StaticLine( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer51.Add( self.m_staticline333, 0, wx.EXPAND, 5 ) + + self.m_staticline334 = wx.StaticLine( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer51.Add( self.m_staticline334, 0, wx.EXPAND, 5 ) + + self.m_staticText24 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"Transparence des sphères", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText24.Wrap( -1 ) + fgSizer51.Add( self.m_staticText24, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.slider_sphere = wx.Slider( self.m_panel3, wx.ID_ANY, 10, 0, 100, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL|wx.SL_LABELS ) + fgSizer51.Add( self.slider_sphere, 0, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.m_staticline335 = wx.StaticLine( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer51.Add( self.m_staticline335, 0, wx.EXPAND, 5 ) + + self.m_staticline336 = wx.StaticLine( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer51.Add( self.m_staticline336, 0, wx.EXPAND, 5 ) + + self.m_staticText25 = wx.StaticText( self.m_panel3, wx.ID_ANY, u"Faire un film", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText25.Wrap( -1 ) + fgSizer51.Add( self.m_staticText25, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.film = wx.CheckBox( self.m_panel3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + fgSizer51.Add( self.film, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + self.m_staticline2918 = wx.StaticLine( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer51.Add( self.m_staticline2918, 0, wx.EXPAND, 5 ) + + self.m_staticline2919 = wx.StaticLine( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + fgSizer51.Add( self.m_staticline2919, 0, wx.EXPAND, 5 ) + + + fgSizer51.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 ) + + + fgSizer5.Add( fgSizer51, 1, wx.EXPAND, 5 ) + + + self.m_panel3.SetSizer( fgSizer5 ) + self.m_panel3.Layout() + fgSizer5.Fit( self.m_panel3 ) + self.m_notebook1.AddPage( self.m_panel3, u"Paramètres graphiques", False ) + + fgSizer10.Add( self.m_notebook1, 1, wx.EXPAND |wx.ALL, 5 ) + + m_sdbSizer2 = wx.StdDialogButtonSizer() + self.m_sdbSizer2OK = wx.Button( self, wx.ID_OK ) + m_sdbSizer2.AddButton( self.m_sdbSizer2OK ) + self.m_sdbSizer2Cancel = wx.Button( self, wx.ID_CANCEL ) + m_sdbSizer2.AddButton( self.m_sdbSizer2Cancel ) + m_sdbSizer2.Realize(); + + fgSizer10.Add( m_sdbSizer2, 1, wx.EXPAND, 5 ) + + + bSizer16.Add( fgSizer10, 1, wx.EXPAND, 5 ) + + + self.SetSizer( bSizer16 ) + self.Layout() + bSizer16.Fit( self ) + + self.Centre( wx.BOTH ) + self.__set_properties() + + # Connect Events + if not self.paramsimi['first'] : + self.check_coord.Bind( wx.EVT_CHECKBOX, self.OnKeepCoords ) + self.choice3.Bind( wx.EVT_CHOICE, self.OnChangeType ) + self.check2.Bind( wx.EVT_CHECKBOX, self.OnCheck2 ) + self.checki.Bind( wx.EVT_CHECKBOX, self.OnChecki ) + self.check_vcex.Bind( wx.EVT_CHECKBOX, self.OnCheck_vcex ) + self.checkit.Bind( wx.EVT_CHECKBOX, self.OnCheckit ) + self.check_s_size.Bind( wx.EVT_CHECKBOX, self.OnCheck_s_size ) + +# self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize ) +# +# bSizer16 = wx.BoxSizer( wx.HORIZONTAL ) +# if wordlist is not None : +# liscol = ListForSpec(dial, self, wordlist, ['forme', 'eff']) +# bSizer16.Add(liscol, 0, wx.ALL| wx.EXPAND, 5 ) +# +# self.m_notebook1 = wx.Notebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_panel2 = wx.Panel( self.m_notebook1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL ) +# +# bSizer18 = wx.BoxSizer( wx.VERTICAL ) +# fgSizer5 = wx.FlexGridSizer( 0, 3, 0, 0 ) +# fgSizer5.SetFlexibleDirection( wx.BOTH ) +# fgSizer5.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) +# +# fgSizer3 = wx.FlexGridSizer( 0, 2, 0, 0 ) +# fgSizer3.SetFlexibleDirection( wx.BOTH ) +# fgSizer3.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) +# +# #self.m_staticText1 = wx.StaticText( self, wx.ID_ANY, u"Sélectionner les colonnes", wx.DefaultPosition, wx.DefaultSize, 0 ) +# #self.m_staticText1.Wrap( -1 ) +# #fgSizer3.Add( self.m_staticText1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# #self.check_colch = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) +# #fgSizer3.Add( self.check_colch, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.m_staticline29 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline29, 0, wx.EXPAND, 5 ) +# +# self.m_staticline291 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline291, 0, wx.EXPAND, 5 ) +# if not self.paramsimi['first'] : +# +# self.m_staticText271 = wx.StaticText( self, wx.ID_ANY, u"Utiliser les coordonnées\nprécédentes", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText271.Wrap( -1 ) +# fgSizer3.Add( self.m_staticText271, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.check_coord = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) +# fgSizer3.Add( self.check_coord, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.m_staticline36 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline36, 0, wx.EXPAND, 5 ) +# +# self.m_staticline37 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline37, 0, wx.EXPAND, 5 ) +# +# self.m_staticText3 = wx.StaticText( self, wx.ID_ANY, u"Indice", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText3.Wrap( -1 ) +# fgSizer3.Add( self.m_staticText3, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# choice1Choices = [] +# self.choice1 = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, self.indices, 0 ) +# self.choice1.SetSelection( 0 ) +# fgSizer3.Add( self.choice1, 0, wx.ALL, 5 ) +# +# self.m_staticline293 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline293, 0, wx.EXPAND, 5 ) +# +# self.m_staticline292 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline292, 0, wx.EXPAND, 5 ) +# +# self.m_staticText4 = wx.StaticText( self, wx.ID_ANY, u"Layout", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText4.Wrap( -1 ) +# fgSizer3.Add( self.m_staticText4, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# choice2Choices = [u"random", u"cercle", u"fruchterman reingold", u"kamada kawai", u"graphopt"] +# self.choice2 = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, choice2Choices, 0 ) +# self.choice2.SetSelection( 0 ) +# fgSizer3.Add( self.choice2, 0, wx.ALL, 5 ) +# +# self.m_staticline294 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline294, 0, wx.EXPAND, 5 ) +# +# self.m_staticline295 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline295, 0, wx.EXPAND, 5 ) +# +# self.m_staticText5 = wx.StaticText( self, wx.ID_ANY, u"Type de graph", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText5.Wrap( -1 ) +# fgSizer3.Add( self.m_staticText5, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# choice3Choices = [u"dynamique", u"statique", u"3D"] +# self.choice3 = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, choice3Choices, 0 ) +# self.choice3.SetSelection( 0 ) +# fgSizer3.Add( self.choice3, 0, wx.ALL, 5 ) +# +# self.m_staticline296 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline296, 0, wx.EXPAND, 5 ) +# +# self.m_staticline297 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline297, 0, wx.EXPAND, 5 ) +# +# self.m_staticText8 = wx.StaticText( self, wx.ID_ANY, u"Arbre maximum", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText8.Wrap( -1 ) +# fgSizer3.Add( self.m_staticText8, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.check1 = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) +# fgSizer3.Add( self.check1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.m_staticline298 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline298, 0, wx.EXPAND, 5 ) +# +# self.m_staticline299 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline299, 0, wx.EXPAND, 5 ) +# +# self.m_staticText91 = wx.StaticText( self, wx.ID_ANY, u"Graph à seuil", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText91.Wrap( -1 ) +# fgSizer3.Add( self.m_staticText91, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# bSizer21 = wx.BoxSizer( wx.HORIZONTAL ) +# +# self.check_seuil = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) +# bSizer21.Add( self.check_seuil, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.spin_seuil = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 1, 10000, 1 ) +# bSizer21.Add( self.spin_seuil, 0, wx.ALL, 5 ) +# +# fgSizer3.Add( bSizer21, 1, wx.EXPAND, 5 ) +# +# self.m_staticline2910 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline2910, 0, wx.EXPAND, 5 ) +# +# self.m_staticline2911 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline2911, 0, wx.EXPAND, 5 ) +# +# self.m_staticText19 = wx.StaticText( self, wx.ID_ANY, u"Texte sur les sommets", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText19.Wrap( -1 ) +# fgSizer3.Add( self.m_staticText19, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.check_vlab = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) +# fgSizer3.Add( self.check_vlab, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.m_staticline2912 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline2912, 0, wx.EXPAND, 5 ) +# +# self.m_staticline2913 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline2913, 0, wx.EXPAND, 5 ) +# +# self.m_staticText20 = wx.StaticText( self, wx.ID_ANY, u"Indices sur les arêtes", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText20.Wrap( -1 ) +# fgSizer3.Add( self.m_staticText20, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.check_elab = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) +# fgSizer3.Add( self.check_elab, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.m_staticline2914 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline2914, 0, wx.EXPAND, 5 ) +# +# self.m_staticline2915 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline2915, 0, wx.EXPAND, 5 ) +# +# self.m_staticText27 = wx.StaticText( self, wx.ID_ANY, u"Taille du texte", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText27.Wrap( -1 ) +# fgSizer3.Add( self.m_staticText27, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.spin_cex = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 10 ) +# fgSizer3.Add( self.spin_cex, 0, wx.ALL, 5 ) +# +# self.m_staticline2916 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline2916, 0, wx.EXPAND, 5 ) +# +# self.m_staticline2917 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline2917, 0, wx.EXPAND, 5 ) +# +# if 'bystar' in self.paramsimi : +# self.m_staticText40 = wx.StaticText( self, wx.ID_ANY, u"Sélectionner une variable", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText40.Wrap( -1 ) +# fgSizer3.Add( self.m_staticText40, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.check_bystar = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) +# fgSizer3.Add( self.check_bystar, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.m_staticline3200 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline3200, 0, wx.EXPAND, 5 ) +# self.m_staticline3201 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer3.Add( self.m_staticline3201, 0, wx.EXPAND, 5 ) +# +# fgSizer5.Add( fgSizer3, 1, wx.EXPAND, 5 ) +# +# self.m_staticline5 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_VERTICAL ) +# self.m_staticline5.SetForegroundColour( wx.Colour( 0, 0, 0 ) ) +# +# fgSizer5.Add( self.m_staticline5, 0, wx.EXPAND|wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 ) +# +# fgSizer51 = wx.FlexGridSizer( 0, 2, 0, 0 ) +# fgSizer51.SetFlexibleDirection( wx.BOTH ) +# fgSizer51.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) +# +# self.m_staticText6 = wx.StaticText( self, wx.ID_ANY, u"Taille du graphique", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText6.Wrap( -1 ) +# fgSizer51.Add( self.m_staticText6, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# fgSizer31 = wx.FlexGridSizer( 0, 2, 0, 0 ) +# fgSizer31.SetFlexibleDirection( wx.BOTH ) +# fgSizer31.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) +# +# self.m_staticText9 = wx.StaticText( self, wx.ID_ANY, u"hauteur", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText9.Wrap( -1 ) +# fgSizer31.Add( self.m_staticText9, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# self.spin_height = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 10, 100000, 800 ) +# fgSizer31.Add( self.spin_height, 0, wx.ALL, 5 ) +# +# self.m_staticText10 = wx.StaticText( self, wx.ID_ANY, u"largeur", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText10.Wrap( -1 ) +# fgSizer31.Add( self.m_staticText10, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# self.spin_width = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 10, 100000, 800 ) +# fgSizer31.Add( self.spin_width, 0, wx.ALL, 5 ) +# +# fgSizer51.Add( fgSizer31, 1, wx.EXPAND, 5 ) +# +# self.m_staticline3 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer51.Add( self.m_staticline3, 0, wx.EXPAND, 5 ) +# +# self.m_staticline4 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer51.Add( self.m_staticline4, 0, wx.EXPAND, 5 ) +# +# self.m_staticText101 = wx.StaticText( self, wx.ID_ANY, u"Taille des sommets \nproportionnelle à l'effectif\n(les scores sont normalisés)", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText101.Wrap( -1 ) +# fgSizer51.Add( self.m_staticText101, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# bSizer7 = wx.BoxSizer( wx.HORIZONTAL ) +# +# bSizer9 = wx.BoxSizer( wx.VERTICAL ) +# +# self.check2 = wx.CheckBox( self, wx.ID_ANY, u"eff.", wx.DefaultPosition, wx.DefaultSize, 0 ) +# bSizer9.Add( self.check2, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# if 'sfromchi' in self.paramsimi : +# self.checki = wx.CheckBox( self, wx.ID_ANY, u"chi2", wx.DefaultPosition, wx.DefaultSize, 0 ) +# bSizer9.Add( self.checki, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# bSizer7.Add( bSizer9, 0, wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# fgSizer7 = wx.FlexGridSizer( 0, 2, 0, 0 ) +# fgSizer7.SetFlexibleDirection( wx.BOTH ) +# fgSizer7.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) +# +# self.m_staticText11 = wx.StaticText( self, wx.ID_ANY, u"min", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText11.Wrap( -1 ) +# fgSizer7.Add( self.m_staticText11, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# self.spin_tvmin = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) +# fgSizer7.Add( self.spin_tvmin, 0, wx.ALL, 5 ) +# +# self.m_staticText12 = wx.StaticText( self, wx.ID_ANY, u"max", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText12.Wrap( -1 ) +# fgSizer7.Add( self.m_staticText12, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# self.spin_tvmax = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) +# fgSizer7.Add( self.spin_tvmax, 0, wx.ALL, 5 ) +# +# bSizer7.Add( fgSizer7, 1, wx.EXPAND, 5 ) +# +# fgSizer51.Add( bSizer7, 1, wx.EXPAND, 5 ) +# +# self.m_staticline31 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer51.Add( self.m_staticline31, 0, wx.EXPAND, 5 ) +# +# self.m_staticline32 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer51.Add( self.m_staticline32, 0, wx.EXPAND, 5 ) +# +# self.m_staticText1011 = wx.StaticText( self, wx.ID_ANY, u"Taille du texte des sommets \nproportionnelle à l'effectif\n(les scores sont normalisés)", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText1011.Wrap( -1 ) +# fgSizer51.Add( self.m_staticText1011, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# bSizer71 = wx.BoxSizer( wx.HORIZONTAL ) +# +# bSizer8 = wx.BoxSizer( wx.VERTICAL ) +# +# self.check_vcex = wx.CheckBox( self, wx.ID_ANY, u"eff.", wx.DefaultPosition, wx.DefaultSize, 0 ) +# bSizer8.Add( self.check_vcex, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# if 'cexfromchi' in self.paramsimi : +# +# self.checkit = wx.CheckBox( self, wx.ID_ANY, u"chi2", wx.DefaultPosition, wx.DefaultSize, 0 ) +# bSizer8.Add( self.checkit, 0, wx.ALL, 5 ) +# +# bSizer71.Add( bSizer8, 0, wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# fgSizer71 = wx.FlexGridSizer( 0, 2, 0, 0 ) +# fgSizer71.SetFlexibleDirection( wx.BOTH ) +# fgSizer71.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) +# +# self.m_staticText111 = wx.StaticText( self, wx.ID_ANY, u"min", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText111.Wrap( -1 ) +# fgSizer71.Add( self.m_staticText111, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# self.spin_vcexmin = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) +# fgSizer71.Add( self.spin_vcexmin, 0, wx.ALL, 5 ) +# +# self.m_staticText121 = wx.StaticText( self, wx.ID_ANY, u"max", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText121.Wrap( -1 ) +# fgSizer71.Add( self.m_staticText121, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# self.spin_vcexmax = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) +# fgSizer71.Add( self.spin_vcexmax, 0, wx.ALL, 5 ) +# +# bSizer71.Add( fgSizer71, 1, wx.EXPAND, 5 ) +# +# fgSizer51.Add( bSizer71, 1, wx.EXPAND, 5 ) +# +# self.m_staticline321 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer51.Add( self.m_staticline321, 0, wx.EXPAND, 5 ) +# +# self.m_staticline322 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer51.Add( self.m_staticline322, 0, wx.EXPAND, 5 ) +# +# self.m_staticText10111 = wx.StaticText( self, wx.ID_ANY, u"Largeur des arêtes\nproportionnelle à l'indice", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText10111.Wrap( -1 ) +# fgSizer51.Add( self.m_staticText10111, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# bSizer711 = wx.BoxSizer( wx.HORIZONTAL ) +# +# self.check3 = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) +# bSizer711.Add( self.check3, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# fgSizer711 = wx.FlexGridSizer( 0, 2, 0, 0 ) +# fgSizer711.SetFlexibleDirection( wx.BOTH ) +# fgSizer711.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED ) +# +# self.m_staticText1111 = wx.StaticText( self, wx.ID_ANY, u"min", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText1111.Wrap( -1 ) +# fgSizer711.Add( self.m_staticText1111, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# self.spin_temin = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) +# fgSizer711.Add( self.spin_temin, 0, wx.ALL, 5 ) +# +# self.m_staticText1211 = wx.StaticText( self, wx.ID_ANY, u"max", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText1211.Wrap( -1 ) +# fgSizer711.Add( self.m_staticText1211, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# self.spin_temax = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 0 ) +# fgSizer711.Add( self.spin_temax, 0, wx.ALL, 5 ) +# +# bSizer711.Add( fgSizer711, 1, wx.EXPAND, 5 ) +# +# fgSizer51.Add( bSizer711, 1, wx.EXPAND, 5 ) +# +# self.m_staticline33 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer51.Add( self.m_staticline33, 0, wx.EXPAND, 5 ) +# +# self.m_staticline34 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer51.Add( self.m_staticline34, 0, wx.EXPAND, 5 ) +# +# self.m_staticText28 = wx.StaticText( self, wx.ID_ANY, u"Gradiant de gris sur les textes en fonction \nde l'effectif (du chi2) (0=noir; 1=blanc)", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText28.Wrap( -1 ) +# fgSizer51.Add( self.m_staticText28, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# bSizer10 = wx.BoxSizer( wx.HORIZONTAL ) +# +# self.m_checkBox14 = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) +# bSizer10.Add( self.m_checkBox14, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# bSizer11 = wx.BoxSizer( wx.VERTICAL ) +# +# bSizer12 = wx.BoxSizer( wx.HORIZONTAL ) +# +# self.m_staticText31 = wx.StaticText( self, wx.ID_ANY, u"min", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText31.Wrap( -1 ) +# bSizer12.Add( self.m_staticText31, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# self.m_spinCtrl14 = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 10, 0 ) +# bSizer12.Add( self.m_spinCtrl14, 0, wx.ALL, 5 ) +# +# bSizer11.Add( bSizer12, 1, wx.EXPAND, 5 ) +# +# bSizer13 = wx.BoxSizer( wx.HORIZONTAL ) +# +# self.m_staticText32 = wx.StaticText( self, wx.ID_ANY, u"max", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText32.Wrap( -1 ) +# bSizer13.Add( self.m_staticText32, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# self.m_spinCtrl15 = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 10, 10 ) +# bSizer13.Add( self.m_spinCtrl15, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) +# +# bSizer11.Add( bSizer13, 1, wx.EXPAND, 5 ) +# +# bSizer10.Add( bSizer11, 1, wx.EXPAND, 5 ) +# +# fgSizer51.Add( bSizer10, 1, wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, 5 ) +# +# self.m_staticline3311 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer51.Add( self.m_staticline3311, 0, wx.EXPAND |wx.ALL, 5 ) +# +# self.m_staticline33111 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer51.Add( self.m_staticline33111, 0, wx.EXPAND |wx.ALL, 5 ) +# bSizer5 = wx.BoxSizer( wx.HORIZONTAL ) +# +# self.m_staticText21 = wx.StaticText( self, wx.ID_ANY, u"Couleur des sommets", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText21.Wrap( -1 ) +# bSizer5.Add( self.m_staticText21, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.cols = wx.ColourPickerCtrl( self, wx.ID_ANY, wx.Colour( 255, 0, 0 ), wx.DefaultPosition, wx.Size( 10,10 ), wx.CLRP_DEFAULT_STYLE ) +# bSizer5.Add( self.cols, 0, wx.ALL, 5 ) +# +# fgSizer51.Add( bSizer5, 1, wx.EXPAND, 5 ) +# +# bSizer6 = wx.BoxSizer( wx.HORIZONTAL ) +# +# self.m_staticText22 = wx.StaticText( self, wx.ID_ANY, u"Couleur des arêtes", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText22.Wrap( -1 ) +# bSizer6.Add( self.m_staticText22, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.cola = wx.ColourPickerCtrl( self, wx.ID_ANY, wx.Colour( 208, 208, 208 ), wx.DefaultPosition, wx.DefaultSize, wx.CLRP_DEFAULT_STYLE ) +# bSizer6.Add( self.cola, 0, wx.ALL, 5 ) +# +# fgSizer51.Add( bSizer6, 1, wx.EXPAND, 5 ) +# +# self.m_staticline331 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer51.Add( self.m_staticline331, 0, wx.EXPAND, 5 ) +# +# self.m_staticline332 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer51.Add( self.m_staticline332, 0, wx.EXPAND, 5 ) +# +# self.m_staticText23 = wx.StaticText( self, wx.ID_ANY, u"Taille des sommets unique", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText23.Wrap( -1 ) +# fgSizer51.Add( self.m_staticText23, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# bSizer72 = wx.BoxSizer( wx.HORIZONTAL ) +# +# self.check_s_size = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) +# bSizer72.Add( self.check_s_size, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.spin_tv = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 10 ) +# bSizer72.Add( self.spin_tv, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# fgSizer51.Add( bSizer72, 1, wx.EXPAND, 5 ) +# +# self.m_staticline333 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer51.Add( self.m_staticline333, 0, wx.EXPAND, 5 ) +# +# self.m_staticline334 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer51.Add( self.m_staticline334, 0, wx.EXPAND, 5 ) +# +# self.m_staticText24 = wx.StaticText( self, wx.ID_ANY, u"Transparence des sphères", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText24.Wrap( -1 ) +# fgSizer51.Add( self.m_staticText24, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.slider_sphere = wx.Slider( self, wx.ID_ANY, 10, 0, 100, wx.DefaultPosition, wx.DefaultSize, wx.SL_HORIZONTAL|wx.SL_LABELS ) +# fgSizer51.Add( self.slider_sphere, 0, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.m_staticline335 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer51.Add( self.m_staticline335, 0, wx.EXPAND, 5 ) +# +# self.m_staticline336 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer51.Add( self.m_staticline336, 0, wx.EXPAND, 5 ) +# +# self.m_staticText25 = wx.StaticText( self, wx.ID_ANY, u"Faire un film", wx.DefaultPosition, wx.DefaultSize, 0 ) +# self.m_staticText25.Wrap( -1 ) +# fgSizer51.Add( self.m_staticText25, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.film = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) +# fgSizer51.Add( self.film, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) +# +# self.m_staticline2918 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer51.Add( self.m_staticline2918, 0, wx.EXPAND, 5 ) +# +# self.m_staticline2919 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) +# fgSizer51.Add( self.m_staticline2919, 0, wx.EXPAND, 5 ) +# +# +# fgSizer51.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 ) +# +# m_sdbSizer2 = wx.StdDialogButtonSizer() +# self.m_sdbSizer2OK = wx.Button( self, wx.ID_OK ) +# m_sdbSizer2.AddButton( self.m_sdbSizer2OK ) +# self.m_sdbSizer2Cancel = wx.Button( self, wx.ID_CANCEL ) +# m_sdbSizer2.AddButton( self.m_sdbSizer2Cancel ) +# m_sdbSizer2.Realize(); +# fgSizer51.Add( m_sdbSizer2, 1, wx.EXPAND, 5 ) +# +# fgSizer5.Add( fgSizer51, 1, wx.EXPAND, 5 ) +# +# self.SetSizer( fgSizer5 ) +# self.__set_properties() +# +# self.Layout() +# fgSizer5.Fit( self ) +# +# self.Centre( wx.BOTH ) + + # Connect Events + if not self.paramsimi['first'] : + self.check_coord.Bind( wx.EVT_CHECKBOX, self.OnKeepCoords ) + self.choice3.Bind( wx.EVT_CHOICE, self.OnChangeType ) + self.check2.Bind( wx.EVT_CHECKBOX, self.OnCheck2 ) + if 'cexfromchi' in self.paramsimi : + self.checkit.Bind( wx.EVT_CHECKBOX, self.OnCheckit ) + if 'sfromchi' in self.paramsimi : + self.checki.Bind( wx.EVT_CHECKBOX, self.OnChecki ) + self.check_vcex.Bind( wx.EVT_CHECKBOX, self.OnCheck_vcex ) + self.check_s_size.Bind( wx.EVT_CHECKBOX, self.OnCheck_s_size ) + + def __set_properties(self): + self.choice1.SetSelection(self.paramsimi['coeff']) + self.choice2.SetSelection(self.paramsimi['layout']) + self.choice3.SetSelection(self.paramsimi['type_graph']) + if self.paramsimi['type'] != 2 : + self.film.Enable(False) + self.slider_sphere.Enable(False) + else : + self.film.Enable(True) + self.slider_sphere.Enable(True) + self.check1.SetValue(self.paramsimi['arbremax']) + self.check_vlab.SetValue(self.paramsimi['label_v']) + self.check_elab.SetValue(self.paramsimi['label_e']) + self.check2.SetValue(self.paramsimi['tvprop']) + self.spin_tv.SetValue(self.paramsimi['coeff_tv_nb']) + self.check_s_size.SetValue(self.paramsimi['coeff_tv']) + self.spin_tvmin.SetValue(self.paramsimi['tvmin']) + self.spin_tvmax.SetValue(self.paramsimi['tvmax']) + self.check3.SetValue(self.paramsimi['coeff_te']) + self.spin_temin.SetValue(self.paramsimi['coeff_temin']) + self.spin_temax.SetValue(self.paramsimi['coeff_temax']) + self.check_vcex.SetValue(self.paramsimi['vcex']) + self.spin_vcexmin.SetValue(self.paramsimi['vcexmin']) + self.spin_vcexmax.SetValue(self.paramsimi['vcexmax']) + self.spin_cex.SetValue(self.paramsimi['cex']) + self.check_seuil.SetValue(self.paramsimi['seuil_ok']) + self.spin_seuil.SetValue(self.paramsimi['seuil']) + self.cols.SetColour(self.paramsimi['cols']) + self.cola.SetColour(self.paramsimi['cola']) + self.spin_width.SetValue(self.paramsimi['width']) + self.spin_height.SetValue(self.paramsimi['height']) + if 'cexfromchi' in self.paramsimi : + self.checkit.SetValue(self.paramsimi['cexfromchi']) + if 'sfromchi' in self.paramsimi : + self.checki.SetValue(self.paramsimi['sfromchi']) + if not self.paramsimi['first'] : + self.check_coord.SetValue(self.paramsimi['keep_coord']) + self.OnKeepCoords(wx.EVT_CHECKBOX) + if self.paramsimi.get('bystar', False) : + self.check_bystar.SetValue(True) + self.stars = self.paramsimi['stars'] + self.slider_sphere.SetValue(self.paramsimi['alpha']) + self.film.SetValue(self.paramsimi['film']) + + def OnCheck_s_size(self, evt): + if self.check_s_size.GetValue() : + if 'cexfromchi' in self.paramsimi : + self.checki.SetValue(False) + self.check2.SetValue(False) + self.spin_tvmin.Enable(False) + self.spin_tvmax.Enable(False) + self.spin_tv.Enable(True) + else : + self.check2.SetValue(True) + self.spin_tvmin.Enable(True) + self.spin_tvmax.Enable(True) + self.spin_tv.Enable(False) + + def OnCheck2(self, evt): + if self.check2.GetValue(): + self.check_s_size.SetValue(False) + if 'cexfromchi' in self.paramsimi : + self.checki.SetValue(False) + self.spin_tvmin.Enable(True) + self.spin_tvmax.Enable(True) + self.spin_tv.Enable(False) + else : + self.check_s_size.SetValue(True) + self.spin_tvmin.Enable(False) + self.spin_tvmax.Enable(False) + self.spin_tv.Enable(True) + + def OnChecki(self, evt): + if 'sfromchi' in self.paramsimi : + if self.checki.GetValue() : + self.check_s_size.SetValue(False) + self.check2.SetValue(False) + self.spin_tvmin.Enable(True) + self.spin_tvmax.Enable(True) + self.spin_tv.Enable(False) + else : + self.check_s_size.SetValue(True) + #self.check2.SetValue(True) + self.spin_tvmin.Enable(False) + self.spin_tvmax.Enable(False) + self.spin_tv.Enable(True) + + def OnCheckit(self,evt) : + if 'cexfromchi' in self.paramsimi : + if self.checkit.GetValue() : + if self.check_vcex.GetValue() : + self.check_vcex.SetValue(False) + + def OnCheck_vcex(self, evt): + if self.check_vcex.GetValue() : + if 'checkit' in dir(self) : + if self.checkit.GetValue() : + self.checkit.SetValue(False) + + def OnChangeType(self, event) : + if event.GetInt() != 1 : + self.spin_width.Enable(False) + self.spin_height.Enable(False) + else : + self.spin_width.Enable(True) + self.spin_height.Enable(True) + if event.GetInt() != 2 : + self.film.Enable(False) + self.slider_sphere.Enable(False) + else : + self.film.Enable(True) + self.slider_sphere.Enable(True) + + def OnKeepCoords(self, event): + if self.check_coord.GetValue() : + self.choice1.SetSelection(self.paramsimi['coeff']) + self.choice2.SetSelection(self.paramsimi['layout']) + self.check_seuil.SetValue(self.paramsimi['seuil_ok']) + self.spin_seuil.SetValue(self.paramsimi['seuil']) + self.choice1.Disable() + self.choice2.Disable() + self.check_seuil.Disable() + self.spin_seuil.Disable() + #self.check_colch.SetValue(False) + #self.check_colch.Disable() + else : + self.choice1.Enable(True) + self.choice2.Enable(True) + self.check_seuil.Enable(True) + self.spin_seuil.Enable(True) + #self.check_colch.Enable(True) + class PrepSimi : - def __init__(self, parent, parametres, indices_simi) : + def __init__(self, parent, source, parametres, pathout, actives, indices_simi, wordlist = None, selected = None) : self.parametres = parametres - self.dial = dialog.PrefSimi(parent, -1, self.parametres, indices_simi) + self.etline = [] + self.dial = PrefSimi(parent, -1, self.parametres, indices_simi, wordlist = wordlist, selected = selected, actives = actives) self.dial.CenterOnParent() self.val = self.dial.ShowModal() if self.val == wx.ID_OK : @@ -167,15 +1334,34 @@ class PrepSimi : nval = vardial.ShowModal() if nval == wx.ID_OK : if vardial.choice.GetSelection() == 1 : - listet = [vardial.listet[i] for i in dial.list_box_1.GetSelections()] + listet = [vardial.listet[i] for i in vardial.list_box_1.GetSelections()] else : - listet = variables[vardial.variables[dial.list_box_1.GetSelections()[0]]] - dial.Destroy() - self.tableau.etline = self.Source.corpus.make_etline(listet) + listet = variables[vardial.variables[vardial.list_box_1.GetSelections()[0]]] + self.dial.Destroy() + vardial.Destroy() + self.etline = source.corpus.make_etline(listet) + self.parametres['selectedstars'] = listet + self.parametres['listet'] = self.etline + else: + vardial.Destroy() + last = self.dial.listcol.GetFirstSelected() + lastl = [self.dial.listcol.GetFirstSelected()] + indexes = [self.dial.listcol.getColumnText(self.dial.listcol.GetFirstSelected(),0)] + while self.dial.listcol.GetNextSelected(last) != -1: + last = self.dial.listcol.GetNextSelected(last) + lastl.append(last) + indexes.append(self.dial.listcol.getColumnText(last,0)) + column = [actives.index(val) for val in indexes] + column.sort() + with open(pathout, 'w') as f : + f.write('\n'.join([`val` for val in column])) self.make_param() + self.dial.Destroy() + else : + self.dial.Destroy() def make_param(self) : - self.select = self.dial.check_colch.GetValue() + #self.select = self.dial.check_colch.GetValue() if self.parametres.get('first', True) : keep_coord = False else : diff --git a/iramuteq.py b/iramuteq.py index afe0966..08ce86c 100644 --- a/iramuteq.py +++ b/iramuteq.py @@ -281,9 +281,9 @@ class IraFrame(wx.Frame): # CenterPane()) self._mgr.AddPane(IntroPanel(self), aui.AuiPaneInfo().Name("Intro_Text"). CenterPane()) - if not os.path.exists(os.path.join(UserConfigPath, 'history.db')) : - with open(os.path.join(UserConfigPath, 'history.db'), 'w') as f : - f.write('') + #if not os.path.exists(os.path.join(UserConfigPath, 'history.db')) : + # with open(os.path.join(UserConfigPath, 'history.db'), 'w') as f : + # f.write('') self.history = History(os.path.join(UserConfigPath, 'history.db')) self.tree = LeftTree(self) self._mgr.AddPane(self.tree, aui.AuiPaneInfo().Name("lefttree").Caption("Navigateur"). diff --git a/layout.py b/layout.py index 0e89647..bee04ee 100644 --- a/layout.py +++ b/layout.py @@ -964,27 +964,30 @@ class SimiLayout(DefaultTextLayout) : self.actives = f.read() self.actives = self.actives.splitlines()#[act for act in self.actives.splitlines()] dictcol = dict([[i, [act, self.corpus.getlemeff(act)]] for i, act in enumerate(self.actives)]) - SelectColumn(self.ira, dictcol, self.actives, self.pathout['selected.csv'], selected = selected) - prep = PrepSimi(self.ira, self.parametres, indices_simi) - self.parametres = prep.parametres - script = PrintSimiScript(self) - script.make_script() - pid = exec_rcode(self.ira.RPath, script.scriptout, wait = True) - check_Rresult(self.ira, pid) - if self.parametres['type_graph'] == 1: - if os.path.exists(self.pathout['liste_graph']): - graph_simi = read_list_file(self.pathout['liste_graph']) - graph_simi.append([os.path.basename(script.filename), script.txtgraph]) - else : - graph_simi = [[os.path.basename(script.filename), script.txtgraph]] - print_liste(self.pathout['liste_graph'], graph_simi) - DoConf().makeoptions([self.parametres['type']], [self.parametres], self.pathout['Analyse.ira']) - if self.parametres['type_graph'] == 1: - self.graphpan.sizer_3.Add(wx.StaticBitmap(self.graphpan.panel_1, -1, wx.Bitmap(script.filename, wx.BITMAP_TYPE_ANY)), 0, wx.ALIGN_CENTER_HORIZONTAL, 0) - self.graphpan.sizer_3.Add(wx.StaticText(self.graphpan.panel_1,-1, script.txtgraph), 0, wx.ALIGN_CENTER_HORIZONTAL, 0) - self.graphpan.sizer_3.Fit(self.graphpan.panel_1) - self.graphpan.Layout() - self.graphpan.panel_1.Scroll(0,self.graphpan.panel_1.GetScrollRange(wx.VERTICAL)) + #res = SelectColumn(self.ira, dictcol, self.actives, self.pathout['selected.csv'], selected = selected, dlg = True) + #if res.ok : + prep = PrepSimi(self.ira, self, self.parametres,self.pathout['selected.csv'], self.actives, indices_simi, wordlist = dictcol, selected = selected) + if prep.val == wx.ID_OK : + self.parametres = prep.parametres + + script = PrintSimiScript(self) + script.make_script() + pid = exec_rcode(self.ira.RPath, script.scriptout, wait = True) + check_Rresult(self.ira, pid) + if self.parametres['type_graph'] == 1: + if os.path.exists(self.pathout['liste_graph']): + graph_simi = read_list_file(self.pathout['liste_graph']) + graph_simi.append([os.path.basename(script.filename), script.txtgraph]) + else : + graph_simi = [[os.path.basename(script.filename), script.txtgraph]] + print_liste(self.pathout['liste_graph'], graph_simi) + DoConf().makeoptions([self.parametres['type']], [self.parametres], self.pathout['Analyse.ira']) + if self.parametres['type_graph'] == 1: + self.graphpan.sizer_3.Add(wx.StaticBitmap(self.graphpan.panel_1, -1, wx.Bitmap(script.filename, wx.BITMAP_TYPE_ANY)), 0, wx.ALIGN_CENTER_HORIZONTAL, 0) + self.graphpan.sizer_3.Add(wx.StaticText(self.graphpan.panel_1,-1, script.txtgraph), 0, wx.ALIGN_CENTER_HORIZONTAL, 0) + self.graphpan.sizer_3.Fit(self.graphpan.panel_1) + self.graphpan.Layout() + self.graphpan.panel_1.Scroll(0,self.graphpan.panel_1.GetScrollRange(wx.VERTICAL)) def export(self, evt) : pass diff --git a/openanalyse.py b/openanalyse.py index cc50ebe..c55fef3 100644 --- a/openanalyse.py +++ b/openanalyse.py @@ -11,7 +11,7 @@ from corpusNG import Corpus, copycorpus from tableau import Tableau import os import shelve -from ConfigParser import * +#from ConfigParser import * from tabsimi import DoSimi from functions import BugReport, DoConf import logging @@ -20,8 +20,6 @@ log = logging.getLogger('iramuteq.openanalyse') class OpenAnalyse(): def __init__(self, parent, parametres, Alceste=True, simifromprof = False): - #self.conf = RawConfigParser() - #self.conf.read(filename) log.info('OpenAnalyse') self.parent = parent if isinstance(parametres, dict) : @@ -34,7 +32,7 @@ class OpenAnalyse(): if self.conf['type'] == 'corpus' : corpus = self.opencorpus() - elif self.conf['corpus'] in self.parent.history.history : + elif self.conf['corpus'] in self.parent.history.corpus : corpus = self.openanalyse() if self.conf.get('lem',1) : corpus.make_lems(True) @@ -46,14 +44,14 @@ class OpenAnalyse(): self.parent.history.addtab(self.conf) def redopath(self, conf, path) : - #if not os.path.exists(conf['ira']) : conf['ira'] = os.path.realpath(path) conf['pathout'] = os.path.dirname(os.path.realpath(path)) DoConf(conf['ira']).makeoptions([conf['type']], [conf]) return conf def opencorpus(self) : - if self.conf['uuid'] not in self.parent.history.history : + log.info('open corpus') + if self.conf['uuid'] not in self.parent.history.corpus : self.parent.history.add(self.conf) log.info('add to history') self.parent.tree.OnItemAppend(self.conf) @@ -61,7 +59,7 @@ class OpenAnalyse(): log.info('corpus is already opened') self.doopen(self.parent.history.openedcorpus[self.conf['uuid']]) else : - corpus = Corpus(self, parametres = self.conf, read = self.parent.history.history[self.conf['uuid']]['ira']) + corpus = Corpus(self, parametres = self.conf, read = self.parent.history.history[self.parent.history.ordercorpus[self.conf['uuid']]]['ira']) self.parent.history.openedcorpus[self.conf['uuid']] = corpus self.opencorpus_analyses() self.doopen(corpus) @@ -77,19 +75,17 @@ class OpenAnalyse(): self.parent.history.add(analyse_conf) self.parent.tree.AddAnalyse(analyse_conf, bold = False) - #self.parent.tree.OnItemAppend(self.conf) def openanalyse(self) : if self.conf['corpus'] in self.parent.history.openedcorpus : log.info('corpus is already opened') corpus = self.parent.history.openedcorpus[self.conf['corpus']] else : - if os.path.exists(self.parent.history.history[self.conf['corpus']]['ira']) : - corpus = Corpus(self, parametres = DoConf(self.parent.history.history[self.conf['corpus']]['ira']).getoptions('corpus'), read = self.parent.history.history[self.conf['corpus']]['ira']) + if os.path.exists(self.parent.history.history[self.parent.history.ordercorpus[self.conf['corpus']]]['ira']) : + corpus = Corpus(self, parametres = DoConf(self.parent.history.history[self.parent.history.ordercorpus[self.conf['corpus']]]['ira']).getoptions('corpus'), read = self.parent.history.history[self.parent.history.ordercorpus[self.conf['corpus']]]['ira']) self.parent.history.openedcorpus[self.conf['corpus']] = corpus return corpus def doopen(self, corpus) : - print self.conf if self.conf['type'] == 'corpus' : self.parent.ShowMenu(_("Text analysis")) OpenCorpus(self.parent, self.conf) @@ -108,86 +104,3 @@ class OpenAnalyse(): elif self.conf['type'] == 'wordcloud' : self.parent.ShowMenu(_("Text analysis")) WordCloudLayout(self.parent, corpus, self.conf) - #self.tableau = Tableau(self.parent, self.conf['ira']) - #self.DictPathOut=construct_simipath(self.conf['pathout']) - #self.tableau.dictpathout = self.DictPathOut - #self.tableau.read_tableau(self.tableau.dictpathout['db']) - #if self.tableau.parametre.get('corpus', False) : - # self.corpus=corpus - #self.corpus.read_corpus_from_shelves(self.DictPathOut['corpus']) - # self.corpus.parametres['openpath'] = self.conf['pathout'] - #DoSimi(self.parent, self.conf, isopen = True, filename = self.conf['ira'], gparent = self, openfromprof=False) - -# try : -# #if self.conf['type'] in ['analyse','lexico','stat','wordcloud'] : -# # self.corpus = Corpus(parent) -# if 'analyse' in self.conf.sections() : -# DictPathOut=ChdTxtPathOut(os.path.dirname(filename)) -# self.pathout = os.path.dirname(filename) -# self.DictPathOut=DictPathOut -# #self.corpus = Corpus(parent) -# self.corpus.dictpathout = self.DictPathOut -# self.corpus.read_corpus_from_shelves(self.DictPathOut['db']) -# self.corpus.parametre['analyse'] = 'alceste' -# self.corpus.make_lem_type_list() -# # print 'EXTRACT NR' -# # self.corpus.extractnr() -# Alceste=True -# #self.corpus.save_corpus(self.corpus.dictpathout['db']) -# #self.corpus.make_uci_stat() -# #self.corpus.make_et_table() -# #self.corpus.prof_type() -# #self.corpus.make_type_tot() -# #self.corpus.make_size_uci() -# #self.corpus.get_stat_by_cluster() -# OpenCHDS(parent, self, filename, Alceste) -# self.parent.ShowMenu(_("Text analysis")) -# self.parent._mgr.Update() -# elif 'questionnaire' in self.conf.sections() : -# self.DictPathOut=ChdTxtPathOut(os.path.dirname(filename)) -# self.pathout = os.path.dirname(filename) -# self.tableau = Tableau(parent, filename) -# self.tableau.dictpathout = self.DictPathOut -# self.tableau.read_tableau(self.tableau.dictpathout['db']) -# OpenCHDS(parent, self, filename, False) -# elif 'simi' in self.conf.sections(): -# self.tableau = Tableau(parent, filename) -# self.DictPathOut=construct_simipath(os.path.abspath(os.path.dirname(filename))) -# self.tableau.dictpathout = self.DictPathOut -# self.tableau.read_tableau(self.tableau.dictpathout['db']) -# if self.tableau.parametre.get('fromtxt', False) : -# self.corpus=Corpus(parent) -# self.corpus.read_corpus_from_shelves(self.DictPathOut['corpus']) -# self.corpus.parametre['openpath'] = os.path.dirname(filename) -# self.parent.ShowMenu(_("Text analysis")) -# DoSimi(parent, self.conf, isopen = True, filename = filename, gparent = self, openfromprof=simifromprof) -# elif 'lexico' in self.conf.sections(): -# print 'lexico' -# #self.corpus = Corpus(parent) -# self.corpus.dictpathout = StatTxtPathOut(os.path.dirname(filename)) -# self.parent.ShowMenu(_("Text analysis")) -# dolexlayout(parent, self, filename) -# elif 'stat' in self.conf.sections(): -# print 'stat' -# #self.corpus = Corpus(parent) -# self.corpus.dictpathout = StatTxtPathOut(os.path.dirname(filename)) -# self.parent.ShowMenu(_("Text analysis")) -# StatLayout(parent, self, filename) -# elif 'chd_dist_quest' in self.conf.sections(): -# self.DictPathOut = ChdTxtPathOut(os.path.dirname(filename)) -# self.pathout = os.path.dirname(filename) -# self.tableau = Tableau(parent, filename) -# self.tableau.dictpathout = self.DictPathOut -# self.tableau.read_tableau(self.tableau.dictpathout['db']) -# OpenCHDS(parent, self, filename, False) -# elif 'wordcloud' in self.conf.sections() : -# self.corpus.dictpathout = StatTxtPathOut(os.path.dirname(filename)) -# self.corpus.read_corpus_from_shelves(self.corpus.dictpathout['db']) -# self.parent.ShowMenu(_("Text analysis")) -# WordCloudLayout(parent, self, filename) -# if self.conf.sections()[0] in ['analyse','lexico','stat','wordcloud'] : -# self.corpus.parametre['openpath'] = os.path.dirname(filename) -# except : -# BugReport(self.parent) - - diff --git a/tabsimi.py b/tabsimi.py index 896cc6f..2af9792 100644 --- a/tabsimi.py +++ b/tabsimi.py @@ -6,7 +6,8 @@ from chemins import ConstructPathOut, construct_simipath, ffr from functions import print_liste, exec_rcode, read_list_file, check_Rresult, indices_simi, treat_var_mod -from dialog import PrefSimi, SelectColDial, OptLexi +from dialog import SelectColDial, OptLexi +from guifunct import PrefSimi from listlex import * import wx import wx.lib.agw.aui as aui diff --git a/textsimi.py b/textsimi.py index 8b296bb..9a68ac3 100644 --- a/textsimi.py +++ b/textsimi.py @@ -31,21 +31,33 @@ class SimiTxt(AnalyseText): #FIXME self.actives = self.corpus.make_actives_limit(3) dictcol = dict([[i, [act, self.corpus.getlemeff(act)]] for i, act in enumerate(self.actives)]) - SelectColumn(self.ira, dictcol, self.actives, self.pathout['selected.csv'], dlg = self.dlg) - self.makefiles() + continu = False if self.dlg : - prep = PrepSimi(self.ira, self.parametres, indices_simi) - self.parametres = prep.parametres - script = PrintSimiScript(self) - script.make_script() - self.doR(script.scriptout) - if self.parametres['type_graph'] == 1: - if os.path.exists(self.pathout['liste_graph']): - graph_simi = read_list_file(self.pathout['liste_graph']) - graph_simi.append([os.path.basename(script.filename), script.txtgraph]) - else : - graph_simi = [[os.path.basename(script.filename), script.txtgraph]] - print_liste(self.pathout['liste_graph'], graph_simi) + #cont = SelectColumn(self.ira, dictcol, self.actives, self.pathout['selected.csv'], dlg = self.dlg) + #if cont.ok : + self.listet = self.corpus.make_etoiles() + self.listet.sort() + self.stars = copy(self.listet) + self.parametres['stars'] = copy(self.listet) + self.parametres['sfromchi'] = False + prep = PrepSimi(self.ira, self, self.parametres, self.pathout['selected.csv'], self.actives, indices_simi, wordlist=dictcol) + if prep.val == wx.ID_OK : + continu = True + self.parametres = prep.parametres + if continu : + self.makefiles() + script = PrintSimiScript(self) + script.make_script() + self.doR(script.scriptout) + if self.parametres['type_graph'] == 1: + if os.path.exists(self.pathout['liste_graph']): + graph_simi = read_list_file(self.pathout['liste_graph']) + graph_simi.append([os.path.basename(script.filename), script.txtgraph]) + else : + graph_simi = [[os.path.basename(script.filename), script.txtgraph]] + print_liste(self.pathout['liste_graph'], graph_simi) + else : + return False def preferences(self) : dial = StatDialog(self, self.parent) @@ -107,11 +119,7 @@ class SimiTxt(AnalyseText): with open(self.pathout['actives.csv'], 'w') as f : f.write('\n'.join(self.actives).encode(self.ira.syscoding)) - self.listet = self.corpus.make_etoiles() - self.listet.sort() - self.parametres['stars'] = copy(self.listet) - self.stars = copy(self.listet) - self.parametres['sfromchi'] = False + diff --git a/tree.py b/tree.py index 5e90eb0..9540271 100644 --- a/tree.py +++ b/tree.py @@ -123,18 +123,18 @@ class LeftTree(CT.CustomTreeCtrl): #textctrl.Bind(wx.EVT_CHAR, self.OnTextCtrl) #combobox.Bind(wx.EVT_COMBOBOX, self.OnComboBox) #lenArtIds = len(ArtIDs) - 2 - for x in range(len(self.history.corpora)) : - if 'corpus_name' in self.h[self.history.order[x]] : - key = 'corpus_name' - else : - key = 'name' - child = self.AppendItem(self.root, self.h[self.history.order[x]][key]) + for corpus in self.h : + #if 'corpus_name' in self.h[self.history.order[x]] : + # key = 'corpus_name' + #else : + # key = 'name' + child = self.AppendItem(self.root, corpus['corpus_name']) #if x == 1: # child = self.AppendItem(self.root, "Item %d" % x + "\nHello World\nHappy wxPython-ing!") # self.SetItemBold(child, True) #else: # child = self.AppendItem(self.root, "Item %d" % x) - self.SetPyData(child, self.h[self.history.order[x]]) + self.SetPyData(child, corpus) self.SetItemImage(child, 24, CT.TreeItemIcon_Normal) self.SetItemImage(child, 13, CT.TreeItemIcon_Expanded) @@ -154,14 +154,14 @@ class LeftTree(CT.CustomTreeCtrl): # elif y == 4 and x == 1: # last = self.AppendItem(child, "item %d-%s" % (x, chr(ord("a")+y)), wnd=combobox) # else: - if 'corpus_name' in self.h[self.history.order[x]] : - if 'analyses' in self.h[self.history.order[x]] : - for y in self.h[self.history.order[x]]['analyses'] : - last = self.AppendItem(child, y['name'], ct_type=0) - - self.SetPyData(last, y) - self.SetItemImage(last, 24, CT.TreeItemIcon_Normal) - self.SetItemImage(last, 13, CT.TreeItemIcon_Expanded) + # if 'corpus_name' in self.h[self.history.order[x]] : + if 'analyses' in corpus : + for y in corpus['analyses'] : + last = self.AppendItem(child, y['name'], ct_type=0) + + self.SetPyData(last, y) + self.SetItemImage(last, 24, CT.TreeItemIcon_Normal) + self.SetItemImage(last, 13, CT.TreeItemIcon_Expanded) # if random.randint(0, 3) == 0: # self.SetItemLeftImage(last, random.randint(0, lenArtIds)) @@ -558,9 +558,9 @@ class LeftTree(CT.CustomTreeCtrl): pydata = self.itemdict['pydata'] if 'corpus_name' in pydata : - self.history.delete(pydata['uuid'], True) + self.history.delete(pydata, True) else : - self.history.delete(pydata['uuid']) + self.history.delete(pydata) self.DeleteChildren(self.current) self.Delete(self.current) self.current = None -- 2.7.4