Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
marc
dtObsGUI
Commits
247c3f2d
Commit
247c3f2d
authored
Oct 07, 2017
by
marc
Browse files
added close and Exit action
parent
aba009ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
247c3f2d
telescope
ui/__pycache__
DTObs.py
View file @
247c3f2d
...
...
@@ -3,17 +3,17 @@
import
sys
import
csv
import
logging
from
telescope
import
telescope
import
subprocess
import
traceback
import
time
import
numpy
as
np
from
PyQt5
import
QtGui
from
PyQt5.QtCore
import
QRunnable
,
QObject
,
pyqtSignal
,
pyqtSlot
,
QThreadPool
from
PyQt5.QtWidgets
import
(
QFileDialog
,
QApplication
,
QMainWindow
,
QTableWidgetItem
)
from
ui.dtobswindow
import
Ui_mainWindow
import
subprocess
import
traceback
import
time
import
numpy
as
np
from
telescope
import
telescope
from
astropy
import
units
as
u
from
astropy.coordinates
import
SkyCoord
...
...
@@ -70,6 +70,8 @@ class DTObservationProgram(Ui_mainWindow):
Ui_mainWindow
.
__init__
(
self
)
self
.
setupUi
(
mainWindow
)
self
.
actionOpen
.
triggered
.
connect
(
self
.
openFileNameDialog
)
self
.
actionClose
.
triggered
.
connect
(
self
.
closeMeasurement
)
self
.
actionQuit
.
triggered
.
connect
(
self
.
quitDTObs
)
self
.
pushButtonStartMeasurement
.
clicked
.
connect
(
self
.
startMeasurement
)
self
.
pushButtonStopMeasurement
.
clicked
.
connect
(
self
.
stopMeasurement
)
...
...
@@ -99,6 +101,13 @@ class DTObservationProgram(Ui_mainWindow):
self
.
tableWidgetPointings
.
resizeColumnsToContents
()
def
closeMeasurement
(
self
):
for
rowPosition
in
range
(
self
.
tableWidgetPointings
.
rowCount
(),
-
1
,
-
1
):
self
.
tableWidgetPointings
.
removeRow
(
rowPosition
)
def
quitDTObs
(
self
):
sys
.
exit
(
app
.
exec_
())
def
allCompleted
(
self
):
""" Callback function when all pointings completed """
print
(
"All pointings completed"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment