-
Notifications
You must be signed in to change notification settings - Fork 0
/
covid-gui.py
37 lines (32 loc) · 1.06 KB
/
covid-gui.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 sys
import os
from git_clone import git_clone
from PySide2.QtWidgets import (QLineEdit, QPushButton, QApplication,
QVBoxLayout, QDialog)
class Form(QDialog):
def __init__(self, parent=None):
super(Form, self).__init__(parent)
# Create widgets
self.edit = QLineEdit("update?")
self.button = QPushButton("Update!")
# Create layout and add widgets
layout = QVBoxLayout()
layout.addWidget(self.edit)
layout.addWidget(self.button)
# Set dialog layout
self.setLayout(layout)
# Add button signal to greetings slot
self.button.clicked.connect(self.greetings)
# Greets the user
def greetings(self):
print("Covid-19 data Exists!")
os.system('rmdir /Q /s COVID-19')
git_clone('https://github.com/CSSEGISandData/COVID-19.git')
if __name__ == '__main__':
# Create the Qt Application
app = QApplication(sys.argv)
# Create and show the form
form = Form()
form.show()
# Run the main Qt loop
sys.exit(app.exec_())