def _scan_directories(self):
"""Begin scanning directories for the default directory."""
logging.info("Starting to scan [{}] for sequencing runs.".format(self._get_default_directory()))
self.Freeze()
self._run_sizer = wx.BoxSizer(wx.VERTICAL)
self._upload_sizer = wx.BoxSizer(wx.HORIZONTAL)
self._sizer.Add(self._run_sizer, proportion=1, flag=wx.EXPAND)
self._sizer.Add(self._upload_sizer, proportion=0, flag=wx.ALIGN_CENTER)
self.Layout()
self.Thaw()
threading.Thread(target=find_runs_in_directory, kwargs={"directory": self._get_default_directory()}).start()
python类ALIGN_CENTER的实例源码
def _handle_connection_error(self, error_message=None):
"""Handle connection errors that might be thrown when initially connecting to IRIDA.
Args:
error_message: A more detailed error message than "Can't connect"
"""
logging.error("Handling connection error.")
self.Freeze()
connection_error_sizer = wx.BoxSizer(wx.HORIZONTAL)
connection_error_header = wx.StaticText(self, label=u"? Uh-oh. I couldn't to connect to IRIDA.")
connection_error_header.SetFont(wx.Font(18, wx.DEFAULT, wx.NORMAL, wx.BOLD))
connection_error_header.SetForegroundColour(wx.Colour(255, 0, 0))
connection_error_header.Wrap(350)
connection_error_sizer.Add(connection_error_header, flag=wx.LEFT | wx.RIGHT, border=5)
self._sizer.Add(connection_error_sizer, flag=wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, border=5)
if error_message:
self._sizer.Add(wx.StaticText(self, label=wordwrap(error_message, 350, wx.ClientDC(self))), flag=wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, border=5)
open_settings_button = wx.Button(self, label="Open Settings")
self.Bind(wx.EVT_BUTTON, self._parent._open_settings, id=open_settings_button.GetId())
self._sizer.Add(open_settings_button, flag=wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, border=5)
self.Layout()
self.Thaw()
pub.unsubscribe(self._handle_connection_error, APIConnectorTopics.connection_error_topic)
def _upload_failed(self, exception=None):
"""The upload failed, add a button to restart the upload.
Args:
exception: the error that caused the upload.
"""
logging.info("Adding try again button on upload failure.")
self.Freeze()
try_again = wx.Button(self, label="Try again")
self._upload_sizer.Add(try_again, flag=wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, border=5)
self.Bind(wx.EVT_BUTTON, self._retry_upload, id=try_again.GetId())
self.Layout()
self.Thaw()
InvalidSampleSheetsPanel.py 文件源码
项目:irida-miseq-uploader
作者: phac-nml
项目源码
文件源码
阅读 20
收藏 0
点赞 0
评论 0
def __init__(self, parent, sheets_directory):
"""Initalize InvalidSampleSheetsPanel.
Args:
parent: the owning Window
sheets_directory: the parent directory for searching sample sheets. This
argument is used in the error message that's displayed to the user to
tell them where to look to fix any issues.
"""
wx.Panel.__init__(self, parent)
self._sizer = wx.BoxSizer(wx.VERTICAL)
self.SetSizer(self._sizer)
header = wx.StaticText(self, label=u"? Looks like some sample sheets are not valid.")
header.SetFont(wx.Font(18, wx.DEFAULT, wx.NORMAL, wx.BOLD))
header.SetForegroundColour(wx.Colour(255, 0, 0))
header.Wrap(350)
self._sizer.Add(header,flag=wx.TOP | wx.BOTTOM | wx.ALIGN_CENTER, border=5)
self._sizer.Add(wx.StaticText(self,
label=wordwrap((
"I found the following sample sheets in {}, but I couldn't understand "
"their contents. Check these sample sheets in an editor outside "
"of the uploader, then click the 'Scan Again' button below.").format(sheets_directory),
350, wx.ClientDC(self))), flag=wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, border=5)
self._errors_tree = wx.TreeCtrl(self, style=wx.TR_DEFAULT_STYLE | wx.TR_FULL_ROW_HIGHLIGHT | wx.TR_LINES_AT_ROOT | wx.TR_HIDE_ROOT)
self._errors_tree_root = self._errors_tree.AddRoot("")
self._sizer.Add(self._errors_tree, flag=wx.EXPAND, proportion=1)
scan_again_button = wx.Button(self, label="Scan Again")
self.Bind(wx.EVT_BUTTON, lambda evt: send_message(SettingsDialog.settings_closed_topic), id=scan_again_button.GetId())
self._sizer.Add(scan_again_button, flag=wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, border=5)
pub.subscribe(self._sample_sheet_error, DirectoryScannerTopics.garbled_sample_sheet)
pub.subscribe(self._sample_sheet_error, DirectoryScannerTopics.missing_files)
def initOptions(self):
optionsSizer = wx.BoxSizer(wx.HORIZONTAL)
self.filtTypeComboBox = wx.ComboBox(self, choices=self.flt.filtMap.keys(),
value=self.flt.filtType, style=wx.CB_DROPDOWN)
self.Bind(wx.EVT_COMBOBOX, self.setFiltType, self.filtTypeComboBox)
optionsSizer.Add(self.filtTypeComboBox, proportion=1,
flag=wx.LEFT | wx.TOP | wx.RIGHT | wx.ALIGN_CENTER, border=20)
self.sizer.Add(optionsSizer, proportion=0)#, flag=wx.EXPAND)
def __init__(self, *args, **kwds):
# begin wxGlade: Dialogo_ejecutando.__init__
kwds["style"] = wx.DEFAULT_DIALOG_STYLE
wx.Dialog.__init__(self, *args, **kwds)
self.titulo = wx.StaticText(self, wx.ID_ANY, "Accediendo al sistema: ", style=wx.ALIGN_CENTER)
self.elementos = wx.StaticText(self, wx.ID_ANY, "000000", style=wx.ALIGN_CENTER)
self.__set_properties()
self.__do_layout()
# end wxGlade
def __do_layout(self):
# begin wxGlade: Dialogo_ejecutando.__do_layout
grid_sizer_3 = wx.FlexGridSizer(1, 2, 0, 0)
grid_sizer_3.Add(self.titulo, 0, wx.ALIGN_CENTER | wx.ALL, 4)
grid_sizer_3.Add(self.elementos, 0, wx.ALIGN_CENTER | wx.ALL, 4)
self.SetSizer(grid_sizer_3)
grid_sizer_3.Fit(self)
self.Layout()
# end wxGlade
# end of class Dialogo_ejecutando
def __do_layout(self):
# begin wxGlade: ExtractionDialog.__do_layout
sizer_15 = wx.BoxSizer(wx.HORIZONTAL)
sizer_16 = wx.BoxSizer(wx.VERTICAL)
sizer_19 = wx.BoxSizer(wx.HORIZONTAL)
sizer_20 = wx.BoxSizer(wx.HORIZONTAL)
sizer_17 = wx.BoxSizer(wx.HORIZONTAL)
sizer_18 = wx.BoxSizer(wx.HORIZONTAL)
sizer_21 = wx.BoxSizer(wx.HORIZONTAL)
sizer_16.Add(self.panel_21, 1, 0, 0)
sizer_21.Add(self.panel_22, 0, wx.EXPAND, 0)
sizer_21.Add(self.label_2, 0, wx.ALIGN_CENTER, 0)
sizer_21.Add(self.panel_23, 0, wx.EXPAND, 0)
sizer_21.Add(self.text_ctrl_outpath, 1, wx.EXPAND, 0)
sizer_21.Add(self.panel_24, 0, wx.EXPAND, 0)
sizer_21.Add(self.button_browse_path, 0, wx.EXPAND, 0)
sizer_21.Add(self.panel_25, 0, wx.EXPAND, 0)
sizer_16.Add(sizer_21, 1, wx.EXPAND, 0)
sizer_16.Add(self.panel_10, 0, wx.EXPAND, 0)
sizer_18.Add(self.panel_13, 0, wx.EXPAND, 0)
sizer_18.Add(self.radio_box_selection, 1, wx.EXPAND, 0)
sizer_18.Add(self.panel_14, 0, wx.EXPAND, 0)
sizer_17.Add(sizer_18, 1, wx.EXPAND, 0)
sizer_16.Add(sizer_17, 1, wx.EXPAND, 0)
sizer_16.Add(self.panel_18, 0, wx.EXPAND, 0)
sizer_20.Add(self.panel_19, 0, wx.EXPAND, 0)
sizer_20.Add(self.checklistbox_options, 1, wx.EXPAND, 0)
sizer_20.Add(self.panel_20, 0, wx.EXPAND, 0)
sizer_16.Add(sizer_20, 1, 0, 0)
sizer_16.Add(self.panel_12, 0, wx.EXPAND, 0)
sizer_19.Add(self.panel_15, 1, wx.EXPAND, 0)
sizer_19.Add(self.button_extract, 0, 0, 0)
sizer_19.Add(self.panel_16, 0, wx.EXPAND, 0)
sizer_19.Add(self.button_cancel, 0, 0, 0)
sizer_19.Add(self.panel_17, 0, wx.EXPAND, 0)
sizer_16.Add(sizer_19, 0, wx.EXPAND, 0)
sizer_16.Add(self.panel_11, 0, wx.EXPAND, 0)
sizer_15.Add(sizer_16, 1, 0, 0)
self.SetSizer(sizer_15)
self.Layout()
# end wxGlade
def __init__(self, message, title):
wx.Dialog.__init__(self, None, -1, title,size=(300, 120))
self.CenterOnScreen(wx.BOTH)
text = wx.StaticText(self, -1, message)
ok = wx.Button(self, wx.ID_OK, "???????????????")
ok.SetDefault()
vbox = wx.BoxSizer(wx.VERTICAL)
vbox.Add(text, 1, wx.ALIGN_CENTER|wx.TOP, 10)
vbox.Add(ok, 1, wx.ALIGN_CENTER|wx.BOTTOM, 10)
self.SetSizer(vbox)
def GenerateMethodButtonSizer(self):
normal_bt_font = wx.Font(faces["size"] / 3, wx.DEFAULT, wx.NORMAL, wx.NORMAL, faceName=faces["helv"])
mouseover_bt_font = wx.Font(faces["size"] / 3, wx.DEFAULT, wx.NORMAL, wx.NORMAL, faceName=faces["helv"], underline=True)
msizer = wx.BoxSizer(wx.HORIZONTAL)
for confnode_method in self.Controler.ConfNodeMethods:
if "method" in confnode_method and confnode_method.get("shown", True):
button = GenBitmapTextButton(self.Editor,
bitmap=GetBitmap(confnode_method.get("bitmap", "Unknown")),
label=confnode_method["name"],
style=wx.NO_BORDER)
button.SetFont(normal_bt_font)
button.SetToolTipString(confnode_method["tooltip"])
if confnode_method.get("push", False):
button.Bind(wx.EVT_LEFT_DOWN, self.GetButtonCallBackFunction(confnode_method["method"], True))
else:
button.Bind(wx.EVT_BUTTON, self.GetButtonCallBackFunction(confnode_method["method"]), button)
# a fancy underline on mouseover
def setFontStyle(b, s):
def fn(event):
b.SetFont(s)
b.Refresh()
event.Skip()
return fn
button.Bind(wx.EVT_ENTER_WINDOW, setFontStyle(button, mouseover_bt_font))
button.Bind(wx.EVT_LEAVE_WINDOW, setFontStyle(button, normal_bt_font))
# hack to force size to mini
if not confnode_method.get("enabled", True):
button.Disable()
msizer.AddWindow(button, flag=wx.ALIGN_CENTER)
return msizer
def add_choice(self, choices, tp, title, key, unit):
sizer = wx.BoxSizer( wx.HORIZONTAL )
lab_title = wx.StaticText( self, wx.ID_ANY, title,
wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTRE )
lab_title.Wrap( -1 )
sizer.Add( lab_title, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
ctrl = wx.Choice( self, wx.ID_ANY,
wx.DefaultPosition, wx.DefaultSize,
[str(choice) for choice in choices], 0 )
ctrl.SetSelection(0)
ctrl.SetValue = lambda x:ctrl.SetSelection(choices.index(x))
ctrl.GetValue = lambda : tp(choices[ctrl.GetSelection()])
self.ctrl_dic[key] = ctrl
ctrl.Bind( wx.EVT_CHOICE, lambda x : self.para_changed(key))
sizer.Add( ctrl, 2, wx.ALL, 5 )
lab_unit = wx.StaticText( self, wx.ID_ANY, unit,
wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTRE )
lab_unit.Wrap( -1 )
sizer.Add( lab_unit, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
self.tus.append((lab_title, lab_unit))
self.lst.Add( sizer, 0, wx.EXPAND, 5 )
def __init__( self, parent):
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = 'Plugin List',
pos = wx.DefaultPosition, size = wx.Size( 412,500 ),
style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )
logopath = os.path.join(root_dir, 'data/logo.ico')
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_3DLIGHT ) )
self.SetIcon(wx.Icon(logopath, wx.BITMAP_TYPE_ICO))
self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
bSizer1 = wx.BoxSizer( wx.VERTICAL )
bSizer2 = wx.BoxSizer( wx.HORIZONTAL )
self.m_staticText1 = wx.StaticText( self, wx.ID_ANY, "Search:",
wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_staticText1.Wrap( -1 )
bSizer2.Add( self.m_staticText1, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
self.txt_search = wx.TextCtrl( self, wx.ID_ANY, wx.EmptyString,
wx.DefaultPosition, wx.DefaultSize, 0 )
bSizer2.Add( self.txt_search, 1, wx.ALL, 5 )
bSizer1.Add( bSizer2, 0, wx.EXPAND, 5 )
self.lst_plgs = VirtualListCtrl( self, ['Name', 'Shotcut'])
self.lst_plgs.SetColumnWidth(0,200)
self.lst_plgs.SetColumnWidth(1,200)
bSizer1.Add( self.lst_plgs, 1, wx.ALL|wx.EXPAND, 5 )
self.SetSizer( bSizer1 )
self.Layout()
self.Centre( wx.BOTH )
# Connect Events
self.txt_search.Bind( wx.EVT_TEXT, self.on_search )
self.lst_plgs.Bind(wx.EVT_LIST_KEY_DOWN, self.on_run)
self.load()
self.Bind(wx.EVT_CLOSE, self.on_close)
def __init__(self, parent, title, label):
wx.Dialog.__init__(self, parent, 20, title, wx.DefaultPosition, wx.Size(300, 140))
vbox = wx.BoxSizer(wx.VERTICAL)
hbox = wx.BoxSizer(wx.HORIZONTAL)
buttonbox = wx.BoxSizer(wx.HORIZONTAL)
fgs = wx.FlexGridSizer(3, 2, 9, 5)
self.title_tc1 = wx.StaticText(self, label=label)
self.tc1 = wx.TextCtrl(self, size=(150, 25))
self.max = IntCtrl( self, size=(150, 25) )
self.max.Enable( True )
self.max.Hide()
fgs.AddMany([(self.title_tc1), (self.tc1, 1, wx.EXPAND)])
fgs.AddMany([(self.title_tc1), (self.max, 1, wx.EXPAND)])
fgs.AddGrowableRow(2, 1)
fgs.AddGrowableCol(1, 1)
hbox.Add(fgs, flag=wx.ALL | wx.EXPAND, border=15)
self.b_ok = wx.Button(self, label='Ok', id=OK_DIALOG)
self.b_cancel = wx.Button(self, label='Cancel', id=CANCEL_DIALOG)
buttonbox.Add(self.b_ok, 1, border=15)
buttonbox.Add(self.b_cancel, 1, border=15)
vbox.Add(hbox, flag=wx.ALIGN_CENTER | wx.ALL | wx.EXPAND)
vbox.Add(buttonbox, flag=wx.ALIGN_CENTER)
self.SetSizer(vbox)
def __init__(self, parent, id, title):
wx.Dialog.__init__(self, parent, id, title)
self.selection_idx = None
self.selection_text = None
vbox = wx.BoxSizer(wx.VERTICAL)
stline = wx.StaticText(self, 11, 'Please select from the following components')
vbox.Add(stline, 0, wx.ALIGN_CENTER|wx.TOP)
self.comp_list = wx.ListBox(self, 331, style=wx.LB_SINGLE)
vbox.Add(self.comp_list, 1, wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND)
self.SetSizer(vbox)
self.comp_list.Bind(wx.EVT_LISTBOX, self.on_selection, id=wx.ID_ANY)
def __init__(self, parent):
wx.Panel.__init__(self, parent, id=wx.ID_ANY, pos=(0, 0), size=(480, 320))
self.bitmap_1 = wx.StaticBitmap(self, wx.ID_ANY, wx.Bitmap("./gui/products.png", wx.BITMAP_TYPE_ANY), pos=(0, 0))
products = get_products()
buttonids = []
i = 0
for product in products:
if product.isshown:
#480x320
self.but = wx.Button(self, id=wx.ID_ANY, label=product.name + u"\n" + u"%0.2f" % product.price, pos=((i%4)*120, int(i/4)*120), size=(120, 120))
self.but.SetBackgroundColour((255-((i+int(i/4))*20 % 40), (160+((i+int(i/4))*50 % 100)), 0))
#self.but.SetForegroundColour("#006699")
self.but.SetFont(wx.Font(23, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Humor Sans"))
self.but.Bind(wx.EVT_LEFT_DOWN, parent.onProduct, id=self.but.Id)
i += 1
if not settings.onlyOneDrink:
self.b_less = wx.Button(self, id = wx.ID_ANY, label=u"-", pos=(0,250), size=(120, 70))
self.b_less.SetFont(wx.Font(60, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Humor Sans"))
self.b_less.Bind(wx.EVT_LEFT_DOWN, self.onLess, id=self.b_less.Id)
self.l_amount = wx.StaticText(self, wx.ID_ANY, "%2d" % 0, pos=(137, 245), style=wx.ALIGN_CENTER)
self.l_amount.SetFont(wx.Font(50, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Sans"))
self.b_more = wx.Button(self, id = wx.ID_ANY, label=u"+", pos=(240,250), size=(120, 70))
self.b_more.SetFont(wx.Font(60, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Humor Sans"))
self.b_more.Bind(wx.EVT_LEFT_DOWN, self.onMore, id=self.b_more.Id)
self.b_exit = wx.Button(self, id = wx.ID_ANY, label=u"x", pos=(360,250), size=(120, 70))
self.b_exit.SetFont(wx.Font(30, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Humor Sans"))
self.b_exit.Bind(wx.EVT_LEFT_DOWN, parent.onExit, id=self.b_exit.Id)
if i <= 4:
self.l_user = wx.StaticText(self, wx.ID_ANY, "todo", pos=(20,170), style=wx.ALIGN_CENTER)
else:
self.l_user = wx.StaticText(self, wx.ID_ANY, "todo", pos=((i%4)*120+20,170), style=wx.ALIGN_CENTER)
self.l_user.SetFont(wx.Font(25, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Humor Sans"))
def __init__(self, parent):
wx.Panel.__init__(self, parent = parent)
file_drop_target = FileDropTarget(self)
lbl = wx.StaticText(self, label="Drag Transactions File here:")
self.fileTextCtrl = wx.TextCtrl(self, style=wx.TE_MULTILINE|wx.VSCROLL|wx.TE_READONLY)
self.fileTextCtrl.SetDropTarget(file_drop_target)
button = wx.Button(self, label = "Process File")
button.Bind(wx.EVT_LEFT_DOWN, self.process_file)
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(lbl, 1, wx.ALL, 5)
sizer.Add(self.fileTextCtrl, 10, wx.EXPAND|wx.ALL, 10)
sizer.Add(button, 1, wx.ALIGN_CENTER, 5)
self.SetSizer(sizer)
self.text = ""
def create(self, panel, value="#FFFFFF", orientation=wx.HORIZONTAL, event=None, key=None,
*args, **kwargs):
item_sizer = wx.BoxSizer(orientation)
self.event = event
self.key = key
label_panel = wx.Panel(panel, style=wx.BORDER_SIMPLE)
label_sizer = wx.BoxSizer(wx.HORIZONTAL)
label_sizer2 = wx.BoxSizer(wx.VERTICAL)
label_text = wx.StaticText(label_panel, label=unicode(value), style=wx.ALIGN_CENTER)
self.text = label_text
label_sizer.Add(label_text, 1, wx.ALIGN_CENTER)
label_sizer2.Add(label_sizer, 1, wx.ALIGN_CENTER)
label_panel.SetSizer(label_sizer2)
label_panel.SetBackgroundColour(value)
self.panel = label_panel
button = wx.Button(panel, label=translate_key(MODULE_KEY.join(key + ['button'])))
button.Bind(wx.EVT_BUTTON, self.on_button_press)
border_size = wx.SystemSettings_GetMetric(wx.SYS_BORDER_Y)
button_size = button.GetSize()
if button_size[0] > 150:
button_size[0] = 150
button_size[1] -= border_size*2
self.button = button
label_panel.SetMinSize(button_size)
label_panel.SetSize(button_size)
item_sizer.Add(label_panel, 0, wx.ALIGN_CENTER)
item_sizer.AddSpacer(2)
item_sizer.Add(button, 0, wx.EXPAND)
return item_sizer
def create_textctrl(**kwargs):
panel = kwargs.get('panel')
value = kwargs.get('value')
key = kwargs.get('key')
bind = kwargs.get('bind')
item_sizer = wx.BoxSizer(wx.HORIZONTAL)
item_name = MODULE_KEY.join(key)
item_box = wx.TextCtrl(panel, id=id_renew(item_name, update=True),
value=unicode(value))
item_box.Bind(wx.EVT_TEXT, bind)
item_text = wx.StaticText(panel, label=translate_key(item_name))
item_sizer.Add(item_text, 0, wx.ALIGN_CENTER)
item_sizer.Add(item_box)
return {'item': item_sizer, 'text_size': item_text.GetSize()[0], 'text_ctrl': item_text}
def __init__(self, *args, **kwargs):
if 'on_ok_callback' in kwargs:
self.on_ok_callback = kwargs.pop('on_ok_callback')
else:
self.on_ok_callback = None
if 'on_cancel_callback' in kwargs:
self.on_cancel_callback = kwargs.pop('on_cancel_callback')
else:
self.on_cancel_callback = None
super(Dialog, self).__init__(*args, **kwargs)
self._OM = ObjectManager(self)
self._OM.subscribe(self.on_wells_changed, 'add')
self._OM.subscribe(self.on_wells_changed, 'post_remove')
#self._OM.addcallback("add", self.on_wells_change)
#self._OM.addcallback("post-remove", self.on_wells_change)
self._mapui = []
self.choice = wx.Choice(self)
self.choice.Bind(wx.EVT_CHOICE, self.on_select)
self.ls_panel = Panel(self)
button_sizer = self.CreateButtonSizer(wx.OK | wx.CANCEL)
self.Bind(wx.EVT_BUTTON, self.on_button)
vbox = wx.BoxSizer(wx.VERTICAL)
vbox.Add(self.choice, flag=wx.ALIGN_CENTER)
vbox.Add(self.ls_panel, 1, wx.ALL | wx.EXPAND)
vbox.Add(button_sizer, flag=wx.ALIGN_RIGHT)
self.SetSizer(vbox)
self.SetSize((400, 600))
self.SetTitle(u"Seletor de Perfis para Plotagem")
self.on_wells_change(None)
def create_inside_panel(self):
self.dvc = dv.DataViewCtrl(self.panel, style=wx.BORDER_THEME | dv.DV_VERT_RULES | dv.DV_MULTIPLE | dv.DV_ROW_LINES)
dv_col = self.dvc.AppendTextColumn("Seq", 0, width=45, align=wx.ALIGN_CENTER)
dv_col.SetMinWidth(45)
dv_col = self.dvc.AppendTextColumn("Well Name", 1, width=85)
dv_col.SetMinWidth(55)
dv_col = self.dvc.AppendTextColumn("Start", 2, width=85)
dv_col.SetMinWidth(55)
dv_col = self.dvc.AppendTextColumn("End", 3, width=85)
dv_col.SetMinWidth(55)
dv_col = self.dvc.AppendTextColumn("Unit", 4, width=85)
dv_col.SetMinWidth(55)
dv_col = self.dvc.AppendToggleColumn("Import", 5, width=90, mode=dv.DATAVIEW_CELL_ACTIVATABLE)
dv_col.SetMinWidth(90)
#dv_col = self.dvc.AppendTextColumn("LAS File Name", 6, width=100)
#dv_col.SetMinWidth(100)
#dv_col = self.dvc.AppendTextColumn("Progress", 6, width=85)
dv_col = self.dvc.AppendProgressColumn ("Progress", 6, width=85)#, mode=dv.DATAVIEW_CELL_INERT)
dv_col.SetMinWidth(80)
for dv_col in self.dvc.Columns:
dv_col.Renderer.Alignment = wx.ALIGN_CENTER
dv_col.SetAlignment(wx.ALIGN_CENTER)
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(self.dvc, 1, wx.EXPAND|wx.ALL, border=10)
sizer.Add(self.getPanelBottomButtons(), 0, wx.EXPAND|wx.BOTTOM|wx.TOP)
self.panel.SetSizer(sizer)
self.panel.Layout()