Skip to content

Commit

Permalink
Update subcategories menu
Browse files Browse the repository at this point in the history
- Added all photos
- Made one common function in pyqt5-gui - main_menu_dev
  • Loading branch information
rayapetkova committed May 29, 2023
1 parent 9cd27de commit ac3d5f8
Show file tree
Hide file tree
Showing 35 changed files with 19 additions and 57 deletions.
Binary file added img/subcategories/Accessories.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Alcohol Beverages.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Beach Shoes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Blouses.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Coffee.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Computers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Documentary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Electric Gadgets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Equipment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Garden Design.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Horror.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Household Appliences.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Kitchen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Makeup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Men Shorts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Men Suits.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Nail Polish.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Non-Alcohol Beverages.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Photography Gadgets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Products.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Romance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Room Decoration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Running Shoes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Shoes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Skin Care Products.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/subcategories/Skirts.png
Binary file added img/subcategories/Slippers.png
Binary file added img/subcategories/Sneakers.png
Binary file added img/subcategories/Sport Accessories.png
Binary file added img/subcategories/Sunglasses.png
Binary file added img/subcategories/Wallets.png
Binary file added img/subcategories/Watches.png
Binary file added img/subcategories/Women Kimonos.png
65 changes: 14 additions & 51 deletions pyqt5-gui/main_menu_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,61 +45,24 @@ def __init__(self):
"""INIT CONNECTION TO THE DATABASE"""
postgres_conn.admin_client()

def food_open():
print("I am eating some food")
def open_func(subcat_name):
global subcategory_name
subcategory_name = "Food"
subcategory_name = subcat_name
open_subcategories()

def books_open():
print("I am reading books")

def drinks_open():
print("I am drinking some drinks")

def accessories_open():
print("I will open Accessories")
global subcategory_name
subcategory_name = 'Accessories'
open_subcategories()

def homeandliving_open():
print("Home and Living")

def hair_open():
print("Hair")

def sports_open():
print("Sports")

def beachwear_open():
print("Beachwear")

def shoes_open():
print("Shoes")

def electronics_open():
print("Electronics")

def cosmetics_open():
print("Cosmetics")

def clothes_open():
print("Clothes")

functions_dict = {
'food_open': lambda: food_open(),
'books_open': lambda: books_open(),
'drinks_open': lambda: drinks_open(),
'accessories_open': lambda: accessories_open(),
'homeandliving_open': lambda: homeandliving_open(),
'hair_open': lambda: hair_open(),
'sports_open': lambda: sports_open(),
'beachwear_open': lambda: beachwear_open(),
'shoes_open': lambda: shoes_open(),
'electronics_open': lambda: electronics_open(),
'cosmetics_open': lambda: cosmetics_open(),
'clothes_open': lambda: clothes_open(),
'food_open': lambda: open_func("Food"),
'books_open': lambda: open_func("Books"),
'drinks_open': lambda: open_func("Drinks"),
'accessories_open': lambda: open_func("Accessories"),
'homeandliving_open': lambda: open_func("Home and Living"),
'hair_open': lambda: open_func("Hair"),
'sports_open': lambda: open_func("Sports"),
'beachwear_open': lambda: open_func("Beachwear"),
'shoes_open': lambda: open_func("Shoes"),
'electronics_open': lambda: open_func("Electronics"),
'cosmetics_open': lambda: open_func("Cosmetics"),
'clothes_open': lambda: open_func("Clothes"),
}

"""ADD CUSTOM FONT TO ARRAY READY TO BE LOADED TO ANY TEXT OBJECT"""
Expand Down
11 changes: 5 additions & 6 deletions pyqt5-gui/subcategories.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,11 @@ def drinks_open():
subcategory_name.setStyleSheet("background-color: rgba(255, 255, 255, 255);"
"border-radius: 10px;")

# IMPORTANTE !!!!!!!!
# image = f"../img/categories/{category_name.text()}.png"
# groupbox_stylesheet = f"QGroupBox {{ background-image: url({image});" \
# f"border-radius: 10px;" \
# f"}}"
# current_groupbox.setStyleSheet(groupbox_stylesheet)
image = f"../img/subcategories/{subcategory_name.text()}.png"
groupbox_stylesheet = f"QGroupBox {{ background-image: url({image});" \
f"border-radius: 10px;" \
f"}}"
current_groupbox.setStyleSheet(groupbox_stylesheet)

subcategory_button = QPushButton()
subcategory_button.setText(subcategory_name.text())
Expand Down

0 comments on commit ac3d5f8

Please sign in to comment.