Example #1
0
import wx
import os
import ftplib

w = wx.App()
screen = wx.ScreenDC()
size = screen.GetSize()
bmap = wx.Bitmap(size[0],size[1])
memo = wx.MemoryDC(bmap)
memo.Blit(0,0,size[0],size(1,screen,0,0)

del memo 
bmap.SaveFile("grabbed.png",wx.BITMAP_TYPE_PNG)

sess_ = ftplib.FTP(192.168.1.1, "msfadmin", "msfadmin")
file_ = open("grabbed.png", "rb")
sess_.storebinary("STOR /tmp/grabbed.png", file_)

file_.close()
sess_.quit()


Example #2
0
    def __init__(self, parent):
        """Constructor"""

        wx.Panel.__init__(self, parent=parent)
        self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM)
        self.SetBackgroundColour(wx.WHITE)
        self.frame = parent

        # detect what's currently on
        needed_robots = autodetect()
        # if you can't find a single robot
        # then show all of them just in case
        if needed_robots.find("GoPiGo") == -1 and \
           needed_robots.find("GrovePi") == -1 and \
           needed_robots.find("BrickPi3") == -1:
            needed_robots = "GoPiGo_GrovePi_BrickPi3"

        vSizer = wx.BoxSizer(wx.VERTICAL)

        font = wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL, False,
                       u'Helvetica')
        self.SetFont(font)

        #-------------------------------------------------------------------
        # icon
        icon_sizer = wx.BoxSizer(wx.HORIZONTAL)
        bmp = wx.Bitmap(
            "/home/pi/di_update/Raspbian_For_Robots/Troubleshooting_GUI/dex.png",
            type=wx.BITMAP_TYPE_PNG)  # Draw the photograph.
        bitmap = wx.StaticBitmap(self, bitmap=bmp)
        bmpW, bmpH = bitmap.GetSize()
        icon_sizer.Add(bitmap, 0, wx.RIGHT | wx.LEFT | wx.EXPAND, 50)

        # Troubleshoot the GoPiGo
        if needed_robots.find("GoPiGo") != -1:
            gopigo_sizer = wx.BoxSizer(wx.HORIZONTAL)
            troubleshoot_gopigo = wx.Button(self, label="Troubleshoot GoPiGo")
            troubleshoot_gopigo.Bind(wx.EVT_BUTTON, self.troubleshoot_gopigo)
            gopigo_txt = wx.StaticText(
                self, -1,
                "This button runs a series of tests on the GoPiGo Hardware.")
            gopigo_txt.Wrap(150)
            gopigo_sizer.AddSpacer(50)
            gopigo_sizer.Add(troubleshoot_gopigo, 1, wx.EXPAND)
            gopigo_sizer.AddSpacer(20)
            gopigo_sizer.Add(gopigo_txt, 1, wx.ALIGN_CENTER_VERTICAL)
            gopigo_sizer.AddSpacer(50)

        if needed_robots.find("GrovePi") != -1:
            # Troubleshoot the GrovePi
            grovepi_sizer = wx.BoxSizer(wx.HORIZONTAL)
            troubleshoot_grovepi = wx.Button(self,
                                             label="Troubleshoot GrovePi")
            troubleshoot_grovepi.Bind(wx.EVT_BUTTON, self.grovepi)
            grovepi_txt = wx.StaticText(
                self, -1,
                "This button runs a series of tests on the GrovePi Hardware.")
            grovepi_txt.Wrap(150)
            grovepi_sizer.AddSpacer(50)
            grovepi_sizer.Add(troubleshoot_grovepi, 1,
                              wx.EXPAND | wx.LEFT | wx.RIGHT, 10)
            grovepi_sizer.AddSpacer(20)
            grovepi_sizer.Add(grovepi_txt, 1)
            grovepi_sizer.AddSpacer(50)

        #Troubleshoot the BrickPi3
        if needed_robots.find("BrickPi3") != -1:
            brickpi3_sizer = wx.BoxSizer(wx.HORIZONTAL)
            troubleshoot_brickpi3 = wx.Button(self,
                                              label="Troubleshoot BrickPi3")
            troubleshoot_brickpi3.Bind(wx.EVT_BUTTON, self.brickpi3)
            brickpi3_txt = wx.StaticText(
                self, -1,
                "This button runs a series of tests on the BrickPi3 Hardware. (not BrickPi+)"
            )
            brickpi3_txt.Wrap(150)
            brickpi3_sizer.AddSpacer(50)
            brickpi3_sizer.Add(troubleshoot_brickpi3, 1, wx.EXPAND)
            brickpi3_sizer.AddSpacer(20)
            brickpi3_sizer.Add(brickpi3_txt, 1, wx.ALIGN_CENTER_VERTICAL)
            brickpi3_sizer.AddSpacer(50)

        # Demo the GoPiGo
        if needed_robots.find("GoPiGo") != -1:
            demo_sizer = wx.BoxSizer(wx.HORIZONTAL)
            demo_gopigo = wx.Button(self, label="Demo GoPiGo")
            demo_gopigo.Bind(wx.EVT_BUTTON, self.demo_gopigo)
            demo_gopigo_txt = wx.StaticText(
                self, -1, "This button demonstrates the GoPiGo Hardware.")
            demo_gopigo_txt.Wrap(150)
            demo_sizer.AddSpacer(50)
            demo_sizer.Add(demo_gopigo, 1, wx.EXPAND)
            demo_sizer.AddSpacer(20)
            demo_sizer.Add(demo_gopigo_txt, 1, wx.ALIGN_CENTER_VERTICAL)
            demo_sizer.AddSpacer(50)

        # Exit
        exit_sizer = wx.BoxSizer(wx.HORIZONTAL)
        exit_button = wx.Button(self, label="Exit")
        exit_button.Bind(wx.EVT_BUTTON, self.onClose)
        exit_sizer.AddSpacer(50)
        exit_sizer.Add(exit_button, 1, wx.EXPAND)
        exit_sizer.AddSpacer(50)

        caution_sizer = wx.BoxSizer(wx.HORIZONTAL)
        caution_txt = wx.StaticText(
            self, -1,
            "Caution: Do not close the LXTerminal window running in the background right now."
        )
        caution_sizer.AddSpacer(50)
        caution_sizer.Add(caution_txt, 1, wx.EXPAND)
        caution_sizer.AddSpacer(50)

        vSizer.Add(icon_sizer, 0, wx.SHAPED | wx.FIXED_MINSIZE)
        if needed_robots.find("GoPiGo") != -1:
            vSizer.Add(gopigo_sizer, 1, wx.EXPAND)
            vSizer.AddSpacer(20)
        if needed_robots.find("GrovePi") != -1:
            vSizer.Add(grovepi_sizer, 1, wx.EXPAND)
            vSizer.AddSpacer(20)
        if needed_robots.find("BrickPi3") != -1:
            vSizer.Add(brickpi3_sizer, 1, wx.EXPAND)
            vSizer.AddSpacer(20)
        if needed_robots.find("GoPiGo") != -1:
            vSizer.Add(demo_sizer, 1, wx.EXPAND)
            vSizer.AddSpacer(20)

        vSizer.Add(exit_sizer, 1, wx.EXPAND)
        vSizer.AddSpacer(20)
        vSizer.Add(caution_sizer, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL)

        self.SetSizerAndFit(vSizer)
Example #3
0
    def __init__(self, notebook, localsettings):

        self.localsettings = localsettings

        pagetitle = self.GetLabel("editsettingslabel")

        action = "SELECT * FROM settings"
        results = db.SendSQL(action, localsettings.dbconnection)

        practicename = results[0][1]
        openfrom = results[0][2]
        opento = results[0][3]
        operationtime = results[0][4]
        practiceaddress = results[0][5]
        practicepostcode = results[0][6]
        practicetelephone = results[0][7]
        practiceemail = results[0][8]
        practicewebsite = results[0][9]
        language = localsettings.language

        self.pagetitle = miscmethods.GetPageTitle(notebook, pagetitle)

        wx.Panel.__init__(self, notebook)

        topsizer = wx.BoxSizer(wx.VERTICAL)

        horizontalsizer = wx.BoxSizer(wx.HORIZONTAL)

        leftsizer = wx.BoxSizer(wx.VERTICAL)

        namelabel = wx.StaticText(
            self, -1,
            self.GetLabel("settingspracticenamelabel") + ": ")
        font = namelabel.GetFont()
        font.SetPointSize(font.GetPointSize() - 2)
        namelabel.SetFont(font)
        leftsizer.Add(namelabel, 0, wx.ALIGN_LEFT)

        nameentry = wx.TextCtrl(self, -1, practicename)
        leftsizer.Add(nameentry, 0, wx.EXPAND)

        addresslabel = wx.StaticText(
            self, -1,
            self.GetLabel("clientaddresslabel") + ": ")
        addresslabel.SetFont(font)
        leftsizer.Add(addresslabel, 0, wx.ALIGN_LEFT)

        addressentry = wx.TextCtrl(self,
                                   -1,
                                   practiceaddress,
                                   style=wx.TE_MULTILINE)
        leftsizer.Add(addressentry, 0, wx.EXPAND)

        postcodelabel = wx.StaticText(
            self, -1,
            self.GetLabel("clientpostcodelabel") + ": ")
        postcodelabel.SetFont(font)
        leftsizer.Add(postcodelabel, 0, wx.ALIGN_LEFT)

        postcodeentry = wx.TextCtrl(self, -1, practicepostcode)
        leftsizer.Add(postcodeentry, 0, wx.EXPAND)

        telephonelabel = wx.StaticText(
            self, -1,
            self.GetLabel("clientsearchphonelabel") + ": ")
        telephonelabel.SetFont(font)
        leftsizer.Add(telephonelabel, 0, wx.ALIGN_LEFT)

        telephoneentry = wx.TextCtrl(self, -1, practicetelephone)
        leftsizer.Add(telephoneentry, 0, wx.EXPAND)

        emaillabel = wx.StaticText(
            self, -1,
            self.GetLabel("clientemailaddresslabel") + ": ")
        emaillabel.SetFont(font)
        leftsizer.Add(emaillabel, 0, wx.ALIGN_LEFT)

        emailentry = wx.TextCtrl(self, -1, practiceemail)
        leftsizer.Add(emailentry, 0, wx.EXPAND)

        websitelabel = wx.StaticText(self, -1,
                                     self.GetLabel("websitelabel") + ": ")
        websitelabel.SetFont(font)
        leftsizer.Add(websitelabel, 0, wx.ALIGN_LEFT)

        websiteentry = wx.TextCtrl(self, -1, practicewebsite)
        leftsizer.Add(websiteentry, 0, wx.EXPAND)

        horizontalsizer.Add(leftsizer, 1, wx.EXPAND)

        horizontalsizer.Add(wx.StaticText(self, -1, "", size=(20, -1)), 0,
                            wx.EXPAND)

        middlesizer = wx.BoxSizer(wx.VERTICAL)

        openfromlabel = wx.StaticText(
            self, -1,
            self.GetLabel("settingsopenfromlabel") + ": ")
        openfromlabel.SetFont(font)
        middlesizer.Add(openfromlabel, 0, wx.ALIGN_LEFT)

        openfromentry = wx.TextCtrl(self, -1, openfrom)
        middlesizer.Add(openfromentry, 0, wx.EXPAND)

        opentolabel = wx.StaticText(
            self, -1,
            self.GetLabel("settingsopentolabel") + ": ")
        opentolabel.SetFont(font)
        middlesizer.Add(opentolabel, 0, wx.ALIGN_LEFT)

        opentoentry = wx.TextCtrl(self, -1, opento)
        middlesizer.Add(opentoentry, 0, wx.EXPAND)

        operationtimelabel = wx.StaticText(
            self, -1,
            self.GetLabel("settingsoperatingtimelabel") + ": ")
        operationtimelabel.SetFont(font)
        middlesizer.Add(operationtimelabel, 0, wx.ALIGN_LEFT)

        operationtimeentry = wx.TextCtrl(self, -1, operationtime)
        middlesizer.Add(operationtimeentry, 0, wx.EXPAND)

        prescriptionfeelabel = wx.StaticText(
            self, -1,
            self.GetLabel("prescriptionfeelabel") + ": ")
        prescriptionfeelabel.SetFont(font)
        middlesizer.Add(prescriptionfeelabel, 0, wx.ALIGN_LEFT)

        prescriptionfeeentry = wx.TextCtrl(
            self, -1,
            miscmethods.FormatPrice(self.localsettings.prescriptionfee))
        middlesizer.Add(prescriptionfeeentry, 0, wx.EXPAND)

        middlesizer.Add(wx.StaticText(self, -1, "", size=(-1, 20)), 0,
                        wx.EXPAND)

        asmshelterlabel = wx.StaticText(
            self, -1,
            self.GetLabel("asmshelterlabel") + ": ")
        asmshelterlabel.SetFont(font)
        middlesizer.Add(asmshelterlabel, 0, wx.ALIGN_LEFT)

        asmsheltersizer = wx.BoxSizer(wx.HORIZONTAL)

        asmbitmap = wx.Bitmap("icons/asm.png")
        asmstaticbitmap = wx.StaticBitmap(self, -1, asmbitmap)
        asmsheltersizer.Add(asmstaticbitmap, 0, wx.ALIGN_CENTER)

        asmshelterentry = wx.TextCtrl(self,
                                      -1,
                                      self.GetLabel("nonelabel"),
                                      style=wx.TE_READONLY)
        asmshelterentry.SetToolTipString(self.GetLabel("asmsheltertooltip"))
        asmsheltersizer.Add(asmshelterentry, 1, wx.EXPAND)

        searchbitmap = wx.Bitmap("icons/search.png")
        asmshelterbutton = wx.BitmapButton(self, -1, searchbitmap)
        asmshelterbutton.Bind(wx.EVT_BUTTON, self.FindShelter)
        asmshelterbutton.SetToolTipString(self.GetLabel("searchlabel"))
        asmsheltersizer.Add(asmshelterbutton, 0, wx.EXPAND)

        middlesizer.Add(asmsheltersizer, 0, wx.EXPAND)

        asmvaccinationlabel = wx.StaticText(
            self, -1,
            self.GetLabel("asmvaccinationlabel") + ": ")
        asmvaccinationlabel.SetFont(font)
        middlesizer.Add(asmvaccinationlabel, 0, wx.ALIGN_LEFT)

        asmvaccinationsizer = wx.BoxSizer(wx.HORIZONTAL)

        #asmbitmap = wx.Bitmap("icons/asm.png")
        asmstaticbitmap = wx.StaticBitmap(self, -1, asmbitmap)
        asmvaccinationsizer.Add(asmstaticbitmap, 0, wx.ALIGN_CENTER)

        asmvaccinationentry = wx.TextCtrl(self,
                                          -1,
                                          self.GetLabel("nonelabel"),
                                          style=wx.TE_READONLY)
        asmvaccinationentry.SetToolTipString(
            self.GetLabel("asmvaccinationtooltip"))
        asmvaccinationsizer.Add(asmvaccinationentry, 1, wx.EXPAND)

        searchbitmap = wx.Bitmap("icons/search.png")
        asmvaccinationbutton = wx.BitmapButton(self, -1, searchbitmap)
        asmvaccinationbutton.Bind(wx.EVT_BUTTON, self.FindVaccination)
        asmvaccinationbutton.SetToolTipString(self.GetLabel("searchlabel"))
        asmvaccinationsizer.Add(asmvaccinationbutton, 0, wx.EXPAND)

        middlesizer.Add(asmvaccinationsizer, 0, wx.EXPAND)

        horizontalsizer.Add(middlesizer, 1, wx.EXPAND)

        horizontalsizer.Add(wx.StaticText(self, -1, "", size=(20, -1)), 0,
                            wx.EXPAND)

        rightsizer = wx.BoxSizer(wx.VERTICAL)

        languagelabel = wx.StaticText(
            self, -1,
            self.GetLabel("settingslanguagelabel") + ": ")
        languagelabel.SetFont(font)
        rightsizer.Add(languagelabel, 0, wx.ALIGN_LEFT)

        inp = open("language.py")
        filecontents = ""
        for a in inp.readlines():
            filecontents = filecontents + a
        inp.close()

        alternativelanguage = filecontents.split("####")[1]

        languageentry = wx.Choice(self,
                                  -1,
                                  choices=("British English",
                                           alternativelanguage))
        languageentry.SetSelection(language)
        rightsizer.Add(languageentry, 0, wx.EXPAND)

        appointmentrefreshlabel = wx.StaticText(
            self, -1,
            self.GetLabel("appointmentrefreshlabel") + ":")
        appointmentrefreshlabel.SetFont(font)
        rightsizer.Add(appointmentrefreshlabel, 0, wx.ALIGN_LEFT)

        appointmentrefreshentry = wx.TextCtrl(
            self, -1, str(self.localsettings.appointmentrefresh))
        rightsizer.Add(appointmentrefreshentry, 0, wx.EXPAND)

        rightsizer.Add(wx.StaticText(self, -1, "", size=(-1, 20)), 0,
                       wx.EXPAND)

        submitbutton = wx.Button(self, -1, self.GetLabel("submitlabel"))
        submitbutton.SetBackgroundColour("green")
        submitbutton.SetToolTipString(self.GetLabel("submitlabel"))
        submitbutton.Bind(wx.EVT_BUTTON, self.Submit)
        rightsizer.Add(submitbutton, 0, wx.ALIGN_CENTER_HORIZONTAL)

        horizontalsizer.Add(rightsizer, 1, wx.EXPAND)

        topsizer.Add(horizontalsizer, 1, wx.EXPAND)

        self.SetSizer(topsizer)

        self.nameentry = nameentry
        self.addressentry = addressentry
        self.postcodeentry = postcodeentry
        self.telephoneentry = telephoneentry
        self.emailentry = emailentry
        self.websiteentry = websiteentry
        self.openfromentry = openfromentry
        self.opentoentry = opentoentry
        self.operationtimeentry = operationtimeentry
        self.asmshelterentry = asmshelterentry
        self.asmvaccinationentry = asmvaccinationentry
        self.asmvaccinationbutton = asmvaccinationbutton
        self.languageentry = languageentry
        self.appointmentrefreshentry = appointmentrefreshentry
        self.prescriptionfeeentry = prescriptionfeeentry
        self.notebook = notebook

        self.UpdateShelterName()
        self.UpdateShelterVaccination()
Example #4
0
    def DrawPaneButton(self, dc, window, button, button_state, _rect, pane):
        """
        Draws a pane button in the pane caption area.

        :param `dc`: a :class:`wx.DC` device context;
        :param `window`: an instance of :class:`wx.Window`;
        :param integer `button`: the button to be drawn;
        :param integer `button_state`: the pane button state;
        :param wx.Rect `_rect`: the pane caption rectangle;
        :param `pane`: the pane for which the button is drawn.
        """

        if not pane:
            return

        if button == AUI_BUTTON_CLOSE:
            if pane.state & optionActive:
                bmp = self._active_close_bitmap
            else:
                bmp = self._inactive_close_bitmap

        elif button == AUI_BUTTON_PIN:
            if pane.state & optionActive:
                bmp = self._active_pin_bitmap
            else:
                bmp = self._inactive_pin_bitmap

        elif button == AUI_BUTTON_MAXIMIZE_RESTORE:
            if pane.IsMaximized():
                if pane.state & optionActive:
                    bmp = self._active_restore_bitmap
                else:
                    bmp = self._inactive_restore_bitmap
            else:
                if pane.state & optionActive:
                    bmp = self._active_maximize_bitmap
                else:
                    bmp = self._inactive_maximize_bitmap

        elif button == AUI_BUTTON_MINIMIZE:
            if pane.state & optionActive:
                bmp = self._active_minimize_bitmap
            else:
                bmp = self._inactive_minimize_bitmap

        isVertical = pane.HasCaptionLeft()

        rect = wx.Rect(*_rect)

        if isVertical:
            old_x = rect.x
            rect.x = rect.x + (rect.width // 2) - (bmp.GetWidth() // 2)
            rect.width = old_x + rect.width - rect.x - 1
        else:
            rect.y = rect.y + (rect.height // 2) - (bmp.GetHeight() // 2)

        if button_state == AUI_BUTTON_STATE_PRESSED:
            rect.x += 1
            rect.y += 1

        if button_state in [AUI_BUTTON_STATE_HOVER, AUI_BUTTON_STATE_PRESSED]:

            if pane.state & optionActive:

                dc.SetBrush(
                    wx.Brush(StepColour(self._active_caption_colour, 120)))
                dc.SetPen(wx.Pen(StepColour(self._active_caption_colour, 70)))

            else:

                dc.SetBrush(
                    wx.Brush(StepColour(self._inactive_caption_colour, 120)))
                dc.SetPen(wx.Pen(StepColour(self._inactive_caption_colour,
                                            70)))

            if wx.Platform != "__WXMAC__":
                # draw the background behind the button
                dc.DrawRectangle(rect.x, rect.y, 15, 15)
            else:
                # Darker the bitmap a bit
                bmp = DarkenBitmap(
                    bmp, self._active_caption_colour,
                    StepColour(self._active_caption_colour, 110))

        if isVertical:
            bmp = wx.Bitmap(bmp).ConvertToImage().Rotate90(
                clockwise=False).ConvertToBitmap()

        # draw the button itself
        dc.DrawBitmap(bmp, rect.x, rect.y, True)
Example #5
0
    def __init__(self, parent):
        wx.Frame.__init__(self, parent)

        self.panel = wx.Panel(self)
        self.heading = wx.StaticText(self.panel,
                                     label="IIT Patna Academic Alexa",
                                     style=wx.ALIGN_CENTRE)
        self.heading.SetFont(wx.Font(15, wx.DECORATIVE, wx.ITALIC, wx.NORMAL))
        self.heading.SetForegroundColour(wx.RED)
        self.quote = wx.StaticText(self.panel, label="Chatbot:")
        #self.result = wx.StaticText(self.panel, label="")
        self.result = wx.TextCtrl(self.panel,
                                  style=wx.TE_MULTILINE | wx.TE_READONLY
                                  | wx.TE_RICH,
                                  size=(540, 200))
        self.result.SetForegroundColour(wx.BLUE)
        self.button = wx.Button(self.panel, label="Enter")
        self.lblname = wx.StaticText(self.panel, label="Your Question:")
        self.editname = wx.TextCtrl(self.panel, size=(540, -1))
        self.rbox = wx.RadioBox(self.panel,
                                label='Type',
                                choices=['Non-DB', 'DB'],
                                majorDimension=1,
                                style=wx.RA_SPECIFY_ROWS)
        self.rbox.SetSelection(0)
        self.rbox.Bind(wx.EVT_RADIOBOX, self.onRadioBox)
        # insert a picture of 100*100 size of your choice
        bmp = wx.Bitmap('iitp_resize.png')
        self.imgbutton = wx.Button(self.panel, label="", size=(100, 100))
        self.imgbutton.SetBitmap(bmp)

        # self.jpg1 = wx.Image('nischal_resize.jpg', wx.BITMAP_TYPE_ANY).ConvertToBitmap()
        # self.imgbutton = wx.StaticBitmap(self, -1, self.jpg1, (10 + self.jpg1.GetWidth(), 5), (self.jpg1.GetWidth(), self.jpg1.GetHeight()))

        # Set sizer for the frame, so we can change frame size to match widgets
        self.windowSizer = wx.BoxSizer()
        self.windowSizer.Add(self.panel, 1, wx.ALL | wx.EXPAND)

        # Set sizer for the panel content
        self.sizer = wx.GridBagSizer(30, 30)
        self.sizer.Add(self.imgbutton, (0, 0))
        self.sizer.Add(self.heading, (0, 1))
        self.sizer.Add(self.lblname, (1, 0))
        self.sizer.Add(self.editname, (1, 1))
        self.sizer.Add(self.quote, (2, 0))
        self.sizer.Add(self.result, (2, 1))
        self.sizer.Add(self.rbox, (3, 0))
        self.sizer.Add(self.button, (4, 0), (3, 2))

        # Set simple sizer for a nice border
        self.border = wx.BoxSizer()
        self.border.Add(self.sizer, 1, wx.ALL | wx.EXPAND, 5)

        # Use the sizers
        self.panel.SetSizerAndFit(self.border)
        self.SetSizerAndFit(self.windowSizer)

        # Set event handlers
        self.button.Bind(wx.EVT_BUTTON, self.OnButton)

        # Trying to call initialize
        string = "Hello! My name is academic chatbot. I am here at your service\nPlease wait! I am configuring myself"
        self.result.SetLabel(string)
        self.sentiment_polarity = []
        self.embedding_matrix, self.tokenizer, self.MAX_LENGTH, self.db, self.nlp = initialize(
        )
        string = "Thanks for your patience!\nI am ready! Let\'s Start!"
        self.result.SetLabel(string)

        # Feedback initialization
        self.type_input = 0
        self.class_feedback_file = open('class_feedback.csv', 'a+')
        self.db_feedback_file = open('db_feedback_file.csv', 'a+')
        self.ndb_feedback_file = open('ndb_feedback_file.csv', 'a+')
        self.prev_string = ''
        self.prev_selection = -1
Example #6
0
	def __init__( self, parent ):
		wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.Size( 1086,756 ), style = wx.TAB_TRAVERSAL )
		
		bSizer1 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_splitter2 = wx.SplitterWindow( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.SP_3D|wx.SP_LIVE_UPDATE )
		self.m_splitter2.Bind( wx.EVT_IDLE, self.m_splitter2OnIdle )
		self.m_splitter2.SetMinimumPaneSize( 300 )
		
		self.panel_path = wx.Panel( self.m_splitter2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer2 = wx.BoxSizer( wx.VERTICAL )
		
		bSizer4 = wx.BoxSizer( wx.HORIZONTAL )
		
		self.button_refresh_categories = wx.BitmapButton( self.panel_path, wx.ID_ANY, wx.Bitmap( u"resources/refresh.png", wx.BITMAP_TYPE_ANY ), wx.DefaultPosition, wx.DefaultSize, wx.BU_AUTODRAW )
		bSizer4.Add( self.button_refresh_categories, 0, wx.ALL|wx.ALIGN_BOTTOM, 5 )
		
		
		bSizer2.Add( bSizer4, 0, wx.ALIGN_RIGHT, 5 )
		
		self.tree_libraries = wx.dataview.DataViewCtrl( self.panel_path, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.dataview.DV_SINGLE )
		bSizer2.Add( self.tree_libraries, 1, wx.ALL|wx.EXPAND, 5 )
		
		
		self.panel_path.SetSizer( bSizer2 )
		self.panel_path.Layout()
		bSizer2.Fit( self.panel_path )
		self.menu_libraries = wx.Menu()
		self.menu_libraries_add_folder = wx.MenuItem( self.menu_libraries, wx.ID_ANY, u"Add folder", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_libraries.Append( self.menu_libraries_add_folder )
		
		self.menu_libraries_add_library = wx.MenuItem( self.menu_libraries, wx.ID_ANY, u"Add library", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_libraries.Append( self.menu_libraries_add_library )
		
		self.menu_libraries_rename = wx.MenuItem( self.menu_libraries, wx.ID_ANY, u"Rename", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_libraries.Append( self.menu_libraries_rename )
		
		self.menu_libraries_remove = wx.MenuItem( self.menu_libraries, wx.ID_ANY, u"Remove", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_libraries.Append( self.menu_libraries_remove )
		
		self.menu_libraries.AppendSeparator()
		
		self.menu_libraries_add_module = wx.MenuItem( self.menu_libraries, wx.ID_ANY, u"Add module", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_libraries.Append( self.menu_libraries_add_module )
		
		self.panel_path.Bind( wx.EVT_RIGHT_DOWN, self.panel_pathOnContextMenu ) 
		
		self.m_panel3 = wx.Panel( self.m_splitter2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer3 = wx.BoxSizer( wx.VERTICAL )
		
		self.module_splitter = wx.SplitterWindow( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.SP_3D )
		self.module_splitter.Bind( wx.EVT_IDLE, self.module_splitterOnIdle )
		
		self.panel_modules = wx.Panel( self.module_splitter, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer12 = wx.BoxSizer( wx.VERTICAL )
		
		self.filters_panel = wx.Panel( self.panel_modules, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer161 = wx.BoxSizer( wx.HORIZONTAL )
		
		self.m_staticText15 = wx.StaticText( self.filters_panel, wx.ID_ANY, u"Filters: ", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText15.Wrap( -1 )
		bSizer161.Add( self.m_staticText15, 0, wx.ALL, 5 )
		
		
		self.filters_panel.SetSizer( bSizer161 )
		self.filters_panel.Layout()
		bSizer161.Fit( self.filters_panel )
		bSizer12.Add( self.filters_panel, 0, wx.EXPAND|wx.RIGHT|wx.LEFT, 5 )
		
		bSizer7 = wx.BoxSizer( wx.VERTICAL )
		
		bSizer11 = wx.BoxSizer( wx.HORIZONTAL )
		
		bSizer10 = wx.BoxSizer( wx.HORIZONTAL )
		
		self.toolbar_module = wx.ToolBar( self.panel_modules, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TB_FLAT ) 
		self.toolbar_module.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
		self.toolbar_module.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
		
		self.toggle_module_path = self.toolbar_module.AddLabelTool( wx.ID_ANY, u"tool", wx.Bitmap( u"resources/tree_mode.png", wx.BITMAP_TYPE_ANY ), wx.NullBitmap, wx.ITEM_CHECK, wx.EmptyString, wx.EmptyString, None ) 
		
		self.toolbar_module.AddSeparator()
		
		self.toggle_show_both_changes = self.toolbar_module.AddLabelTool( wx.ID_ANY, u"tool", wx.Bitmap( u"resources/show_both.png", wx.BITMAP_TYPE_ANY ), wx.NullBitmap, wx.ITEM_CHECK, wx.EmptyString, wx.EmptyString, None ) 
		
		self.toggle_show_conflict_changes = self.toolbar_module.AddLabelTool( wx.ID_ANY, u"tool", wx.Bitmap( u"resources/show_conf.png", wx.BITMAP_TYPE_ANY ), wx.NullBitmap, wx.ITEM_CHECK, wx.EmptyString, wx.EmptyString, None ) 
		
		self.toggle_show_incoming_changes = self.toolbar_module.AddLabelTool( wx.ID_ANY, u"tool", wx.Bitmap( u"resources/show_in.png", wx.BITMAP_TYPE_ANY ), wx.NullBitmap, wx.ITEM_CHECK, wx.EmptyString, wx.EmptyString, None ) 
		
		self.toggle_show_outgoing_changes = self.toolbar_module.AddLabelTool( wx.ID_ANY, u"tool", wx.Bitmap( u"resources/show_out.png", wx.BITMAP_TYPE_ANY ), wx.NullBitmap, wx.ITEM_CHECK, wx.EmptyString, wx.EmptyString, None ) 
		
		self.toolbar_module.Realize() 
		
		bSizer10.Add( self.toolbar_module, 1, wx.EXPAND, 5 )
		
		bSizer61 = wx.BoxSizer( wx.HORIZONTAL )
		
		self.search_modules = wx.SearchCtrl( self.panel_modules, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.TE_PROCESS_ENTER )
		self.search_modules.ShowSearchButton( True )
		self.search_modules.ShowCancelButton( False )
		self.search_modules.SetMinSize( wx.Size( 200,-1 ) )
		
		bSizer61.Add( self.search_modules, 0, wx.ALL|wx.EXPAND, 5 )
		
		self.button_refresh_modules = wx.BitmapButton( self.panel_modules, wx.ID_ANY, wx.Bitmap( u"resources/refresh.png", wx.BITMAP_TYPE_ANY ), wx.DefaultPosition, wx.DefaultSize, wx.BU_AUTODRAW )
		bSizer61.Add( self.button_refresh_modules, 0, wx.ALL, 5 )
		
		
		bSizer10.Add( bSizer61, 0, 0, 5 )
		
		
		bSizer11.Add( bSizer10, 1, wx.EXPAND, 5 )
		
		
		bSizer7.Add( bSizer11, 0, wx.EXPAND, 5 )
		
		self.tree_modules = wx.dataview.DataViewCtrl( self.panel_modules, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.dataview.DV_MULTIPLE )
		bSizer7.Add( self.tree_modules, 1, wx.ALL|wx.EXPAND, 5 )
		
		
		bSizer12.Add( bSizer7, 1, wx.EXPAND, 5 )
		
		
		self.panel_modules.SetSizer( bSizer12 )
		self.panel_modules.Layout()
		bSizer12.Fit( self.panel_modules )
		self.module_splitter.Initialize( self.panel_modules )
		bSizer3.Add( self.module_splitter, 1, wx.EXPAND, 5 )
		
		
		self.m_panel3.SetSizer( bSizer3 )
		self.m_panel3.Layout()
		bSizer3.Fit( self.m_panel3 )
		self.m_splitter2.SplitVertically( self.panel_path, self.m_panel3, 294 )
		bSizer1.Add( self.m_splitter2, 1, wx.EXPAND, 5 )
		
		
		self.SetSizer( bSizer1 )
		self.Layout()
		self.menu_modules = wx.Menu()
		self.menu_modules_update = wx.MenuItem( self.menu_modules, wx.ID_ANY, u"Update", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_modules_update.SetBitmap( wx.Bitmap( u"resources/update.png", wx.BITMAP_TYPE_ANY ) )
		self.menu_modules.Append( self.menu_modules_update )
		
		self.menu_modules_force_update = wx.MenuItem( self.menu_modules, wx.ID_ANY, u"Force update", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_modules_force_update.SetBitmap( wx.Bitmap( u"resources/update.png", wx.BITMAP_TYPE_ANY ) )
		self.menu_modules.Append( self.menu_modules_force_update )
		
		self.menu_modules.AppendSeparator()
		
		self.menu_modules_commit = wx.MenuItem( self.menu_modules, wx.ID_ANY, u"Commit", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_modules_commit.SetBitmap( wx.Bitmap( u"resources/commit.png", wx.BITMAP_TYPE_ANY ) )
		self.menu_modules.Append( self.menu_modules_commit )
		
		self.menu_modules_force_commit = wx.MenuItem( self.menu_modules, wx.ID_ANY, u"Force commit", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_modules_force_commit.SetBitmap( wx.Bitmap( u"resources/commit.png", wx.BITMAP_TYPE_ANY ) )
		self.menu_modules.Append( self.menu_modules_force_commit )
		
		self.menu_modules.AppendSeparator()
		
		self.menu_modules_add = wx.MenuItem( self.menu_modules, wx.ID_ANY, u"Add module", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_modules.Append( self.menu_modules_add )
		
		self.menu_modules_edit = wx.MenuItem( self.menu_modules, wx.ID_ANY, u"Edit module", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_modules.Append( self.menu_modules_edit )
		
		self.menu_modules_delete = wx.MenuItem( self.menu_modules, wx.ID_ANY, u"Delete module", wx.EmptyString, wx.ITEM_NORMAL )
		self.menu_modules.Append( self.menu_modules_delete )
		
		self.Bind( wx.EVT_RIGHT_DOWN, self.PanelModulesOnContextMenu ) 
		
		
		# Connect Events
		self.Bind( wx.EVT_INIT_DIALOG, self.onInitDialog )
		self.button_refresh_categories.Bind( wx.EVT_BUTTON, self.onButtonRefreshCategoriesClick )
		self.Bind( wx.EVT_MENU, self.onMenuLibrariesAddFolder, id = self.menu_libraries_add_folder.GetId() )
		self.Bind( wx.EVT_MENU, self.onMenuLibrariesAddLibrary, id = self.menu_libraries_add_library.GetId() )
		self.Bind( wx.EVT_MENU, self.onMenuLibrariesRename, id = self.menu_libraries_rename.GetId() )
		self.Bind( wx.EVT_MENU, self.onMenuLibrariesRemove, id = self.menu_libraries_remove.GetId() )
		self.Bind( wx.EVT_MENU, self.onMenuLibrariesAddModule, id = self.menu_libraries_add_module.GetId() )
		self.Bind( wx.EVT_TOOL, self.onToggleModulePathClicked, id = self.toggle_module_path.GetId() )
		self.Bind( wx.EVT_TOOL, self.onToggleShowBothChangesClicked, id = self.toggle_show_both_changes.GetId() )
		self.Bind( wx.EVT_TOOL, self.onToggleShowConflictChangesClicked, id = self.toggle_show_conflict_changes.GetId() )
		self.Bind( wx.EVT_TOOL, self.onToggleShowIncomingChangesClicked, id = self.toggle_show_incoming_changes.GetId() )
		self.Bind( wx.EVT_TOOL, self.onToggleShowOutgoingChangesClicked, id = self.toggle_show_outgoing_changes.GetId() )
		self.search_modules.Bind( wx.EVT_SEARCHCTRL_SEARCH_BTN, self.onSearchModulesButton )
		self.search_modules.Bind( wx.EVT_TEXT_ENTER, self.onSearchModulesTextEnter )
		self.button_refresh_modules.Bind( wx.EVT_BUTTON, self.onButtonRefreshModulesClick )
		self.Bind( wx.EVT_MENU, self.onMenuModulesUpdate, id = self.menu_modules_update.GetId() )
		self.Bind( wx.EVT_MENU, self.onMenuModulesForceUpdate, id = self.menu_modules_force_update.GetId() )
		self.Bind( wx.EVT_MENU, self.onMenuModulesCommit, id = self.menu_modules_commit.GetId() )
		self.Bind( wx.EVT_MENU, self.onMenuModulesForceCommit, id = self.menu_modules_force_commit.GetId() )
		self.Bind( wx.EVT_MENU, self.onMenuModulesAdd, id = self.menu_modules_add.GetId() )
		self.Bind( wx.EVT_MENU, self.onMenuModulesEdit, id = self.menu_modules_edit.GetId() )
		self.Bind( wx.EVT_MENU, self.onMenuModulesDelete, id = self.menu_modules_delete.GetId() )
Example #7
0
    def __init__(self, *args, **kwds):
        # begin wxGlade: wxGladePreferencesUI.__init__
        kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE
        wx.Dialog.__init__(self, *args, **kwds)
        self.SetTitle(_("wxGlade: preferences"))
        _icon = wx.NullIcon
        _icon.CopyFromBitmap(wx.Bitmap(_icon_path, wx.BITMAP_TYPE_ANY))
        self.SetIcon(_icon)

        sizer_1 = wx.BoxSizer(wx.VERTICAL)

        self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=0)
        sizer_1.Add(self.notebook_1, 1, wx.ALL | wx.EXPAND, 5)

        self.notebook_1_pane_1 = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.notebook_1.AddPage(self.notebook_1_pane_1, _("Interface"))

        sizer_3 = wx.BoxSizer(wx.VERTICAL)

        self.use_menu_icons = wx.CheckBox(self.notebook_1_pane_1, wx.ID_ANY,
                                          _("Use icons in menu items"))
        self.use_menu_icons.SetValue(1)
        sizer_3.Add(self.use_menu_icons, 0, wx.ALL | wx.EXPAND, 5)

        self.frame_tool_win = wx.CheckBox(
            self.notebook_1_pane_1, wx.ID_ANY,
            _("Show properties and tree windows as small frames"))
        self.frame_tool_win.SetValue(1)
        sizer_3.Add(self.frame_tool_win, 0, wx.ALL | wx.EXPAND, 5)

        self.show_progress = wx.CheckBox(
            self.notebook_1_pane_1, wx.ID_ANY,
            _("Show progress dialog when loading wxg files"))
        self.show_progress.SetValue(1)
        sizer_3.Add(self.show_progress, 0, wx.ALL | wx.EXPAND, 5)

        self.remember_geometry = wx.CheckBox(
            self.notebook_1_pane_1, wx.ID_ANY,
            _("Remember position and size of wxGlade windows"))
        self.remember_geometry.SetValue(1)
        sizer_3.Add(self.remember_geometry, 0, wx.ALL | wx.EXPAND, 5)

        self.show_sizer_handle = wx.CheckBox(self.notebook_1_pane_1, wx.ID_ANY,
                                             _("Show \"handles\" of sizers"))
        self.show_sizer_handle.SetValue(1)
        sizer_3.Add(self.show_sizer_handle, 0, wx.ALL | wx.EXPAND, 5)

        self.use_kde_dialogs = wx.CheckBox(self.notebook_1_pane_1, wx.ID_ANY,
                                           _("Use native file dialogs on KDE"))
        self.use_kde_dialogs.SetValue(1)
        sizer_3.Add(self.use_kde_dialogs, 0, wx.ALL | wx.EXPAND, 5)

        sizer_4 = wx.FlexGridSizer(4, 2, 0, 0)
        sizer_3.Add(sizer_4, 0, wx.EXPAND, 3)

        label_1 = wx.StaticText(
            self.notebook_1_pane_1, wx.ID_ANY,
            _("Initial path for \nfile opening/saving dialogs:"))
        sizer_4.Add(label_1, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)

        self.open_save_path = wx.TextCtrl(self.notebook_1_pane_1, wx.ID_ANY,
                                          "")
        self.open_save_path.SetMinSize((196, -1))
        sizer_4.Add(self.open_save_path, 1, wx.ALIGN_CENTER_VERTICAL | wx.ALL,
                    5)

        label_2_copy = wx.StaticText(
            self.notebook_1_pane_1, wx.ID_ANY,
            _("Initial path for \ncode generation file dialogs:"))
        sizer_4.Add(label_2_copy, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)

        self.codegen_path = wx.TextCtrl(self.notebook_1_pane_1, wx.ID_ANY, "")
        self.codegen_path.SetMinSize((196, -1))
        sizer_4.Add(self.codegen_path, 1, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)

        label_2 = wx.StaticText(self.notebook_1_pane_1, wx.ID_ANY,
                                _("Number of items in file history"))
        sizer_4.Add(label_2, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)

        self.number_history = wx.SpinCtrl(self.notebook_1_pane_1,
                                          wx.ID_ANY,
                                          "4",
                                          min=0,
                                          max=100,
                                          style=0)
        self.number_history.SetMinSize((196, -1))
        sizer_4.Add(self.number_history, 1, wx.ALIGN_CENTER_VERTICAL | wx.ALL,
                    5)

        label_2_copy_1 = wx.StaticText(
            self.notebook_1_pane_1, wx.ID_ANY,
            _("Number of buttons per row\nin the main palette"))
        sizer_4.Add(label_2_copy_1, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)

        self.buttons_per_row = wx.SpinCtrl(self.notebook_1_pane_1,
                                           wx.ID_ANY,
                                           "5",
                                           min=1,
                                           max=100,
                                           style=0)
        self.buttons_per_row.SetMinSize((196, -1))
        sizer_4.Add(self.buttons_per_row, 1, wx.ALIGN_CENTER_VERTICAL | wx.ALL,
                    5)

        self.notebook_1_pane_2 = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.notebook_1.AddPage(self.notebook_1_pane_2, _("Other"))

        sizer_5 = wx.BoxSizer(wx.VERTICAL)

        self.use_dialog_units = wx.CheckBox(
            self.notebook_1_pane_2, wx.ID_ANY,
            _("Use dialog units by default for size properties"))
        sizer_5.Add(self.use_dialog_units, 0, wx.ALL | wx.EXPAND, 5)

        self.wxg_backup = wx.CheckBox(self.notebook_1_pane_2, wx.ID_ANY,
                                      _("Create backup wxg files"))
        self.wxg_backup.SetValue(1)
        sizer_5.Add(self.wxg_backup, 0, wx.ALL | wx.EXPAND, 5)

        self.codegen_backup = wx.CheckBox(
            self.notebook_1_pane_2, wx.ID_ANY,
            _("Create backup files for generated source"))
        self.codegen_backup.SetValue(1)
        sizer_5.Add(self.codegen_backup, 0, wx.ALL | wx.EXPAND, 5)

        self.allow_duplicate_names = wx.CheckBox(
            self.notebook_1_pane_2, wx.ID_ANY,
            _("Allow duplicate widget names"))
        self.allow_duplicate_names.Hide()
        sizer_5.Add(self.allow_duplicate_names, 0, wx.ALL | wx.EXPAND, 5)

        sizer_7 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_5.Add(sizer_7, 0, wx.EXPAND, 0)

        self.default_border = wx.CheckBox(
            self.notebook_1_pane_2, wx.ID_ANY,
            _("Default border width for widgets"))
        sizer_7.Add(self.default_border, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL,
                    5)

        self.default_border_size = wx.SpinCtrl(self.notebook_1_pane_2,
                                               wx.ID_ANY,
                                               "",
                                               min=0,
                                               max=20,
                                               style=0)
        self.default_border_size.SetMinSize((45, 22))
        sizer_7.Add(self.default_border_size, 0, wx.ALL, 5)

        sizer_7_copy = wx.BoxSizer(wx.HORIZONTAL)
        sizer_5.Add(sizer_7_copy, 0, wx.EXPAND, 0)

        self.autosave = wx.CheckBox(self.notebook_1_pane_2, wx.ID_ANY,
                                    _("Auto save wxg files every "))
        sizer_7_copy.Add(
            self.autosave, 0,
            wx.ALIGN_CENTER_VERTICAL | wx.BOTTOM | wx.LEFT | wx.TOP, 5)

        self.autosave_delay = wx.SpinCtrl(self.notebook_1_pane_2,
                                          wx.ID_ANY,
                                          "120",
                                          min=30,
                                          max=300,
                                          style=0)
        self.autosave_delay.SetMinSize((45, 22))
        sizer_7_copy.Add(self.autosave_delay, 0, wx.BOTTOM | wx.TOP, 5)

        label_3 = wx.StaticText(self.notebook_1_pane_2, wx.ID_ANY,
                                _(" seconds"))
        sizer_7_copy.Add(
            label_3, 0,
            wx.ALIGN_CENTER_VERTICAL | wx.BOTTOM | wx.FIXED_MINSIZE | wx.TOP,
            5)

        self.write_timestamp = wx.CheckBox(
            self.notebook_1_pane_2, wx.ID_ANY,
            _("Insert timestamp on generated source files"))
        self.write_timestamp.SetValue(1)
        sizer_5.Add(self.write_timestamp, 0, wx.ALL | wx.EXPAND, 5)

        self.write_generated_from = wx.CheckBox(
            self.notebook_1_pane_2, wx.ID_ANY,
            _("Insert .wxg file name on generated source files"))
        sizer_5.Add(self.write_generated_from, 0, wx.ALL | wx.EXPAND, 5)

        self.backup_suffix = wx.RadioBox(
            self.notebook_1_pane_2,
            wx.ID_ANY,
            _("Backup options"),
            choices=[_("append ~ to filename"),
                     _("append .bak to filename")],
            majorDimension=2,
            style=wx.RA_SPECIFY_COLS)
        self.backup_suffix.SetSelection(0)
        sizer_5.Add(self.backup_suffix, 0, wx.ALL | wx.EXPAND, 5)

        sizer_6 = wx.StaticBoxSizer(
            wx.StaticBox(self.notebook_1_pane_2, wx.ID_ANY,
                         _("Local widget path")), wx.HORIZONTAL)
        sizer_5.Add(sizer_6, 0, wx.ALL | wx.EXPAND, 5)

        self.local_widget_path = wx.TextCtrl(self.notebook_1_pane_2, wx.ID_ANY,
                                             "")
        sizer_6.Add(self.local_widget_path, 1, wx.ALL, 3)

        self.choose_widget_path = wx.Button(self.notebook_1_pane_2,
                                            wx.ID_ANY,
                                            _("..."),
                                            style=wx.BU_EXACTFIT)
        sizer_6.Add(self.choose_widget_path, 0,
                    wx.ALIGN_CENTER_VERTICAL | wx.ALL, 3)

        sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_1.Add(sizer_2, 0, wx.ALIGN_RIGHT | wx.ALL, 10)

        self.ok = wx.Button(self, wx.ID_OK, "")
        self.ok.SetDefault()
        sizer_2.Add(self.ok, 0, 0, 0)

        self.cancel = wx.Button(self, wx.ID_CANCEL, "")
        sizer_2.Add(self.cancel, 0, wx.LEFT, 10)

        self.notebook_1_pane_2.SetSizer(sizer_5)

        sizer_4.AddGrowableCol(1)

        self.notebook_1_pane_1.SetSizer(sizer_3)

        self.SetSizer(sizer_1)
        sizer_1.Fit(self)

        self.SetAffirmativeId(self.ok.GetId())
        self.SetEscapeId(self.cancel.GetId())

        self.Layout()
        self.Centre()
Example #8
0
    def __init__(self, parent):
        wx.Dialog.__init__(self,
                           parent,
                           id=wx.ID_ANY,
                           title=u"About",
                           pos=wx.DefaultPosition,
                           size=wx.Size(450, 439),
                           style=wx.DEFAULT_DIALOG_STYLE)

        self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)

        bSizer17 = wx.BoxSizer(wx.VERTICAL)

        self.m_staticText10 = wx.StaticText(self, wx.ID_ANY, u"MetaGenerador",
                                            wx.DefaultPosition,
                                            wx.Size(1000, 50), wx.ALIGN_CENTRE)
        self.m_staticText10.Wrap(-1)
        self.m_staticText10.SetFont(
            wx.Font(28, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL,
                    wx.FONTWEIGHT_BOLD, False, "Sans"))

        bSizer17.Add(self.m_staticText10, 0,
                     wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 5)

        self.m_bitmap1 = wx.StaticBitmap(
            self, wx.ID_ANY,
            wx.Bitmap(u"src/icon//notebook128x128.png", wx.BITMAP_TYPE_ANY),
            wx.DefaultPosition, wx.DefaultSize, 0)
        bSizer17.Add(self.m_bitmap1, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 5)

        self.m_staticText13 = wx.StaticText(
            self, wx.ID_ANY,
            u"MetaGenerador Generador de datos para mysql\n en formatos como MySQL escrito en wxpython ,\n python 3",
            wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTRE)
        self.m_staticText13.Wrap(-1)
        bSizer17.Add(self.m_staticText13, 0,
                     wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 5)

        self.m_staticText11 = wx.StaticText(self, wx.ID_ANY,
                                            u"*****@*****.**",
                                            wx.DefaultPosition, wx.DefaultSize,
                                            0)
        self.m_staticText11.Wrap(-1)
        bSizer17.Add(self.m_staticText11, 0,
                     wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 5)

        self.m_hyperlink1 = wx.adv.HyperlinkCtrl(
            self, wx.ID_ANY, u"MetaGenerator",
            u"https://github.com/pacpac1992/MetaGenerador", wx.DefaultPosition,
            wx.DefaultSize, wx.adv.HL_DEFAULT_STYLE)
        bSizer17.Add(self.m_hyperlink1, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL,
                     5)

        self.m_staticText12 = wx.StaticText(
            self, wx.ID_ANY,
            u"Iconos de flaticons: www.flaticon.com \n Madebyoliver, Kirill Kazachek, Freepik \nLicence: Creative Commons BY 3.0",
            wx.DefaultPosition, wx.DefaultSize, 0)
        self.m_staticText12.Wrap(-1)
        bSizer17.Add(self.m_staticText12, 0,
                     wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 5)

        self.SetSizer(bSizer17)
        self.Layout()

        self.Centre(wx.BOTH)
Example #9
0
 def icon(self):
     if not self._icon:
         self._icon = wx.Bitmap(self._icon_image)
     return self._icon
Example #10
0
    def __init__(self, parent, fileName):

        self.parent = parent
        self.fileName = fileName

        self.normalFont = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
        self.normalFont.SetPointSize(self.normalFont.GetPointSize() + 1)
        self.smallerFont = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)

        self.greyColour = wx.SystemSettings.GetColour(wx.SYS_COLOUR_GRAYTEXT)

        if os.path.isdir(fileName):
            self.text = fileName
            bitmap = wx.Bitmap(os.path.join(bitmapDir, "folder.png"),
                               wx.BITMAP_TYPE_PNG)
            self.icon = wx.IconFromBitmap(bitmap)
            self.description = ""
            return

        self.text = os.path.split(fileName)[1]
        extension = os.path.splitext(fileName)[1]

        if not extension:
            self.text = fileName
            bitmap = wx.Bitmap(os.path.join(bitmapDir, "empty_icon.png"),
                               wx.BITMAP_TYPE_PNG)
            self.icon = wx.IconFromBitmap(bitmap)
            self.description = "File"
            return

        fileType = wx.TheMimeTypesManager.GetFileTypeFromExtension(extension)

        bmp = wx.Bitmap(os.path.join(bitmapDir, "empty_icon.png"),
                        wx.BITMAP_TYPE_PNG)
        bmp = wx.IconFromBitmap(bmp)

        if not fileType:
            icon = wx.IconFromLocation(wx.IconLocation(fileName))
            if not icon.IsOk():
                self.icon = bmp
            else:
                self.icon = icon

            self.description = "%s File" % extension[1:].upper()
            return

        #------- Icon info
        info = fileType.GetIconInfo()
        icon = None

        if info is not None:
            icon, file, idx = info
            if icon.IsOk():
                bmp = icon
            else:
                icon = None

        if icon is None:
            icon = wx.IconFromLocation(wx.IconLocation(fileName))
            if icon.IsOk():
                bmp = icon
            else:
                command = fileType.GetOpenCommand(fileName)
                command = " ".join(command.split()[0:-1])
                command = command.replace('"', "")
                if " -" in command:
                    command = command[0:command.index(" -")]

                icon = wx.IconFromLocation(wx.IconLocation(command))
                if icon.IsOk():
                    bmp = icon

        self.icon = bmp
        self.description = convert(fileType.GetDescription())

        if not self.description:
            self.description = "%s File" % extension[1:].upper()
Example #11
0
    def gui(self):
        self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
        self.toolbar = self.CreateToolBar(wx.TB_HORIZONTAL, wx.ID_ANY)
        self.tool_new_document = self.toolbar.AddTool(
            wx.ID_ANY, u"tool",
            wx.Bitmap(u"src/icon/new-file.png",
                      wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL,
            wx.EmptyString, wx.EmptyString, None)
        self.toolbar.AddSeparator()
        self.tool_database = self.toolbar.AddTool(
            wx.ID_ANY, u"tool",
            wx.Bitmap(u"src/icon/database.png",
                      wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL,
            wx.EmptyString, wx.EmptyString, None)
        self.toolbar.AddSeparator()
        self.tool_export = self.toolbar.AddTool(
            wx.ID_ANY, u"tool",
            wx.Bitmap(u"src/icon/export.png",
                      wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL,
            wx.EmptyString, wx.EmptyString, None)
        self.toolbar.AddSeparator()
        self.tool_preferences = self.toolbar.AddTool(
            wx.ID_ANY, u"tool",
            wx.Bitmap(u"src/icon/settings.png",
                      wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL,
            wx.EmptyString, wx.EmptyString, None)
        self.toolbar.AddSeparator()
        self.tool_help = self.toolbar.AddTool(
            wx.ID_ANY, u"tool",
            wx.Bitmap(u"src/icon/info.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap,
            wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None)
        self.toolbar.AddSeparator()
        self.tool_close = self.toolbar.AddTool(
            wx.ID_ANY, u"tool",
            wx.Bitmap(u"src/icon/power.png",
                      wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL,
            wx.EmptyString, wx.EmptyString, None)
        self.toolbar.Realize()

        bSizer1 = wx.BoxSizer(wx.VERTICAL)
        bSizer2 = wx.BoxSizer(wx.HORIZONTAL)
        self.m_staticText1 = wx.StaticText(self, wx.ID_ANY, u"Databases:",
                                           wx.DefaultPosition, wx.DefaultSize,
                                           0)
        self.m_staticText1.Wrap(-1)
        bSizer2.Add(self.m_staticText1, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL,
                    5)

        m_comboBox1Choices = []
        self.cbo_databases = wx.ComboBox(self, wx.ID_ANY, u"Ninguna",
                                         wx.DefaultPosition, wx.DefaultSize,
                                         m_comboBox1Choices, 0)
        bSizer2.Add(self.cbo_databases, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL,
                    5)

        self.m_staticText2 = wx.StaticText(self, wx.ID_ANY, u"Tables:",
                                           wx.DefaultPosition, wx.DefaultSize,
                                           0)
        self.m_staticText2.Wrap(-1)
        bSizer2.Add(self.m_staticText2, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL,
                    5)

        m_comboBox2Choices = []
        self.cbo_tables = wx.ComboBox(self, wx.ID_ANY, u"Ninguna",
                                      wx.DefaultPosition, wx.DefaultSize,
                                      m_comboBox2Choices, 0)
        bSizer2.Add(self.cbo_tables, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)

        self.btn_describe_table = wx.BitmapButton(self, wx.ID_ANY,
                                                  wx.NullBitmap,
                                                  wx.DefaultPosition,
                                                  wx.DefaultSize,
                                                  wx.BU_AUTODRAW | 0)
        self.btn_describe_table.SetBitmap(
            wx.Bitmap(u"src/icon/table.png", wx.BITMAP_TYPE_ANY))
        bSizer2.Add(self.btn_describe_table, 0,
                    wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)

        bSizer1.Add(bSizer2, 0, wx.EXPAND, 5)
        bSizer3 = wx.BoxSizer(wx.HORIZONTAL)

        self.m_staticText3 = wx.StaticText(self, wx.ID_ANY, u"Column:",
                                           wx.DefaultPosition, wx.DefaultSize,
                                           0)
        self.m_staticText3.Wrap(-1)
        bSizer3.Add(self.m_staticText3, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL,
                    5)

        m_comboBox3Choices = []
        self.cbo_columns = wx.ComboBox(self, wx.ID_ANY, u"Ninguna",
                                       wx.DefaultPosition, wx.DefaultSize,
                                       m_comboBox3Choices, 0)
        bSizer3.Add(self.cbo_columns, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)

        self.m_staticText4 = wx.StaticText(self, wx.ID_ANY, u"List:",
                                           wx.DefaultPosition, wx.DefaultSize,
                                           0)
        self.m_staticText4.Wrap(-1)
        bSizer3.Add(self.m_staticText4, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL,
                    5)

        m_comboBox4Choices = []
        self.cbo_list = wx.ComboBox(self, wx.ID_ANY,
                                    u"Ninguna", wx.DefaultPosition,
                                    wx.Size(120, -1), m_comboBox4Choices, 0)
        bSizer3.Add(self.cbo_list, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)

        self.txt_config = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString,
                                      wx.DefaultPosition, wx.Size(200, -1), 0)
        bSizer3.Add(self.txt_config, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)

        self.m_bpButton2 = wx.BitmapButton(self, wx.ID_ANY, wx.NullBitmap,
                                           wx.DefaultPosition, wx.DefaultSize,
                                           wx.BU_AUTODRAW | 0)
        self.m_bpButton2.SetBitmap(
            wx.Bitmap(u"src/icon/info16x16.png", wx.BITMAP_TYPE_ANY))

        bSizer3.Add(self.m_bpButton2, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)
        bSizer1.Add(bSizer3, 0, wx.EXPAND, 5)

        bSizer4 = wx.BoxSizer(wx.HORIZONTAL)
        self.spin_number_items = wx.SpinCtrl(self, wx.ID_ANY, wx.EmptyString,
                                             wx.DefaultPosition,
                                             wx.DefaultSize, wx.SP_ARROW_KEYS,
                                             0, 10, 0)
        bSizer4.Add(self.spin_number_items, 0,
                    wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)

        self.btn_play = wx.Button(self, wx.ID_ANY, u"Preview",
                                  wx.DefaultPosition, wx.DefaultSize, 0)
        bSizer4.Add(self.btn_play, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)

        self.btn_clean = wx.Button(self, wx.ID_ANY, u"Clean",
                                   wx.DefaultPosition, wx.DefaultSize, 0)
        bSizer4.Add(self.btn_clean, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)

        bSizer1.Add(bSizer4, 0, wx.EXPAND, 5)
        bSizer5 = wx.BoxSizer(wx.VERTICAL)
        self.list_preview = wx.ListCtrl(self, wx.ID_ANY, wx.DefaultPosition,
                                        wx.DefaultSize, wx.LC_REPORT)
        self.list_preview.InsertColumn(0, 'Num', width=50)
        self.list_preview.InsertColumn(1, 'Column', width=100)
        self.list_preview.InsertColumn(2, 'Type', wx.LIST_FORMAT_RIGHT, 80)
        self.list_preview.InsertColumn(3, 'Content', wx.LIST_FORMAT_RIGHT, 90)
        self.list_preview.InsertColumn(4, 'Example', wx.LIST_FORMAT_RIGHT, 220)
        bSizer5.Add(self.list_preview, 1, wx.ALL | wx.EXPAND, 5)
        bSizer1.Add(bSizer5, 1, wx.EXPAND, 5)
        self.SetSizer(bSizer1)
        self.Layout()

        #ToolBar
        self.Bind(wx.EVT_TOOL, self.menu_file_newlist, self.tool_new_document)
        self.Bind(wx.EVT_TOOL, self.menu_edit_databases, self.tool_database)
        self.Bind(wx.EVT_TOOL, self.menu_file_export, self.tool_export)
        self.Bind(wx.EVT_TOOL, self.menu_file_close, self.tool_close)
        self.Bind(wx.EVT_TOOL, self.menu_edit_preferences,
                  self.tool_preferences)
        self.Bind(wx.EVT_TOOL, self.OnAboutBox, self.tool_help)

        #Combos
        self.cbo_databases.Bind(wx.EVT_COMBOBOX, self.combo_change_databases)
        self.cbo_tables.Bind(wx.EVT_COMBOBOX, self.combo_change_tables)

        #Botones
        self.btn_play.Bind(wx.EVT_BUTTON, self.preview_info)
        self.btn_clean.Bind(wx.EVT_BUTTON, self.clean_info)
        self.btn_describe_table.Bind(wx.EVT_BUTTON,
                                     self.describe_table_database)
Example #12
0
    def __init__(self, parent, gui_size, cfg):
        """Constructor"""
        wx.Panel.__init__(self, parent=parent)

        # variable initilization
        self.config = cfg
        # design the panel
        self.sizer = wx.GridBagSizer(5, 5)

        text = wx.StaticText(self, label="DeepLabCut Load project")
        self.sizer.Add(text,
                       pos=(0, 0),
                       flag=wx.TOP | wx.LEFT | wx.BOTTOM,
                       border=15)
        # Add logo of DLC
        icon = wx.StaticBitmap(self, bitmap=wx.Bitmap(logo))
        self.sizer.Add(icon,
                       pos=(0, 4),
                       flag=wx.TOP | wx.RIGHT | wx.ALIGN_RIGHT,
                       border=5)

        line1 = wx.StaticLine(self)
        self.sizer.Add(line1,
                       pos=(1, 0),
                       span=(1, 5),
                       flag=wx.EXPAND | wx.BOTTOM,
                       border=10)

        self.cfg = wx.StaticText(self, label="Select the config file")
        self.sizer.Add(self.cfg, pos=(2, 0), flag=wx.TOP | wx.LEFT, border=5)

        if sys.platform == 'darwin':
            self.sel_config = wx.FilePickerCtrl(
                self,
                path="",
                style=wx.FLP_USE_TEXTCTRL,
                message="Choose the config.yaml file",
                wildcard="*.yaml")
        else:
            self.sel_config = wx.FilePickerCtrl(
                self,
                path="",
                style=wx.FLP_USE_TEXTCTRL,
                message="Choose the config.yaml file",
                wildcard="config.yaml")
        # self.sel_config = wx.FilePickerCtrl(self, path="",style=wx.FLP_USE_TEXTCTRL,message="Choose the config.yaml file", wildcard="config.yaml")
        if self.config == None:
            self.config = "Please select the config file"
#            self.sel_config.SetPath("Please select the config file")
#        else:
        self.sel_config.SetPath(self.config)

        self.sizer.Add(self.sel_config,
                       pos=(2, 1),
                       span=(1, 3),
                       flag=wx.TOP | wx.EXPAND,
                       border=5)
        self.sel_config.Bind(wx.EVT_FILEPICKER_CHANGED, self.select_config)

        button3 = wx.Button(self, label='Help')
        self.sizer.Add(button3, pos=(4, 0), flag=wx.LEFT, border=10)

        self.ok = wx.Button(self, label="Ok")
        self.sizer.Add(self.ok, pos=(4, 4))
        self.ok.Bind(wx.EVT_BUTTON, self.load_project)

        self.cancel = wx.Button(self, label="Reset")
        self.sizer.Add(self.cancel,
                       pos=(4, 3),
                       span=(1, 1),
                       flag=wx.BOTTOM | wx.RIGHT,
                       border=10)
        self.cancel.Bind(wx.EVT_BUTTON, self.cancel_load_project)

        self.sizer.AddGrowableCol(2)

        self.SetSizer(self.sizer)
        self.sizer.Fit(self)
Example #13
0
    def _videoInitialize(self):
        self.panel1 = wx.Panel(id=wx.ID_ANY,
                               name='panel1',
                               parent=self,
                               size=wx.DefaultSize,
                               style=wx.TAB_TRAVERSAL)

        self.mainSizer = wx.BoxSizer(wx.VERTICAL)
        self.timeSliderSizer = wx.BoxSizer(wx.HORIZONTAL)
        self.btnSizer = wx.BoxSizer(wx.HORIZONTAL)
        self.quitBoxSizer = wx.BoxSizer(wx.HORIZONTAL)

        img = wx.Image(800, 500)
        self.imageCtrl = wx.StaticBitmap(self, wx.ID_ANY, wx.Bitmap(img))
        self.imageCtrl.SetBackgroundColour(wx.BLACK)

        self.timeSlider = wx.Slider(self, -1, 0, 0, 1000)
        self.timeSlider.SetRange(0, 1000)
        self.Bind(wx.EVT_SLIDER, self.videoOnTimeSlider, self.timeSlider)

        self.timeElapsed = wx.StaticText(self, label='00:00:00')

        self.btnPrev = wx.Button(self, label='Prev')
        self.Bind(wx.EVT_BUTTON, self.videoOnBtnPrev, self.btnPrev)

        self.btnPlay = wx.Button(self, label='Play')
        self.Bind(wx.EVT_BUTTON, self.videoOnBtnPlayPause, self.btnPlay)

        self.btnStop = wx.Button(self, label='Stop')
        self.Bind(wx.EVT_BUTTON, self.videoOnBtnStop, self.btnStop)

        self.btnNext = wx.Button(self, label='Next')
        self.Bind(wx.EVT_BUTTON, self.videoOnBtnNext, self.btnNext)

        self.btnVolume = wx.Button(self, label='Mute')
        self.Bind(wx.EVT_BUTTON, self.videoOnBtnVolume, self.btnVolume)

        self.volSlider = wx.Slider(self, -1, 0, 0, 100)
        self.Bind(wx.EVT_SLIDER, self.videoOnVolSlider, self.volSlider)

        self.btnQuit = wx.Button(self, id=wx.ID_CLOSE)
        self.btnQuit.SetToolTip('Quit Viewer')
        self.btnQuit.Bind(wx.EVT_BUTTON, self.videoOnBtnQuit)
        self.quitBoxSizer.Add(self.btnQuit,
                              0,
                              border=5,
                              flag=wx.EXPAND | wx.ALL)

        self.timeSliderSizer.AddStretchSpacer(prop=1)
        self.timeSliderSizer.Add(self.timeElapsed)
        self.timeSliderSizer.Add(8, 0)
        self.timeSliderSizer.Add(self.timeSlider, 4)
        self.timeSliderSizer.AddStretchSpacer(prop=1)

        self.btnSizer.Add(self.btnPrev, 0, border=5, flag=wx.EXPAND | wx.ALL)
        self.btnSizer.Add(self.btnPlay, 0, border=5, flag=wx.EXPAND | wx.ALL)
        self.btnSizer.Add(self.btnStop, 0, border=5, flag=wx.EXPAND | wx.ALL)
        self.btnSizer.Add(self.btnNext, 0, border=5, flag=wx.EXPAND | wx.ALL)
        self.btnSizer.AddStretchSpacer(prop=1)
        self.btnSizer.Add(self.btnVolume, 0, border=5, flag=wx.EXPAND | wx.ALL)
        self.btnSizer.Add(self.volSlider, flag=wx.TOP | wx.LEFT, border=5)
        self.btnSizer.AddStretchSpacer(prop=2)
        self.btnSizer.Add(self.quitBoxSizer, 0)  #211, flag=wx.ALIGN_RIGHT)

        # Put everything together
        self.mainSizer.Add(self.imageCtrl, 0, wx.ALL | wx.CENTER, border=5)
        self.mainSizer.Add(self.timeSliderSizer, flag=wx.EXPAND, border=0)
        self.mainSizer.Add(self.btnSizer, 1, flag=wx.EXPAND)
Example #14
0
    def _imageInitialize(self):
        """
        Layout the widgets on the panel
        """
        self.gaugeRange = int(globs.ssDelay) * 1000  # in milli
        self.gaugeRemaining = self.gaugeRange  # in milli

        self.panel1 = wx.Panel(id=wx.ID_ANY,
                               name='panel1',
                               parent=self,
                               size=wx.DefaultSize,
                               style=wx.TAB_TRAVERSAL)

        self.mainSizer = wx.BoxSizer(wx.VERTICAL)
        self.btnSizer = wx.BoxSizer(wx.HORIZONTAL)
        self.bottomBtnSizer = wx.BoxSizer(wx.HORIZONTAL)
        self.quitBoxSizer = wx.BoxSizer(wx.HORIZONTAL)

        img = wx.Image(self.photoMaxSize, self.photoMaxSize)
        self.imageCtrl = wx.StaticBitmap(self, wx.ID_ANY, wx.Bitmap(img))

        self.mainSizer.Add(self.imageCtrl, 0, wx.ALL | wx.CENTER, 5)

        self.btnPrev = wx.Button(label='Prev', parent=self)
        self.btnPrev.SetToolTip('Load previous Image')
        self.btnPrev.Bind(wx.EVT_BUTTON, lambda evt: self.imageOnBtnPrev(evt))

        self.btnPlay = wx.Button(label='Play', parent=self)
        self.btnPlay.SetToolTip('Start the Slideshow')
        #        self.btnPlay.Bind(wx.EVT_BUTTON, self.imageOnBtnPlay)
        self.btnPlay.Bind(wx.EVT_BUTTON, lambda evt: self.imageOnBtnPlay(evt))

        self.btnNext = wx.Button(label='Next', parent=self)
        self.btnNext.SetToolTip('Load Next Image')
        self.btnNext.Bind(wx.EVT_BUTTON, lambda evt: self.imageOnBtnNext(evt))

        if self.singleFile:
            for b in [self.btnPrev, self.btnPlay, self.btnNext]:
                b.Disable()

        self.ssDelayGauge = wx.Gauge(range=self.gaugeRange,
                                     parent=self,
                                     size=(200, 15))
        self.ssDelayGauge.SetValue(self.gaugeRange)

        # Exif Data button
        self.btnExif = wx.Button(label='Exif Data', parent=self)
        self.btnExif.SetToolTip('Show the Exif Data')
        self.btnExif.Bind(wx.EVT_BUTTON, self.imageOnBtnExif)

        self.btnQuit = wx.Button(id=wx.ID_CLOSE, parent=self)
        self.btnQuit.SetToolTip('Quit Viewer')
        self.btnQuit.Bind(wx.EVT_BUTTON, self.imageOnBtnQuit)

        self.btnSizer.Add(self.btnPrev, 0, border=10, flag=wx.EXPAND | wx.ALL)
        self.btnSizer.Add(self.btnPlay, 0, border=10, flag=wx.EXPAND | wx.ALL)
        self.btnSizer.Add(self.btnNext, 0, border=10, flag=wx.EXPAND | wx.ALL)
        self.btnSizer.AddStretchSpacer(prop=1)
        self.btnSizer.Add(self.ssDelayGauge,
                          0,
                          border=10,
                          flag=wx.EXPAND | wx.ALL)
        self.btnSizer.AddStretchSpacer(prop=1)
        self.btnSizer.Add(self.btnExif, 0, border=10, flag=wx.EXPAND | wx.ALL)
        self.quitBoxSizer.Add(self.btnQuit,
                              0,
                              border=10,
                              flag=wx.EXPAND | wx.ALL)

        self.bottomBtnSizer.AddStretchSpacer(prop=1)
        self.bottomBtnSizer.Add(self.btnSizer, 0, flag=wx.EXPAND | wx.ALL)
        self.bottomBtnSizer.AddStretchSpacer(prop=1)
        self.bottomBtnSizer.Add(self.quitBoxSizer,
                                0)  #211, flag=wx.ALIGN_RIGHT)

        self.mainSizer.Add(self.bottomBtnSizer, 0, flag=wx.EXPAND | wx.ALL)
Example #15
0
    def _Render(self):
        """Renders the tab, complete with the icon, text, and close button"""
        if self.tab_bitmap:
            del self.tab_bitmap

        height = self.tab_height

        canvas = wx.Bitmap(self.tab_width, self.tab_height, 24)

        mdc = wx.MemoryDC()

        mdc.SelectObject(canvas)
        mdc.Clear()

        mdc.DrawBitmap(self.tab_back_bitmap, 0, 0, True)

        # draw the tab icon
        if self.tab_img:
            bmp = wx.Bitmap(self.tab_img.ConvertToGreyscale() if self.
                            disabled else self.tab_img)
            # @todo: is this conditional relevant anymore?
            if self.content_width > 16:
                # Draw tab icon
                mdc.DrawBitmap(
                    bmp, self.left_width + self.padding - bmp.GetWidth() / 2,
                    (height - bmp.GetHeight()) / 2)
            text_start = self.left_width + self.padding + bmp.GetWidth() / 2
        else:
            text_start = self.left_width

        mdc.SetFont(self.font)

        maxsize = self.tab_width \
            - text_start \
            - self.right_width \
            - self.padding * 4
        color = self.selected_color if self.selected else self.inactive_color

        mdc.SetTextForeground(color_utils.GetSuitable(color, 1))

        # draw text (with no ellipses)
        text = draw.GetPartialText(mdc, self.text, maxsize, "")
        tx, ty = mdc.GetTextExtent(text)
        mdc.DrawText(text, text_start + self.padding, height / 2 - ty / 2)

        # draw close button
        if self.closeable:
            if self.close_btn_hovering:
                cbmp = self.ctab_close_bmp
            else:
                cimg = self.ctab_close_bmp.ConvertToImage()
                cimg = cimg.AdjustChannels(0.7, 0.7, 0.7, 0.3)
                cbmp = wx.Bitmap(cimg)

            mdc.DrawBitmap(
                cbmp,
                self.content_width + self.left_width - cbmp.GetWidth() / 2,
                (height - cbmp.GetHeight()) / 2)

        mdc.SelectObject(wx.NullBitmap)

        canvas.SetMaskColour((0x12, 0x23, 0x32))
        img = canvas.ConvertToImage()

        if not img.HasAlpha():
            img.InitAlpha()

        bmp = wx.Bitmap(img)
        self.tab_bitmap = bmp
    def __init__(self, parent, gui_size, cfg):
        """Constructor"""
        wx.Panel.__init__(self, parent=parent)
        # variable initilization
        self.filelist = []
        self.config = cfg
        self.draw = False
        # design the panel
        self.sizer = wx.GridBagSizer(5, 10)

        text = wx.StaticText(self, label="DeepLabCut - Step 7. Analyze videos")
        self.sizer.Add(text,
                       pos=(0, 0),
                       flag=wx.TOP | wx.LEFT | wx.BOTTOM,
                       border=15)
        # Add logo of DLC
        icon = wx.StaticBitmap(self, bitmap=wx.Bitmap(logo))
        self.sizer.Add(icon,
                       pos=(0, 9),
                       flag=wx.TOP | wx.RIGHT | wx.ALIGN_RIGHT,
                       border=5)

        line1 = wx.StaticLine(self)
        self.sizer.Add(line1,
                       pos=(1, 0),
                       span=(1, 10),
                       flag=wx.EXPAND | wx.BOTTOM,
                       border=10)

        self.cfg_text = wx.StaticText(self, label="Select the config file")
        self.sizer.Add(self.cfg_text,
                       pos=(2, 0),
                       flag=wx.TOP | wx.LEFT,
                       border=10)

        if sys.platform == 'darwin':
            self.sel_config = wx.FilePickerCtrl(
                self,
                path="",
                style=wx.FLP_USE_TEXTCTRL,
                message="Choose the config.yaml file",
                wildcard="*.yaml")
        else:
            self.sel_config = wx.FilePickerCtrl(
                self,
                path="",
                style=wx.FLP_USE_TEXTCTRL,
                message="Choose the config.yaml file",
                wildcard="config.yaml")
        # self.sel_config = wx.FilePickerCtrl(self, path="",style=wx.FLP_USE_TEXTCTRL,message="Choose the config.yaml file", wildcard="config.yaml")
        self.sizer.Add(self.sel_config,
                       pos=(2, 1),
                       span=(1, 3),
                       flag=wx.TOP | wx.EXPAND,
                       border=5)
        self.sel_config.SetPath(self.config)
        self.sel_config.Bind(wx.EVT_FILEPICKER_CHANGED, self.select_config)

        self.vids = wx.StaticText(self, label="Choose the videos")
        self.sizer.Add(self.vids, pos=(3, 0), flag=wx.TOP | wx.LEFT, border=10)

        self.sel_vids = wx.Button(self, label="Select videos to analyze")
        self.sizer.Add(self.sel_vids,
                       pos=(3, 1),
                       flag=wx.TOP | wx.EXPAND,
                       border=5)
        self.sel_vids.Bind(wx.EVT_BUTTON, self.select_videos)

        sb = wx.StaticBox(self, label="Additional Attributes")
        boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL)

        hbox1 = wx.BoxSizer(wx.HORIZONTAL)
        hbox2 = wx.BoxSizer(wx.HORIZONTAL)
        hbox3 = wx.BoxSizer(wx.HORIZONTAL)
        hbox4 = wx.BoxSizer(wx.HORIZONTAL)

        #        self.shuffles = wx.SpinCtrl(self, value='1',min=1,max=100)
        #        shuffles_text_boxsizer.Add(self.shuffles,1, wx.EXPAND|wx.TOP|wx.BOTTOM, 10)

        videotype_text = wx.StaticBox(self, label="Specify the videotype")
        videotype_text_boxsizer = wx.StaticBoxSizer(videotype_text,
                                                    wx.VERTICAL)

        videotypes = ['.avi', '.mp4', '.mov']
        self.videotype = wx.ComboBox(self,
                                     choices=videotypes,
                                     style=wx.CB_READONLY)
        self.videotype.SetValue('.avi')
        videotype_text_boxsizer.Add(self.videotype, 1,
                                    wx.EXPAND | wx.TOP | wx.BOTTOM, 10)

        shuffle_text = wx.StaticBox(self, label="Specify the shuffle")
        shuffle_boxsizer = wx.StaticBoxSizer(shuffle_text, wx.VERTICAL)
        self.shuffle = wx.SpinCtrl(self, value='1', min=1, max=100)
        shuffle_boxsizer.Add(self.shuffle, 1, wx.EXPAND | wx.TOP | wx.BOTTOM,
                             10)

        trainingset = wx.StaticBox(self, label="Specify the trainingset index")
        trainingset_boxsizer = wx.StaticBoxSizer(trainingset, wx.VERTICAL)
        self.trainingset = wx.SpinCtrl(self, value='0', min=0, max=100)
        trainingset_boxsizer.Add(self.trainingset, 1,
                                 wx.EXPAND | wx.TOP | wx.BOTTOM, 10)

        destfolder_text = wx.StaticBox(self,
                                       label="Specify destination folder")
        destfolderboxsizer = wx.StaticBoxSizer(destfolder_text, wx.VERTICAL)
        self.sel_destfolder = wx.DirPickerCtrl(
            self,
            path="",
            style=wx.FLP_USE_TEXTCTRL,
            message="Choose the destination folder")
        self.sel_destfolder.SetPath("None")
        self.destfolder = None
        self.sel_destfolder.Bind(wx.EVT_FILEPICKER_CHANGED,
                                 self.select_destfolder)
        destfolderboxsizer.Add(self.sel_destfolder, 1,
                               wx.EXPAND | wx.TOP | wx.BOTTOM, 10)

        hbox1.Add(videotype_text_boxsizer, 10, wx.EXPAND | wx.TOP | wx.BOTTOM,
                  5)
        hbox1.Add(shuffle_boxsizer, 10, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)
        hbox1.Add(trainingset_boxsizer, 10, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)
        hbox1.Add(destfolderboxsizer, 10, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)

        boxsizer.Add(hbox1, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 10)

        self.csv = wx.RadioBox(self,
                               label='Want to save result(s) as csv?',
                               choices=['Yes', 'No'],
                               majorDimension=1,
                               style=wx.RA_SPECIFY_COLS)
        self.csv.SetSelection(1)

        self.cropping = wx.RadioBox(self,
                                    label='Want to crop the videos?',
                                    choices=['Yes', 'No'],
                                    majorDimension=1,
                                    style=wx.RA_SPECIFY_COLS)
        self.cropping.SetSelection(1)

        self.dynamic = wx.RadioBox(self,
                                   label='Want to dynamically crop bodyparts?',
                                   choices=['Yes', 'No'],
                                   majorDimension=1,
                                   style=wx.RA_SPECIFY_COLS)
        self.dynamic.SetSelection(1)

        self.filter = wx.RadioBox(self,
                                  label='Want to filter the predictions?',
                                  choices=['Yes', 'No'],
                                  majorDimension=1,
                                  style=wx.RA_SPECIFY_COLS)
        self.filter.SetSelection(1)

        self.trajectory = wx.RadioBox(self,
                                      label='Want to plot the trajectories?',
                                      choices=['Yes', 'No'],
                                      majorDimension=1,
                                      style=wx.RA_SPECIFY_COLS)
        self.trajectory.SetSelection(1)

        self.create_labeled_videos = wx.RadioBox(
            self,
            label='Want to create labeled video(s)?',
            choices=['Yes', 'No'],
            majorDimension=1,
            style=wx.RA_SPECIFY_COLS)
        self.create_labeled_videos.Bind(
            wx.EVT_RADIOBOX, self.choose_create_labeled_video_options)
        self.create_labeled_videos.SetSelection(1)

        self.draw_skeleton = wx.RadioBox(
            self,
            label='Include the skeleton in the video?',
            choices=['Yes', 'No'],
            majorDimension=1,
            style=wx.RA_SPECIFY_COLS)
        self.draw_skeleton.Bind(wx.EVT_RADIOBOX,
                                self.choose_draw_skeleton_options)
        self.draw_skeleton.SetSelection(1)
        self.draw_skeleton.Hide()

        self.trail_points_text = wx.StaticBox(
            self, label="Specify the number of trail points")
        trail_pointsboxsizer = wx.StaticBoxSizer(self.trail_points_text,
                                                 wx.VERTICAL)
        self.trail_points = wx.SpinCtrl(self, value='1')
        trail_pointsboxsizer.Add(self.trail_points, 20,
                                 wx.EXPAND | wx.TOP | wx.BOTTOM, 10)
        self.trail_points_text.Hide()
        self.trail_points.Hide()

        hbox2.Add(self.csv, 10, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)
        hbox2.Add(self.filter, 10, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)
        hbox2.Add(self.trajectory, 10, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)
        boxsizer.Add(hbox2, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 10)

        hbox3.Add(self.cropping, 10, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)
        hbox3.Add(self.dynamic, 10, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)
        hbox3.Add(self.create_labeled_videos, 10,
                  wx.EXPAND | wx.TOP | wx.BOTTOM, 5)
        boxsizer.Add(hbox3, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 10)

        hbox4.Add(self.draw_skeleton, 10, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)
        hbox4.Add(trail_pointsboxsizer, 10, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)
        boxsizer.Add(hbox4, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 10)
        self.sizer.Add(boxsizer,
                       pos=(4, 0),
                       span=(1, 10),
                       flag=wx.EXPAND | wx.TOP | wx.LEFT | wx.RIGHT,
                       border=10)

        self.help_button = wx.Button(self, label='Help')
        self.sizer.Add(self.help_button, pos=(5, 0), flag=wx.LEFT, border=10)
        self.help_button.Bind(wx.EVT_BUTTON, self.help_function)

        self.ok = wx.Button(self, label="RUN")
        self.sizer.Add(self.ok,
                       pos=(5, 8),
                       flag=wx.BOTTOM | wx.RIGHT,
                       border=10)
        self.ok.Bind(wx.EVT_BUTTON, self.analyze_videos)

        self.reset = wx.Button(self, label="Reset")
        self.sizer.Add(self.reset,
                       pos=(5, 1),
                       span=(1, 1),
                       flag=wx.BOTTOM | wx.RIGHT,
                       border=10)
        self.reset.Bind(wx.EVT_BUTTON, self.reset_analyze_videos)

        self.sizer.AddGrowableCol(2)

        self.SetSizer(self.sizer)
        self.sizer.Fit(self)
Example #17
0
    def __init__(self, parent):
        wx.Notebook.__init__(self, parent, id=-1)
        self.parent = parent
        self.donnees = {}
        self.SetPadding((10, 8))

        self.listePages = [
            {
                "code":
                "familles",
                "label":
                _(u"Familles"),
                "page":
                Page_Familles_individus(self, "familles"),
                "image":
                wx.Bitmap(Chemins.GetStaticPath(u"Images/32x32/Famille.png"),
                          wx.BITMAP_TYPE_PNG)
            },
            {
                "code":
                "individus",
                "label":
                _(u"Individus"),
                "page":
                Page_Familles_individus(self, "individus"),
                "image":
                wx.Bitmap(Chemins.GetStaticPath(u"Images/32x32/Personnes.png"),
                          wx.BITMAP_TYPE_PNG)
            },
            {
                "code":
                "listes_diffusion",
                "label":
                _(u"Listes de diffusion"),
                "page":
                Page_Listes_diffusion(self),
                "image":
                wx.Bitmap(
                    Chemins.GetStaticPath(u"Images/32x32/Questionnaire.png"),
                    wx.BITMAP_TYPE_PNG)
            },
            {
                "code":
                "saisie_manuelle",
                "label":
                _(u"Saisie manuelle"),
                "page":
                Page_Saisie_manuelle(self),
                "image":
                wx.Bitmap(Chemins.GetStaticPath(u"Images/32x32/Contrat.png"),
                          wx.BITMAP_TYPE_PNG)
            },
        ]

        # Images
        self.imageList = wx.ImageList(32, 32)
        for dictPage in self.listePages:
            self.imageList.Add(dictPage["image"])
        self.AssignImageList(self.imageList)

        # Création des pages
        index = 0
        for dictPage in self.listePages:
            self.AddPage(dictPage["page"], dictPage["label"], imageId=index)
            index += 1
Example #18
0
 def scale_bitmap_image(bitmap, width, height):
     image = bitmap.ConvertToImage()
     image = image.Scale(width, height, wx.IMAGE_QUALITY_HIGH)
     result = wx.Bitmap(image)
     return result
 def _get_bitmap(cls) -> Bitmap:
     return wx.Bitmap(*cls._get_screen_size())
Example #20
0
    def __init__(self,
                 parent,
                 ID=wx.ID_ANY,
                 title=_("About"),
                 pos=wx.DefaultPosition,
                 size=wx.Size(570, 590),
                 style=wx.DEFAULT_DIALOG_STYLE):
        super(DialogAbout, self).__init__(parent, ID, title, pos, size, style)

        self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)

        sizer_all = wx.BoxSizer(wx.VERTICAL)
        sizer_img = wx.BoxSizer(wx.HORIZONTAL)

        img = wx.Image(data_directory + "icon.ico", wx.BITMAP_TYPE_PNG)
        self.__bitmapIcone = wx.StaticBitmap(self, wx.ID_ANY, wx.Bitmap(img),
                                             wx.DefaultPosition,
                                             wx.Size(48, 48))
        sizer_img.Add(self.__bitmapIcone, 0, wx.ALL, 5)

        sizer_text = wx.BoxSizer(wx.VERTICAL)

        self.__staticTextTitre = wx.StaticText(self, wx.ID_ANY, "WoeUSB-ng")
        self.__staticTextTitre.SetFont(wx.Font(16, 74, 90, 92, False, "Sans"))
        self.__staticTextTitre.SetForegroundColour(wx.Colour(0, 60, 118))
        sizer_text.Add(self.__staticTextTitre, 0,
                       wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 5)

        self.__staticTextVersion = wx.StaticText(self, wx.ID_ANY,
                                                 WoeUSB.__version__)
        self.__staticTextVersion.SetFont(wx.Font(10, 74, 90, 92, False,
                                                 "Sans"))
        self.__staticTextVersion.SetForegroundColour(wx.Colour(69, 141, 196))
        sizer_text.Add(self.__staticTextVersion, 0, wx.LEFT, 5)
        sizer_img.Add(sizer_text, 0, 0, 5)
        sizer_all.Add(sizer_img, 0, wx.EXPAND, 5)

        self.__NotebookAutorLicence = wx.Notebook(self, wx.ID_ANY)

        self.__NotebookAutorLicence.AddPage(
            PanelNoteBookAutors(self.__NotebookAutorLicence, wx.ID_ANY,
                                "slacka et al.",
                                data_directory + "woeusb-logo.png",
                                "github.com/slacka/WoeUSB"), "Authors", True)
        self.__NotebookAutorLicence.AddPage(
            PanelNoteBookAutors(self.__NotebookAutorLicence, wx.ID_ANY,
                                "Colin GILLE / Congelli501",
                                data_directory + "c501-logo.png",
                                "www.congelli.eu"),
            "Original WinUSB Developer", False)

        licence_str = '''
            This file is part of WoeUSB-ng.

            WoeUSB-ng is free software: you can redistribute it and/or modify
            it under the terms of the GNU General Public License as published by
            the Free Software Foundation, either version 3 of the License, or
            (at your option) any later version.

            WoeUSB-ng is distributed in the hope that it will be useful,
            but WITHOUT ANY WARRANTY; without even the implied warranty of
            MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            GNU General Public License for more details.

            You should have received a copy of the GNU General Public License
            along with WoeUSB-ng.  If not, see <http://www.gnu.org/licenses/>.
        '''

        licence_txt = wx.TextCtrl(self.__NotebookAutorLicence, wx.ID_ANY,
                                  licence_str, wx.DefaultPosition,
                                  wx.DefaultSize,
                                  wx.TE_MULTILINE | wx.TE_READONLY)

        self.__NotebookAutorLicence.AddPage(licence_txt, _("License"))

        sizer_all.Add(self.__NotebookAutorLicence, 1, wx.EXPAND | wx.ALL, 5)

        self.__BtOk = wx.Button(self, wx.ID_OK)
        sizer_all.Add(self.__BtOk, 0, wx.ALIGN_RIGHT | wx.BOTTOM | wx.RIGHT, 5)
        self.__BtOk.SetFocus()

        self.SetSizer(sizer_all)
        self.Layout()
Example #21
0
 def __do_layout(self):
     # begin wxGlade: main.__do_layout
     sizer_main = wx.BoxSizer(wx.VERTICAL)
     sizer_saida = wx.BoxSizer(wx.VERTICAL)
     sizer_gauge = wx.BoxSizer(wx.HORIZONTAL)
     sizer_inputs = wx.BoxSizer(wx.VERTICAL)
     sizer_outputname = wx.BoxSizer(wx.HORIZONTAL)
     sizer_separador = wx.BoxSizer(wx.HORIZONTAL)
     sizer_config = wx.BoxSizer(wx.VERTICAL)
     sizer_fotos = wx.BoxSizer(wx.HORIZONTAL)
     self.sizer_threshold = wx.StaticBoxSizer(
         wx.StaticBox(self.notebook_ConfiguracoesdoOPENCV, wx.ID_ANY,
                      "Threshold"), wx.VERTICAL)
     self.sizer_original = wx.StaticBoxSizer(
         wx.StaticBox(self.notebook_ConfiguracoesdoOPENCV, wx.ID_ANY,
                      "Original"), wx.VERTICAL)
     sizer_configs = wx.BoxSizer(wx.VERTICAL)
     sizer_slider_fotos = wx.StaticBoxSizer(
         wx.StaticBox(self.panel_configs, wx.ID_ANY, "Fotos"), wx.VERTICAL)
     sizer_limite_inferior = wx.StaticBoxSizer(
         wx.StaticBox(self.panel_configs, wx.ID_ANY,
                      "Limite superior (h,s,v)"), wx.VERTICAL)
     sizer_h1s1v1 = wx.BoxSizer(wx.HORIZONTAL)
     sizer_limite_superior = wx.StaticBoxSizer(
         wx.StaticBox(self.panel_configs, wx.ID_ANY,
                      "Limite inferior (h,s,v)"), wx.VERTICAL)
     sizer_hsv = wx.BoxSizer(wx.HORIZONTAL)
     sizer_dir = wx.BoxSizer(wx.VERTICAL)
     sizer_dir.Add(self.dirselect, 0, wx.ALL | wx.EXPAND, 0)
     sizer_dir.Add(self.thumbs, 1, wx.ALL | wx.EXPAND, 0)
     self.notebook_dir.SetSizer(sizer_dir)
     sizer_hsv.Add(self.slider_h, 1, 0, 0)
     sizer_hsv.Add(self.slider_s, 1, 0, 0)
     sizer_hsv.Add(self.slider_v, 1, 0, 0)
     sizer_limite_superior.Add(sizer_hsv, 1, wx.EXPAND, 0)
     sizer_configs.Add(sizer_limite_superior, 1, wx.EXPAND, 0)
     sizer_h1s1v1.Add(self.slider_h1, 1, wx.EXPAND, 0)
     sizer_h1s1v1.Add(self.slider_s1, 1, wx.EXPAND, 0)
     sizer_h1s1v1.Add(self.slider_v1, 1, wx.EXPAND, 0)
     sizer_limite_inferior.Add(sizer_h1s1v1, 1, wx.EXPAND, 0)
     sizer_configs.Add(sizer_limite_inferior, 1, wx.EXPAND, 0)
     sizer_slider_fotos.Add(self.slider_imagens, 0, wx.EXPAND, 0)
     sizer_configs.Add(sizer_slider_fotos, 1, wx.EXPAND, 0)
     self.panel_configs.SetSizer(sizer_configs)
     sizer_config.Add(self.panel_configs, 1, wx.EXPAND, 0)
     self.sizer_original.Add(self.panel_original, 1, wx.ALL | wx.EXPAND, 2)
     sizer_fotos.Add(self.sizer_original, 1,
                     wx.ALIGN_CENTER | wx.ALL | wx.EXPAND, 0)
     self.sizer_threshold.Add(self.panel_threshold, 1, wx.ALL | wx.EXPAND,
                              2)
     sizer_fotos.Add(self.sizer_threshold, 1, wx.ALIGN_CENTER | wx.EXPAND,
                     0)
     sizer_config.Add(sizer_fotos, 2, wx.EXPAND, 0)
     self.notebook_ConfiguracoesdoOPENCV.SetSizer(sizer_config)
     label_separardor = wx.StaticText(self.notebook_saida,
                                      wx.ID_ANY,
                                      "Separador  ",
                                      style=wx.ALIGN_CENTER
                                      | wx.ST_ELLIPSIZE_MIDDLE)
     sizer_separador.Add(label_separardor, 1, wx.ALIGN_CENTER | wx.ALL, 0)
     sizer_separador.Add(self.text_separador, 1, wx.ALIGN_CENTER, 0)
     sizer_inputs.Add(sizer_separador, 0, wx.ALL, 1)
     label_outputname = wx.StaticText(self.notebook_saida,
                                      wx.ID_ANY,
                                      "Arquivo Saida",
                                      style=wx.ALIGN_CENTER
                                      | wx.ST_ELLIPSIZE_MIDDLE)
     sizer_outputname.Add(label_outputname, 1, wx.ALIGN_CENTER | wx.ALL, 0)
     sizer_outputname.Add(self.text_outputname, 1, wx.ALIGN_CENTER, 0)
     sizer_inputs.Add(sizer_outputname, 0, wx.ALL, 1)
     sizer_saida.Add(sizer_inputs, 0, wx.EXPAND, 0)
     sizer_saida.Add(self.list_classes, 1, wx.ALIGN_CENTER | wx.EXPAND, 0)
     sizer_gauge.Add(self.gauge, 1, wx.EXPAND, 0)
     sizer_gauge.Add(self.button_gerar, 0, wx.ALIGN_CENTER, 0)
     sizer_saida.Add(sizer_gauge, 0, wx.EXPAND, 0)
     self.notebook_saida.SetSizer(sizer_saida)
     self.notebook.AddPage(self.notebook_dir, "Diretorio de trabalho")
     self.notebook.AddPage(self.notebook_ConfiguracoesdoOPENCV,
                           "Configuracoes do OPENCV")
     self.notebook.AddPage(self.notebook_saida, "Configuracoes da saida")
     sizer_main.Add(self.notebook, 1, wx.ALIGN_CENTER | wx.ALL | wx.EXPAND,
                    0)
     self.SetSizer(sizer_main)
     self.Layout()
     # end wxGlade
     bitmap_1 = wx.StaticBitmap(
         self.panel_original, wx.ID_ANY,
         wx.Bitmap(".\\icos\\img.ico", wx.BITMAP_TYPE_ANY))
     bitmap_2 = wx.StaticBitmap(
         self.panel_threshold, wx.ID_ANY,
         wx.Bitmap(".\\icos\\img.ico", wx.BITMAP_TYPE_ANY))
     self.Center()
Example #22
0
def ScnFil(obj, colm1, colm2, colm3, num_row): #, rd_btns1=[], rd_btns2=[]):
    ''' this function loads all the information into the flex grid.
    The num_rows indicates how many rows will be used on the
    two columns of flex grids. In fact there is only one flex grid split
    to look like two separate grids each of 3 columns.  There is an
    additional column used as a spacer. So there is a total of 7 columns;
    3 with information, a spacer, and 3 more with information'''

    # lst is the actual list of tuples filling the flex grid
    lst = []
    # counters for the button arays if needed
    b = 0
    c = 0

    for n in range(num_row):
        for m in range(len(colm1)):
            # get header text for column 1 and column 5
            # if the spot is to be empty then use a
            # statictext box as a place holder
            if colm1[m][n] == 'Blank':
                col1 = (wx.StaticText(obj), 1, wx.EXPAND)
            else:
                col1 = (wx.StaticText(obj, label=colm1[m][n]), 1,
                        wx.ALIGN_RIGHT)
            lst.append(col1)

            # get image for column 2 and column 6
            # if the spot is to be empty then use a
            # statictext box as a place holder
            if colm2[m][n] == 'Blank':
                col2 = (wx.StaticText(obj), 1, wx.EXPAND)
            else:
                img1 = wx.Image(colm2[m][n], wx.BITMAP_TYPE_PNG)
                img = img1.Scale((img1.GetWidth())/3, (img1.GetHeight())/3)
                pic = wx.StaticBitmap(obj, -1, wx.Bitmap(img))
                col2 = (pic, 1, wx.EXPAND)
            lst.append(col2)

            # get input for column 3 and column 7
            # if the spot is to be empty then use a
            # statictext box as a place holder otherwise use a textctrl
            # or radiobutton array
            if colm3[m][n] == 1:
                img_txt = wx.TextCtrl(obj, value='0', size=(50, 30))
                obj.pg_txt.append(img_txt)
                col3 = (img_txt, 1)
            elif colm3[m][n] == 2:  # set if radiobutton is used
                # values of c and b are used to sync the array
                if m == 0:
                    col3 = (obj.rdbtn1[c], 1, wx.EXPAND)
                    c += 1
                elif m == 1:
                    col3 = (obj.rdbtn2[b], 1, wx.EXPAND)
                    b += 1
            elif colm3[m][n] == 3:  # this is set if a check box is needed
                img_chk = wx.CheckBox(obj, label=' ')
                obj.pg_chk.append(img_chk)
                col3 = (img_chk, 1)
            else:
                col3 = (wx.StaticText(obj), 1, wx.EXPAND)
            lst.append(col3)

            # this is the spacer column
            if m%2 == 0:
                col_spc = (wx.StaticText(obj, label='\t\t'), 1, wx.EXPAND)
                lst.append(col_spc)
    # returns a list consisting of the required
    # widgets to be loaded for the specified notebook page
    return lst
Example #23
0
    def __init__(self, *args, **kwds):
        # begin wxGlade: mainFrame.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.panel_2 = wx.Panel(self, -1)
        self.panel_1 = wx.Panel(self, -1)

        # Menu Bar
        self.mainMenu = wx.MenuBar()
        global ID_MENU_ADD_FILES
        ID_MENU_ADD_FILES = wx.NewId()
        global ID_MENU_ADD_FOLDER
        ID_MENU_ADD_FOLDER = wx.NewId()
        global ID_MENU_CLEAR_FILES
        ID_MENU_CLEAR_FILES = wx.NewId()
        global ID_MENU_CLEAR_ALL
        ID_MENU_CLEAR_ALL = wx.NewId()
        global ID_MENU_MODE_TRACK
        ID_MENU_MODE_TRACK = wx.NewId()
        global ID_MENU_MODE_ALBUM
        ID_MENU_MODE_ALBUM = wx.NewId()
        global ID_MENU_MODE_MANUAL
        ID_MENU_MODE_MANUAL = wx.NewId()
        global ID_MENU_TRACK_ANALYSIS
        ID_MENU_TRACK_ANALYSIS = wx.NewId()
        global ID_MENU_ALBUM_ANALYSIS
        ID_MENU_ALBUM_ANALYSIS = wx.NewId()
        global ID_MENU_TRACK_GAIN
        ID_MENU_TRACK_GAIN = wx.NewId()
        global ID_MENU_ALBUM_GAIN
        ID_MENU_ALBUM_GAIN = wx.NewId()
        global ID_MENU_MANUAL_GAIN
        ID_MENU_MANUAL_GAIN = wx.NewId()
        wxglade_tmp_menu = wx.Menu()
        wxglade_tmp_menu.Append(ID_MENU_ADD_FILES, "Add Files",
                                "Add mp3 files to list", wx.ITEM_NORMAL)
        wxglade_tmp_menu.Append(ID_MENU_ADD_FOLDER, "Add Folder",
                                "Add all mp3 files in a folder",
                                wx.ITEM_NORMAL)
        wxglade_tmp_menu.AppendSeparator()
        wxglade_tmp_menu.Append(ID_MENU_CLEAR_FILES, "Clear files",
                                "Remove selected files from list",
                                wx.ITEM_NORMAL)
        wxglade_tmp_menu.Append(ID_MENU_CLEAR_ALL, "Clear all files",
                                "Remove all files from list", wx.ITEM_NORMAL)
        wxglade_tmp_menu.AppendSeparator()
        wxglade_tmp_menu.Append(wx.ID_EXIT, "E&xit", "Quit this program",
                                wx.ITEM_NORMAL)
        self.mainMenu.Append(wxglade_tmp_menu, "&File")
        wxglade_tmp_menu = wx.Menu()
        self.trackMenu = wx.MenuItem(wxglade_tmp_menu, ID_MENU_MODE_TRACK,
                                     "&Track", "\"Track\" analysis and gain",
                                     wx.ITEM_CHECK)
        wxglade_tmp_menu.AppendItem(self.trackMenu)
        self.albumMenu = wx.MenuItem(wxglade_tmp_menu, ID_MENU_MODE_ALBUM,
                                     "&Album", "\"Album\" analysis and gain",
                                     wx.ITEM_CHECK)
        wxglade_tmp_menu.AppendItem(self.albumMenu)
        self.manualMenu = wx.MenuItem(wxglade_tmp_menu, ID_MENU_MODE_MANUAL,
                                      "&Manual", "Manual gain change",
                                      wx.ITEM_CHECK)
        wxglade_tmp_menu.AppendItem(self.manualMenu)
        self.mainMenu.Append(wxglade_tmp_menu, "&Mode")
        wxglade_tmp_menu = wx.Menu()
        wxglade_tmp_menu.Append(ID_MENU_TRACK_ANALYSIS, "Track Analysis",
                                "Calculate ReplayGain for each mp3 file",
                                wx.ITEM_NORMAL)
        wxglade_tmp_menu.Append(ID_MENU_ALBUM_ANALYSIS, "Album Analysis",
                                "Calculate ReplayGain for each folder",
                                wx.ITEM_NORMAL)
        self.mainMenu.Append(wxglade_tmp_menu, "Analysis")
        wxglade_tmp_menu = wx.Menu()
        wxglade_tmp_menu.Append(ID_MENU_TRACK_GAIN, "Track Gain",
                                "Apply suggested Track gain to each file",
                                wx.ITEM_NORMAL)
        wxglade_tmp_menu.Append(ID_MENU_ALBUM_GAIN, "Album Gain",
                                "Apply suggested Album gain to each folder",
                                wx.ITEM_NORMAL)
        wxglade_tmp_menu.Append(
            ID_MENU_MANUAL_GAIN, "Manual Gain",
            "Apply user-selected gain change to each file", wx.ITEM_NORMAL)
        self.mainMenu.Append(wxglade_tmp_menu, "Gain")
        self.SetMenuBar(self.mainMenu)
        # Menu Bar end
        self.mainStatusbar = self.CreateStatusBar(1, 0)

        # Tool Bar
        self.mainToolbar = wx.ToolBar(self,
                                      -1,
                                      style=wx.TB_HORIZONTAL | wx.TB_FLAT
                                      | wx.TB_TEXT)
        self.SetToolBar(self.mainToolbar)
        global ID_TOOL_ADD_FILES
        ID_TOOL_ADD_FILES = wx.NewId()
        global ID_TOOL_ADD_FOLDER
        ID_TOOL_ADD_FOLDER = wx.NewId()
        global ID_TOOL_ANALYZE
        ID_TOOL_ANALYZE = wx.NewId()
        global ID_TOOL_GAIN
        ID_TOOL_GAIN = wx.NewId()
        global ID_TOOL_CLEAR_FILES
        ID_TOOL_CLEAR_FILES = wx.NewId()
        global ID_TOOL_CLEAR_ALL
        ID_TOOL_CLEAR_ALL = wx.NewId()
        global ID_TOOL_CANCEL
        ID_TOOL_CANCEL = wx.NewId()
        self.mainToolbar.AddLabelTool(
            ID_TOOL_ADD_FILES, "Add Files",
            wx.Bitmap("res/big_add_files.xpm",
                      wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL,
            "Add mp3 files to list", "Add mp3 files to list")
        self.mainToolbar.AddLabelTool(
            ID_TOOL_ADD_FOLDER, "Add Folder",
            wx.Bitmap("res/big_add_folder.xpm",
                      wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL,
            "Add all mp3 files in a folder", "Add all mp3 files in a folder")
        self.mainToolbar.AddSeparator()
        self.mainToolbar.AddLabelTool(
            ID_TOOL_ANALYZE, "Track Analysis",
            wx.Bitmap("res/big_scan_radio.xpm", wx.BITMAP_TYPE_ANY),
            wx.NullBitmap, wx.ITEM_NORMAL, "Do ReplayGain analysis on files",
            "Do ReplayGain analysis on files")
        self.mainToolbar.AddLabelTool(
            ID_TOOL_GAIN, "Track Gain",
            wx.Bitmap("res/big_adjust_radio.xpm",
                      wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL,
            "Change volume of files", "Change volume of files")
        self.mainToolbar.AddSeparator()
        self.mainToolbar.AddLabelTool(
            ID_TOOL_CLEAR_FILES, "Clear Files",
            wx.Bitmap("res/big_remove_files.xpm", wx.BITMAP_TYPE_ANY),
            wx.NullBitmap, wx.ITEM_NORMAL, "Remove selected files from list",
            "Remove selected files from list")
        self.mainToolbar.AddLabelTool(
            ID_TOOL_CLEAR_ALL, "Clear All",
            wx.Bitmap("res/big_remove_all.xpm",
                      wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL,
            "Remove all files from list", "Remove all files from list")
        self.mainToolbar.AddSeparator()
        self.mainToolbar.AddLabelTool(
            ID_TOOL_CANCEL, "Cancel",
            wx.Bitmap("res/big_stop.xpm",
                      wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL,
            "Cancel current processing", "Cancel current processing")
        # Tool Bar end
        self.static_line_1 = wx.StaticLine(self, -1)
        self.targetLabel = wx.StaticText(self.panel_1, -1,
                                         "Target \"Normal\" Volume:")
        global ID_SLIDER_VOLUME
        ID_SLIDER_VOLUME = wx.NewId()
        self.volumeSlider = wx.Slider(self.panel_1, ID_SLIDER_VOLUME, 890, 800,
                                      1050)
        global ID_LABEL_VOLUME
        ID_LABEL_VOLUME = wx.NewId()
        self.volumeLabel = wx.StaticText(self.panel_1, ID_LABEL_VOLUME,
                                         "100.0 dB")
        self.mainList = wx.ListCtrl(self,
                                    -1,
                                    style=wx.LC_REPORT | wx.SUNKEN_BORDER)
        self.fileProgressLabel = wx.StaticText(self.panel_2, -1,
                                               "File Progress:")
        self.fileProgress = wx.Gauge(self.panel_2, -1, 100)
        self.totalProgressLabel = wx.StaticText(self.panel_2, -1,
                                                "Total Progress:")
        self.totalProgress = wx.Gauge(self.panel_2, -1, 100)

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_MENU, self.OnAddFiles, id=ID_MENU_ADD_FILES)
        self.Bind(wx.EVT_MENU, self.OnAddFolder, id=ID_MENU_ADD_FOLDER)
        self.Bind(wx.EVT_MENU, self.OnClearFiles, id=ID_MENU_CLEAR_FILES)
        self.Bind(wx.EVT_MENU, self.OnClearAll, id=ID_MENU_CLEAR_ALL)
        self.Bind(wx.EVT_MENU, self.OnExit, id=wx.ID_EXIT)
        self.Bind(wx.EVT_MENU, self.OnModeChange, self.trackMenu)
        self.Bind(wx.EVT_MENU, self.OnModeChange, self.albumMenu)
        self.Bind(wx.EVT_MENU, self.OnModeChange, self.manualMenu)
        self.Bind(wx.EVT_MENU, self.OnTrackAnalysis, id=ID_MENU_TRACK_ANALYSIS)
        self.Bind(wx.EVT_MENU, self.OnAlbumAnalysis, id=ID_MENU_ALBUM_ANALYSIS)
        self.Bind(wx.EVT_MENU, self.OnTrackGain, id=ID_MENU_TRACK_GAIN)
        self.Bind(wx.EVT_MENU, self.OnAlbumGain, id=ID_MENU_ALBUM_GAIN)
        self.Bind(wx.EVT_MENU, self.OnManualGain, id=ID_MENU_MANUAL_GAIN)
        self.Bind(wx.EVT_TOOL, self.OnAddFiles, id=ID_TOOL_ADD_FILES)
        self.Bind(wx.EVT_TOOL, self.OnAddFolder, id=ID_TOOL_ADD_FOLDER)
        self.Bind(wx.EVT_TOOL, self.OnAnalysisButton, id=ID_TOOL_ANALYZE)
        self.Bind(wx.EVT_TOOL, self.OnGainButton, id=ID_TOOL_GAIN)
        self.Bind(wx.EVT_TOOL, self.OnClearFiles, id=ID_TOOL_CLEAR_FILES)
        self.Bind(wx.EVT_TOOL, self.OnClearAll, id=ID_TOOL_CLEAR_ALL)
        self.Bind(wx.EVT_TOOL, self.OnCancel, id=ID_TOOL_CANCEL)
        self.Bind(wx.EVT_COMMAND_SCROLL,
                  self.OnVolumeChange,
                  id=ID_SLIDER_VOLUME)
        # end wxGlade

        self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)

        self.trackGainIcon = wx.Bitmap("res/big_adjust_radio.xpm",
                                       wx.BITMAP_TYPE_ANY)
        self.trackAnalysisIcon = wx.Bitmap("res/big_scan_radio.xpm",
                                           wx.BITMAP_TYPE_ANY)
        self.albumGainIcon = wx.Bitmap("res/big_adjust_album.xpm",
                                       wx.BITMAP_TYPE_ANY)
        self.albumAnalysisIcon = wx.Bitmap("res/big_scan_album.xpm",
                                           wx.BITMAP_TYPE_ANY)
        self.manualGainIcon = wx.Bitmap("res/big_adjust_constant.xpm",
                                        wx.BITMAP_TYPE_ANY)

        # ---- Load User Preferences

        self.config = wx.Config("wxMP3Gain")

        try:
            vol = float(self.config.Read("Target", "89.0"))
        except ValueError:
            vol = 89.0
        if vol < 80.0 or vol > 105.0:
            vol = 89.0

        self.volumeSlider.SetValue(vol * 10.0)
        self.ChangeVolumeLabel()

        try:
            self.mode = int(self.config.Read("Mode"))
        except ValueError:
            self.mode = TRACK_MODE
        if self.mode != ALBUM_MODE and self.mode != MANUAL_MODE:
            # in case invalid mode was stored in config
            self.mode = TRACK_MODE

        #do "Maximize window" BEFORE setting window size; otherwise, un-maximize won't shrink
        maximized = self.config.Read("Maximized")
        if maximized == "1":
            self.Maximize()

        try:
            width = int(self.config.Read("Width"))
            height = int(self.config.Read("Height"))
        except ValueError:
            width = 675
            height = 475

        if width < 675:
            width = 675
        if height < 350:
            height = 350
        self.SetSize((width, height))
        self.UpdateMode()
    def OnContextMenu(self, event):
        """Ouverture du menu contextuel """
        if len(self.Selection()) == 0:
            noSelection = True
        else:
            noSelection = False
            ID = self.Selection()[0].IDresponsable

        # Création du menu contextuel
        menuPop = wx.Menu()

        # Item Modifier
        item = wx.MenuItem(menuPop, 10, _(u"Ajouter"))
        bmp = wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Ajouter.png"),
                        wx.BITMAP_TYPE_PNG)
        item.SetBitmap(bmp)
        menuPop.AppendItem(item)
        self.Bind(wx.EVT_MENU, self.Ajouter, id=10)

        menuPop.AppendSeparator()

        # Item Ajouter
        item = wx.MenuItem(menuPop, 20, _(u"Modifier"))
        bmp = wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Modifier.png"),
                        wx.BITMAP_TYPE_PNG)
        item.SetBitmap(bmp)
        menuPop.AppendItem(item)
        self.Bind(wx.EVT_MENU, self.Modifier, id=20)
        if noSelection == True: item.Enable(False)

        # Item Supprimer
        item = wx.MenuItem(menuPop, 30, _(u"Supprimer"))
        bmp = wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Supprimer.png"),
                        wx.BITMAP_TYPE_PNG)
        item.SetBitmap(bmp)
        menuPop.AppendItem(item)
        self.Bind(wx.EVT_MENU, self.Supprimer, id=30)
        if noSelection == True: item.Enable(False)

        menuPop.AppendSeparator()

        # Item Par défaut
        item = wx.MenuItem(menuPop, 40,
                           _(u"Définir comme responsable par défaut"))
        if noSelection == False:
            if self.Selection()[0].defaut == 1:
                bmp = wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Ok.png"),
                                wx.BITMAP_TYPE_PNG)
                item.SetBitmap(bmp)
        menuPop.AppendItem(item)
        self.Bind(wx.EVT_MENU, self.SetDefaut, id=40)
        if noSelection == True: item.Enable(False)

        menuPop.AppendSeparator()

        # Item Apercu avant impression
        item = wx.MenuItem(menuPop, 40, _(u"Aperçu avant impression"))
        bmp = wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Apercu.png"),
                        wx.BITMAP_TYPE_PNG)
        item.SetBitmap(bmp)
        menuPop.AppendItem(item)
        self.Bind(wx.EVT_MENU, self.Apercu, id=40)

        # Item Imprimer
        item = wx.MenuItem(menuPop, 50, _(u"Imprimer"))
        bmp = wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Imprimante.png"),
                        wx.BITMAP_TYPE_PNG)
        item.SetBitmap(bmp)
        menuPop.AppendItem(item)
        self.Bind(wx.EVT_MENU, self.Imprimer, id=50)

        self.PopupMenu(menuPop)
        menuPop.Destroy()
Example #25
0
    def __init__(self, parent, IDcompte_payeur=None, IDreglement=None):
        wx.Panel.__init__(self, parent, id=-1, style=wx.TAB_TRAVERSAL)
        self.parent = parent
        self.IDcompte_payeur = IDcompte_payeur
        self.IDreglement = IDreglement
        self.montant_reglement = FloatToDecimal(0.0)
        self.total_ventilation = FloatToDecimal(0.0)
        self.validation = True

        if "linux" in sys.platform:
            defaultFont = self.GetFont()
            defaultFont.SetPointSize(8)
            self.SetFont(defaultFont)

        # Regroupement
        self.label_regroupement = wx.StaticText(self, -1,
                                                _(u"Regrouper par :"))
        self.radio_periode = wx.RadioButton(self,
                                            -1,
                                            _(u"Mois"),
                                            style=wx.RB_GROUP)
        self.radio_facture = wx.RadioButton(self, -1, _(u"Facture"))
        self.radio_individu = wx.RadioButton(self, -1, _(u"Individu"))
        self.radio_date = wx.RadioButton(self, -1, _(u"Date"))

        # Commandes rapides
        self.label_hyperliens_1 = wx.StaticText(self, -1, _(u"Ventiler "))
        self.hyper_automatique = Hyperlien(
            self,
            label=_(u"automatiquement"),
            infobulle=_(
                u"Cliquez ici pour ventiler automatiquement le crédit restant"
            ),
            URL="automatique")
        self.label_hyperliens_2 = wx.StaticText(self, -1, u" | ")
        self.hyper_tout = Hyperlien(
            self,
            label=_(u"tout"),
            infobulle=_(u"Cliquez ici pour tout ventiler"),
            URL="tout")
        self.label_hyperliens_3 = wx.StaticText(self, -1, u" | ")
        self.hyper_rien = Hyperlien(
            self,
            label=_(u"rien"),
            infobulle=_(u"Cliquez ici pour ne rien ventiler"),
            URL="rien")

        # Liste de la ventilation
        self.ctrl_ventilation = CTRL_Ventilation(self, IDcompte_payeur,
                                                 IDreglement)

        # Etat de la ventilation
        self.imgOk = wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Ok4.png"),
                               wx.BITMAP_TYPE_PNG)
        self.imgErreur = wx.Bitmap(
            Chemins.GetStaticPath("Images/16x16/Interdit2.png"),
            wx.BITMAP_TYPE_PNG)
        self.imgAddition = wx.Bitmap(
            Chemins.GetStaticPath("Images/16x16/Addition.png"),
            wx.BITMAP_TYPE_PNG)
        self.ctrl_image = wx.StaticBitmap(self, -1, self.imgAddition)

        self.ctrl_info = wx.StaticText(
            self, -1, _(u"Vous pouvez encore ventiler 30.90 ¤"))
        self.ctrl_info.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD))

        self.__do_layout()

        self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioRegroupement,
                  self.radio_periode)
        self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioRegroupement,
                  self.radio_facture)
        self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioRegroupement,
                  self.radio_individu)
        self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioRegroupement,
                  self.radio_date)

        # Init
        self.ctrl_ventilation.InitGrid()
    def InitObjectListView(self):
        # Création du imageList
        for categorie, civilites in Civilites.LISTE_CIVILITES:
            for IDcivilite, CiviliteLong, CiviliteAbrege, nomImage, genre in civilites:
                indexImg = self.AddNamedImages(
                    nomImage,
                    wx.Bitmap(
                        Chemins.GetStaticPath("Images/16x16/%s" % nomImage),
                        wx.BITMAP_TYPE_PNG))

        def GetImageCivilite(track):
            return track.nomImage

        def FormateDate(dateStr):
            if dateStr == "" or dateStr == None: return ""
            date = str(
                datetime.date(year=int(dateStr[:4]),
                              month=int(dateStr[5:7]),
                              day=int(dateStr[8:10])))
            text = str(date[8:10]) + "/" + str(date[5:7]) + "/" + str(date[:4])
            return text

        def FormateAge(age):
            if age == None: return ""
            return _(u"%d ans") % age

        # Couleur en alternance des lignes
        self.oddRowsBackColor = UTILS_Interface.GetValeur(
            "couleur_tres_claire", wx.Colour(240, 251, 237))
        self.evenRowsBackColor = wx.Colour(255, 255, 255)
        self.useExpansionColumn = True

        liste_Colonnes = [
            ColumnDefn(u"",
                       "left",
                       22,
                       "IDindividu",
                       typeDonnee="entier",
                       imageGetter=GetImageCivilite),
            ColumnDefn(_(u"Nom"), 'left', 100, "nom", typeDonnee="texte"),
            ColumnDefn(_(u"Prénom"),
                       "left",
                       100,
                       "prenom",
                       typeDonnee="texte"),
            ColumnDefn(_(u"Date naiss."),
                       "left",
                       72,
                       "date_naiss",
                       typeDonnee="date",
                       stringConverter=FormateDate),
            ColumnDefn(_(u"Age"),
                       "left",
                       50,
                       "age",
                       typeDonnee="entier",
                       stringConverter=FormateAge),
            ColumnDefn(_(u"Niveau"),
                       "left",
                       60,
                       "abregeNiveau",
                       typeDonnee="texte"),
            ColumnDefn(u"Du",
                       "left",
                       72,
                       "date_debut",
                       typeDonnee="date",
                       stringConverter=FormateDate),
            ColumnDefn(_(u"Au"),
                       "left",
                       72,
                       "date_fin",
                       typeDonnee="date",
                       stringConverter=FormateDate),
        ]

        self.SetColumns(liste_Colonnes)
        self.CreateCheckStateColumn(0)
        self.SetEmptyListMsg(_(u"Aucun individu"))
        self.SetEmptyListMsgFont(wx.FFont(11, wx.DEFAULT, False, "Tekton"))
        self.SetSortColumn(self.columns[2])
        self.SetObjects(self.donnees)
Example #27
0
    def __init__(self,
                 parent,
                 id=-1,
                 title="",
                 pos=wx.DefaultPosition,
                 size=wx.DefaultSize,
                 style=wx.DEFAULT_FRAME_STYLE):

        self.frame = wx.Frame.__init__(self, parent, id, title, pos, size,
                                       style)  # Initiate parent window

        self.SetIcon(wx.Icon("Icons/Pie.ico",
                             wx.BITMAP_TYPE_ICO))  # Set window icon

        self.ribbon = RB.RibbonBar(self, -1)  # Initiate Ribbon Bar
        self.CreateStatusBar()  # Initiate Status Bar

        ### ------------------------------------------- Home Tab: id = 100 -------------------------------------------- ###
        home = RB.RibbonPage(self.ribbon, -1, "Home")  # Home tab on bar

        filePanel = RB.RibbonPanel(home, -1, "File")  # File menu
        fileBar = RB.RibbonButtonBar(filePanel)
        fileBar.AddSimpleButton(101, "New",
                                wx.Bitmap("Icons/stock_new.png",
                                          wx.BITMAP_TYPE_PNG),
                                "")  # New document
        fileBar.AddSimpleButton(102, "Open",
                                wx.Bitmap("Icons/stock_open.png",
                                          wx.BITMAP_TYPE_PNG),
                                "")  # Open file tool
        fileBar.AddHybridButton(
            103, "Save", wx.Bitmap("Icons/stock_save.png",
                                   wx.BITMAP_TYPE_PNG))  # Save file tool
        fileBar.AddHybridButton(104, "Print",
                                wx.Bitmap("Icons/stock_print.png",
                                          wx.BITMAP_TYPE_PNG), "")  # Print

        alignmentPanel = RB.RibbonPanel(home, -1,
                                        "Alignment")  # Alignment menu
        alignBar = RB.RibbonButtonBar(alignmentPanel)
        alignBar.AddSimpleButton(105, "Left",
                                 wx.Bitmap("Icons/align_left.png",
                                           wx.BITMAP_TYPE_PNG),
                                 "")  # Left Align
        alignBar.AddSimpleButton(106, "Center",
                                 wx.Bitmap("Icons/align_center.png",
                                           wx.BITMAP_TYPE_PNG),
                                 "")  # Centre Align
        alignBar.AddSimpleButton(107, "Right",
                                 wx.Bitmap("Icons/align_right.png",
                                           wx.BITMAP_TYPE_PNG),
                                 "")  # Right Align

        toolsPanel = RB.RibbonPanel(home, -1, "Text")  # Text menu
        toolsBar = RB.RibbonButtonBar(toolsPanel)
        toolsBar.AddSimpleButton(108, "Standard",
                                 wx.Bitmap("Icons/bullet_point.png",
                                           wx.BITMAP_TYPE_PNG),
                                 "")  # Standard Bullets
        toolsBar.AddSimpleButton(109, "Number",
                                 wx.Bitmap("Icons/numb_point.png",
                                           wx.BITMAP_TYPE_PNG),
                                 "")  # Numbered Bullets
        toolsBar.AddSimpleButton(110, "Bold",
                                 wx.Bitmap("Icons/stock_text_bold.png",
                                           wx.BITMAP_TYPE_PNG),
                                 "")  # Bold text
        toolsBar.AddSimpleButton(111, "Italic",
                                 wx.Bitmap("Icons/stock_text_italic.png",
                                           wx.BITMAP_TYPE_PNG),
                                 "")  # Italic text
        toolsBar.AddSimpleButton(112, "Underline",
                                 wx.Bitmap("Icons/stock_text_underline.png",
                                           wx.BITMAP_TYPE_PNG),
                                 "")  # Underline Text
        toolsBar.AddSimpleButton(119, "Highlight",
                                 wx.Bitmap("Icons/highlighter_icon.png",
                                           wx.BITMAP_TYPE_PNG),
                                 "")  # Highlight text

        lineSpace = RB.RibbonPanel(home, -1, "Spacing")  # Spacing menu
        lineBar = RB.RibbonButtonBar(lineSpace)
        lineBar.AddSimpleButton(113, "Normal",
                                wx.Bitmap("Icons/spacing_normal.png",
                                          wx.BITMAP_TYPE_PNG),
                                "")  # Single line spacing
        lineBar.AddSimpleButton(114, "Half",
                                wx.Bitmap("Icons/spacing_half.png",
                                          wx.BITMAP_TYPE_PNG),
                                "")  # 1 1/2 line spacing
        lineBar.AddSimpleButton(115, "Double",
                                wx.Bitmap("Icons/spacing_double.png",
                                          wx.BITMAP_TYPE_PNG),
                                "")  # Double line spacing

        tabPanel = RB.RibbonPanel(home, -1, "Indent")  # Indent menu
        tabBar = RB.RibbonButtonBar(tabPanel)
        tabBar.AddSimpleButton(116, "Right",
                               wx.Bitmap("Icons/arrow_right.png",
                                         wx.BITMAP_TYPE_PNG),
                               "")  # Right indent
        tabBar.AddSimpleButton(117, "Left",
                               wx.Bitmap("Icons/arrow_left.png",
                                         wx.BITMAP_TYPE_PNG),
                               "")  # Left indent

        picPanel = RB.RibbonPanel(home, -1, "Add Pictures")  # Pictures menu
        picBar = RB.RibbonButtonBar(picPanel)
        picBar.AddSimpleButton(118, "Import",
                               wx.Bitmap("Icons/insert_image.png",
                                         wx.BITMAP_TYPE_PNG),
                               "")  # Import pics

        ### ------------------------------------------- Font Tab: id = 200 -------------------------------------------- ###
        font_tab = RB.RibbonPage(self.ribbon, -1, "Font")  # Font tab created
        fontPanel = RB.RibbonPanel(font_tab, 400, "Font")  # Font gallery
        self.addColours(fontPanel, 200)
        fontPanel2 = RB.RibbonPanel(font_tab, -1, "Fonts")  # Fonts bar
        fonts = RB.RibbonButtonBar(fontPanel2)
        fonts.AddSimpleButton(
            201, "Font", wx.Bitmap("Icons/edit_pic.jpg", wx.BITMAP_TYPE_JPEG),
            "")
        fonts.AddSimpleButton(
            202, "Words",
            wx.Bitmap("Icons/suggestion_icon.png", wx.BITMAP_TYPE_PNG), "")
        fonts.AddSimpleButton(
            203, "Check",
            wx.Bitmap("Icons/suggestion_icon.png", wx.BITMAP_TYPE_PNG), "")
        fontPanel.Realize()
        fontPanel2.Realize()

        ### ------------------------------------------- End Ribbon ---------------------------------------------------- ###

        self.rtc = RichTextCtrl(self, style=wx.HSCROLL
                                | wx.NO_BORDER)  # Init rich text box
        wx.CallAfter(self.rtc.SetFocus)  # Display text box
        self.rtc.BeginFont(
            wx.Font(15, wx.SWISS, wx.NORMAL, wx.NORMAL, False, "Calibri"))

        box = wx.BoxSizer(
            wx.VERTICAL)  # Resizes widgets within window when resized

        box.Add(self.ribbon, 0, wx.EXPAND)  # Resizes ribbon appropriately
        box.Add(self.rtc, 1,
                wx.EXPAND)  # Fills in remaining space with text box

        self.ribbon.Realize()  # Displays ribbon
        self.SetSizer(box)  # Initiate
        self.Show(True)

        self.bindEvents()
Example #28
0
    def __init__(self, parent):
        wx.Panel.__init__(self,
                          parent,
                          id=wx.ID_ANY,
                          pos=wx.DefaultPosition,
                          size=wx.Size(669, 428),
                          style=wx.TAB_TRAVERSAL)

        container = wx.BoxSizer(wx.VERTICAL)

        self.m_staticText17 = wx.StaticText(self, wx.ID_ANY, u"All Classes",
                                            wx.DefaultPosition, wx.DefaultSize,
                                            wx.ALIGN_CENTRE)
        self.m_staticText17.Wrap(-1)
        self.m_staticText17.SetFont(
            wx.Font(14, 70, 90, 92, False, wx.EmptyString))

        container.Add(self.m_staticText17, 0, wx.TOP | wx.EXPAND, 25)

        horizontal_sizer = wx.BoxSizer(wx.HORIZONTAL)

        left_sizer = wx.BoxSizer(wx.HORIZONTAL)
        OLV_sizer = wx.BoxSizer(wx.VERTICAL)

        #
        # Classes Object list View
        # ----------------------------------------------------------------
        # Search
        # ----------------------------------------------------------------
        search_container = wx.BoxSizer(wx.HORIZONTAL)

        self.refresh_btn = wx.BitmapButton(
            self, wx.ID_ANY,
            wx.Bitmap(u"images/reload_16x16.bmp", wx.BITMAP_TYPE_ANY),
            wx.DefaultPosition, wx.DefaultSize, wx.BU_AUTODRAW)

        self.refresh_btn.SetBitmapHover(
            wx.Bitmap(u"images/reload_16x16_rotated.bmp", wx.BITMAP_TYPE_ANY))
        search_container.Add(self.refresh_btn, 0,
                             wx.BOTTOM | wx.LEFT | wx.RIGHT, 5)

        self.m_staticText53 = wx.StaticText(self, wx.ID_ANY, wx.EmptyString,
                                            wx.DefaultPosition, wx.DefaultSize,
                                            0)
        self.m_staticText53.Wrap(-1)
        search_container.Add(self.m_staticText53, 1, wx.ALL, 5)

        self.search_classes = wx.SearchCtrl(self, wx.ID_ANY, wx.EmptyString,
                                            wx.DefaultPosition, wx.DefaultSize,
                                            wx.TE_PROCESS_ENTER)
        self.search_classes.ShowSearchButton(True)
        self.search_classes.ShowCancelButton(False)
        search_container.Add(self.search_classes, 0, wx.BOTTOM, 8)

        self.search_classes.Bind(wx.EVT_TEXT, self.searchClasses)
        self.search_classes.Bind(wx.EVT_TEXT_ENTER, self.searchClasses)

        OLV_sizer.Add(search_container, 0, wx.EXPAND, 5)
        #
        #
        # ----------------------------------------------------------------
        # Table
        # ----------------------------------------------------------------
        self.classes = getClassDets()

        self.classesOLV = ObjectListView(self,
                                         wx.ID_ANY,
                                         style=wx.LC_REPORT | wx.SUNKEN_BORDER)
        self.setClassesData()

        OLV_sizer.Add(self.classesOLV, 1, wx.EXPAND | wx.ALL, 5)

        # ----------------------------------------------------------------
        #
        #

        left_btns_sizer = wx.BoxSizer(wx.VERTICAL)

        self.view_students_btn = wx.Button(self, wx.ID_ANY, u"View Students",
                                           wx.DefaultPosition, wx.DefaultSize,
                                           0)
        self.view_students_btn.Bind(wx.EVT_BUTTON, self.getClassStudents)
        left_btns_sizer.Add(self.view_students_btn, 0, wx.EXPAND | wx.ALL, 5)

        self.edit_class_btn = wx.Button(self, wx.ID_ANY, u"Edit Class",
                                        wx.DefaultPosition, wx.DefaultSize, 0)
        self.edit_class_btn.Bind(wx.EVT_BUTTON, self.getClassInfo)
        left_btns_sizer.Add(self.edit_class_btn, 0, wx.ALL | wx.EXPAND, 5)

        self.delete_class_btn = wx.Button(self, wx.ID_ANY, u"Delete",
                                          wx.DefaultPosition, wx.DefaultSize,
                                          0)
        self.delete_class_btn.Bind(wx.EVT_BUTTON, self.deleteClass)
        left_btns_sizer.Add(self.delete_class_btn, 0, wx.ALL | wx.EXPAND, 5)

        #
        #
        left_sizer.Add(OLV_sizer, 3, wx.EXPAND | wx.ALL, 5)
        left_sizer.Add(left_btns_sizer, 1, wx.ALL, 5)

        horizontal_sizer.Add(left_sizer, 1, wx.EXPAND, 5)

        right_sizer = wx.BoxSizer(wx.VERTICAL)

        # self.m_staticText59 = wx.StaticText(self, wx.ID_ANY, u"Exams", wx.DefaultPosition, wx.DefaultSize, 0)
        # self.m_staticText59.Wrap(-1)
        # right_sizer.Add(self.m_staticText59, 0, wx.ALL, 5)

        self.edit_class_panel = EditClass(self)

        self.show_students = ViewClassStudents(self)

        #
        #
        #
        right_sizer.Add(self.edit_class_panel, 1, wx.EXPAND)
        right_sizer.Add(self.show_students, 1, wx.EXPAND)
        self.show_students.Hide()

        horizontal_sizer.Add(right_sizer, 1, wx.EXPAND, 5)

        container.Add(horizontal_sizer, 1, wx.ALL | wx.EXPAND, 10)

        self.SetSizer(container)
        self.Layout()

        # Connect Events
        self.refresh_btn.Bind(wx.EVT_BUTTON, self.refreshTable)
    def __init__(self, parent, donnees=[], texte_xml=None):
        wx.Dialog.__init__(self,
                           parent,
                           -1,
                           style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER
                           | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX)
        self.parent = parent
        self.donnees = donnees
        self.texte_xml = texte_xml

        listeAdresses = []
        for dictTemp in self.donnees:
            listeAdresses.append(dictTemp["adresse"])

        # Navigation
        self.bouton_premier = wx.BitmapButton(
            self, -1,
            wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Premier.png"),
                      wx.BITMAP_TYPE_ANY))
        self.bouton_reculer = wx.BitmapButton(
            self, -1,
            wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Reculer.png"),
                      wx.BITMAP_TYPE_ANY))
        self.ctrl_adresse = wx.ComboBox(self,
                                        -1,
                                        choices=listeAdresses,
                                        style=wx.CB_DROPDOWN)
        self.ctrl_adresse.SetEditable(False)
        if len(listeAdresses) > 0:
            self.ctrl_adresse.Select(0)
        self.bouton_avancer = wx.BitmapButton(
            self, -1,
            wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Avancer.png"),
                      wx.BITMAP_TYPE_ANY))
        self.bouton_dernier = wx.BitmapButton(
            self, -1,
            wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Dernier.png"),
                      wx.BITMAP_TYPE_ANY))

        # Aperçu
        self.ctrl_editeur = CTRL_Editeur_email.Editeur(self)
        self.ctrl_editeur.SetEditable(False)

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

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.OnBoutonPremier, self.bouton_premier)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonReculer, self.bouton_reculer)
        self.Bind(wx.EVT_CHOICE, self.OnChoixAdresse, self.ctrl_adresse)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonAvancer, self.bouton_avancer)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonDernier, self.bouton_dernier)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonFermer, self.bouton_fermer)

        # Init contrôles
        self.bouton_fermer.SetFocus()
        self.MAJ_apercu()
Example #30
0
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Frame.__init__(self,
                          id=wxID_FRAMECADASTROALUNO,
                          name=u'frameCadastroAluno',
                          parent=prnt,
                          pos=wx.Point(700, 273),
                          size=wx.Size(1040, 614),
                          style=wx.DEFAULT_FRAME_STYLE,
                          title=u'Est\xe1gio Curricular - Cadastro de Alunos')
        self.SetClientSize(wx.Size(1024, 576))
        self.Center(wx.BOTH)
        self.SetIcon(wx.Icon(u'./Graficos/icone.ico', wx.BITMAP_TYPE_ICO))
        self.SetMaxSize(wx.Size(1040, 614))
        self.SetMinSize(wx.Size(1040, 614))

        self.painelCadastro = wx.Panel(
            id=wxID_FRAMECADASTROALUNOPAINELCADASTRO,
            name=u'painelCadastro',
            parent=self,
            pos=wx.Point(0, 0),
            size=wx.Size(1024, 576),
            style=wx.TAB_TRAVERSAL)
        self.painelCadastro.SetBackgroundColour(wx.Colour(255, 255, 255))

        self.logoIFPE = wx.StaticBitmap(bitmap=wx.Bitmap(
            u'./Graficos/logo.png', wx.BITMAP_TYPE_PNG),
                                        id=wxID_FRAMECADASTROALUNOLOGOIFPE,
                                        name=u'logoIFPE',
                                        parent=self.painelCadastro,
                                        pos=wx.Point(8, 8),
                                        size=wx.Size(175, 70),
                                        style=0)

        self.linhaCadastroAlunos = wx.StaticBitmap(
            bitmap=wx.Bitmap(u'./Graficos/LinhaCAdastroAlunos.png',
                             wx.BITMAP_TYPE_PNG),
            id=wxID_FRAMECADASTROALUNOLINHACADASTROALUNOS,
            name=u'linhaCadastroAlunos',
            parent=self.painelCadastro,
            pos=wx.Point(0, 80),
            size=wx.Size(1024, 21),
            style=0)

        self.dadosDosAlunos = wx.Notebook(
            id=wxID_FRAMECADASTROALUNODADOSDOSALUNOS,
            name=u'dadosDosAlunos',
            parent=self.painelCadastro,
            pos=wx.Point(20, 120),
            size=wx.Size(984, 424),
            style=0)
        self.dadosDosAlunos.SetBackgroundColour(wx.Colour(255, 255, 255))
        self.dadosDosAlunos.SetForegroundColour(wx.Colour(255, 255, 255))
        self.dadosDosAlunos.SetThemeEnabled(True)

        self.abaPessoal = wx.Window(id=wxID_FRAMECADASTROALUNOABAPESSOAL,
                                    name=u'abaPessoal',
                                    parent=self.dadosDosAlunos,
                                    pos=wx.Point(0, 0),
                                    size=wx.Size(976, 398),
                                    style=wx.TAB_TRAVERSAL)

        self.campoCPF = wx.lib.masked.textctrl.TextCtrl(
            id=wxID_FRAMECADASTROALUNOCAMPOCPF,
            name=u'campoCPF',
            parent=self.abaPessoal,
            pos=wx.Point(24, 34),
            size=wx.Size(104, 21),
            style=0,
            value=u'')
        self.campoCPF.SetMask(u'XXX.XXX.XXX-XX')
        self.campoCPF.SetAutoformat('')
        self.campoCPF.SetFormatcodes('')
        self.campoCPF.SetDescription('')
        self.campoCPF.SetExcludeChars('')
        self.campoCPF.SetValidRegex('')
        self.campoCPF.SetMaxLength(14)
        self.campoCPF.SetFont(
            wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Tahoma'))
        self.campoCPF.SetDefaultEncoding(u'latin1')
        self.campoCPF.SetFillChar(u' ')

        self.nomeCPF = wx.StaticText(id=wxID_FRAMECADASTROALUNONOMECPF,
                                     label=u'CPF:',
                                     name=u'nomeCPF',
                                     parent=self.abaPessoal,
                                     pos=wx.Point(11, 15),
                                     size=wx.Size(24, 13),
                                     style=0)

        self.CPFInvalido = wx.StaticBitmap(
            bitmap=wx.Bitmap(u'./Graficos/botao_invalido.png',
                             wx.BITMAP_TYPE_PNG),
            id=wxID_FRAMECADASTROALUNOCPFINVALIDO,
            name=u'CPFInvalido',
            parent=self.abaPessoal,
            pos=wx.Point(170, 36),
            size=wx.Size(14, 14),
            style=0)
        self.CPFInvalido.Show(False)

        self.cpfValido = wx.StaticBitmap(bitmap=wx.Bitmap(
            u'./Graficos/botao_valido.png', wx.BITMAP_TYPE_PNG),
                                         id=wxID_FRAMECADASTROALUNOCPFVALIDO,
                                         name=u'cpfValido',
                                         parent=self.abaPessoal,
                                         pos=wx.Point(170, 36),
                                         size=wx.Size(14, 14),
                                         style=0)
        self.cpfValido.Show(False)

        self.validarCPF = wx.BitmapButton(bitmap=wx.Bitmap(
            u'./Graficos/botao_buscar.png', wx.BITMAP_TYPE_PNG),
                                          id=wxID_FRAMECADASTROALUNOVALIDARCPF,
                                          name=u'validarCPF',
                                          parent=self.abaPessoal,
                                          pos=wx.Point(134, 30),
                                          size=wx.Size(26, 26),
                                          style=wx.BU_AUTODRAW)
        self.validarCPF.Bind(wx.EVT_BUTTON,
                             self.OnValidarCPFButton,
                             id=wxID_FRAMECADASTROALUNOVALIDARCPF)

        self.dataNascimento = wx.StaticText(
            id=wxID_FRAMECADASTROALUNODATANASCIMENTO,
            label=u'Data de nascimento:',
            name=u'dataNascimento',
            parent=self.abaPessoal,
            pos=wx.Point(202, 14),
            size=wx.Size(100, 13),
            style=0)

        self.campoAniversario = wx.lib.masked.textctrl.TextCtrl(
            id=wxID_FRAMECADASTROALUNOCAMPOANIVERSARIO,
            name=u'campoAniversario',
            parent=self.abaPessoal,
            pos=wx.Point(215, 33),
            size=wx.Size(104, 21),
            style=0,
            value=u'')
        self.campoAniversario.SetMask(u'XX/XX/XXXX')
        self.campoAniversario.SetAutoformat('')
        self.campoAniversario.SetFormatcodes('')
        self.campoAniversario.SetDescription('')
        self.campoAniversario.SetExcludeChars('')
        self.campoAniversario.SetValidRegex('')
        self.campoAniversario.SetMaxLength(10)
        self.campoAniversario.SetFont(
            wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Tahoma'))
        self.campoAniversario.SetDatestyle('MDY')

        self.selecionaSexo = wx.RadioBox(
            choices=['Feminino', 'Masculino'],
            id=wxID_FRAMECADASTROALUNOSELECIONASEXO,
            label=u'Sexo:',
            majorDimension=1,
            name=u'selecionaSexo',
            parent=self.abaPessoal,
            pos=wx.Point(342, 14),
            size=wx.Size(176, 43),
            style=wx.RA_SPECIFY_ROWS)
        self.selecionaSexo.SetStringSelection(u'Feminino')

        self.nomeNomeAluno = wx.StaticText(
            id=wxID_FRAMECADASTROALUNONOMENOMEALUNO,
            label=u'Nome Completo:',
            name=u'nomeNomeAluno',
            parent=self.abaPessoal,
            pos=wx.Point(11, 70),
            size=wx.Size(80, 13),
            style=0)

        self.campoNomeAluno = wx.TextCtrl(
            id=wxID_FRAMECADASTROALUNOCAMPONOMEALUNO,
            name=u'campoNomeAluno',
            parent=self.abaPessoal,
            pos=wx.Point(24, 89),
            size=wx.Size(496, 21),
            style=0,
            value=u'')
        self.campoNomeAluno.SetMaxLength(50)

        self.nomeNomeMae = wx.StaticText(id=wxID_FRAMECADASTROALUNONOMENOMEMAE,
                                         label=u'Nome da M\xe3e:',
                                         name=u'nomeNomeMae',
                                         parent=self.abaPessoal,
                                         pos=wx.Point(11, 125),
                                         size=wx.Size(70, 14),
                                         style=0)

        self.campoNomeMae = wx.TextCtrl(id=wxID_FRAMECADASTROALUNOCAMPONOMEMAE,
                                        name=u'campoNomeMae',
                                        parent=self.abaPessoal,
                                        pos=wx.Point(24, 145),
                                        size=wx.Size(496, 21),
                                        style=0,
                                        value=u'')
        self.campoNomeMae.SetMaxLength(50)

        self.nomeNomePai = wx.StaticText(id=wxID_FRAMECADASTROALUNONOMENOMEPAI,
                                         label=u'Nome do Pai:',
                                         name=u'nomeNomePai',
                                         parent=self.abaPessoal,
                                         pos=wx.Point(11, 181),
                                         size=wx.Size(64, 13),
                                         style=0)

        self.campoNomePai = wx.TextCtrl(id=wxID_FRAMECADASTROALUNOCAMPONOMEPAI,
                                        name=u'campoNomePai',
                                        parent=self.abaPessoal,
                                        pos=wx.Point(24, 202),
                                        size=wx.Size(496, 21),
                                        style=0,
                                        value=u'')
        self.campoNomePai.SetMaxLength(50)

        self.nomeCEP = wx.StaticText(id=wxID_FRAMECADASTROALUNONOMECEP,
                                     label=u'CEP:',
                                     name=u'nomeCEP',
                                     parent=self.abaPessoal,
                                     pos=wx.Point(11, 237),
                                     size=wx.Size(24, 13),
                                     style=0)

        self.campoCEP = wx.lib.masked.textctrl.TextCtrl(
            id=wxID_FRAMECADASTROALUNOCAMPOCEP,
            name=u'campoCEP',
            parent=self.abaPessoal,
            pos=wx.Point(24, 256),
            size=wx.Size(104, 21),
            style=0,
            value=u'  .   -   ')
        self.campoCEP.SetMask(u'XX.XXX-XXX')
        self.campoCEP.SetAutoformat('')
        self.campoCEP.SetFormatcodes('')
        self.campoCEP.SetDescription('')
        self.campoCEP.SetExcludeChars('')
        self.campoCEP.SetValidRegex('')
        self.campoCEP.SetMaxLength(10)
        self.campoCEP.SetFont(
            wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Tahoma'))
        self.campoCEP.SetDatestyle('MDY')

        self.botaoBuscarCEP = wx.BitmapButton(
            bitmap=wx.Bitmap(u'./Graficos/botao_buscar.png',
                             wx.BITMAP_TYPE_PNG),
            id=wxID_FRAMECADASTROALUNOBOTAOBUSCARCEP,
            name=u'botaoBuscarCEP',
            parent=self.abaPessoal,
            pos=wx.Point(136, 253),
            size=wx.Size(26, 26),
            style=wx.BU_AUTODRAW)
        self.botaoBuscarCEP.Bind(wx.EVT_BUTTON,
                                 self.OnBotaoBuscarCEPButton,
                                 id=wxID_FRAMECADASTROALUNOBOTAOBUSCARCEP)

        self.nomeNumero = wx.StaticText(id=wxID_FRAMECADASTROALUNONOMENUMERO,
                                        label=u'N\xfamero:',
                                        name=u'nomeNumero',
                                        parent=self.abaPessoal,
                                        pos=wx.Point(160, 237),
                                        size=wx.Size(42, 13),
                                        style=0)

        self.campoNumero = wx.TextCtrl(id=wxID_FRAMECADASTROALUNOCAMPONUMERO,
                                       name=u'campoNumero',
                                       parent=self.abaPessoal,
                                       pos=wx.Point(173, 256),
                                       size=wx.Size(100, 21),
                                       style=0,
                                       value=u'')

        self.nomeComplemento = wx.StaticText(
            id=wxID_FRAMECADASTROALUNONOMECOMPLEMENTO,
            label=u'Complemento:',
            name=u'nomeComplemento',
            parent=self.abaPessoal,
            pos=wx.Point(293, 237),
            size=wx.Size(70, 13),
            style=0)

        self.abaProfissional = wx.Window(
            id=wxID_FRAMECADASTROALUNOABAPROFISSIONAL,
            name=u'abaProfissional',
            parent=self.dadosDosAlunos,
            pos=wx.Point(0, 0),
            size=wx.Size(976, 398),
            style=wx.TAB_TRAVERSAL)

        self.nomeMatricula = wx.StaticText(
            id=wxID_FRAMECADASTROALUNONOMEMATRICULA,
            label=u'Matr\xedcula:',
            name=u'nomeMatricula',
            parent=self.abaProfissional,
            pos=wx.Point(16, 15),
            size=wx.Size(48, 13),
            style=0)

        self.campoMatricula = wx.TextCtrl(
            id=wxID_FRAMECADASTROALUNOCAMPOMATRICULA,
            name=u'campoMatricula',
            parent=self.abaProfissional,
            pos=wx.Point(29, 34),
            size=wx.Size(144, 21),
            style=0,
            value=u'')

        self.abaContato = wx.Window(id=wxID_FRAMECADASTROALUNOABACONTATO,
                                    name=u'abaContato',
                                    parent=self.dadosDosAlunos,
                                    pos=wx.Point(0, 0),
                                    size=wx.Size(976, 398),
                                    style=wx.TAB_TRAVERSAL)

        self.campoEmail = wx.TextCtrl(id=wxID_FRAMECADASTROALUNOCAMPOEMAIL,
                                      name=u'campoEmail',
                                      parent=self.abaContato,
                                      pos=wx.Point(24, 35),
                                      size=wx.Size(312, 21),
                                      style=0,
                                      value=u'')

        self.nomeEmail = wx.StaticText(id=wxID_FRAMECADASTROALUNONOMEEMAIL,
                                       label=u'E-Mail:',
                                       name=u'nomeEmail',
                                       parent=self.abaContato,
                                       pos=wx.Point(11, 16),
                                       size=wx.Size(33, 13),
                                       style=0)

        self.nomeTelefone = wx.StaticText(
            id=wxID_FRAMECADASTROALUNONOMETELEFONE,
            label=u'Telefone:',
            name=u'nomeTelefone',
            parent=self.abaContato,
            pos=wx.Point(11, 68),
            size=wx.Size(47, 13),
            style=0)

        self.campoTelefone = wx.lib.masked.textctrl.TextCtrl(
            id=wxID_FRAMECADASTROALUNOCAMPOTELEFONE,
            name=u'campoTelefone',
            parent=self.abaContato,
            pos=wx.Point(24, 87),
            size=wx.Size(136, 21),
            style=0,
            value=u'(  )    -    ')
        self.campoTelefone.SetAutoformat('')
        self.campoTelefone.SetMask(u'(XX)XXXX-XXXX')
        self.campoTelefone.SetFormatcodes('')
        self.campoTelefone.SetDescription('')
        self.campoTelefone.SetExcludeChars('')
        self.campoTelefone.SetValidRegex('')
        self.campoTelefone.SetMaxLength(13)
        self.campoTelefone.SetFont(
            wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Tahoma'))

        self.nomeCelular = wx.StaticText(id=wxID_FRAMECADASTROALUNONOMECELULAR,
                                         label=u'Celular:',
                                         name=u'nomeCelular',
                                         parent=self.abaContato,
                                         pos=wx.Point(11, 125),
                                         size=wx.Size(38, 13),
                                         style=0)

        self.campoCelular = wx.lib.masked.textctrl.TextCtrl(
            id=wxID_FRAMECADASTROALUNOCAMPOCELULAR,
            name=u'campoCelular',
            parent=self.abaContato,
            pos=wx.Point(24, 144),
            size=wx.Size(136, 21),
            style=0,
            value=u'')
        self.campoCelular.SetAutoformat('')
        self.campoCelular.SetMask(u'(XX)XXXX-XXXX')
        self.campoCelular.SetFormatcodes('')
        self.campoCelular.SetDescription('')
        self.campoCelular.SetExcludeChars('')
        self.campoCelular.SetValidRegex('')
        self.campoCelular.SetMaxLength(13)
        self.campoCelular.SetFont(
            wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Tahoma'))

        self.botaoSalvar = wx.Button(id=wxID_FRAMECADASTROALUNOBOTAOSALVAR,
                                     label=u'Salvar',
                                     name=u'botaoSalvar',
                                     parent=self.abaContato,
                                     pos=wx.Point(885, 360),
                                     size=wx.Size(75, 23),
                                     style=0)
        self.botaoSalvar.Bind(wx.EVT_BUTTON,
                              self.OnBotaoSalvarButton,
                              id=wxID_FRAMECADASTROALUNOBOTAOSALVAR)

        self.campoComplemento = wx.TextCtrl(
            id=wxID_FRAMECADASTROALUNOCAMPOCOMPLEMENTO,
            name=u'campoComplemento',
            parent=self.abaPessoal,
            pos=wx.Point(306, 256),
            size=wx.Size(214, 21),
            style=0,
            value=u'')

        self.nomeDepartamento = wx.StaticText(
            id=wxID_FRAMECADASTROALUNONOMEDEPARTAMENTO,
            label=u'Departamento:',
            name=u'nomeDepartamento',
            parent=self.abaProfissional,
            pos=wx.Point(200, 15),
            size=wx.Size(74, 13),
            style=0)

        self.nomeSenha = wx.StaticText(id=wxID_FRAMECADASTROALUNONOMESENHA,
                                       label=u'Senha:',
                                       name=u'nomeSenha',
                                       parent=self.abaContato,
                                       pos=wx.Point(11, 178),
                                       size=wx.Size(35, 13),
                                       style=0)

        self.nomeEndereco = wx.StaticText(
            id=wxID_FRAMECADASTROALUNONOMEENDERECO,
            label=u'Endere\xe7o:',
            name=u'nomeEndereco',
            parent=self.abaPessoal,
            pos=wx.Point(11, 292),
            size=wx.Size(50, 13),
            style=0)

        self.campoEndereco = wx.TextCtrl(
            id=wxID_FRAMECADASTROALUNOCAMPOENDERECO,
            name=u'campoEndereco',
            parent=self.abaPessoal,
            pos=wx.Point(24, 313),
            size=wx.Size(496, 21),
            style=0,
            value=u'')

        self.nomeBairro = wx.StaticText(id=wxID_FRAMECADASTROALUNONOMEBAIRRO,
                                        label=u'Bairro:',
                                        name=u'nomeBairro',
                                        parent=self.abaPessoal,
                                        pos=wx.Point(11, 346),
                                        size=wx.Size(33, 13),
                                        style=0)

        self.nomeCidade = wx.StaticText(id=wxID_FRAMECADASTROALUNONOMECIDADE,
                                        label=u'Cidade:',
                                        name=u'nomeCidade',
                                        parent=self.abaPessoal,
                                        pos=wx.Point(265, 346),
                                        size=wx.Size(38, 13),
                                        style=0)

        self.campoBairro = wx.TextCtrl(id=wxID_FRAMECADASTROALUNOCAMPOBAIRRO,
                                       name=u'campoBairro',
                                       parent=self.abaPessoal,
                                       pos=wx.Point(24, 365),
                                       size=wx.Size(224, 21),
                                       style=0,
                                       value=u'')

        self.campoCidade = wx.TextCtrl(id=wxID_FRAMECADASTROALUNOCAMPOCIDADE,
                                       name=u'campoCidade',
                                       parent=self.abaPessoal,
                                       pos=wx.Point(278, 365),
                                       size=wx.Size(186, 21),
                                       style=0,
                                       value=u'')

        self.comboBoxDepartamento = wx.ComboBox(
            choices=['DASE'],
            id=wxID_FRAMECADASTROALUNOCOMBOBOXDEPARTAMENTO,
            name=u'comboBoxDepartamento',
            parent=self.abaProfissional,
            pos=wx.Point(217, 34),
            size=wx.Size(130, 21),
            style=wx.CB_READONLY,
            value=u'Selecione o Departamento')
        self.comboBoxDepartamento.SetLabel(u'')
        self.comboBoxDepartamento.SetStringSelection(
            u'Selecione o departamento')

        self.nomeCurso = wx.StaticText(id=wxID_FRAMECADASTROALUNONOMECURSO,
                                       label=u'Curso:',
                                       name=u'nomeCurso',
                                       parent=self.abaProfissional,
                                       pos=wx.Point(373, 15),
                                       size=wx.Size(33, 13),
                                       style=0)

        self.comboBoxCursos = wx.ComboBox(
            choices=['TELECOMUNICACOES', 'ELETRONICA', 'ELETROTECNICA'],
            id=wxID_FRAMECADASTROALUNOCOMBOBOXCURSOS,
            name=u'comboBoxCursos',
            parent=self.abaProfissional,
            pos=wx.Point(390, 34),
            size=wx.Size(130, 21),
            style=wx.CB_READONLY,
            value=u'')
        self.comboBoxCursos.SetLabel(u'Selecione o Curso')

        self.nomeAnoConclusao = wx.StaticText(
            id=wxID_FRAMECADASTROALUNONOMEANOCONCLUSAO,
            label=u'Ano que concluiu (ou concluir\xe1) o curso:',
            name=u'nomeAnoConclusao',
            parent=self.abaProfissional,
            pos=wx.Point(16, 75),
            size=wx.Size(192, 13),
            style=0)

        self.campoAnoConclusao = wx.lib.masked.textctrl.TextCtrl(
            id=wxID_FRAMECADASTROALUNOCAMPOANOCONCLUSAO,
            name=u'campoAnoConclusao',
            parent=self.abaProfissional,
            pos=wx.Point(40, 96),
            size=wx.Size(56, 21),
            style=0,
            value=u'    . ')
        self.campoAnoConclusao.SetAutoformat('')
        self.campoAnoConclusao.SetMask(u'XXXX.X')
        self.campoAnoConclusao.SetDatestyle('MDY')
        self.campoAnoConclusao.SetFormatcodes('')
        self.campoAnoConclusao.SetDescription('')
        self.campoAnoConclusao.SetExcludeChars('')
        self.campoAnoConclusao.SetValidRegex('')
        self.campoAnoConclusao.SetMaxLength(6)
        self.campoAnoConclusao.SetFont(
            wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Tahoma'))

        self.botaoLimparProfissional = wx.Button(
            id=wxID_FRAMECADASTROALUNOBOTAOLIMPARPROFISSIONAL,
            label=u'Limpar',
            name=u'botaoLimparProfissional',
            parent=self.abaProfissional,
            pos=wx.Point(880, 20),
            size=wx.Size(75, 23),
            style=0)
        self.botaoLimparProfissional.Bind(
            wx.EVT_BUTTON,
            self.OnBotaoLimparProfissionalButton,
            id=wxID_FRAMECADASTROALUNOBOTAOLIMPARPROFISSIONAL)

        self.botaoVoltar = wx.BitmapButton(
            bitmap=wx.Bitmap(u'./Graficos/botao_voltar.png',
                             wx.BITMAP_TYPE_PNG),
            id=wxID_FRAMECADASTROALUNOBOTAOVOLTAR,
            name=u'botaoVoltar',
            parent=self.painelCadastro,
            pos=wx.Point(952, 13),
            size=wx.Size(57, 57),
            style=wx.BU_AUTODRAW)
        self.botaoVoltar.Bind(wx.EVT_BUTTON,
                              self.OnBotaoVoltarButton,
                              id=wxID_FRAMECADASTROALUNOBOTAOVOLTAR)

        self.nomeUF = wx.StaticText(id=wxID_FRAMECADASTROALUNONOMEUF,
                                    label=u'UF:',
                                    name=u'nomeUF',
                                    parent=self.abaPessoal,
                                    pos=wx.Point(480, 346),
                                    size=wx.Size(18, 13),
                                    style=0)

        self.campoUF = wx.TextCtrl(id=wxID_FRAMECADASTROALUNOCAMPOUF,
                                   name=u'campoUF',
                                   parent=self.abaPessoal,
                                   pos=wx.Point(493, 365),
                                   size=wx.Size(27, 21),
                                   style=0,
                                   value=u'')
        self.campoUF.SetMaxLength(2)

        self.botaoLimparPessoal = wx.Button(
            id=wxID_FRAMECADASTROALUNOBOTAOLIMPARPESSOAL,
            label=u'Limpar',
            name=u'botaoLimparPessoal',
            parent=self.abaPessoal,
            pos=wx.Point(880, 20),
            size=wx.Size(75, 23),
            style=0)
        self.botaoLimparPessoal.Bind(
            wx.EVT_BUTTON,
            self.OnBotaoLimparPessoalButton,
            id=wxID_FRAMECADASTROALUNOBOTAOLIMPARPESSOAL)

        self.nomeErro = wx.StaticText(id=wxID_FRAMECADASTROALUNONOMEERRO,
                                      label=u'',
                                      name=u'nomeErro',
                                      parent=self.abaPessoal,
                                      pos=wx.Point(541, 36),
                                      size=wx.Size(0, 13),
                                      style=wx.ALIGN_CENTRE)
        self.nomeErro.SetFont(
            wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, True, u'Tahoma'))
        self.nomeErro.SetAutoLayout(True)

        self.verificarEstagio = wx.RadioBox(
            choices=['Sim', 'N\xe3o'],
            id=wxID_FRAMECADASTROALUNOVERIFICARESTAGIO,
            label=u'Estagiando:',
            majorDimension=1,
            name=u'verificarEstagio',
            parent=self.abaProfissional,
            pos=wx.Point(234, 75),
            size=wx.Size(94, 44),
            style=wx.RA_SPECIFY_ROWS)
        self.verificarEstagio.SetStringSelection(u'N\xe3o')
        self.verificarEstagio.Bind(wx.EVT_RADIOBOX,
                                   self.OnVerificarEstagioRadiobox,
                                   id=wxID_FRAMECADASTROALUNOVERIFICARESTAGIO)

        self.nomeDisponibilidade = wx.StaticText(
            id=wxID_FRAMECADASTROALUNONOMEDISPONIBILIDADE,
            label=u'Disponibilidade:',
            name=u'nomeDisponibilidade',
            parent=self.abaProfissional,
            pos=wx.Point(351, 76),
            size=wx.Size(75, 13),
            style=0)

        self.opcaoManha = wx.CheckBox(id=wxID_FRAMECADASTROALUNOOPCAOMANHA,
                                      label=u'Manh\xe3',
                                      name=u'opcaoManha',
                                      parent=self.abaProfissional,
                                      pos=wx.Point(372, 98),
                                      size=wx.Size(53, 13),
                                      style=0)
        self.opcaoManha.SetValue(False)

        self.opcaoTarde = wx.CheckBox(id=wxID_FRAMECADASTROALUNOOPCAOTARDE,
                                      label=u'Tarde',
                                      name=u'opcaoTarde',
                                      parent=self.abaProfissional,
                                      pos=wx.Point(428, 98),
                                      size=wx.Size(49, 13),
                                      style=0)
        self.opcaoTarde.SetValue(False)
        self.opcaoTarde.SetToolTipString(u'opcaoTarde')

        self.opcaoNoite = wx.CheckBox(id=wxID_FRAMECADASTROALUNOOPCAONOITE,
                                      label=u'Noite',
                                      name=u'opcaoNoite',
                                      parent=self.abaProfissional,
                                      pos=wx.Point(479, 98),
                                      size=wx.Size(40, 13),
                                      style=0)
        self.opcaoNoite.SetValue(False)

        self.campoSenha = wx.TextCtrl(id=wxID_FRAMECADASTROALUNOCAMPOSENHA,
                                      name=u'campoSenha',
                                      parent=self.abaContato,
                                      pos=wx.Point(24, 197),
                                      size=wx.Size(312, 21),
                                      style=wx.TE_PASSWORD,
                                      value=u'')

        self.nomeConfirmarSenha = wx.StaticText(
            id=wxID_FRAMECADASTROALUNONOMECONFIRMARSENHA,
            label=u'Confirmar Senha:',
            name=u'nomeConfirmarSenha',
            parent=self.abaContato,
            pos=wx.Point(11, 231),
            size=wx.Size(85, 13),
            style=0)

        self.botaoLimparContato = wx.Button(
            id=wxID_FRAMECADASTROALUNOBOTAOLIMPARCONTATO,
            label=u'Limpar',
            name=u'botaoLimparContato',
            parent=self.abaContato,
            pos=wx.Point(880, 20),
            size=wx.Size(75, 23),
            style=0)
        self.botaoLimparContato.Bind(
            wx.EVT_BUTTON,
            self.OnBotaoLimparContatoButton,
            id=wxID_FRAMECADASTROALUNOBOTAOLIMPARCONTATO)

        self.campoConfirmarSenha = wx.TextCtrl(
            id=wxID_FRAMECADASTROALUNOCAMPOCONFIRMARSENHA,
            name=u'campoConfirmarSenha',
            parent=self.abaContato,
            pos=wx.Point(24, 250),
            size=wx.Size(312, 21),
            style=wx.TE_PASSWORD,
            value=u'')

        self._init_coll_dadosDosAlunos_Pages(self.dadosDosAlunos)