本文整理汇总了Python中wx.adv方法的典型用法代码示例。如果您正苦于以下问题:Python wx.adv方法的具体用法?Python wx.adv怎么用?Python wx.adv使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wx
的用法示例。
在下文中一共展示了wx.adv方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: OnInternetDown
# 需要导入模块: import wx [as 别名]
# 或者: from wx import adv [as 别名]
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)
示例2: OnSyncStarted
# 需要导入模块: import wx [as 别名]
# 或者: from wx import adv [as 别名]
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")
示例3: OnSyncDone
# 需要导入模块: import wx [as 别名]
# 或者: from wx import adv [as 别名]
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)
示例4: OnAbout
# 需要导入模块: import wx [as 别名]
# 或者: from wx import adv [as 别名]
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)
示例5: layoutComponent
# 需要导入模块: import wx [as 别名]
# 或者: from wx import adv [as 别名]
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)
示例6: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import adv [as 别名]
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
示例7: OnAboutClick
# 需要导入模块: import wx [as 别名]
# 或者: from wx import adv [as 别名]
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
# --------------------------------------------------------------------------------------------------
示例8: OnMenuAbout
# 需要导入模块: import wx [as 别名]
# 或者: from wx import adv [as 别名]
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)
示例9: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import adv [as 别名]
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)
示例10: aboutApplication
# 需要导入模块: import wx [as 别名]
# 或者: from wx import adv [as 别名]
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
示例11: aboutResnet
# 需要导入模块: import wx [as 别名]
# 或者: from wx import adv [as 别名]
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)
示例12: aboutApplication
# 需要导入模块: import wx [as 别名]
# 或者: from wx import adv [as 别名]
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
示例13: aboutSqueezenet
# 需要导入模块: import wx [as 别名]
# 或者: from wx import adv [as 别名]
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)
示例14: aboutApplication
# 需要导入模块: import wx [as 别名]
# 或者: from wx import adv [as 别名]
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
示例15: aboutApplication
# 需要导入模块: import wx [as 别名]
# 或者: from wx import adv [as 别名]
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