Example #1
0
    def __init__(self, parent, ini_path, ini_section, autosave=False, db_table_users_class=None):
        Panels.Database.__init__(self, parent)
        self.ErrorDialog = Dialogs.Error()

        self.ini_file = iniFile(ini_path)
        self.ini_section = ini_section
        self.autosave = autosave
        self.db_table_users_class = db_table_users_class

        # Get the database settings -------------------------------------------
        self.connect_functions_list = []
        self.disconnect_functions_list = []

        self.database = None
        self.initialize()
Example #2
0
    def __init__(self, parent, ini_path='', xrc_path='', xrc_panel=''):
        wx.Dialog.__init__(self,
                           parent,
                           wx.ID_ANY,
                           'Einstellungen',
                           size=(600, 400),
                           style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)

        self.iniFile = iniFile(ini_path)

        self.sizer = wx.FlexGridSizer(2, 1, 0, 0)
        self.sizer.AddGrowableCol(0)
        self.sizer.AddGrowableRow(0, 1)
        self.sizer.SetFlexibleDirection(wx.BOTH)
        self.sizer.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.panel_main = IniPanel(self, xrc_path, xrc_panel)
        self.sizer.Add(self.panel_main, 0, wx.ALL | wx.EXPAND)

        # Bottom panel --------------------------------------------------------
        bottom_panel = wx.Panel(self, wx.ID_ANY, wx.DefaultPosition,
                                wx.DefaultSize, wx.TAB_TRAVERSAL)
        self.sizer.Add(bottom_panel, 1, wx.ALL | wx.EXPAND)

        bottom_sizer = wx.FlexGridSizer(0, 3, 0, 0)
        bottom_sizer.AddGrowableCol(0)
        bottom_sizer.AddGrowableRow(0)

        self.button_ok = wx.Button(bottom_panel, label='Ok')
        bottom_sizer.Add(self.button_ok, 1, wx.ALL | wx.ALIGN_RIGHT, 5)
        self.button_ok.Bind(wx.EVT_BUTTON, self.on_ok)

        self.button_cancel = wx.Button(bottom_panel, label='Abbrechen')
        bottom_sizer.Add(self.button_cancel, 1, wx.ALL | wx.ALIGN_RIGHT, 5)
        self.button_cancel.Bind(wx.EVT_BUTTON, self.on_cancel)

        self.button_apply = wx.Button(bottom_panel, label=u'Übernehmen')
        bottom_sizer.Add(self.button_apply, 1, wx.ALL | wx.ALIGN_RIGHT, 5)
        self.button_apply.Bind(wx.EVT_BUTTON, self.on_apply)

        bottom_panel.SetSizer(bottom_sizer)

        # Add that stuff to the Dialog ----------------------------------------
        self.SetSizer(self.sizer)
        self.Layout()
Example #3
0
    def __init__(self,
                 parent,
                 ini_path,
                 ini_section,
                 autosave=False,
                 db_table_users_class=None):
        Panels.Database.__init__(self, parent)
        self.ErrorDialog = Dialogs.Error()

        self.ini_file = iniFile(ini_path)
        self.ini_section = ini_section
        self.autosave = autosave
        self.db_table_users_class = db_table_users_class

        # Get the database settings -------------------------------------------
        self.connect_functions_list = []
        self.disconnect_functions_list = []

        self.database = None
        self.initialize()
    def __init__(self, parent, ini_path='', xrc_path='', xrc_panel=''):
        wx.Dialog.__init__ (self, parent, wx.ID_ANY, 'Einstellungen', size=(600,400), style = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER)
        
        self.iniFile = iniFile(ini_path)
        
        self.sizer = wx.FlexGridSizer( 2, 1, 0, 0 )
        self.sizer.AddGrowableCol( 0 )
        self.sizer.AddGrowableRow( 0, 1 )
        self.sizer.SetFlexibleDirection( wx.BOTH )
        self.sizer.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
        
        self.panel_main = IniPanel(self, xrc_path, xrc_panel)
        self.sizer.Add(self.panel_main, 0, wx.ALL|wx.EXPAND)
        
        # Bottom panel --------------------------------------------------------
        bottom_panel = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
        self.sizer.Add(bottom_panel, 1, wx.ALL|wx.EXPAND)
        
        bottom_sizer = wx.FlexGridSizer( 0, 3, 0, 0 )
        bottom_sizer.AddGrowableCol( 0 )
        bottom_sizer.AddGrowableRow( 0 )
        
        self.button_ok = wx.Button(bottom_panel, label='Ok')
        bottom_sizer.Add(self.button_ok, 1, wx.ALL|wx.ALIGN_RIGHT, 5)
        self.button_ok.Bind(wx.EVT_BUTTON, self.on_ok)
        
        self.button_cancel = wx.Button(bottom_panel, label='Abbrechen')
        bottom_sizer.Add(self.button_cancel, 1, wx.ALL|wx.ALIGN_RIGHT, 5)
        self.button_cancel.Bind(wx.EVT_BUTTON, self.on_cancel)
        
        self.button_apply = wx.Button(bottom_panel, label=u'Übernehmen')
        bottom_sizer.Add(self.button_apply, 1, wx.ALL|wx.ALIGN_RIGHT, 5)
        self.button_apply.Bind(wx.EVT_BUTTON, self.on_apply)

        bottom_panel.SetSizer(bottom_sizer)
        
        # Add that stuff to the Dialog ----------------------------------------
        self.SetSizer(self.sizer)
        self.Layout()