当前位置: 首页>>代码示例>>Python>>正文


Python wx.ICON_WARNING属性代码示例

本文整理汇总了Python中wx.ICON_WARNING属性的典型用法代码示例。如果您正苦于以下问题:Python wx.ICON_WARNING属性的具体用法?Python wx.ICON_WARNING怎么用?Python wx.ICON_WARNING使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在wx的用法示例。


在下文中一共展示了wx.ICON_WARNING属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __on_rec

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_WARNING [as 别名]
def __on_rec(self, recording):
        timestamp = time.time()
        for monitor in self._monitors:
            if not recording:
                monitor.set_level(None, timestamp, None)
            monitor.set_recording(recording, timestamp)

        if recording:
            self.__on_start()
        else:
            while self._push.hasFailed():
                resp = wx.MessageBox('Web push has failed, retry?', 'Warning',
                                     wx.OK | wx.CANCEL | wx.ICON_WARNING)
                if resp == wx.OK:
                    busy = wx.BusyInfo('Pushing...', self)
                    self._push.send_failed(self._settings.get_push_uri())
                    del busy
                else:
                    self._push.clear_failed()

        self._warnedPush = False
        self.__set_timeline() 
开发者ID:EarToEarOak,项目名称:RF-Monitor,代码行数:24,代码来源:gui.py

示例2: verify_connect

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_WARNING [as 别名]
def verify_connect(self, con_info):
		if self.is_connected() or self.connecting:
			gui.messageBox(_("NVDA Remote is already connected. Disconnect before opening a new connection."), _("NVDA Remote Already Connected"), wx.OK|wx.ICON_WARNING)
			return
		self.connecting = True
		server_addr = con_info.get_address()
		key = con_info.key
		if con_info.mode == 'master':
			message = _("Do you wish to control the machine on server {server} with key {key}?").format(server=server_addr, key=key)
		elif con_info.mode == 'slave':
			message = _("Do you wish to allow this machine to be controlled on server {server} with key {key}?").format(server=server_addr, key=key)
		if gui.messageBox(message, _("NVDA Remote Connection Request"), wx.YES|wx.NO|wx.NO_DEFAULT|wx.ICON_WARNING) != wx.YES:
			self.connecting = False
			return
		if con_info.mode == 'master':
			self.connect_as_master((con_info.hostname, con_info.port), key=key)
		elif con_info.mode == 'slave':
			self.connect_as_slave((con_info.hostname, con_info.port), key=key)
		self.connecting = False 
开发者ID:NVDARemote,项目名称:NVDARemote,代码行数:21,代码来源:__init__.py

示例3: OnInternetDown

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_WARNING [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) 
开发者ID:hschauhan,项目名称:gosync,代码行数:25,代码来源:GoSyncController.py

示例4: OnColorCalibration

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_WARNING [as 别名]
def OnColorCalibration(self, event):
        if self.scaniface.IsScanning():
            dlg = wx.MessageDialog(self, 'In order to calibrate, please stop scanning process first.',
                                   'Stop scanning',
                                   wx.OK | wx.ICON_WARNING)
            dlg.ShowModal()
            dlg.Destroy()
            return

        training = self.trainingAreas.GetValue()
        if not training:
            return
        if self.settings['output']['color'] and self.settings['output']['color_name']:
            self.group = self.settings['output']['color_name']
        else:
            self.group = None
            dlg = wx.MessageDialog(self, "In order to calibrate colors, please specify name of output color raster in 'Output' tab.",
                                   'Need color output',
                                   wx.OK | wx.ICON_WARNING)
            dlg.ShowModal()
            dlg.Destroy()
            return

        self.CalibrateColor() 
开发者ID:tangible-landscape,项目名称:grass-tangible-landscape,代码行数:26,代码来源:g.gui.tangible.py

示例5: CalibrateModelBBox

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_WARNING [as 别名]
def CalibrateModelBBox(self, event):
        if self.IsScanning():
            dlg = wx.MessageDialog(self, 'In order to calibrate, please stop scanning process first.',
                                   'Stop scanning',
                                   wx.OK | wx.ICON_WARNING)
            dlg.ShowModal()
            dlg.Destroy()
            return
        params = {}
        if self.calib_matrix:
            params['calib_matrix'] = self.calib_matrix
        params['rotate'] = self.scan['rotation_angle']
        zrange = ','.join(self.scan['trim_nsewtb'].split(',')[4:])
        params['zrange'] = zrange
        res = gscript.parse_command('r.in.kinect', flags='m', overwrite=True, **params)
        if not res['bbox']:
            gscript.message(_("Failed to find model extent"))
        offsetcm = 2
        n, s, e, w = [int(round(float(each))) for each in res['bbox'].split(',')]
        self.scanning_panel.trim['n'].SetValue(str(n + offsetcm))
        self.scanning_panel.trim['s'].SetValue(str(abs(s) + offsetcm))
        self.scanning_panel.trim['e'].SetValue(str(e + offsetcm))
        self.scanning_panel.trim['w'].SetValue(str(abs(w) + offsetcm)) 
开发者ID:tangible-landscape,项目名称:grass-tangible-landscape,代码行数:25,代码来源:g.gui.tangible.py

示例6: OnKeyPressed

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_WARNING [as 别名]
def OnKeyPressed(self, event=None):
        if event.GetKeyCode() == wx.WXK_RIGHT:
            self.nextImage(event=None)
        elif event.GetKeyCode() == wx.WXK_LEFT:
            self.prevImage(event=None)
        elif event.GetKeyCode() == wx.WXK_BACK:
            pos_abs = event.GetPosition()
            inv = self.axes.transData.inverted()
            pos_rel = list(inv.transform(pos_abs))
            pos_rel[1] = (
                self.axes.get_ylim()[0] - pos_rel[1]
            )  # Recall y-axis is inverted
            i = np.nanargmin(
                [self.calc_distance(*dp.point.center, *pos_rel) for dp in self.drs]
            )
            closest_dp = self.drs[i]
            msg = wx.MessageBox(
                "Do you want to remove the label %s ?" % closest_dp.bodyParts,
                "Remove!",
                wx.YES_NO | wx.ICON_WARNING,
            )
            if msg == 2:
                closest_dp.delete_data() 
开发者ID:DeepLabCut,项目名称:DeepLabCut,代码行数:25,代码来源:refinement.py

示例7: quitButton

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_WARNING [as 别名]
def quitButton(self, event):
        """
        Quits the GUI
        """
        self.statusbar.SetStatusText("")
        dlg = wx.MessageDialog(
            None, "Are you sure?", "Quit!", wx.YES_NO | wx.ICON_WARNING
        )
        result = dlg.ShowModal()
        if result == wx.ID_YES:
            print(
                "Closing... The refined labels are stored in a subdirectory under labeled-data. Use the function 'merge_datasets' to augment the training dataset, and then re-train a network using create_training_dataset followed by train_network!"
            )
            self.Destroy()
        else:
            self.save.Enable(True) 
开发者ID:DeepLabCut,项目名称:DeepLabCut,代码行数:18,代码来源:refinement.py

示例8: Run

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_WARNING [as 别名]
def Run(self):
        dlg = SVG2ZoneDialog()
        res = dlg.ShowModal()

        if res == wx.ID_OK:
            print("ok")

            if (dlg.net.value == None):
                warndlg = wx.MessageDialog(self, "no net was selected", "Error", wx.OK | wx.ICON_WARNING)
                warndlg.ShowModal()
                warndlg.Destroy()
                return

            # do it.
            SVG2Zone(dlg.file_picker.value,
                     pcbnew.GetBoard(),
                     dlg.basic_layer.valueint,
                     dlg.net.GetValuePtr())
        else:
            print("cancel") 
开发者ID:mmccoo,项目名称:kicad_mmccoo,代码行数:22,代码来源:svg2border.py

示例9: Run

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_WARNING [as 别名]
def Run(self):
        dlg = DXFZoneDialog()
        res = dlg.ShowModal()

        if res == wx.ID_OK:
            print("ok")
            if (dlg.net.value == None):
                warndlg = wx.MessageDialog(self, "no net was selected", "Error", wx.OK | wx.ICON_WARNING)
                warndlg.ShowModal()
                warndlg.Destroy()
                return

            net = dlg.net.GetValuePtr()

            traverse_dxf(dlg.file_picker.value,
                         zone_actions(pcbnew.GetBoard(),
                                      net,
                                      dlg.basic_layer.valueint),
                         merge_polys=True,
                         break_curves=True
            )
            #pcbnew.Refresh()
        else:
            print("cancel") 
开发者ID:mmccoo,项目名称:kicad_mmccoo,代码行数:26,代码来源:dxf_plugins.py

示例10: on_list_item_activated

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_WARNING [as 别名]
def on_list_item_activated(self, event):  # wxGlade: DeviceManager.<event_handler>
        uid = event.GetLabel()
        try:
            device = self.device.instances['device'][uid]
        except KeyError:
            device_name = self.device.read_persistent(str, 'device_name', 'Lhystudios', uid)
            device = self.device.open('device', device_name, root=self.device, uid=int(uid), instance_name=str(uid))
        if device.state == STATE_UNKNOWN:
            device.open('window', "MeerK40t", None, -1, "")
            device.boot()
            self.Close()
        else:
            dlg = wx.MessageDialog(None, _("That device already booted."),
                                   _("Cannot Boot Selected Device"), wx.OK | wx.ICON_WARNING)
            result = dlg.ShowModal()
            dlg.Destroy() 
开发者ID:meerk40t,项目名称:meerk40t,代码行数:18,代码来源:DeviceManager.py

示例11: initialize

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_WARNING [as 别名]
def initialize(self):
        self.device.close('window', self.name)
        self.Show()
        if self.device.is_root():
            for attr in dir(self):
                value = getattr(self, attr)
                if isinstance(value, wx.Control):
                    value.Enable(False)
            dlg = wx.MessageDialog(None, _("You do not have a selected device."),
                                   _("No Device Selected."), wx.OK | wx.ICON_WARNING)
            result = dlg.ShowModal()
            dlg.Destroy()
            return
        self.device.setting(bool, 'rotary', False)
        self.device.setting(float, 'scale_x', 1.0)
        self.device.setting(float, 'scale_y', 1.0)
        self.spin_rotary_scalex.SetValue(self.device.scale_x)
        self.spin_rotary_scaley.SetValue(self.device.scale_y)
        self.checkbox_rotary.SetValue(self.device.rotary)
        self.on_check_rotary(None) 
开发者ID:meerk40t,项目名称:meerk40t,代码行数:22,代码来源:RotarySettings.py

示例12: __on_del

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_WARNING [as 别名]
def __on_del(self, _event):
        if len(self._signals):
            resp = wx.MessageBox('''Remove monitor?\n'''
                                 '''The recording on this monitor will be lost''',
                                 'Warning',
                                 wx.OK | wx.CANCEL | wx.ICON_WARNING)
            if resp != wx.OK:
                return
        self._on_del(self) 
开发者ID:EarToEarOak,项目名称:RF-Monitor,代码行数:11,代码来源:panel_monitor.py

示例13: __on_clear

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_WARNING [as 别名]
def __on_clear(self, _event):
        resp = wx.MessageBox('Clear recorded data?', 'Warning',
                             wx.OK | wx.CANCEL | wx.ICON_WARNING)
        if resp != wx.OK:
            return

        for monitor in self._monitors:
            monitor.clear()

        self.__set_timeline()
        self._isSaved = False
        self.__set_title() 
开发者ID:EarToEarOak,项目名称:RF-Monitor,代码行数:14,代码来源:gui.py

示例14: __save_warning

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_WARNING [as 别名]
def __save_warning(self):
        if not self._isSaved:
            resp = wx.MessageBox('Not saved, continue?', 'Warning',
                                 wx.OK | wx.CANCEL | wx.ICON_WARNING)
            if resp != wx.OK:
                return False

        return True 
开发者ID:EarToEarOak,项目名称:RF-Monitor,代码行数:10,代码来源:gui.py

示例15: warn

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_WARNING [as 别名]
def warn(self, message, caption='Warning!'):
        dlg = wx.MessageDialog(self.parent, message, caption,
                               wx.OK | wx.ICON_WARNING)
        dlg.ShowModal()
        dlg.Destroy() 
开发者ID:jantman,项目名称:python-wifi-survey-heatmap,代码行数:7,代码来源:ui.py


注:本文中的wx.ICON_WARNING属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。