Skip to content

Commit

Permalink
chore: update logo of loading UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziad-Muhammed committed Oct 1, 2022
1 parent 1e79785 commit 2312391
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 23 deletions.
24 changes: 13 additions & 11 deletions FrontApp.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import sys
import time

from PIL import Image, ImageQt
from PyQt5 import QtWidgets, uic, QtGui, QtCore
from PyQt5.QtWidgets import QMainWindow, QPushButton, QTextEdit, QLabel, QWidget, QLabel, QApplication, QSplashScreen , QDialog
from PyQt5.uic import loadUi
import time
from PyQt5.QtCore import pyqtSignal, pyqtSlot, QThread, Qt, QTimer

from PyQt5.QtCore import Qt
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QMainWindow, QPushButton, QTextEdit, QLabel, QSplashScreen

# from detect import crop_one
sys.path.insert(0, './localisation')
path = './localisation/data/images/1.png'
Expand Down Expand Up @@ -120,11 +119,13 @@ def finish(self):
self.main_img.setText("Enter a new input directory")
self.clean_directory("./green_boxes")
self.clean_directory("./detections")
self.clean_directory("./outputs")

def clean_directory(self, path):
files = glob.glob(f'{path}/*')
for file in files:
os.remove(file)

def clean(self):
for label, text in zip(self.segmented_chars, self.textbox_values):
label.clear()
Expand Down Expand Up @@ -182,22 +183,23 @@ def skipImg(self):
self.to_be_saved = {}
self.clean()


class SplashScreen(QSplashScreen):
def __init__(self):
super(QSplashScreen, self).__init__()
uic.loadUi("untitled.ui", self)
uic.loadUi("loading.ui", self)
self.setWindowFlag(Qt.FramelessWindowHint)
pixmap = QPixmap("bg.png")
pixmap = QPixmap("IIC.png")
self.setPixmap(pixmap)

self.show()

self.show()

def progress(self):

for i in range(100):
time.sleep(0.02)
self.progressBar.setValue(i+1)
self.progressBar.setValue(i + 1)


# Main
if __name__ == "__main__":
application = QtWidgets.QApplication(sys.argv)
Expand Down
8 changes: 4 additions & 4 deletions LabellingApp.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import sys
import time

from PIL import Image, ImageQt
from PyQt5 import QtWidgets, uic, QtGui, QtCore
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QMainWindow, QPushButton, QTextEdit, QLabel,QComboBox, QSplashScreen , QDialog
import time
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QMainWindow, QPushButton, QTextEdit, QLabel, QComboBox, QSplashScreen

# from detect import crop_one
sys.path.insert(0, './localisation')
Expand Down Expand Up @@ -151,9 +151,9 @@ def skipImg(self):
class SplashScreen(QSplashScreen):
def __init__(self):
super(QSplashScreen, self).__init__()
uic.loadUi("untitled.ui", self)
uic.loadUi("loading.ui", self)
self.setWindowFlag(Qt.FramelessWindowHint)
pixmap = QPixmap("bg.png")
pixmap = QPixmap("IIC.png")
self.setPixmap(pixmap)

self.show()
Expand Down
10 changes: 5 additions & 5 deletions untitled.ui → loading.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>699</width>
<height>353</height>
<height>420</height>
</rect>
</property>
<property name="windowTitle">
Expand All @@ -16,8 +16,8 @@
<widget class="QProgressBar" name="progressBar">
<property name="geometry">
<rect>
<x>60</x>
<y>230</y>
<x>80</x>
<y>360</y>
<width>411</width>
<height>31</height>
</rect>
Expand All @@ -34,7 +34,7 @@

QProgressBar::chunk{
border-radius:10px;
background-color: #ce5698;
background-color: #137AC4;
}</string>
</property>
<property name="value">
Expand All @@ -54,7 +54,7 @@ QProgressBar::chunk{
<string notr="true">text-align:center;</string>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:36pt; color:#ffffff;&quot;&gt;ALPD&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</widget>
Expand Down
6 changes: 3 additions & 3 deletions streaming.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import sys
import time

import cv2 as cv
from PIL import Image, ImageQt
from PyQt5 import QtWidgets, uic, QtGui, QtCore
from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QThread
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QMainWindow, QPushButton, QLabel, QSplashScreen
import time

# from detect import crop_one
sys.path.insert(0, './localisation')
Expand Down Expand Up @@ -237,9 +237,9 @@ def captureImg(self):
class SplashScreen(QSplashScreen):
def __init__(self):
super(QSplashScreen, self).__init__()
uic.loadUi("untitled.ui", self)
uic.loadUi("loading.ui", self)
self.setWindowFlag(Qt.FramelessWindowHint)
pixmap = QPixmap("bg.png")
pixmap = QPixmap("IIC.png")
self.setPixmap(pixmap)

self.show()
Expand Down

0 comments on commit 2312391

Please sign in to comment.