diff --git a/__pycache__/constants.cpython-310.pyc b/__pycache__/constants.cpython-310.pyc new file mode 100644 index 0000000..287cd53 Binary files /dev/null and b/__pycache__/constants.cpython-310.pyc differ diff --git a/__pycache__/mvc.cpython-310.pyc b/__pycache__/mvc.cpython-310.pyc new file mode 100644 index 0000000..e233d08 Binary files /dev/null and b/__pycache__/mvc.cpython-310.pyc differ diff --git a/__pycache__/sign_up_window.cpython-310.pyc b/__pycache__/sign_up_window.cpython-310.pyc index 366686f..02199c4 100644 Binary files a/__pycache__/sign_up_window.cpython-310.pyc and b/__pycache__/sign_up_window.cpython-310.pyc differ diff --git a/book_search/__pycache__/book_search.cpython-310.pyc b/book_search/__pycache__/book_search.cpython-310.pyc new file mode 100644 index 0000000..aa116d7 Binary files /dev/null and b/book_search/__pycache__/book_search.cpython-310.pyc differ diff --git a/book_search/__pycache__/constants.cpython-310.pyc b/book_search/__pycache__/constants.cpython-310.pyc new file mode 100644 index 0000000..e1aed14 Binary files /dev/null and b/book_search/__pycache__/constants.cpython-310.pyc differ diff --git a/book_search/constants.py b/book_search/constants.py new file mode 100644 index 0000000..ef78bba --- /dev/null +++ b/book_search/constants.py @@ -0,0 +1 @@ +WINDOW_ICON = "icon/app_icon.ico" \ No newline at end of file diff --git a/book_search/icon/app_icon.ico b/book_search/icon/app_icon.ico new file mode 100644 index 0000000..fc46a1e Binary files /dev/null and b/book_search/icon/app_icon.ico differ diff --git a/book_search/main.py b/book_search/main.py new file mode 100644 index 0000000..99c5760 --- /dev/null +++ b/book_search/main.py @@ -0,0 +1,12 @@ +import sys + +from PyQt6.QtWidgets import QApplication +from book_search import BookSearch + +def main(): + app = QApplication(sys.argv) + window = BookSearch() + window.show() + sys.exit(app.exec()) + +main() \ No newline at end of file diff --git a/constants.py b/constants.py new file mode 100644 index 0000000..ef78bba --- /dev/null +++ b/constants.py @@ -0,0 +1 @@ +WINDOW_ICON = "icon/app_icon.ico" \ No newline at end of file diff --git a/main.py b/main.py index abfd43e..4d9d571 100644 --- a/main.py +++ b/main.py @@ -1,14 +1,11 @@ -# Main file - import sys -from PyQt6.QtWidgets import QApplication, QWidget, QLabel, QLineEdit, QVBoxLayout -from PyQt6.QtGui import QIcon, QFont, QPixmap -from sign_up_window import Window +from PyQt6.QtWidgets import QApplication +from sign_up_window import SignUpWindow def main(): app = QApplication(sys.argv) - window = Window() + window = SignUpWindow() window.show() sys.exit(app.exec()) diff --git a/sign_up_window.py b/sign_up_window.py index fe9e7c2..5da47b5 100644 --- a/sign_up_window.py +++ b/sign_up_window.py @@ -1,27 +1,26 @@ -# sign_up_window - import sys from PyQt6.QtWidgets import QApplication, QWidget, QLabel, QLineEdit, QVBoxLayout from PyQt6.QtGui import QIcon, QFont, QPixmap +from constants import WINDOW_ICON -class Window(QWidget) : +class SignUpWindow(QWidget) : def __init__(self) : super().__init__() self.setWindowTitle("X_Library | Sign Up Window") - self.setWindowIcon(QIcon("icon/app_icon.ico")) + self.setWindowIcon(QIcon(WINDOW_ICON)) self.resize(800, 600) - + self.create_widgets() + + def create_widgets(self) : window_layout = QVBoxLayout() - # image box + image_box = QLabel(self) captcha_image = QPixmap("icon/app_icon.ico") image_box.setPixmap(captcha_image) - image_box.setGeometry(100, 100, 300, 300) window_layout.addWidget(image_box) - # input box + input_box = QLineEdit(self) - input_box.setGeometry(150, 400, 200, 30) window_layout.addWidget(input_box) - # applying layout + self.setLayout(window_layout) \ No newline at end of file