# Path: wildfind/common/constants.py
# HARRIER_STATUS = ['Idle', 'Locate', 'Capture', 'Process']
# 
# Path: wildfind/falconer/utils_qt.py
# def set_max_text_width(label, textList):
#     longest = max(textList, key=len)
#     width = label.fontMetrics().width(longest)
#     label.setFixedWidth(width * 1.5)


from PySide import QtGui
from wildfind.common.constants import HARRIER_STATUS
from wildfind.falconer.utils_qt import set_max_text_width
        set_max_text_width(self._labelRemoteLog, ['#' * 25])
        statusBar.addPermanentWidget(self._labelRemoteLog)

        self.set_remote_status({'status': 0,
                                'lon': None,
                                'lat': None})
        self.set_remote_sats(None)
        self.set_remote_log(None)
        self.set_connected(False)

    def show_message(self, message, param=None):
        status = Status._MESSAGES[message]
        if param is not None:
            status = status.format(param)

        self._statusBar.showMessage(status)

    def set_connected(self, connected):
        self._labelConnected.setText(Status._CONNECTED[connected])
        if not connected:
            self._labelRemoteStatus.clear()
            self._labelRemoteFix.clear()
            self._labelRemoteSats.clear()

    def set_remote_status(self, remoteStatus):
        status = remoteStatus['status']
        lon = remoteStatus['lon']
        lat = remoteStatus['lat']
        fix = lon is not None and lat is not None


# Path: wildfind/common/constants.py
# HARRIER_STATUS = ['Idle', 'Locate', 'Capture', 'Process']
# 
# Path: wildfind/falconer/utils_qt.py
# def set_max_text_width(label, textList):
#     longest = max(textList, key=len)
#     width = label.fontMetrics().width(longest)
#     label.setFixedWidth(width * 1.5)


# Path: wildfind/falconer/status.py
from PySide import QtGui
from wildfind.common.constants import HARRIER_STATUS
from wildfind.falconer.utils_qt import set_max_text_width

        set_max_text_width(self._labelRemoteLog, ['#' * 25])
        statusBar.addPermanentWidget(self._labelRemoteLog)

        self.set_remote_status({'status': 0,
                                'lon': None,
                                'lat': None})
        self.set_remote_sats(None)
        self.set_remote_log(None)
        self.set_connected(False)

    def show_message(self, message, param=None):
        status = Status._MESSAGES[message]
        if param is not None:
            status = status.format(param)

        self._statusBar.showMessage(status)

    def set_connected(self, connected):
        self._labelConnected.setText(Status._CONNECTED[connected])
        if not connected:
            self._labelRemoteStatus.clear()
            self._labelRemoteFix.clear()
            self._labelRemoteSats.clear()

    def set_remote_status(self, remoteStatus):
        status = remoteStatus['status']
        lon = remoteStatus['lon']
        lat = remoteStatus['lat']
        fix = lon is not None and lat is not None


        self._labelRemoteStatus.setText(HARRIER_STATUS[status])