import tempfile
import sys
from KeyFrame import AlcOptFrame
+import subprocess
#------------------------------------
# import des modules wx
self.spin_min = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 2, 30, 2 )
self.spin_min.SetValue(2)
fgSizer1.Add( self.spin_min, 0, wx.ALL, 5 )
- self.m_staticText4 = wx.StaticText( self, wx.ID_ANY, _("Maxmum size of segments"), wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.m_staticText4 = wx.StaticText( self, wx.ID_ANY, _("Maximum size of segments"), wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_staticText4.Wrap( -1 )
fgSizer1.Add( self.m_staticText4, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
self.spin_max = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 2, 30, 10 )
self.heightsp.Enable(True)
event.Skip()
+class ImageViewer :
+ def __init__( self, parent, parametres, title, size) :
+ ira = wx.GetTopLevelParent(parent)
+ try :
+ if ira.pref.get('iramuteq', 'imageviewer').strip() != '' :
+ subprocess.Popen([ira.pref.get('iramuteq', 'imageviewer').strip(), parametres['tmpgraph']])
+ else :
+ viewer = ImageViewerFrame(parent, parametres, title, size)
+ viewer.Show()
+ except :
+ viewer = ImageViewerFrame(parent, parametres, title, size)
+ viewer.Show()
+
-class ImageViewer ( wx.Frame ):
+class ImageViewerFrame ( wx.Frame ):
def __init__( self, parent, parametres, title, size ):
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = title, pos = wx.DefaultPosition, size = size, style = wx.DEFAULT_FRAME_STYLE|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX|wx.STAY_ON_TOP|wx.TAB_TRAVERSAL )
f.write(txt)
exec_rcode(ira.RPath, tmpscript, wait = True)
win = ImageViewer(ira, parametres, _("Graphic"), size=(700, 500))
- win.Show(True)
+ #win.Show(True)
dial.Destroy()
script.make_script()
exec_rcode(ira.RPath, script.scriptout, wait = True)
win = ImageViewer(ira, self.parametres, _("Graphic"), size=(700, 500))
- win.Show(True)
+ #win.Show(True)
dial.Destroy()
from chemins import ConstructPathOut, ChdTxtPathOut, FFF, ffr, PathOut, StatTxtPathOut, simipath
from configparser import ConfigParser
from functions import ReadProfileAsDico, GetTxtProfile, read_list_file, ReadList, exec_rcode, print_liste, BugReport, DoConf,\
- indices_simi, check_Rresult, progressbar, normpath_win32, TGen, ReadList, launchcommand
+ indices_simi, check_Rresult, progressbar, normpath_win32, TGen, ReadList, launchcommand, read_dist_list
from ProfList import ProfListctrlPanel
from guiparam3d import param3d, simi3d
from PrintRScript import write_afc_graph, print_simi3d, PrintSimiScript
image_id = int(event.GetEventObject().GetName())
image_path = self.list_graph[image_id][0]
viewer = ImageViewer(self, {'tmpgraph' : os.path.join(self.dirout,image_path), 'svg': 'FALSE', 'wildcard': '*.*'}, self.labels[image_id].GetLabelText(), self.listimg[image_id].GetSize())
- viewer.Show()
+ #viewer.Show()
#print image_path
#print self.labels[image_id].GetLabelText()
self.Dict = dico
self.txt = txt
self.parent = parent
- self.SetFont(wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, "Arial"))
+ #self.SetFont(wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, "Arial"))
self.labels = []
self.listimg = []
self.dirout = os.path.dirname(self.Dict['ira'])
#panel.TabChdSim = LB.LabelBook(panel, -1, agwStyle = INB_TOP|INB_SHOW_ONLY_TEXT|INB_FIT_LABELTEXT)
panel.TabChdSim.SetAGWWindowStyleFlag(notebook_flags)
panel.TabChdSim.SetArtProvider(aui.ChromeTabArt())
- font = wx.Font(self.parent.fontsize, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
- panel.TabChdSim.SetFont(font)
+ #font = wx.Font(self.parent.fontsize, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
+ #panel.TabChdSim.SetFont(font)
sizer1.Add(panel.TabChdSim,10, wx.EXPAND, 5)
panel.SetSizer(sizer1)
sizer1.Fit(panel)
self.tab_prof_seg = ProfListctrlPanel(self.parent, self, prof_seg[str(i + 1)], False, i + 1)
self.prof_seg_nb.AddPage(self.tab_prof_seg, _("Cluster") + ' %i' % (i + 1))
panel.ProfNB.SetSelection(0)
- panel.ProfNB.SetFont(font)
+ #panel.ProfNB.SetFont(font)
if clnb > 2 :
self.TabAFC = aui.AuiNotebook(panel.TabChdSim, -1, wx.DefaultPosition)
log.info('read AFC')
for val in list_graph :
#self.TabStatTot = GraphPanel(self.ira.nb, self.pathout, [val])
self.Tab.AddPage(GraphPanel(self.Tab, self.pathout, [val]), val[1])
+ self.dictlist, first = read_dist_list(self.pathout['listdist.csv'])
+ self.listpan = ListPanel(self.ira, self, self.dictlist, context='labbe')
+ self.Tab.AddPage(self.listpan, _("List"))
self.Tab.corpus = self.corpus
self.Tab.parametres = self.parametres
self.ira.nb.AddPage(self.Tab, '%s' % self.parametres['name'])