Commit 247c3f2d authored by marc's avatar marc
Browse files

added close and Exit action

parent aba009ea
telescope
ui/__pycache__
......@@ -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")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment