示例#1
0
    def __init__(self, parent, clsbase=None):
        wx.Panel.__init__(self, parent, id=-1, style=wx.TAB_TRAVERSAL)
        self.parent = parent
        self.clsbase = clsbase

        self.date_debut = self.clsbase.GetValeur("date_debut")
        self.date_fin = self.clsbase.GetValeur("date_fin")
        self.IDactivite = self.clsbase.GetValeur("IDactivite")
        self.IDunite_prevision = self.clsbase.GetValeur("IDunite_prevision")

        # Calendrier
        self.box_calendrier_staticbox = wx.StaticBox(self, -1,
                                                     _(u"Calendrier"))
        self.ctrl_calendrier = CTRL_Calendrier.CTRL(self,
                                                    afficheBoutonAnnuel=True,
                                                    multiSelections=True)
        self.ctrl_calendrier.SetMinSize((200, 200))

        # Unites
        self.box_unites_staticbox = wx.StaticBox(self, -1, _(u"Unités"))
        self.ctrl_unites = CTRL_Unites(self,
                                       IDactivite=self.IDactivite,
                                       IDunite=self.IDunite_prevision)
        self.ctrl_unites.SetMinSize((330, 100))

        self.__do_layout()

        # Init
        self.ctrl_unites.MAJ()
示例#2
0
    def __init__(self, parent):
        wx.Panel.__init__(self,
                          parent,
                          id=-1,
                          name="panel_parametres",
                          style=wx.TAB_TRAVERSAL)
        self.parent = parent

        # Calendrier
        self.staticbox_calendrier_staticbox = wx.StaticBox(
            self, -1, _(u"Calendrier"))
        self.ctrl_calendrier = CTRL_Calendrier.CTRL(self,
                                                    afficheBoutonAnnuel=False,
                                                    multiSelections=True)

        # Filtres
        self.staticbox_filtres_staticbox = wx.StaticBox(
            self, -1, _(u"Filtres"))
        self.ctrl_filtres = CTRL_Filtres_transports.CTRL(self)
        self.ctrl_filtres.SetMinSize((250, -1))

        self.__set_properties()
        self.__do_layout()

        self.ctrl_calendrier.Bind(CTRL_Calendrier.EVT_SELECT_DATES,
                                  self.OnDateSelected)
示例#3
0
    def __init__(self, parent):
        wx.Dialog.__init__(self, parent, -1, name="DLG_Calendrier_simple", style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX)
        self.parent = parent
##        self.locale = wx.Locale(wx.LANGUAGE_FRENCH)
        
##        self.ctrl_calendrier = wx.calendar.CalendarCtrl(self, -1, wx.DateTime_Now(), 
##                             style = wx.calendar.CAL_SHOW_HOLIDAYS
##                             | wx.calendar.CAL_MONDAY_FIRST
##                             | wx.calendar.CAL_SEQUENTIAL_MONTH_SELECTION
##                             )
##        self.ctrl_calendrier.Bind(wx.calendar.EVT_CALENDAR, self.OnDateSelected)
        
        self.ctrl_calendrier = CTRL_Calendrier.CTRL(self, afficheAujourdhui=False, typeCalendrier="annuel", afficheBoutonAnnuel=True, multiSelections=False)
        self.ctrl_calendrier.Bind(CTRL_Calendrier.EVT_SELECT_DATES, self.OnDateSelected)

        self.bouton_ok = CTRL_Bouton_image.CTRL(self, texte=_(u"Ok"), cheminImage="Images/32x32/Valider.png")
        self.bouton_annuler = CTRL_Bouton_image.CTRL(self, id=wx.ID_CANCEL, texte=_(u"Annuler"), cheminImage="Images/32x32/Annuler.png")
        self.bouton_aide = CTRL_Bouton_image.CTRL(self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png")
        self.bouton_ok.Show(False) 
        
        self.SetTitle(_(u"Cliquez sur une date pour la sélectionner..."))
        self.SetMinSize((800, 600))
        self.bouton_aide.SetToolTip(wx.ToolTip(_(u"Cliquez ici pour obtenir de l'aide")))
        self.bouton_annuler.SetToolTip(wx.ToolTip(_(u"Cliquez ici pour fermer")))
        self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide)

        grid_sizer_base = wx.FlexGridSizer(rows=3, cols=1, vgap=0, hgap=0)
        
        grid_sizer_contenu = wx.FlexGridSizer(rows=2, cols=2, vgap=10, hgap=10)
        grid_sizer_contenu.Add(self.ctrl_calendrier, 0, wx.EXPAND, 0)
        grid_sizer_contenu.AddGrowableCol(0)
        grid_sizer_contenu.AddGrowableRow(0)
        grid_sizer_base.Add(grid_sizer_contenu, 1, wx.ALL|wx.EXPAND, 10)
        
        grid_sizer_boutons = wx.FlexGridSizer(rows=1, cols=4, vgap=10, hgap=10)
        grid_sizer_boutons.Add(self.bouton_aide, 0, 0, 0)
        grid_sizer_boutons.Add( (1, 1), 0, 0, 0)
        grid_sizer_boutons.Add(self.bouton_ok, 0, 0, 0)
        grid_sizer_boutons.Add(self.bouton_annuler, 0, 0, 0)
        grid_sizer_boutons.AddGrowableCol(0)
        grid_sizer_base.Add(grid_sizer_boutons, 1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 10)
        
        self.SetSizer(grid_sizer_base)
        grid_sizer_base.Fit(self)
        grid_sizer_base.AddGrowableCol(0)
        grid_sizer_base.AddGrowableRow(0)
        self.Layout()
        self.CenterOnScreen()
        
        self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok)
 def __init__(self, parent):
     wx.Choicebook.__init__(self, parent, id=-1)
     self.parent = parent
     #self.SetToolTipString(_(u"Sélectionnez ici une localisation"))
     
     self.listePanels = [
         ("CALENDRIER", _(u"Selon les dates sélectionnées"), CTRL_Calendrier.CTRL(self, afficheBoutonAnnuel=False) ),
         ("PLANNING", _(u"Selon le planning suivant"), CTRL_Planning(self) ),
         ]
     
     for code, label, ctrl in self.listePanels :
         self.AddPage(ctrl, label)
         
     # Sélection par défaut
     self.SetSelection(0)
示例#5
0
    def __init__(self, parent):
        wx.Panel.__init__(self, parent, -1)
        self.parent = parent

        self.ctrl_calendrier = CTRL_Calendrier.CTRL(self,
                                                    afficheBoutonAnnuel=False,
                                                    multiSelections=False,
                                                    bordHaut=5,
                                                    bordBas=5,
                                                    bordLateral=5)
        grid_sizer_base = wx.FlexGridSizer(rows=2, cols=1, vgap=0, hgap=0)
        grid_sizer_base.Add(self.ctrl_calendrier, 0, wx.EXPAND, 0)
        grid_sizer_base.AddGrowableRow(0)
        grid_sizer_base.AddGrowableCol(0)
        self.SetSizer(grid_sizer_base)
        self.Layout()

        self.ctrl_calendrier.Bind(CTRL_Calendrier.EVT_SELECT_DATES,
                                  self.OnDateSelected)
示例#6
0
    def __init__(self, parent):
        wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX|wx.THICK_FRAME)
        self.parent = parent
        
        # Bandeau
        intro = _(u"Vous pouvez ici consulter un simple calendrier qui affiche les périodes de vacances et les jours fériés. Le triangle rouge indique la date du jour. Vous pouvez permuter l'affichage annuel / mensuel en cliquant sur le bouton en haut à gauche.")
        titre = _(u"Calendrier")
        self.ctrl_bandeau = CTRL_Bandeau.Bandeau(self, titre=titre, texte=intro, hauteurHtml=30, nomImage="Images/32x32/Calendrier.png")
        
        # Liste
        self.ctrl_calendrier = CTRL_Calendrier.CTRL(self, selectionInterdite=True, typeCalendrier="annuel")

        self.bouton_aide = CTRL_Bouton_image.CTRL(self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png")
        self.bouton_fermer = CTRL_Bouton_image.CTRL(self, id=wx.ID_CANCEL, texte=_(u"Fermer"), cheminImage="Images/32x32/Fermer.png")

        self.__set_properties()
        self.__do_layout()
        
        self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide)