diff --git a/View/about_window.py b/View/about_window.py index 52b499e..afde22a 100644 --- a/View/about_window.py +++ b/View/about_window.py @@ -1,6 +1,6 @@ import sys -from PyQt5.QtGui import QIcon, QPixmap +from PyQt5.QtGui import QIcon, QPixmap, QFont from PyQt5.QtWidgets import (QWidget, QLabel, QHBoxLayout, QVBoxLayout, QApplication, QMainWindow, QGridLayout, QDialog, QDialogButtonBox, QPushButton, QTextEdit, QFrame) from PyQt5.QtCore import Qt @@ -15,9 +15,11 @@ class AboutWindow(QDialog): super().__init__() - self.logo_path = "./Logo/" - self.logo = QPixmap(self.logo_path + "/" + "Logo_AcouSed_AboutAcouSedWindow.png") - self.logo.scaled(16, 16, Qt.KeepAspectRatio, Qt.SmoothTransformation) + self.logo_path = "/home/bmoudjed/Documents/3 SSC acoustic meas project/Graphical interface project/acoused/Logo/" + self.logo_AcouSed = QPixmap(self.logo_path + "/" + "Logo_AcouSed_AboutAcouSedWindow.png") + self.logo_AcouSed.scaled(16, 16, Qt.KeepAspectRatio, Qt.SmoothTransformation) + + self.logo_INRAE = QPixmap(self.logo_path + "/" + "BlocMarque-INRAE-Inter.jpg") self.setGeometry(400, 200, 300, 200) @@ -28,21 +30,28 @@ class AboutWindow(QDialog): self.verticalLayout_Main = QVBoxLayout() self.setLayout(self.verticalLayout_Main) - self.horizontalLayout = QHBoxLayout() - self.verticalLayout_Main.addLayout(self.horizontalLayout) + self.gridLayout = QGridLayout() + self.verticalLayout_Main.addLayout(self.gridLayout) # ---------------------------------------------------------- - self.label_logo = QLabel() - self.label_logo.setPixmap(self.logo) - self.horizontalLayout.addWidget(self.label_logo) - - self.verticalLayout_AcouSed_info = QVBoxLayout() - self.horizontalLayout.addLayout(self.verticalLayout_AcouSed_info) + self.label_logo_AcouSed = QLabel() + self.label_logo_AcouSed.setPixmap(self.logo_AcouSed.scaledToHeight(128, Qt.SmoothTransformation)) + self.gridLayout.addWidget(self.label_logo_AcouSed, 0, 0, 3, 1, Qt.AlignCenter) self.label_acoused = QLabel() - self.label_acoused.setText(f"Acoused 1.10 \n" + date.today().isoformat() + "\n by INRAE") - self.verticalLayout_AcouSed_info.addWidget(self.label_acoused) + self.label_acoused.setText("Acoused 1.10") + self.label_acoused.setFont(QFont("Ubuntu", 14)) + self.gridLayout.addWidget(self.label_acoused, 0, 1, 1, 1, Qt.AlignCenter) + + self.label_date = QLabel() + self.label_date.setText("2024.11.04") + self.label_date.setFont(QFont("Ubuntu", 12)) + self.gridLayout.addWidget(self.label_date, 1, 1, 1, 1, Qt.AlignCenter) + + self.label_logo_INRAE = QLabel() + self.label_logo_INRAE.setPixmap(self.logo_INRAE.scaledToHeight(42, Qt.SmoothTransformation)) + self.gridLayout.addWidget(self.label_logo_INRAE, 2, 1, 1, 1, Qt.AlignCenter) # self.label_date = QLabel() # self.label_date.setText(f"") @@ -164,20 +173,20 @@ class Support(QDialog): # w = AboutWindow() # sys.exit(app.exec_()) -# if __name__ == "__main__": -# app = QApplication(sys.argv) -# # otherwindow = QMainWindow() -# # w = AboutWindow(otherwindow) -# w = AboutWindow() -# print(w) -# w.show() -# print("et ici") -# # otherwindow.show() -# # MainWindow = QMainWindow() -# # ui = Ui_MainWindow() -# # ui.setupUi(MainWindow) -# # MainWindow.show() -# sys.exit(app.exec_()) +if __name__ == "__main__": + app = QApplication(sys.argv) + # otherwindow = QMainWindow() + # w = AboutWindow(otherwindow) + w = AboutWindow() + print(w) + w.show() + print("et ici") + # otherwindow.show() + # MainWindow = QMainWindow() + # ui = Ui_MainWindow() + # ui.setupUi(MainWindow) + # MainWindow.show() + sys.exit(app.exec_())