def __init__(self, parent): QtGui.QWidget.__init__(self, parent) ui.loadUi(self, 'signals.ui') self._signal = SignalSignals() formatters = [None, format_freq, format_rate, None, format_level] self._model = Model(self._signal, self.HEADER, self.HEADER_TIPS, formatters, 1) self._proxyModel = QtGui.QSortFilterProxyModel(self) self._proxyModel.setDynamicSortFilter(True) self._proxyModel.setSourceModel(self._model) self._tableSignals.setModel(self._proxyModel) selection = self._tableSignals.selectionModel() selection.selectionChanged.connect(self.__on_signal_select) self._contextMenu = TableSelectionMenu(self._tableSignals, self._model, self.hasSelection) self.__set_width() palette = self.palette() colour = palette.color(QtGui.QPalette.Active, QtGui.QPalette.Highlight) palette.setColor(QtGui.QPalette.Inactive, QtGui.QPalette.Highlight, colour) self.setPalette(palette)
def __init__(self, parent, settings): QtGui.QDialog.__init__(self, parent) self._settings = settings ui.loadUi(self, 'preferences.ui') win_remove_context_help(self) styles = QtGui.QStyleFactory.keys() style = QtGui.QApplication.style().objectName() self._comboStyles.addItems(styles) index = ([name.lower() for name in styles]).index(style) self._comboStyles.setCurrentIndex(index) units = ['Metric', 'Imperial', 'Nautical'] self._comboUnits.addItems(units) index = ([unit.lower() for unit in units]).index(self._settings.units.lower()) self._comboUnits.setCurrentIndex(index) self._font = QtGui.QFont() self._font.fromString(settings.fontList) self._buttonFont.setText(self.__font_name()) if NATGRID: interp = ['Linear', 'Nearest neighbour'] self._comboInterp.addItems(interp) self._comboInterp.setCurrentIndex( 1 if self._settings.interpolation == 'nn' else 0) else: self._labelInterp.hide() self._comboInterp.hide()
def __init__(self, signals, filtered): QtGui.QDialog.__init__(self) self._signals = signals self._filtered = filtered self._scale = 1. self._dragStart = None ui.loadUi(self, 'signals_hist.ui') win_set_icon(self) win_set_maximise(self) self._graphicsView.viewport().installEventFilter(self) size = self._buttonIn.size() size.setHeight(size.height() / 1.5) size.setWidth(size.height()) self._buttonIn.setMaximumSize(size) self._buttonOut.setMaximumSize(size) self._show_all = self._checkAll.isChecked() if not len(filtered): self._checkAll.setEnabled(False) self.activateWindow()
def __init__(self, parent, remote): QtGui.QDialog.__init__(self, parent) self._remote = remote settings = remote.get_settings() ports = remote.get_ports() ui.loadUi(self, 'remote_settings.ui') win_remove_context_help(self) if settings[0] is not None: self._comboPort.addItems(ports) if settings[0] in ports: index = ports.index(settings[0]) self._comboPort.setCurrentIndex(index) self._editFreq.setValidator(QtGui.QDoubleValidator(1, 9999, 1)) self._editFreq.setText(str(settings[2])) self._editDelay.setValidator(QtGui.QDoubleValidator(0, 9999, 1)) if settings[1] is not None: self._checkAuto.setChecked(True) self._editDelay.setEnabled(True) self._editDelay.setText(str(settings[1])) else: self._editDelay.setText('4')
def __init__(self, parent, settings): QtGui.QDialog.__init__(self, parent) self._settings = settings ui.loadUi(self, 'preferences.ui') win_remove_context_help(self) styles = QtGui.QStyleFactory.keys() style = QtGui.QApplication.style().objectName() self._comboStyles.addItems(styles) index = ([name.lower() for name in styles]).index(style) self._comboStyles.setCurrentIndex(index) units = ['Metric', 'Imperial', 'Nautical'] self._comboUnits.addItems(units) index = ([unit.lower() for unit in units]).index(self._settings.units.lower()) self._comboUnits.setCurrentIndex(index) self._font = QtGui.QFont() self._font.fromString(settings.fontList) self._buttonFont.setText(self.__font_name()) if NATGRID: interp = ['Linear', 'Nearest neighbour'] self._comboInterp.addItems(interp) self._comboInterp.setCurrentIndex(1 if self._settings.interpolation == 'nn' else 0) else: self._labelInterp.hide() self._comboInterp.hide()
def __init__(self, parent, webMap): QtGui.QWidget.__init__(self, parent) self._webMap = webMap self._settings = None self._follow = True self._signal = SignalMap() self._signal.colour.connect(parent.on_colour) ui.loadUi(self, 'map_controls.ui') self._comboLayers.addItem('Waiting...') colours = [colour for colour in cm.cmap_d] colours.sort() self._comboColour.addItems(colours) frame = self._webMap.page().mainFrame() self._mapLink = MapLink(frame) self._mapLink.connect(parent.on_interaction, parent.on_layer_names, parent.on_map_loaded, parent.on_colour, parent.on_selected) frame.addToJavaScriptWindowObject('mapLink', self._mapLink)
def __init__(self, parent): QtGui.QDialog.__init__(self, parent) ui.loadUi(self, 'about.ui') win_remove_context_help(self) pixmap = QtGui.QPixmap(get_ui_path('logo.png')) self._labelLogo.setPixmap(pixmap)
def __init__(self): QtGui.QDialog.__init__(self) ui.loadUi(self, 'popup.ui') self.setWindowFlags(QtCore.Qt.Tool) self._web.titleChanged.connect(self.__on_title)
def __init__(self, parent): QtGui.QDialog.__init__(self, parent) ui.loadUi(self, 'about.ui') win_remove_context_help(self) pixmap = QtGui.QPixmap(get_resource_ui('logo.png')) self._labelLogo.setPixmap(pixmap) self._version.setText('v' + '.'.join([str(x) for x in VERSION]))
def __init__(self, parent, settings): QtGui.QDialog.__init__(self, parent) self._settings = settings ui.loadUi(self, 'remote_connect.ui') win_remove_context_help(self) completer = QtGui.QCompleter(settings.remoteHistory, self) completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive) self._editAddr.setCompleter(completer) self._editAddr.setText(settings.remoteAddr)
def __init__(self, parent, logs): QtGui.QDialog.__init__(self, parent) ui.loadUi(self, 'log.ui') win_remove_context_help(self) self._model = ModelLog(logs) self._tableLog.setModel(self._model) self._tableLog.resizeColumnsToContents() header = self._tableLog.horizontalHeader() header.setResizeMode(QtGui.QHeaderView.Fixed)
def __init__(self, settings, telemetry): QtGui.QDialog.__init__(self) self.customWidgets = {'WidgetPlot': WidgetPlot} ui.loadUi(self, 'plot3d.ui') win_set_icon(self) win_set_maximise(self) coords = [[row['Lon'], row['Lat'], row['Level']] for row in telemetry] self._widgetPlot.set(coords) self._widgetPlot.set_cmap(settings.heatmapColour) resolution = self._spinResolution.value() self._widgetPlot.set_resolution(resolution) self._widgetPlot.plot()
def __init__(self, parent): QtGui.QWidget.__init__(self, parent) self._signal = SignalSurveys() ui.loadUi(self, 'surveys.ui') self._model = Model(self._signal, self.HEADER, self.HEADER_TIPS) proxyModel = QtGui.QSortFilterProxyModel(self) proxyModel.setDynamicSortFilter(True) proxyModel.setSourceModel(self._model) self._tableSurveys.setModel(proxyModel) self._contextMenu = TableSelectionMenu(self._tableSurveys, self._model) self.__set_width()
def __init__(self, parent): QtGui.QWidget.__init__(self, parent) self._signal = SignalSurveys() ui.loadUi(self, 'surveys.ui') self._model = Model(self._signal, self.HEADER, self.HEADER_TIPS) proxyModel = QtGui.QSortFilterProxyModel(self) proxyModel.setDynamicSortFilter(True) proxyModel.setSourceModel(self._model) self._tableSurveys.setModel(proxyModel) self._contextMenu = TableSelectionMenu(self._tableSurveys, self._model) self.__set_width()
def __init__(self, settings, telemetry): QtGui.QDialog.__init__(self) self._interpolation = settings.interpolation self.customWidgets = {'WidgetPlot': WidgetPlot} ui.loadUi(self, 'plot3d.ui') win_set_icon(self) win_set_maximise(self) coords = [[row['Lon'], row['Lat'], row['Level']] for row in telemetry] self._widgetPlot.set(coords) self._widgetPlot.set_cmap(settings.heatmapColour) resolution = self._spinResolution.value() self._widgetPlot.set_resolution(resolution) self._widgetPlot.plot(self._interpolation)
def __init__(self, parent, timeStamps): QtGui.QDialog.__init__(self, parent) self._timeStamps = timeStamps ui.loadUi(self, 'scans_range.ui') win_remove_context_help(self) timeMin, timeMax = self.__get_range() self._timeFrom = timeMin.toTime_t() self._timeTo = timeMax.toTime_t() self._dateFrom.setDateTimeRange(timeMin, timeMax) self._dateFrom.setDateTime(timeMin) self._dateTo.setDateTimeRange(timeMin, timeMax) self._dateTo.setDateTime(timeMax) cal_set_colours(self._dateFrom) cal_set_colours(self._dateTo)
def __init__(self, parent): QtGui.QWidget.__init__(self, parent) self._signal = SignalScans() ui.loadUi(self, 'scans.ui') formatters = [None, format_qtime, None] self._model = Model(self._signal, self.HEADER, self.HEADER_TIPS, formatters) proxyModel = QtGui.QSortFilterProxyModel(self) proxyModel.setDynamicSortFilter(True) proxyModel.setSourceModel(self._model) self._tableScans.setModel(proxyModel) self._contextMenu = TableSelectionMenu(self._tableScans, self._model) self.__set_width()
def __init__(self, parent, timeStamps): QtGui.QDialog.__init__(self, parent) self._timeStamps = timeStamps ui.loadUi(self, 'scans_range.ui') win_remove_context_help(self) timeMin, timeMax = self.__get_range() self._timeFrom = timeMin.toTime_t() self._timeTo = timeMax.toTime_t() self._dateFrom.setDateTimeRange(timeMin, timeMax) self._dateFrom.setDateTime(timeMin) self._dateTo.setDateTimeRange(timeMin, timeMax) self._dateTo.setDateTime(timeMax) cal_set_colours(self._dateFrom) cal_set_colours(self._dateTo)
def __init__(self, parent): QtGui.QWidget.__init__(self, parent) self._signal = SignalScans() ui.loadUi(self, 'scans.ui') formatters = [None, format_qtime, None] self._model = Model(self._signal, self.HEADER, self.HEADER_TIPS, formatters) proxyModel = QtGui.QSortFilterProxyModel(self) proxyModel.setDynamicSortFilter(True) proxyModel.setSourceModel(self._model) self._tableScans.setModel(proxyModel) self._contextMenu = TableSelectionMenu(self._tableScans, self._model) self.__set_width()
def __init__(self, parent, settings): QtGui.QDialog.__init__(self, parent) self._settings = settings ui.loadUi(self, 'preferences.ui') win_remove_context_help(self) styles = QtGui.QStyleFactory.keys() style = QtGui.QApplication.style().objectName() self._comboStyles.addItems(styles) index = ([name.lower() for name in styles]).index(style) self._comboStyles.setCurrentIndex(index) units = ['Metric', 'Imperial', 'Nautical'] self._comboUnits.addItems(units) index = ([unit.lower() for unit in units]).index(self._settings.units.lower()) self._comboUnits.setCurrentIndex(index) self._font = QtGui.QFont() self._font.fromString(settings.fontList) self._buttonFont.setText(self.__font_name())
def __init__(self, parent, webMap): QtGui.QWidget.__init__(self, parent) self._webMap = webMap self._settings = None self._follow = True self._signal = SignalMap() self._signal.colour.connect(parent.on_colour) ui.loadUi(self, 'map_controls.ui') self._comboLayers.addItem('Waiting...') colours = [colour for colour in cm.cmap_d] colours.sort() self._comboColour.addItems(colours) frame = self._webMap.page().mainFrame() self._mapLink = MapLink(frame) self._mapLink.connect(parent.on_interaction, parent.on_layer_names, parent.on_map_loaded, parent.on_colour, parent.on_selected) frame.addToJavaScriptWindowObject('mapLink', self._mapLink)
def __init__(self, args): QtGui.QMainWindow.__init__(self) self._args = args self._mapLoaded = False self._fullScreen = False self.customWidgets = {'WidgetMap': WidgetMap, 'WidgetSurveys': WidgetSurveys, 'WidgetScans': WidgetScans, 'WidgetSignals': WidgetSignals} ui.loadUi(self, 'falconer.ui') self.splitter.splitterMoved.connect(self.__on_splitter_moved) self.splitter.setCollapsible(1, True) self.splitter.setCollapsible(2, True) self.splitter.setCollapsible(3, True) self._settings = Settings(self, self._menubar, self.__on_open_history) self._widgetSurveys.connect(self.__on_survey_filter) self._widgetScans.connect(self.__on_scan_filter) self._widgetSignals.connect(self.__on_signal_filter, self.__on_signal_select) self._widgetMap.connect(self.__on_signal_map_loaded, self.__on_signal_map_colour, self.__on_signal_map_selected) self._widgetMap.set_settings(self._settings) self.actionPlot3d.setVisible(SIP) self._status = Status(self._statusbar) self._heatMap = HeatMap(self, self._settings, self.__on_signal_map_plotted, self.__on_signal_map_cleared) self._database = Database() self._remote = Remote(self, self._status, self._database, self.__on_remote_opened, self.__on_remote_status, self.__on_remote_synched, self.__on_remote_closed) self._server = None self.__start_server() self._printer = QtGui.QPrinter() self._printer.setCreator('Falconer') self.__set_icons() self.__set_fonts() self.__set_table_view() self.setAcceptDrops(True) self._status.show_message(Status.STARTING) self.show()
def __init__(self, args): QtGui.QMainWindow.__init__(self) self._args = args self._mapLoaded = False self._fullScreen = False self.customWidgets = { 'WidgetMap': WidgetMap, 'WidgetSurveys': WidgetSurveys, 'WidgetScans': WidgetScans, 'WidgetSignals': WidgetSignals } ui.loadUi(self, 'falconer.ui') self.splitter.splitterMoved.connect(self.__on_splitter_moved) self.splitter.setCollapsible(1, True) self.splitter.setCollapsible(2, True) self.splitter.setCollapsible(3, True) self._settings = Settings(self, self._menubar, self.__on_open_history) self._widgetSurveys.connect(self.__on_survey_filter) self._widgetScans.connect(self.__on_scan_filter) self._widgetSignals.connect(self.__on_signal_filter, self.__on_signal_select) self._widgetMap.connect(self.__on_signal_map_loaded, self.__on_signal_map_colour, self.__on_signal_map_selected) self._widgetMap.set_settings(self._settings) self.actionPlot3d.setVisible(SIP) self._status = Status(self._statusbar) self._heatMap = HeatMap(self, self._settings, self.__on_signal_map_plotted, self.__on_signal_map_cleared) self._database = Database() self._remote = Remote(self, self._status, self._database, self.__on_remote_opened, self.__on_remote_status, self.__on_remote_synched, self.__on_remote_closed) self._server = None self.__start_server() self._printer = QtGui.QPrinter() self._printer.setCreator('Falconer') self.__set_icons() self.__set_fonts() self.__set_table_view() self.setAcceptDrops(True) self._status.show_message(Status.STARTING) self.show()