# Path: rtlsdr_scanner/events.py
# def post_event(destination, status):
#     if isinstance(destination, Queue.Queue):
#         destination.put(status)
#     elif isinstance(destination, wx.EvtHandler):
#         wx.PostEvent(destination, status)
# 
# class EventThread(wx.PyEvent):
#     def __init__(self, status, arg1=None, arg2=None):
#         wx.PyEvent.__init__(self)
#         self.SetEventType(EVENT_THREAD)
#         self.data = Status(status, arg1, arg2)
# 
# class Event(object):
#     STARTING, STEPS, INFO, DATA, STOPPED, ERROR, FINISHED, PROCESSED, \
#         CAL, LEVEL, UPDATED, DRAW, \
#         DELAY_COUNT, DELAY_START, \
#         LOC, LOC_RAW, LOC_WARN, LOC_ERR, LOC_SAT = range(19)


import sys
import wx
        import visvis as vv
from rtlsdr_scanner.events import post_event, EventThread, Event
        from visvis.core.line import Line
#





vvPresent = False
if not hasattr(sys, 'frozen'):
    try:
        app = vv.use('wx')
        vvPresent = True
    except ImportError:
        pass


class PlotterPreview(object):
    def __init__(self, notify, figure, settings):
        self.notify = notify
        self.figure = figure
        self.settings = settings
        self.axes = None
        self.window = None
        self.preview = None

        self.__setup_plot()
        self.__setup_window()
        self.set_plot(None, None, None)

    def __setup_plot(self):
        self.axes = self.figure.add_subplot(111)

# Path: rtlsdr_scanner/events.py
# def post_event(destination, status):
#     if isinstance(destination, Queue.Queue):
#         destination.put(status)
#     elif isinstance(destination, wx.EvtHandler):
#         wx.PostEvent(destination, status)
# 
# class EventThread(wx.PyEvent):
#     def __init__(self, status, arg1=None, arg2=None):
#         wx.PyEvent.__init__(self)
#         self.SetEventType(EVENT_THREAD)
#         self.data = Status(status, arg1, arg2)
# 
# class Event(object):
#     STARTING, STEPS, INFO, DATA, STOPPED, ERROR, FINISHED, PROCESSED, \
#         CAL, LEVEL, UPDATED, DRAW, \
#         DELAY_COUNT, DELAY_START, \
#         LOC, LOC_RAW, LOC_WARN, LOC_ERR, LOC_SAT = range(19)


# Path: rtlsdr_scanner/plot_preview.py
import sys
import wx
        import visvis as vv
from rtlsdr_scanner.events import post_event, EventThread, Event
        from visvis.core.line import Line

#





vvPresent = False
if not hasattr(sys, 'frozen'):
    try:
        app = vv.use('wx')
        vvPresent = True
    except ImportError:
        pass


class PlotterPreview(object):
    def __init__(self, notify, figure, settings):
        self.notify = notify
        self.figure = figure
        self.settings = settings
        self.axes = None
        self.window = None
        self.preview = None

        self.__setup_plot()
        self.__setup_window()
        self.set_plot(None, None, None)

    def __setup_plot(self):
        self.axes = self.figure.add_subplot(111)

        self.axes.set_axis_off()