當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。