diff --git a/timeseriesviewer/plotstyling.py b/timeseriesviewer/plotstyling.py new file mode 100644 index 0000000000000000000000000000000000000000..f61eace12ee1e4f54684bcc4c4e9b55931ef19b3 --- /dev/null +++ b/timeseriesviewer/plotstyling.py @@ -0,0 +1,122 @@ +import os + +from qgis.core import * +from qgis.gui import * +from PyQt4.QtCore import * +from PyQt4.QtGui import * +import numpy as np +from timeseriesviewer import * +from timeseriesviewer.utils import * + +from timeseriesviewer.ui.widgets import loadUIFormClass +import pyqtgraph as pg +load = lambda p : loadUIFormClass(jp(DIR_UI,p)) + + +class PlotStyle(object): + def __init__(self, **kwds): + + self.symbol = 'o' + self.symbolBrush = QColor('green') + self.symbolPen = 'w' + self.symbolSize = 8 + + +class PlotStyleWidget(QWidget, load('plotstylewidget.ui')): + sigPlotStyleChanged = pyqtSignal(PlotStyle) + + def __init__(self, title='<#>', parent=None): + super(PlotStyleWidget, self).__init__(parent) + self.setupUi(self) + assert isinstance(self.plotWidget, pg.PlotWidget) + + + self.plotWidget.disableAutoRange() + self.plotWidget.setAspectLocked() + self.plotWidget.setLimits(xMin=0, xMax=2, yMin=0, yMax=2) + self.plotWidget.setMouseEnabled(x=False, y=False) + self.plotWidget.disableAutoRange() + + self.plotItem = self.plotWidget.plot() + self.plotItem.setData(x=[0.25, 0.5, 0.75], y=[0.25, 0.75, 0.5]) + #self.plotWidget.setCentralItem(self.plotItem) + self.plotWidget.disableAutoRange() + + self.lastStyle = PlotStyle() + self.setPlotStyle(self.lastStyle) + def refreshPlotStylePreview(self, *args): + style = self.plotStyle() + #todo: set style to style preview + + + self.sigPlotStyleChanged.emit(style) + + def setPlotStyle(self, style): + assert isinstance(style, PlotStyle) + + self.plotItem.setData(symbol=style.symbol, symbolBrush=style.symbolBrush, + symbolPen=style.symbolPen, symbolSize=style.symbolSize) + + self.plotItem.update() + self.plotWidget.update() + + def plotStyle(self): + style = PlotStyle() + #todo: read plotstyle values from widgets + return style + +class PlotStyleDialog(QgsDialog): + + @staticmethod + def getPlotStyle(*args, **kwds): + """ + Opens a CrosshairDialog. + :param args: + :param kwds: + :return: specified CrosshairStyle if accepted, else None + """ + d = PlotStyleDialog(*args, **kwds) + d.exec_() + + if d.result() == QDialog.Accepted: + return d.crosshairStyle() + else: + + return None + + def __init__(self, parent=None, plotStyle=None, title='Specify Plot Style'): + super(PlotStyleDialog, self).__init__(parent=parent , \ + buttons=QDialogButtonBox.Ok | QDialogButtonBox.Cancel) + self.w = PlotStyleWidget(parent=self) + self.setWindowTitle(title) + self.btOk = QPushButton('Ok') + self.btCancel = QPushButton('Cancel') + buttonBar = QHBoxLayout() + #buttonBar.addWidget(self.btCancel) + #buttonBar.addWidget(self.btOk) + l = self.layout() + l.addWidget(self.w) + l.addLayout(buttonBar) + #self.setLayout(l) + + + def plotStyle(self): + return self.w.plotStyle() + + def setPlotStyle(self, plotStyle): + assert isinstance(plotStyle, PlotStyle) + self.w.setPlotStyle(plotStyle) + + + +if __name__ == '__main__': + import site, sys + #add site-packages to sys.path as done by enmapboxplugin.py + + from timeseriesviewer import sandbox + qgsApp = sandbox.initQgisEnvironment() + + style = PlotStyleDialog.getPlotStyle() + print(style) + qgsApp.exec_() + qgsApp.exitQgis() diff --git a/timeseriesviewer/profilevisualization.py b/timeseriesviewer/profilevisualization.py index a3ec7b592f9aae8631d63d8ae901e5217123ae68..64b5cd75f15830d3964458a24d8dc2836a07554f 100644 --- a/timeseriesviewer/profilevisualization.py +++ b/timeseriesviewer/profilevisualization.py @@ -626,8 +626,10 @@ class PixelCollection(QObject): return tsds, values -class SensorPlotSettings(object): +from plotstyling import PlotStyle +class SensorPlotSettings(PlotStyle): def __init__(self, sensor, memoryLyr): + super(SensorPlotSettings, self).__init__() assert isinstance(sensor, SensorInstrument) assert isinstance(memoryLyr, QgsVectorLayer) @@ -1107,8 +1109,8 @@ class SpectralTemporalVisualization(QObject): assert isinstance(sensorView, SensorPlotSettings) if sensorView.sensor not in self.plotData2D.keys(): - plotDataItem = SensorPoints(name=sensorView.sensor.name(), pen=None, symbol='o', symbolPen=None) - plotDataItem = pg.ScatterPlotItem(name=sensorView.sensor.name(), pen= {'color': 'w', 'width': 2},brush=QColor('green'), symbol='o') + #plotDataItem = SensorPoints(name=sensorView.sensor.name(), pen=None, symbol='o', symbolPen=None) + #plotDataItem = pg.ScatterPlotItem(name=sensorView.sensor.name(), pen= {'color': 'w', 'width': 2},brush=QColor('green'), symbol='o') #self.plot2D.addItem(plotDataItem) diff --git a/timeseriesviewer/ui/plotstylewidget.ui b/timeseriesviewer/ui/plotstylewidget.ui new file mode 100644 index 0000000000000000000000000000000000000000..dd963fc925d7ecc9cfc8646e4e0d62bab0c30889 --- /dev/null +++ b/timeseriesviewer/ui/plotstylewidget.ui @@ -0,0 +1,312 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Form</class> + <widget class="QWidget" name="Form"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>429</width> + <height>310</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="1" column="0" rowspan="4" colspan="3"> + <widget class="PlotWidget" name="plotWidget"/> + </item> + <item row="0" column="1" colspan="2"> + <widget class="QGroupBox" name="groupBox_2"> + <property name="title"> + <string>Line</string> + </property> + <layout class="QFormLayout" name="formLayout_2"> + <item row="0" column="0"> + <widget class="QLabel" name="label_17"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Style</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QComboBox" name="cbLineType"/> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_18"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Color</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QgsColorButton" name="btnBrushColor_2"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="colorDialogTitle" stdset="0"> + <string>Select Map Canvas Background Color</string> + </property> + <property name="color" stdset="0"> + <color> + <red>255</red> + <green>0</green> + <blue>0</blue> + </color> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_4"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Width</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QSpinBox" name="spinBoxCrosshairSize_2"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="suffix"> + <string> pt</string> + </property> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>50</number> + </property> + <property name="singleStep"> + <number>1</number> + </property> + <property name="value"> + <number>8</number> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item row="0" column="0"> + <widget class="QGroupBox" name="groupBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>204</height> + </size> + </property> + <property name="title"> + <string>Marker</string> + </property> + <layout class="QFormLayout" name="formLayout"> + <item row="0" column="0"> + <widget class="QLabel" name="label_19"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Style</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QComboBox" name="cbMarkerType_2"/> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_15"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Fill</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QgsColorButton" name="btnMarkerFillColor"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="colorDialogTitle" stdset="0"> + <string>Select Map Canvas Background Color</string> + </property> + <property name="color" stdset="0"> + <color> + <red>255</red> + <green>0</green> + <blue>0</blue> + </color> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_2"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Size</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QSpinBox" name="spinBoxCrosshairSize"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>21</height> + </size> + </property> + <property name="suffix"> + <string> pt</string> + </property> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>50</number> + </property> + <property name="singleStep"> + <number>1</number> + </property> + <property name="value"> + <number>8</number> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="label_14"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Outline</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QgsColorButton" name="btnMarkerColor"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="colorDialogTitle" stdset="0"> + <string>Select Map Canvas Background Color</string> + </property> + <property name="color" stdset="0"> + <color> + <red>255</red> + <green>0</green> + <blue>0</blue> + </color> + </property> + </widget> + </item> + <item row="4" column="0"> + <widget class="QLabel" name="label_16"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Outline style</string> + </property> + </widget> + </item> + <item row="4" column="1"> + <widget class="QComboBox" name="cbMarkerType"/> + </item> + <item row="5" column="0"> + <widget class="QLabel" name="label_3"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Outline width</string> + </property> + </widget> + </item> + <item row="5" column="1"> + <widget class="QSpinBox" name="spinBoxCrosshairSize_3"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>21</height> + </size> + </property> + <property name="suffix"> + <string> pt</string> + </property> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>50</number> + </property> + <property name="singleStep"> + <number>1</number> + </property> + <property name="value"> + <number>8</number> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + <customwidgets> + <customwidget> + <class>QgsColorButton</class> + <extends>QPushButton</extends> + <header>qgscolorbutton.h</header> + </customwidget> + <customwidget> + <class>PlotWidget</class> + <extends>QGraphicsView</extends> + <header>pyqtgraph</header> + </customwidget> + </customwidgets> + <resources/> + <connections/> +</ui> diff --git a/timeseriesviewer/ui/tmp.ui b/timeseriesviewer/ui/tmp.ui index 8bcb13acdb3d06714c847d79045323535c82d6ae..c57e721e9102888cdd01eb43aa98a2b8e63ecec3 100644 --- a/timeseriesviewer/ui/tmp.ui +++ b/timeseriesviewer/ui/tmp.ui @@ -1,993 +1,262 @@ <?xml version='1.0' encoding='UTF-8'?> <ui version="4.0"> - <class>MapViewRenderSettings</class> - <widget class="QFrame" name="MapViewRenderSettings"> + <class>Form</class> + <widget class="QWidget" name="Form"> <property name="geometry"> <rect> <x>0</x> <y>0</y> - <width>260</width> - <height>135</height> + <width>414</width> + <height>314</height> </rect> </property> - <property name="sizePolicy"> - <sizepolicy vsizetype="Preferred" hsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>260</width> - <height>135</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>260</width> - <height>151</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> <property name="windowTitle"> - <string>RenderSettings</string> + <string>Form</string> </property> - <property name="title" stdset="0"> - <string/> - </property> - <property name="flat" stdset="0"> - <bool>false</bool> - </property> - <property name="checkable" stdset="0"> - <bool>false</bool> - </property> - <layout class="QVBoxLayout" name="verticalLayout"> - <property name="spacing"> - <number>2</number> - </property> - <property name="leftMargin"> - <number>2</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>2</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> - <widget class="QLabel" name="labelTitle"> - <property name="font"> - <font> - <pointsize>8</pointsize> - <weight>50</weight> - <italic>false</italic> - <bold>false</bold> - <kerning>true</kerning> - </font> - </property> - <property name="toolTip"> - <string>Sensor name</string> - </property> - <property name="text"> - <string>Sensor Name</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="cbRenderType"> - <property name="maximumSize"> - <size> - <width>60</width> - <height>16777215</height> - </size> - </property> - <item> + <layout class="QGridLayout" name="gridLayout"> + <item row="1" column="4"> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item rowspan="4" row="1" column="0" colspan="3"> + <widget class="PlotWidget" name="plotWidget"/> + </item> + <item row="0" column="1" colspan="2"> + <widget class="QGroupBox" name="groupBox_2"> + <property name="title"> + <string>Line</string> + </property> + <layout class="QFormLayout" name="formLayout_2"> + <item row="0" column="0"> + <widget class="QLabel" name="label_17"> + <property name="enabled"> + <bool>true</bool> + </property> <property name="text"> - <string>Multi</string> + <string>Type</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QComboBox" name="cbLineType"/> + </item> + <item row="1" column="1"> + <widget class="QgsColorButton" name="btnBrushColor_2"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="colorDialogTitle" stdset="0"> + <string>Select Map Canvas Background Color</string> + </property> + <property name="color" stdset="0"> + <color> + <red>255</red> + <green>0</green> + <blue>0</blue> + </color> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_18"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Color</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_4"> + <property name="enabled"> + <bool>true</bool> </property> - </item> - <item> <property name="text"> - <string>Single</string> - </property> - </item> - </widget> - </item> - <item> - <widget class="QLabel" name="labelSummary"> - <property name="sizePolicy"> - <sizepolicy vsizetype="Fixed" hsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>15</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> - <property name="text"> - <string><RGB Bands></string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> + <string>Size</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QSpinBox" name="spinBoxCrosshairSize_2"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="sizePolicy"> + <sizepolicy vsizetype="Preferred" hsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="suffix"> + <string> pt</string> + </property> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>50</number> + </property> + <property name="singleStep"> + <number>1</number> + </property> + <property name="value"> + <number>8</number> + </property> + </widget> + </item> + </layout> + </widget> </item> - <item> - <widget class="QStackedWidget" name="stackedWidget"> + <item row="0" column="0"> + <widget class="QGroupBox" name="groupBox"> + <property name="sizePolicy"> + <sizepolicy vsizetype="Preferred" hsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="minimumSize"> <size> - <width>250</width> - <height>0</height> + <width>0</width> + <height>100</height> </size> </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="currentIndex"> - <number>1</number> + <property name="title"> + <string>Marker</string> </property> - <widget class="QWidget" name="pageMultiBand"> - <layout class="QGridLayout" name="gridLayout_2"> - <property name="leftMargin"> - <number>2</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>2</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <property name="horizontalSpacing"> - <number>2</number> - </property> - <property name="verticalSpacing"> - <number>0</number> - </property> - <item row="1" column="1"> - <widget class="QSlider" name="sliderRed"> - <property name="sizePolicy"> - <sizepolicy vsizetype="Fixed" hsizetype="Preferred"> - <horstretch>1</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="minimum"> - <number>1</number> - </property> - <property name="maximum"> - <number>6</number> - </property> - <property name="value"> - <number>3</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="tickPosition"> - <enum>QSlider::TicksAbove</enum> - </property> - <property name="tickInterval"> - <number>1</number> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QLabel" name="labelMax"> - <property name="text"> - <string>Min</string> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="QLineEdit" name="tbRedMin"> - <property name="sizePolicy"> - <sizepolicy vsizetype="Fixed" hsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>50</width> - <height>0</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> - <property name="text"> - <string>0</string> - </property> - </widget> - </item> - <item row="2" column="2"> - <widget class="QLineEdit" name="tbGreenMin"> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> - <property name="text"> - <string>0</string> - </property> - </widget> - </item> - <item row="1" column="3"> - <widget class="QLineEdit" name="tbRedMax"> - <property name="sizePolicy"> - <sizepolicy vsizetype="Fixed" hsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>50</width> - <height>0</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> - <property name="text"> - <string>5000</string> - </property> - </widget> - </item> - <item row="0" column="3"> - <widget class="QLabel" name="labelMin"> - <property name="text"> - <string>Max</string> - </property> - </widget> - </item> - <item row="2" column="3"> - <widget class="QLineEdit" name="tbGreenMax"> - <property name="sizePolicy"> - <sizepolicy vsizetype="Fixed" hsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> - <property name="text"> - <string>5000</string> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="labelGreen"> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="text"> - <string>G</string> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QSlider" name="sliderGreen"> - <property name="sizePolicy"> - <sizepolicy vsizetype="Fixed" hsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="minimum"> - <number>1</number> - </property> - <property name="maximum"> - <number>6</number> - </property> - <property name="value"> - <number>2</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="tickPosition"> - <enum>QSlider::TicksAbove</enum> - </property> - <property name="tickInterval"> - <number>1</number> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="labelRed"> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="text"> - <string>R</string> - </property> - </widget> - </item> - <item row="3" column="0"> - <widget class="QLabel" name="labelBlue"> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> - <property name="text"> - <string>B</string> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QSlider" name="sliderBlue"> - <property name="sizePolicy"> - <sizepolicy vsizetype="Fixed" hsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimum"> - <number>1</number> - </property> - <property name="maximum"> - <number>6</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="tickPosition"> - <enum>QSlider::TicksAbove</enum> - </property> - <property name="tickInterval"> - <number>1</number> - </property> - </widget> - </item> - <item row="3" column="2"> - <widget class="QLineEdit" name="tbBlueMin"> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> - <property name="text"> - <string>0</string> - </property> - </widget> - </item> - <item row="3" column="3"> - <widget class="QLineEdit" name="tbBlueMax"> - <property name="sizePolicy"> - <sizepolicy vsizetype="Fixed" hsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> - <property name="text"> - <string>5000</string> - </property> - </widget> - </item> - <item row="0" column="0" colspan="2"> - <widget class="QFrame" name="btnBarMB"> - <property name="sizePolicy"> - <sizepolicy vsizetype="Preferred" hsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <layout class="QHBoxLayout" name="horizontalLayout"> - <property name="spacing"> - <number>0</number> - </property> - <property name="margin"> - <number>0</number> - </property> - <item> - <widget class="QToolButton" name="btnDefaultMB"> - <property name="font"> - <font> - <pointsize>8</pointsize> - <italic>false</italic> - </font> - </property> - <property name="toolTip"> - <string>default band selection</string> - </property> - <property name="text"> - <string>D</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="btnTrueColor"> - <property name="font"> - <font> - <pointsize>8</pointsize> - <italic>false</italic> - </font> - </property> - <property name="toolTip"> - <string>red-green-blue (true colour)</string> - </property> - <property name="text"> - <string>TC</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="btnCIR"> - <property name="font"> - <font> - <pointsize>8</pointsize> - <italic>false</italic> - </font> - </property> - <property name="toolTip"> - <string>swIR-red-green (coloured infra-red)</string> - </property> - <property name="text"> - <string>CIR</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="btn453"> - <property name="font"> - <font> - <pointsize>8</pointsize> - <italic>false</italic> - </font> - </property> - <property name="toolTip"> - <string>swIR-mwIR-red</string> - </property> - <property name="text"> - <string>453</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - <widget class="QWidget" name="pageSingleBand"> - <layout class="QGridLayout" name="gridLayout"> - <property name="horizontalSpacing"> - <number>2</number> - </property> - <property name="verticalSpacing"> - <number>0</number> - </property> - <property name="margin"> - <number>0</number> - </property> - <item row="3" column="1"> - <widget class="QSlider" name="sliderSingleBand"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="minimum"> - <number>1</number> - </property> - <property name="maximum"> - <number>6</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="tickPosition"> - <enum>QSlider::TicksAbove</enum> - </property> - <property name="tickInterval"> - <number>1</number> - </property> - </widget> - </item> - <item row="8" column="1" colspan="4"> - <widget class="QFrame" name="frame"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QGridLayout" name="gridLayout_4"> - <property name="horizontalSpacing"> - <number>1</number> - </property> - <property name="verticalSpacing"> - <number>0</number> - </property> - <property name="margin"> - <number>0</number> - </property> - <item row="1" column="2"> - <widget class="QComboBox" name="cbSingleBandColorRampType"> - <property name="sizePolicy"> - <sizepolicy vsizetype="Fixed" hsizetype="Preferred"> - <horstretch>2</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="toolTip"> - <string>Type of color ramp</string> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QgsColorRampComboBox" name="cbSingleBandColorRamp"> - <property name="sizePolicy"> - <sizepolicy vsizetype="Fixed" hsizetype="Preferred"> - <horstretch>1</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="toolTip"> - <string>Color ramp</string> - </property> - </widget> - </item> - <item row="1" column="3"> - <widget class="QComboBox" name="cbSingleBandMode"> - <property name="sizePolicy"> - <sizepolicy vsizetype="Fixed" hsizetype="Preferred"> - <horstretch>2</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="toolTip"> - <string>Color classification</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="2" column="1"> - <widget class="QFrame" name="bntBarSB"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <property name="spacing"> - <number>0</number> - </property> - <property name="margin"> - <number>0</number> - </property> - <item> - <widget class="QToolButton" name="btnSingleBandDef"> - <property name="font"> - <font> - <italic>false</italic> - </font> - </property> - <property name="text"> - <string>D</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="btnSingleBandBlue"> - <property name="toolTip"> - <string>Select band from visible blue</string> - </property> - <property name="text"> - <string>B</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="btnSingleBandGreen"> - <property name="toolTip"> - <string>Select band from visible green</string> - </property> - <property name="text"> - <string>G</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="btnSingleBandRed"> - <property name="toolTip"> - <string>Select band from visible red</string> - </property> - <property name="text"> - <string>R</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="btnSingleBandNIR"> - <property name="toolTip"> - <string>Select band from near infra-red</string> - </property> - <property name="text"> - <string>nIR</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="btnSingleBandSWIR"> - <property name="toolTip"> - <string>Select band from shortwave infra-red</string> - </property> - <property name="text"> - <string>swIR</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="2" column="3"> - <widget class="QLabel" name="labelMin_2"> - <property name="text"> - <string>Min</string> - </property> - </widget> - </item> - <item row="3" column="3"> - <widget class="QLineEdit" name="tbSingleBandMin"> - <property name="minimumSize"> - <size> - <width>50</width> - <height>0</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> - <property name="text"> - <string>0</string> - </property> - </widget> - </item> - <item row="2" column="4"> - <widget class="QLabel" name="labelMax_2"> - <property name="text"> - <string>Max</string> - </property> - </widget> - </item> - <item row="3" column="4"> - <widget class="QLineEdit" name="tbSingleBandMax"> - <property name="sizePolicy"> - <sizepolicy vsizetype="Fixed" hsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>50</width> - <height>0</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> - <property name="text"> - <string>5000</string> - </property> - </widget> - </item> - </layout> - </widget> + <layout class="QFormLayout" name="formLayout"> + <item row="1" column="0"> + <widget class="QLabel" name="label_14"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Color</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QgsColorButton" name="btnBrushColor"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="colorDialogTitle" stdset="0"> + <string>Select Map Canvas Background Color</string> + </property> + <property name="color" stdset="0"> + <color> + <red>255</red> + <green>0</green> + <blue>0</blue> + </color> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="label_2"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Size</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QSpinBox" name="spinBoxCrosshairSize"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="sizePolicy"> + <sizepolicy vsizetype="Preferred" hsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="suffix"> + <string> pt</string> + </property> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>50</number> + </property> + <property name="singleStep"> + <number>1</number> + </property> + <property name="value"> + <number>8</number> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_15"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Fill Color</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QgsColorButton" name="btnFillColor"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="colorDialogTitle" stdset="0"> + <string>Select Map Canvas Background Color</string> + </property> + <property name="color" stdset="0"> + <color> + <red>255</red> + <green>0</green> + <blue>0</blue> + </color> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QComboBox" name="cbMarkerType"/> + </item> + <item row="0" column="0"> + <widget class="QLabel" name="label_16"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Type</string> + </property> + </widget> + </item> + </layout> </widget> </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_4"> - <property name="spacing"> - <number>6</number> - </property> - <item> - <widget class="QToolButton" name="btnApplyStyle"> - <property name="text"> - <string>...</string> - </property> - <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/timeseriesviewer/icons/mActionRefresh.png</normaloff>:/timeseriesviewer/icons/mActionRefresh.png</iconset> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="btnCopyStyle"> - <property name="text"> - <string>...</string> - </property> - <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/timeseriesviewer/icons/mActionEditCopy.png</normaloff>:/timeseriesviewer/icons/mActionEditCopy.png</iconset> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="btnPasteStyle"> - <property name="text"> - <string>...</string> - </property> - <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/timeseriesviewer/icons/mActionEditPaste.png</normaloff>:/timeseriesviewer/icons/mActionEditPaste.png</iconset> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label"> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> - <property name="text"> - <string>Stretch</string> - </property> - <property name="alignment"> - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="comboBoxContrastEnhancement"> - <property name="sizePolicy"> - <sizepolicy vsizetype="Fixed" hsizetype="Preferred"> - <horstretch>1</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> - </widget> - </item> - </layout> - </item> </layout> - <action name="actionSetDefaultMB"> - <property name="text"> - <string>Def</string> - </property> - <property name="toolTip"> - <string>Set default band selection</string> - </property> - </action> - <action name="actionSetTrueColor"> - <property name="text"> - <string>True</string> - </property> - <property name="toolTip"> - <string>Set to true color (red-green-blue)</string> - </property> - </action> - <action name="actionSetCIR"> - <property name="text"> - <string>CIR</string> - </property> - <property name="toolTip"> - <string>Set to coloured infra red (swIR-red-green)</string> - </property> - </action> - <action name="actionSet453"> - <property name="text"> - <string>453</string> - </property> - <property name="toolTip"> - <string>Set to swIR-mwIR-red (Landsat 4-5-3)</string> - </property> - </action> - <action name="actionCopyStyle"> - <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/timeseriesviewer/icons/mActionEditCopy.png</normaloff>:/timeseriesviewer/icons/mActionEditCopy.png</iconset> - </property> - <property name="text"> - <string>Copy style</string> - </property> - <property name="toolTip"> - <string>Copy style to clipboard</string> - </property> - </action> - <action name="actionPasteStyle"> - <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/timeseriesviewer/icons/mActionEditPaste.png</normaloff>:/timeseriesviewer/icons/mActionEditPaste.png</iconset> - </property> - <property name="text"> - <string>Paste Style</string> - </property> - <property name="toolTip"> - <string>Paste style from clipboard</string> - </property> - </action> - <action name="actionApplyStyle"> - <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/timeseriesviewer/icons/mActionRefresh.png</normaloff>:/timeseriesviewer/icons/mActionRefresh.png</iconset> - </property> - <property name="text"> - <string>ApplySettings</string> - </property> - <property name="toolTip"> - <string>Apply Style</string> - </property> - </action> - <action name="actionSetR"> - <property name="text"> - <string>R</string> - </property> - </action> - <action name="actionSetG"> - <property name="text"> - <string>G</string> - </property> - </action> - <action name="actionSetB"> - <property name="text"> - <string>B</string> - </property> - </action> - <action name="actionSetNIR"> - <property name="text"> - <string>nIR</string> - </property> - </action> - <action name="actionSetSWIR"> - <property name="text"> - <string>swIR</string> - </property> - </action> - <action name="actionSetDefaultSB"> - <property name="text"> - <string>Def</string> - </property> - </action> </widget> <customwidgets> <customwidget> - <class>QgsColorRampComboBox</class> - <extends>QComboBox</extends> + <class>QgsColorButton</class> + <extends>QPushButton</extends> <header>qgis.gui</header> </customwidget> + <customwidget> + <class>PlotWidget</class> + <extends>QGraphicsView</extends> + <header>pyqtgraph</header> + </customwidget> </customwidgets> - <resources> - <include location="resources.qrc"/> - </resources> - <connections> - <connection> - <sender>cbRenderType</sender> - <signal>currentIndexChanged(int)</signal> - <receiver>stackedWidget</receiver> - <slot>setCurrentIndex(int)</slot> - <hints> - <hint type="sourcelabel"> - <x>107</x> - <y>19</y> - </hint> - <hint type="destinationlabel"> - <x>144</x> - <y>54</y> - </hint> - </hints> - </connection> - </connections> + <resources/> + <connections/> </ui>