-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
26 lines (22 loc) · 864 Bytes
/
app.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
from PyQt5.QtWidgets import QApplication
import sys
import logging
from Utils.redisconn import redisServerSetup
from Screens.Main import Main
__version__ = "0.1"
__authors__ = ["Ahmet Yusuf Başaran ", "Yusufcan Günay"]
logging.basicConfig(format="%(message)s", level=logging.INFO)
if __name__ == "__main__":
# Redis baglantasindan donen status degerine gore uygulamayi baslatiyoruz!
status, r, p = redisServerSetup()
if status:
app = QApplication(sys.argv)
# Ekran Cozunurluk degerlerini almak!
screen_resolution = app.desktop().screenGeometry()
width, height = screen_resolution.width(), screen_resolution.height()
main_window = Main(width, height)
# Ana pencereyi göstermek!
main_window.show()
sys.exit(app.exec())
else:
logging.info("Server'a bağlanılamıyor...")