forked from deufrai/als
-
Notifications
You must be signed in to change notification settings - Fork 1
/
alsui.py
150 lines (140 loc) · 7.56 KB
/
alsui.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'alsui.ui'
#
# Created by: PyQt5 UI code generator 5.12.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_stack_window(object):
def setupUi(self, stack_window):
stack_window.setObjectName("stack_window")
stack_window.resize(870, 792)
self.centralwidget = QtWidgets.QWidget(stack_window)
self.centralwidget.setObjectName("centralwidget")
self.gridLayoutWidget = QtWidgets.QWidget(self.centralwidget)
self.gridLayoutWidget.setGeometry(QtCore.QRect(0, 5, 435, 101))
self.gridLayoutWidget.setObjectName("gridLayoutWidget")
self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
self.gridLayout.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.gridLayout.setObjectName("gridLayout")
self.tWork = QtWidgets.QLineEdit(self.gridLayoutWidget)
self.tWork.setEnabled(False)
self.tWork.setObjectName("tWork")
self.gridLayout.addWidget(self.tWork, 3, 1, 1, 1)
self.bBrowseFolder = QtWidgets.QPushButton(self.gridLayoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.bBrowseFolder.sizePolicy().hasHeightForWidth())
self.bBrowseFolder.setSizePolicy(sizePolicy)
self.bBrowseFolder.setMinimumSize(QtCore.QSize(20, 0))
self.bBrowseFolder.setMaximumSize(QtCore.QSize(80, 16777215))
self.bBrowseFolder.setObjectName("bBrowseFolder")
self.gridLayout.addWidget(self.bBrowseFolder, 0, 0, 1, 1)
self.cbDark = QtWidgets.QCheckBox(self.gridLayoutWidget)
self.cbDark.setMaximumSize(QtCore.QSize(150, 16777215))
self.cbDark.setObjectName("cbDark")
self.gridLayout.addWidget(self.cbDark, 1, 2, 1, 1)
self.pbPlay = QtWidgets.QPushButton(self.gridLayoutWidget)
self.pbPlay.setObjectName("pbPlay")
self.gridLayout.addWidget(self.pbPlay, 0, 3, 1, 1)
self.pbReset = QtWidgets.QPushButton(self.gridLayoutWidget)
self.pbReset.setObjectName("pbReset")
self.gridLayout.addWidget(self.pbReset, 3, 3, 1, 1)
self.tDark = QtWidgets.QLineEdit(self.gridLayoutWidget)
self.tDark.setEnabled(False)
self.tDark.setObjectName("tDark")
self.gridLayout.addWidget(self.tDark, 1, 1, 1, 1)
self.tFolder = QtWidgets.QLineEdit(self.gridLayoutWidget)
self.tFolder.setEnabled(False)
self.tFolder.setObjectName("tFolder")
self.gridLayout.addWidget(self.tFolder, 0, 1, 1, 1)
self.bBrowseDark = QtWidgets.QPushButton(self.gridLayoutWidget)
self.bBrowseDark.setEnabled(False)
self.bBrowseDark.setMaximumSize(QtCore.QSize(80, 16777215))
self.bBrowseDark.setObjectName("bBrowseDark")
self.gridLayout.addWidget(self.bBrowseDark, 1, 0, 1, 1)
self.bBrowseWork = QtWidgets.QPushButton(self.gridLayoutWidget)
self.bBrowseWork.setMaximumSize(QtCore.QSize(80, 16777215))
self.bBrowseWork.setObjectName("bBrowseWork")
self.gridLayout.addWidget(self.bBrowseWork, 3, 0, 1, 1)
self.pbStop = QtWidgets.QPushButton(self.gridLayoutWidget)
self.pbStop.setEnabled(False)
self.pbStop.setObjectName("pbStop")
self.gridLayout.addWidget(self.pbStop, 1, 3, 1, 1)
self.cbAlign = QtWidgets.QCheckBox(self.gridLayoutWidget)
self.cbAlign.setMaximumSize(QtCore.QSize(150, 16777215))
self.cbAlign.setChecked(True)
self.cbAlign.setObjectName("cbAlign")
self.gridLayout.addWidget(self.cbAlign, 0, 2, 1, 1)
self.cmMode = QtWidgets.QComboBox(self.gridLayoutWidget)
self.cmMode.setObjectName("cmMode")
self.cmMode.addItem("")
self.cmMode.addItem("")
self.gridLayout.addWidget(self.cmMode, 3, 2, 1, 1)
self.pbSave = QtWidgets.QPushButton(self.gridLayoutWidget)
self.pbSave.setObjectName("pbSave")
self.gridLayout.addWidget(self.pbSave, 4, 3, 1, 1)
self.cnt = QtWidgets.QLabel(self.gridLayoutWidget)
font = QtGui.QFont()
font.setPointSize(16)
self.cnt.setFont(font)
self.cnt.setAlignment(QtCore.Qt.AlignCenter)
self.cnt.setObjectName("cnt")
self.gridLayout.addWidget(self.cnt, 4, 1, 1, 1)
self.cbKeep = QtWidgets.QCheckBox(self.gridLayoutWidget)
self.cbKeep.setObjectName("cbKeep")
self.gridLayout.addWidget(self.cbKeep, 4, 2, 1, 1)
self.cbWww = QtWidgets.QCheckBox(self.gridLayoutWidget)
self.cbWww.setObjectName("cbWww")
self.gridLayout.addWidget(self.cbWww, 4, 0, 1, 1)
self.gridLayout.setColumnMinimumWidth(1, 50)
self.log = QtWidgets.QTextBrowser(self.centralwidget)
self.log.setGeometry(QtCore.QRect(436, 5, 431, 100))
self.log.setMaximumSize(QtCore.QSize(16777215, 500))
self.log.setObjectName("log")
self.image_stack = QtWidgets.QLabel(self.centralwidget)
self.image_stack.setGeometry(QtCore.QRect(16, 126, 841, 621))
self.image_stack.setText("")
self.image_stack.setPixmap(QtGui.QPixmap("dslr-camera.svg"))
self.image_stack.setAlignment(QtCore.Qt.AlignCenter)
self.image_stack.setObjectName("image_stack")
stack_window.setCentralWidget(self.centralwidget)
self.actionQuit = QtWidgets.QAction(stack_window)
self.actionQuit.setObjectName("actionQuit")
self.retranslateUi(stack_window)
self.actionQuit.triggered.connect(stack_window.close)
self.cbDark.clicked['bool'].connect(self.tDark.setEnabled)
self.cbDark.clicked['bool'].connect(self.bBrowseDark.setEnabled)
self.cbAlign.clicked['bool'].connect(self.cmMode.setEnabled)
QtCore.QMetaObject.connectSlotsByName(stack_window)
def retranslateUi(self, stack_window):
_translate = QtCore.QCoreApplication.translate
stack_window.setWindowTitle(_translate("stack_window", "Astro Live Stacker"))
self.tWork.setText(_translate("stack_window", "~/als/wrk"))
self.bBrowseFolder.setText(_translate("stack_window", "Rep. scan"))
self.cbDark.setText(_translate("stack_window", "Utiliser un dark"))
self.pbPlay.setText(_translate("stack_window", "Play"))
self.pbReset.setText(_translate("stack_window", "Reset"))
self.tDark.setText(_translate("stack_window", "~/als/dark.fits"))
self.tFolder.setText(_translate("stack_window", "~/als/scan"))
self.bBrowseDark.setText(_translate("stack_window", "Fic. dark"))
self.bBrowseWork.setText(_translate("stack_window", "Rep. wrk"))
self.pbStop.setText(_translate("stack_window", "Stop"))
self.cbAlign.setText(_translate("stack_window", "Aligner"))
self.cmMode.setItemText(0, _translate("stack_window", "Sum"))
self.cmMode.setItemText(1, _translate("stack_window", "Mean"))
self.pbSave.setText(_translate("stack_window", "Save"))
self.cnt.setText(_translate("stack_window", "0"))
self.cbKeep.setText(_translate("stack_window", "Conserver les images"))
self.cbWww.setText(_translate("stack_window", "www"))
self.actionQuit.setText(_translate("stack_window", "&Quit"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
stack_window = QtWidgets.QMainWindow()
ui = Ui_stack_window()
ui.setupUi(stack_window)
stack_window.show()
sys.exit(app.exec_())