forked from markwbrown/MAPIR_Camera_Control
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BandOrder.py
38 lines (31 loc) · 1.12 KB
/
BandOrder.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import os
from PyQt5 import QtCore, QtGui, QtWidgets
import PyQt5.uic as uic
os.umask(0)
BANDORDER_Class, _ = uic.loadUiType(os.path.join(
os.path.dirname(__file__), 'MAPIR_Processing_dockwidget_BandOrder.ui'))
class BandOrder(QtWidgets.QDialog, BANDORDER_Class):
_items = []
def __init__(self, parent=None, items=None):
"""Constructor."""
super(BandOrder, self).__init__(parent=parent)
self.parent = parent
self._items = items
self.setupUi(self)
for itm in self._items:
self.Band1.addItem(itm)
self.Band2.addItem(itm)
self.Band3.addItem(itm)
self.Band4.addItem(itm)
self.Band5.addItem(itm)
self.Band6.addItem(itm)
def on_SaveButton_released(self):
self.parent.rdr = [self.Band1.currentIndex() - 1,
self.Band2.currentIndex() - 1,
self.Band3.currentIndex() - 1,
self.Band4.currentIndex() - 1,
self.Band5.currentIndex() - 1,
self.Band6.currentIndex() - 1]
self.close()
def on_CancelButton_released(self):
self.close()