stretchdialog¶
Module that contains the StretchLayout, RuleLayout and StretchDefaultsDialog classes
- class tuiview.stretchdialog.ColorButton(*args: Any, **kwargs: Any)[source]¶
Class that is a button with a icon that displays the current color. Clicking the button allows user to change color
- class tuiview.stretchdialog.RuleLayout(*args: Any, **kwargs: Any)[source]¶
Layout that contains the ‘rules’. These are the number of bands, the comparison with the number of bands and the check for a color table
- class tuiview.stretchdialog.StretchDefaultsDialog(*args: Any, **kwargs: Any)[source]¶
Dialog that contains a Tabs, each one describing a rule and is a combination of RuleLayout and StretchLayout
- static fromSettings()[source]¶
Read the default stretch rules from the settings and return a list of StretchRules. Supplies a default set of rules if none found.
- onNewAfter()[source]¶
The ‘add new page after’ button pressed. Add a new page in with the rule/stretch same as current page
- class tuiview.stretchdialog.StretchDockWidget(*args: Any, **kwargs: Any)[source]¶
Class that has a StretchLayout as a dockable window with apply and save buttons
- importFromGDAL()[source]¶
Import stretch and lookup table from file where these have already been saved
- onApplyAll()[source]¶
The function to be run when the ApplyAll button is clicked (applies a stretch to all files open in tuiview.
- class tuiview.stretchdialog.StretchLayout(*args: Any, **kwargs: Any)[source]¶
Layout that contains the actual stretch information
- createComboBands(gdaldataset, parent)[source]¶
We have a dataset - create combo boxes with the band names
- createSpinBands(parent)[source]¶
For the case where we are creating a rule we have no band names so create spin boxes
- static getBandValue(widget)[source]¶
Depending on whether widget it a spinbox or a combo box extract the current value for it.
- populateComboFromDataset(combo, gdaldataset)[source]¶
Go through all the bands in the dataset and add a combo item for each one. Set the current index to the currentBand