Python wx.adv() Examples

The following are 29 code examples of wx.adv(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module wx , or try the search function .
Example #1
Source File: relay_modbus_gui.py    From R421A08-rs485-8ch-relay-board with MIT License 6 votes vote down vote up
def OnMenuAbout(self, event):
        """
            Display an About Dialog
        :param event:
        :return:
        """
        info = wx.adv.AboutDialogInfo()
        info.SetName('RS485 MODBUS GUI')
        info.SetVersion('v{}'.format(relay_modbus.VERSION))
        info.SetCopyright('(C) 2018 by Erriez')
        ico_path = resource_path('images/modbus.ico')
        if os.path.exists(ico_path):
            info.SetIcon(wx.Icon(ico_path))
        info.SetDescription(wordwrap(
            "This is an example application to monitor and send MODBUS commands using wxPython!",
            350, wx.ClientDC(self)))
        info.SetWebSite("https://github.com/Erriez/R421A08-rs485-8ch-relay-board",
                        "Source & Documentation")
        info.AddDeveloper('Erriez')
        info.SetLicense(wordwrap("MIT License: Completely and totally open source!", 500,
                                 wx.ClientDC(self)))
        # Then we call wx.AboutBox giving it that info object
        wx.adv.AboutBox(info) 
Example #2
Source File: application.py    From Gooey with MIT License 6 votes vote down vote up
def layoutComponent(self):
        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(self.header, 0, wx.EXPAND)
        sizer.Add(wx_util.horizontal_rule(self), 0, wx.EXPAND)

        sizer.Add(self.navbar, 1, wx.EXPAND)
        sizer.Add(self.console, 1, wx.EXPAND)
        sizer.Add(wx_util.horizontal_rule(self), 0, wx.EXPAND)
        sizer.Add(self.footer, 0, wx.EXPAND)
        self.SetMinSize((400, 300))
        self.SetSize(self.buildSpec['default_size'])
        self.SetSizer(sizer)
        self.console.Hide()
        self.Layout()
        if self.buildSpec.get('fullscreen', True):
            self.ShowFullScreen(True)
        # Program Icon (Windows)
        icon = wx.Icon(self.buildSpec['images']['programIcon'], wx.BITMAP_TYPE_PNG)
        self.SetIcon(icon)
        if sys.platform != 'win32':
            # OSX needs to have its taskbar icon explicitly set
            # bizarrely, wx requires the TaskBarIcon to be attached to the Frame
            # as instance data (self.). Otherwise, it will not render correctly.
            self.taskbarIcon = TaskBarIcon(iconType=wx.adv.TBI_DOCK)
            self.taskbarIcon.SetIcon(icon) 
Example #3
Source File: relay_board_gui.py    From R421A08-rs485-8ch-relay-board with MIT License 6 votes vote down vote up
def OnAboutClick(self, event=None):
        info = wx.adv.AboutDialogInfo()
        info.SetName('RS485 MODBUS GUI')
        info.SetVersion('v{}'.format(relay_boards.VERSION))
        info.SetCopyright('(C) 2018 by Erriez')
        ico_path = resource_path('images/R421A08.ico')
        if os.path.exists(ico_path):
            info.SetIcon(wx.Icon(ico_path))
        info.SetDescription(wordwrap(
            "This is an example application to control a R421A08 relay board using wxPython!",
            350, wx.ClientDC(self)))
        info.SetWebSite(SOURCE_URL,
                        "Source & Documentation")
        info.AddDeveloper('Erriez')
        info.SetLicense(wordwrap("MIT License: Completely and totally open source!", 500,
                                 wx.ClientDC(self)))
        wx.adv.AboutBox(info)


# --------------------------------------------------------------------------------------------------
# Relay panel
# -------------------------------------------------------------------------------------------------- 
Example #4
Source File: CalendarCtrl_Phoenix.py    From wxGlade with MIT License 6 votes vote down vote up
def __init__(self, *args, **kwds):
        # begin wxGlade: MyDialog.__init__
        kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE
        wx.Dialog.__init__(self, *args, **kwds)
        self.SetTitle("dialog_1")

        sizer_1 = wx.BoxSizer(wx.HORIZONTAL)

        self.calendar_ctrl_1 = wx.adv.CalendarCtrl(self, wx.ID_ANY, style=0)
        sizer_1.Add(self.calendar_ctrl_1, 0, 0, 0)

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

        self.Layout()
        # end wxGlade

# end of class MyDialog 
Example #5
Source File: GoSyncController.py    From gosync with GNU General Public License v2.0 6 votes vote down vote up
def OnInternetDown(self, event):
        if event.data == 1:
            self.sb.SetStatusText("Network is down")
            if self.sync_model.GetUseSystemNotifSetting():
                if wxgtk4:
                    nmsg = wx.adv.NotificationMessage(title="GoSync", message="Network has gone down!")
                    nmsg.SetFlags(wx.ICON_WARNING)
                    nmsg.Show(timeout=wx.adv.NotificationMessage.Timeout_Auto)
                else:
                    nmsg = wx.NotificationMessage("GoSync", "Network has gone down!")
                    nmsg.SetFlags(wx.ICON_WARNING)
                    nmsg.Show(timeout=wx.NotificationMessage.Timeout_Auto)
        else:
            self.sb.SetStatusText("Network is up!")
            if self.sync_model.GetUseSystemNotifSetting():
                if wxgtk4:
                    nmsg = wx.adv.NotificationMessage(title="GoSync", message="Network is up!")
                    nmsg.SetFlags(wx.ICON_INFORMATION)
                    nmsg.Show(timeout=wx.adv.NotificationMessage.Timeout_Auto)
                else:
                    nmsg = wx.NotificationMessage("GoSync", "Network is up!")
                    nmsg.SetFlags(wx.ICON_INFORMATION)
                    nmsg.Show(timeout=wx.NotificationMessage.Timeout_Auto) 
Example #6
Source File: GoSyncController.py    From gosync with GNU General Public License v2.0 6 votes vote down vote up
def OnAbout(self, evt):
        """About GoSync"""
        if wxgtk4 :
            about = wx.adv.AboutDialogInfo()
        else:
            about = wx.AboutDialogInfo()
        about.SetIcon(wx.Icon(ABOUT_ICON, wx.BITMAP_TYPE_PNG))
        about.SetName(APP_NAME)
        about.SetVersion(APP_VERSION)
        about.SetDescription(APP_DESCRIPTION)
        about.SetCopyright(APP_COPYRIGHT)
        about.SetWebSite(APP_WEBSITE)
        about.SetLicense(APP_LICENSE)
        about.AddDeveloper(APP_DEVELOPER)
        about.AddArtist(ART_DEVELOPER)
        if wxgtk4 :
            wx.adv.AboutBox(about)
        else:
            wx.AboutBox(about) 
Example #7
Source File: GoSyncController.py    From gosync with GNU General Public License v2.0 6 votes vote down vote up
def OnSyncStarted(self, event):
        if self.sync_model.GetUseSystemNotifSetting():
            if wxgtk4 :
                nmsg = wx.adv.NotificationMessage(title="GoSync", message="Sync Started")
                nmsg.SetFlags(wx.ICON_INFORMATION)
                nmsg.Show(timeout=wx.adv.NotificationMessage.Timeout_Auto)
            else:
                nmsg = wx.NotificationMessage("GoSync", "Sync Started")
                nmsg.SetFlags(wx.ICON_INFORMATION)
                nmsg.Show(timeout=wx.NotificationMessage.Timeout_Auto)

        self.sb.SetStatusText("Sync started...")
        self.sb.SetStatusText("Running", 1)
        self.sync_now_mitem.Enable(False)
        self.rcu.Enable(False)
        self.pr_item.SetItemLabel("Pause Sync") 
Example #8
Source File: GoSyncController.py    From gosync with GNU General Public License v2.0 6 votes vote down vote up
def OnSyncDone(self, event):
        if not event.data:
            if self.sync_model.GetUseSystemNotifSetting():
                if wxgtk4:
                    nmsg = wx.adv.NotificationMessage(title="GoSync", message="Sync Completed!")
                    nmsg.SetFlags(wx.ICON_INFORMATION)
                    nmsg.Show(timeout=wx.adv.NotificationMessage.Timeout_Auto)
                else:
                    nmsg = wx.NotificationMessage("GoSync", "Sync Completed!")
                    nmsg.SetFlags(wx.ICON_INFORMATION)
                    nmsg.Show(timeout=wx.NotificationMessage.Timeout_Auto)
            self.sb.SetStatusText("Sync completed.")
        else:
            if self.sync_model.GetUseSystemNotifSetting():
                if wxgtk4:
                    nmsg = wx.adv.NotificationMessage(title="GoSync", message="Sync Completed with errors!\nPlease check ~/GoSync.log")
                    nmsg.SetFlags(wx.ICON_ERROR)
                    nmsg.Show(timeout=wx.adv.NotificationMessage.Timeout_Auto)
                else:
                    nmsg = wx.NotificationMessage("GoSync", "Sync Completed with errors!\nPlease check ~/GoSync.log")
                    nmsg.SetFlags(wx.ICON_ERROR)
                    nmsg.Show(timeout=wx.NotificationMessage.Timeout_Auto)
            self.sb.SetStatusText("Sync failed. Please check the logs.")
        self.sync_now_mitem.Enable(True)
        self.rcu.Enable(True) 
Example #9
Source File: three_to_four.py    From Gooey with MIT License 5 votes vote down vote up
def AboutBox(aboutDialog):
    return (wx.adv.AboutBox(aboutDialog)
            if isLatestVersion
            else wx.AboutBox(aboutDialog)) 
Example #10
Source File: tray.py    From superpaper with MIT License 5 votes vote down vote up
def on_about(self, event):
        """Opens About dialog."""
        # Credit for AboutDiaglog example to Jan Bodnar of
        # http://zetcode.com/wxpython/dialogs/
        description = (
            "Superpaper is an advanced multi monitor wallpaper\n"
            +"manager for Unix and Windows operating systems.\n"
            +"Features include setting a single or multiple image\n"
            +"wallpaper, pixel per inch and bezel corrections,\n"
            +"manual pixel offsets for tuning, slideshow with\n"
            +"configurable file order, multiple path support and more."
            )
        licence = (
            "Superpaper is free software; you can redistribute\n"
            +"it and/or modify it under the terms of the MIT"
            +" License.\n\n"
            +"Superpaper is distributed in the hope that it will"
            +" be useful,\n"
            +"but WITHOUT ANY WARRANTY; without even the implied"
            +" warranty of\n"
            +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
            +"See the MIT License for more details."
            )
        artists = "Icons kindly provided by Icons8 https://icons8.com"

        info = wx.adv.AboutDialogInfo()
        info.SetIcon(wx.Icon(TRAY_ICON, wx.BITMAP_TYPE_PNG))
        info.SetName('Superpaper')
        info.SetVersion(__version__)
        info.SetDescription(description)
        info.SetCopyright('(C) 2020 Henri Hänninen')
        info.SetWebSite('https://github.com/hhannine/Superpaper/')
        info.SetLicence(licence)
        info.AddDeveloper('Henri Hänninen')
        info.AddArtist(artists)
        # info.AddDocWriter('Doc Writer')
        # info.AddTranslator('Tran Slator')
        wx.adv.AboutBox(info) 
Example #11
Source File: gui.py    From atbswp with GNU General Public License v3.0 5 votes vote down vote up
def on_about(self, event):
        """About dialog."""
        info = wx.adv.AboutDialogInfo()
        info.Name = "atbswp"
        info.Version = "v0.1"
        info.Copyright = ("(C) 2019 Mairo Paul Rufus <akoudanilo@gmail.com>\n")
        info.Description = "Record mouse and keyboard actions and reproduce them identically at will"
        info.WebSite = ("https://github.com/atbswp", "Project homepage")
        info.Developers = ["Mairo Paul Rufus"]
        info.License = "GNU General Public License V3"
        info.Icon = self.icon
        wx.adv.AboutBox(info) 
Example #12
Source File: hyperlink_ctrl.py    From wxGlade with MIT License 5 votes vote down vote up
def wxname2attr(self, name):
        cn = self.codegen.get_class(self.codegen.cn(name))
        module = wx if compat.IS_CLASSIC else wx.adv
        return getattr(module, cn) 
Example #13
Source File: datepicker_ctrl.py    From wxGlade with MIT License 5 votes vote down vote up
def wxname2attr(self, name):
        cn = self.codegen.get_class(self.codegen.cn(name))
        module = wx if compat.IS_CLASSIC else wx.adv
        return getattr(module, cn) 
Example #14
Source File: calendar_ctrl.py    From wxGlade with MIT License 5 votes vote down vote up
def wxname2attr(self, name):
        assert name.startswith('wx')

        cn = self.codegen.get_class(self.codegen.cn(name))
        if compat.IS_PHOENIX:
            attr = getattr(wx.adv, cn)
        else:
            attr = getattr(wx.calendar, cn)
        return attr 
Example #15
Source File: generic_calendar_ctrl.py    From wxGlade with MIT License 5 votes vote down vote up
def wxname2attr(self, name):
        assert name.startswith('wx')

        cn = self.codegen.get_class(self.codegen.cn(name))
        if compat.IS_PHOENIX:
            attr = getattr(wx.adv, cn)
        else:
            attr = getattr(wx, cn)
        return attr 
Example #16
Source File: relay_board_gui.py    From R421A08-rs485-8ch-relay-board with MIT License 5 votes vote down vote up
def __init__(self, frame, icon):
        """
            Create Taskbar icon
        :param frame: Frame
        :type frame: RelayGUI
        :param icon: Taskbar icon
        """
        wx.adv.TaskBarIcon.__init__(self)
        self.frame = frame

        self.SetIcon(icon, self.frame.GetTitle())
        self.Bind(wx.adv.EVT_TASKBAR_LEFT_DOWN, self.OnTaskBarLeftClick) 
Example #17
Source File: wxpython_toggle.py    From R421A08-rs485-8ch-relay-board with MIT License 5 votes vote down vote up
def OnMenuAbout(self, event):
        info = wx.adv.AboutDialogInfo()
        info.SetName('Relay example GUI')
        if os.path.exists(ICO_PATH):
            info.SetIcon(wx.Icon(ICO_PATH))
        info.SetVersion('v1.0')
        info.SetCopyright('(C) 2018 by Erriez')
        info.SetDescription('Relay example with wxPython {}'.format(wx.version()))
        info.SetWebSite('https://github.com/Erriez/R421A08-rs485-8ch-relay-board',
                        'Source & Documentation')
        info.AddDeveloper('Erriez')
        info.SetLicense('MIT License: Completely and totally open source!')
        wx.adv.AboutBox(info) 
Example #18
Source File: three_to_four.py    From Gooey with MIT License 5 votes vote down vote up
def AboutDialog():
    if isLatestVersion:
        return wx.adv.AboutDialogInfo()
    else:
        return wx.AboutDialogInfo() 
Example #19
Source File: Main.py    From nodemcu-pyflasher with MIT License 5 votes vote down vote up
def __init__(self):
        wx.adv.SplashScreen.__init__(self, images.Splash.GetBitmap(),
                                     wx.adv.SPLASH_CENTRE_ON_SCREEN | wx.adv.SPLASH_TIMEOUT, 2500, None, -1)
        self.Bind(wx.EVT_CLOSE, self._on_close)
        self.__fc = wx.CallLater(2000, self._show_main) 
Example #20
Source File: GoSyncController.py    From gosync with GNU General Public License v2.0 5 votes vote down vote up
def OnSyncInvalidFolder(self, event):
        if self.sync_model.GetUseSystemNotifSetting():
            if wxgtk4:
                nmsg = wx.adv.NotificationMessage(title="GoSync",
                                                  message="Invalid sync settings detected.\nPlease check the logs.")
                nmsg.SetFlags(wx.ICON_ERROR)
                nmsg.Show(timeout=wx.adv.NotificationMessage.Timeout_Auto)
            else:
                nmsg = wx.NotificationMessage("GoSync", "Invalid sync settings detected.\nPlease check the logs.")
                nmsg.SetFlags(wx.ICON_ERROR)
                nmsg.Show(timeout=wx.NotificationMessage.Timeout_Auto) 
Example #21
Source File: MainUI.py    From Model-Playgrounds with MIT License 5 votes vote down vote up
def aboutInception(self, evt):
        about_details = wx.adv.AboutDialogInfo()
        about_details.Name = "Inception"
        about_details.Version = "V3"
        about_details.Description = wordwrap("           Inception V3 is a Convolutional Neural Network that scales up in ways"
                                             " that utilizes higher computation as efficiently as possible by suitably"
                                             " factorized convolutions and aggressive regularization. It is developed"
                                             " and maintained at Google. The Inception Neural Networks have achieved"
                                             " state-of-the-art performance in practical applications."
                                             " ", 500, wx.ClientDC(self))
        about_details.Copyright = "Google Inc."
        about_details.SetWebSite("https://arxiv.org/abs/1512.00567", "Arxiv Publication Page")
        about_details.SetDevelopers(["Christian Szegedy ","Vincent Vanhoucke", "Sergey Ioffe", "Jonathon Shlens", "Zbigniew Wojna"])

        about_dialog = wx.adv.AboutBox(about_details) 
Example #22
Source File: MainUI.py    From Model-Playgrounds with MIT License 5 votes vote down vote up
def aboutApplication(self, evt):
        about_details = wx.adv.AboutDialogInfo()
        about_details.Name = "Inception Playground"
        about_details.Version = "1.0"
        about_details.Description = wordwrap("        Inception Playground is a software that enables users to perform average "
                                             "recognition and classification on pictures on computer systems. Powered by "
                                             "the Convolutional Neural Network Architecture, InceptionV3 model, trained on the ImageNet "
                                             "dataset which comprises of 1000 different objects in its 1.2 million pictures "
                                             "collection, this software can recognize on average most everyday objects based on "
                                             "the capability of the Inception V3 + ImageNet model shipped with it. \n "
                                             "        This software is part of a series of programs that is meant to let "
                                             "non-programmers and average computer users to experience Artificial Intelligence "
                                             "in which machines and software programs can identify picture/objects in pictures. \n"
                                             "        These series of Artificial Intelligence playgrounds is built by Specpal "
                                             "with Moses Olafenwa as its Chief programmer and John Olafenwa as the Technical Adviser.  \n"
                                             "        This program is free for anyone to use for both commercial and non-commercial purposes.  "
                                             " We do not guarantee the accuracy or consistency of this program and we shall not be "
                                             "responsible for any consequence or damage to your computer system that may arise in the "
                                             " use of this program. \n"
                                             "        You can reach to Moses Olafenwa via an email to \"guymodscientist@gmail.com\", or John Olafenwa via an email to \"johnolafenwa@gmail.com\" . ", 500, wx.ClientDC(self))
        about_details.Copyright = "Specpal"
        about_details.SetWebSite("http://www.specpal.science", "Specpal's Official Website")

        about_dialog = wx.adv.AboutBox(about_details)

    # About Inception dialog function 
Example #23
Source File: MainUI.py    From Model-Playgrounds with MIT License 5 votes vote down vote up
def aboutApplication(self, evt):
        about_details = wx.adv.AboutDialogInfo()
        about_details.Name = "DenseNet Playground"
        about_details.Version = "1.0"
        about_details.Description = wordwrap("        DenseNet Playground is a software that enables users to perform average "
                                             "recognition and classification on pictures on computer systems. Powered by "
                                             "the Convolutional Neural Network Architecture, DenseNet model, trained on the ImageNet "
                                             "dataset which comprises of 1000 different objects in its 1.2 million pictures "
                                             "collection, this software can recognize on average most everyday objects based on "
                                             "the capability of the DenseNet + ImageNet model shipped with it. \n "
                                             "        This software is part of a series of programs that is meant to let "
                                             "non-programmers and average computer users to experience Artificial Intelligence "
                                             "in which machines and software programs can identify picture/objects in pictures. \n"
                                             "        These series of Artificial Intelligence playgrounds is built by Specpal "
                                             "with Moses Olafenwa as its Chief programmer and John Olafenwa as the Technical Adviser.  \n"
                                             "        This program is free for anyone to use for both commercial and non-commercial purposes.  "
                                             " We do not guarantee the accuracy or consistency of this program and we shall not be "
                                             "responsible for any consequence or damage to your computer system that may arise in the "
                                             " use of this program. \n"
                                             "        You can reach to Moses Olafenwa via an email to \"guymodscientist@gmail.com\", or John Olafenwa via an email to \"johnolafenwa@gmail.com\" . ", 500, wx.ClientDC(self))
        about_details.Copyright = "Specpal"
        about_details.SetWebSite("http://www.specpal.science", "Specpal's Official Website")

        about_dialog = wx.adv.AboutBox(about_details)

    # About DenseNet dialog function 
Example #24
Source File: MainUI.py    From Model-Playgrounds with MIT License 5 votes vote down vote up
def aboutSqueezenet(self, evt):
        about_details = wx.adv.AboutDialogInfo()
        about_details.Name = "SqueezeNet"
        about_details.Version = ""
        about_details.Description = wordwrap(
            "     SqueezeNet is a Deep Neural Network architecture developed to be relatively small"
            ", require less computational power for training, require less server-to-server communication"
            " during distributed training and have a viable low-end devices deployment.", 300, wx.ClientDC(self))
        about_details.Copyright = ""
        about_details.SetWebSite("https://github.com/DeepScale/SqueezeNet", "SqueezeNet GitHub page")
        about_details.SetDevelopers(["Forrest N. Iandola", "Song Han", "Matthew W. Moskewicz", "Khalid Ashraf", "William J. Dally", "Kurt Keutzer"])

        about_dialog = wx.adv.AboutBox(about_details) 
Example #25
Source File: MainUI.py    From Model-Playgrounds with MIT License 5 votes vote down vote up
def aboutApplication(self, evt):
        about_details = wx.adv.AboutDialogInfo()
        about_details.Name = "SqueezeNet Playground"
        about_details.Version = "1.0"
        about_details.Description = wordwrap("        SqueezeNet Playground is a software that enables users to perform average "
                                             "recognition and classification on pictures on computer systems. Powered by "
                                             "the Convolutional Neural Network Architecture, SqueezeNet model, trained on the ImageNet "
                                             "dataset which comprises of 1000 different objects in its 1.2 million pictures "
                                             "collection, this software can recognize on average most everyday objects based on "
                                             "the capability of the SqueezeNet + ImageNet model shipped with it. \n "
                                             "        This software is part of a series of programs that is meant to let "
                                             "non-programmers and average computer users to experience Artificial Intelligence "
                                             "in which machines and software programs can identify picture/objects in pictures. \n"
                                             "        These series of Artificial Intelligence playgrounds is built by Specpal "
                                             "with Moses Olafenwa as its Chief programmer and John Olafenwa as the Technical Adviser.  \n"
                                             "        This program is free for anyone to use for both commercial and non-commercial purposes.  "
                                             " We do not guarantee the accuracy or consistency of this program and we shall not be "
                                             "responsible for any consequence or damage to your computer system that may arise in the "
                                             " use of this program. \n"
                                             "        You can reach to Moses Olafenwa via an email to \"guymodscientist@gmail.com\", or John Olafenwa via an email to \"johnolafenwa@gmail.com\" . ", 500, wx.ClientDC(self))
        about_details.Copyright = "Specpal"
        about_details.SetWebSite("http://www.specpal.science", "Specpal's Official Website")

        about_dialog = wx.adv.AboutBox(about_details)

    # About SqueezeNet dialog function 
Example #26
Source File: MainUI.py    From Model-Playgrounds with MIT License 5 votes vote down vote up
def aboutResnet(self, evt):
        about_details = wx.adv.AboutDialogInfo()
        about_details.Name = "ResNet"
        about_details.Version = "50"
        about_details.Description = wordwrap("      ResNet is a Residual Learning Framework by Kaiming He et al at Microsoft"
                                             " Research Asia (MSRA). The network was developed to ease the training of neural"
                                             " networks that are substantially deeper than those used previously."
                                             " ", 300, wx.ClientDC(self))
        about_details.Copyright = "Microsoft Research Asia (MSRA)"
        about_details.SetWebSite("https://github.com/KaimingHe/deep-residual-networks", "ResNet GitHub page")
        about_details.SetDevelopers(["Kaiming He","Xiangyu Zhang", "Shaoqing Ren", "Jian Sun"])

        about_dialog = wx.adv.AboutBox(about_details) 
Example #27
Source File: MainUI.py    From Model-Playgrounds with MIT License 5 votes vote down vote up
def aboutApplication(self, evt):
        about_details = wx.adv.AboutDialogInfo()
        about_details.Name = "ResNet Playground"
        about_details.Version = "1.0"
        about_details.Description = wordwrap("        ResNet Playground is a software that enables users to perform average "
                                             "recognition and classification on pictures on computer systems. Powered by "
                                             "the Convolutional Neural Network Architecture, ResNet50 model, trained on the ImageNet "
                                             "dataset which comprises of 1000 different objects in its 1.2 million pictures "
                                             "collection, this software can recognize on average most everyday objects based on "
                                             "the capability of the ResNet50 + ImageNet model shipped with it. \n "
                                             "        This software is part of a series of programs that is meant to let "
                                             "non-programmers and average computer users to experience Artificial Intelligence "
                                             "in which machines and software programs can identify picture/objects in pictures. \n"
                                             "        These series of Artificial Intelligence playgrounds is built by Specpal "
                                             "with Moses Olafenwa as its Chief programmer and John Olafenwa as the Technical Adviser.  \n"
                                             "        This program is free for anyone to use for both commercial and non-commercial purposes.  "
                                             " We do not guarantee the accuracy or consistency of this program and we shall not be "
                                             "responsible for any consequence or damage to your computer system that may arise in the "
                                             " use of this program. \n"
                                             "        You can reach to Moses Olafenwa via an email to \"guymodscientist@gmail.com\", or John Olafenwa via an email to \"johnolafenwa@gmail.com\" . ", 500, wx.ClientDC(self))
        about_details.Copyright = "Specpal"
        about_details.SetWebSite("http://www.specpal.science", "Specpal's Official Website")

        about_dialog = wx.adv.AboutBox(about_details)

    # About ResNet dialog function 
Example #28
Source File: app.py    From thotkeeper with BSD 2-Clause "Simplified" License 4 votes vote down vote up
def _QueryChooseDate(self, title, default_date=None):
        # Fetch the date selection dialog, and replace the "unknown" XRC
        # placeholder with a calendar widget.
        choose_date_dialog = self.resources.LoadDialog(self.frame,
                                                       'TKChooseDate')
        choose_date_dialog.SetTitle(title)
        choose_date_panel = choose_date_dialog.FindWindowById(
            self._GetXRCID('TKChooseDatePanel'))
        choose_date_cal = wx.adv.GenericCalendarCtrl(
            parent=choose_date_panel,
            style=wx.adv.CAL_SEQUENTIAL_MONTH_SELECTION)
        self.resources.AttachUnknownControl('TKChooseDateCalendar',
                                            choose_date_cal,
                                            choose_date_panel)
        choose_date_cal_id = self._GetXRCID('TKChooseDateCalendar')
        choose_date_today_id = self._GetXRCID('TKChooseDateToday')

        # Ask the user to select a date.  We'll hook in a couple of
        # custom event handlers here:  one catches double-clicks on the
        # calendar as dialog-close-worthy events, and the other allows
        # the dialog's "Today" button to set the dialog's selected
        # calendar day.

        def _ChooseDateCalendarChanged(event):
            event.Skip()
            choose_date_dialog.EndModal(wx.ID_OK)
        self.Bind(wx.adv.EVT_CALENDAR, _ChooseDateCalendarChanged,
                  id=choose_date_cal_id)

        def _ChooseDateTodayClicked(event):
            timestruct = time.localtime()
            date = self._MakeDateTime(timestruct[0],
                                      timestruct[1],
                                      timestruct[2])
            choose_date_cal.SetDate(date)
        self.Bind(wx.EVT_BUTTON, _ChooseDateTodayClicked,
                  id=choose_date_today_id)

        if not default_date:
            timestruct = time.localtime()
            default_date = self._MakeDateTime(timestruct[0],
                                              timestruct[1],
                                              timestruct[2])
        choose_date_cal.SetDate(default_date)
        if choose_date_dialog.ShowModal() != wx.ID_OK:
            choose_date_dialog.Destroy()
            return None
        date = choose_date_cal.GetDate()
        choose_date_dialog.Destroy()
        return date 
Example #29
Source File: tray.py    From superpaper with MIT License 4 votes vote down vote up
def __init__(self, frame):
        self.g_settings = GeneralSettingsData()

        self.frame = frame
        super(TaskBarIcon, self).__init__()
        self.set_icon(TRAY_ICON)
        # self.Bind(wx.adv.EVT_TASKBAR_LEFT_DOWN, self.on_left_down)
        self.Bind(wx.adv.EVT_TASKBAR_LEFT_DCLICK, self.configure_wallpapers)
        # Initialize display data
        # get_display_data()
        wpproc.refresh_display_data()
        # profile initialization
        self.job_lock = Lock()
        self.repeating_timer = None
        self.pause_item = None
        self.is_paused = False
        if sp_logging.DEBUG:
            sp_logging.G_LOGGER.info("START Listing profiles for menu.")
        self.list_of_profiles = list_profiles()
        if sp_logging.DEBUG:
            sp_logging.G_LOGGER.info("END Listing profiles for menu.")
        # Should now return an object if a previous profile was written or
        # None if no previous data was found
        self.active_profile = read_active_profile()
        self.start_prev_profile(self.active_profile)
        # if self.active_profile is None:
        #     sp_logging.G_LOGGER.info("Starting up the first profile found.")
        #     self.start_profile(wx.EVT_MENU, self.list_of_profiles[0])

        # self.hk = None
        # self.hk2 = None
        if self.g_settings.use_hotkeys is True:
            try:
                # import keyboard # https://github.com/boppreh/keyboard
                # This import is here to have the module in the class scope
                from system_hotkey import SystemHotkey
                self.hk = SystemHotkey(check_queue_interval=0.05)
                self.hk2 = SystemHotkey(
                    consumer=self.profile_consumer,
                    check_queue_interval=0.05)
                self.seen_binding = set()
                self.register_hotkeys()
            except ImportError as excep:
                sp_logging.G_LOGGER.info(
                    "WARNING: Could not import keyboard hotkey hook library, \
hotkeys will not work. Exception: %s", excep)
        if self.g_settings.show_help is True:
            config_frame = ConfigFrame(self)
            help_frame = HelpFrame()