some filesystem changes
This commit is contained in:
@@ -2,7 +2,8 @@ import threading
|
|||||||
from PyQt5 import QtWidgets
|
from PyQt5 import QtWidgets
|
||||||
from gui.gui import Ui_MainWindow
|
from gui.gui import Ui_MainWindow
|
||||||
from modules.core.exceptions import hook, thread_hook
|
from modules.core.exceptions import hook, thread_hook
|
||||||
from gui.modules import setup_ui
|
from gui.modules.initialize import setup_ui
|
||||||
|
from gui.modules.handlers.register import register_handlers
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
sys.excepthook = hook
|
sys.excepthook = hook
|
||||||
@@ -16,5 +17,6 @@ setup_ui.on_load(ui, MainWindow)
|
|||||||
|
|
||||||
MainWindow.show()
|
MainWindow.show()
|
||||||
|
|
||||||
|
register_handlers(ui)
|
||||||
|
|
||||||
sys.exit(app.exec_())
|
sys.exit(app.exec_())
|
||||||
|
|||||||
124
gui/gui.py
124
gui/gui.py
@@ -14,7 +14,8 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
|||||||
class Ui_MainWindow(object):
|
class Ui_MainWindow(object):
|
||||||
def setupUi(self, MainWindow):
|
def setupUi(self, MainWindow):
|
||||||
MainWindow.setObjectName("MainWindow")
|
MainWindow.setObjectName("MainWindow")
|
||||||
MainWindow.resize(800, 435)
|
MainWindow.resize(800, 489)
|
||||||
|
MainWindow.setMaximumSize(QtCore.QSize(16777215, 16777215))
|
||||||
icon = QtGui.QIcon()
|
icon = QtGui.QIcon()
|
||||||
icon.addPixmap(QtGui.QPixmap(":/img/img/icon.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
icon.addPixmap(QtGui.QPixmap(":/img/img/icon.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
MainWindow.setWindowIcon(icon)
|
MainWindow.setWindowIcon(icon)
|
||||||
@@ -83,12 +84,66 @@ class Ui_MainWindow(object):
|
|||||||
self.content_layout.setObjectName("content_layout")
|
self.content_layout.setObjectName("content_layout")
|
||||||
self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.content_layout)
|
self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.content_layout)
|
||||||
self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0)
|
self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0)
|
||||||
|
self.horizontalLayout_3.setSpacing(0)
|
||||||
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
||||||
self.logo_if_empty = QtWidgets.QTextBrowser(self.content_layout)
|
self.logo_if_empty = QtWidgets.QTextBrowser(self.content_layout)
|
||||||
self.logo_if_empty.setMaximumSize(QtCore.QSize(16777215, 16777215))
|
self.logo_if_empty.setMaximumSize(QtCore.QSize(0, 16777215))
|
||||||
self.logo_if_empty.setTextInteractionFlags(QtCore.Qt.NoTextInteraction)
|
self.logo_if_empty.setTextInteractionFlags(QtCore.Qt.NoTextInteraction)
|
||||||
self.logo_if_empty.setObjectName("logo_if_empty")
|
self.logo_if_empty.setObjectName("logo_if_empty")
|
||||||
self.horizontalLayout_3.addWidget(self.logo_if_empty)
|
self.horizontalLayout_3.addWidget(self.logo_if_empty)
|
||||||
|
self.filter_lay = QtWidgets.QWidget(self.content_layout)
|
||||||
|
self.filter_lay.setMinimumSize(QtCore.QSize(0, 0))
|
||||||
|
self.filter_lay.setMaximumSize(QtCore.QSize(0, 16777215))
|
||||||
|
self.filter_lay.setObjectName("filter_lay")
|
||||||
|
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.filter_lay)
|
||||||
|
self.verticalLayout_3.setContentsMargins(0, 0, 6, 0)
|
||||||
|
self.verticalLayout_3.setObjectName("verticalLayout_3")
|
||||||
|
self.filter_class_label = QtWidgets.QLabel(self.filter_lay)
|
||||||
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
|
||||||
|
sizePolicy.setHorizontalStretch(0)
|
||||||
|
sizePolicy.setVerticalStretch(0)
|
||||||
|
sizePolicy.setHeightForWidth(self.filter_class_label.sizePolicy().hasHeightForWidth())
|
||||||
|
self.filter_class_label.setSizePolicy(sizePolicy)
|
||||||
|
self.filter_class_label.setObjectName("filter_class_label")
|
||||||
|
self.verticalLayout_3.addWidget(self.filter_class_label)
|
||||||
|
self.filter_class_box = QtWidgets.QComboBox(self.filter_lay)
|
||||||
|
self.filter_class_box.setObjectName("filter_class_box")
|
||||||
|
self.verticalLayout_3.addWidget(self.filter_class_box, 0, QtCore.Qt.AlignTop)
|
||||||
|
self.filter_type_label = QtWidgets.QLabel(self.filter_lay)
|
||||||
|
self.filter_type_label.setObjectName("filter_type_label")
|
||||||
|
self.verticalLayout_3.addWidget(self.filter_type_label)
|
||||||
|
self.filter_type_box = QtWidgets.QComboBox(self.filter_lay)
|
||||||
|
self.filter_type_box.setObjectName("filter_type_box")
|
||||||
|
self.verticalLayout_3.addWidget(self.filter_type_box)
|
||||||
|
self.filter_shop_label = QtWidgets.QLabel(self.filter_lay)
|
||||||
|
self.filter_shop_label.setObjectName("filter_shop_label")
|
||||||
|
self.verticalLayout_3.addWidget(self.filter_shop_label)
|
||||||
|
self.filter_shop_box = QtWidgets.QComboBox(self.filter_lay)
|
||||||
|
self.filter_shop_box.setObjectName("filter_shop_box")
|
||||||
|
self.verticalLayout_3.addWidget(self.filter_shop_box)
|
||||||
|
self.filter_min_price_label = QtWidgets.QLabel(self.filter_lay)
|
||||||
|
self.filter_min_price_label.setObjectName("filter_min_price_label")
|
||||||
|
self.verticalLayout_3.addWidget(self.filter_min_price_label)
|
||||||
|
self.filter_min_price_box = QtWidgets.QSpinBox(self.filter_lay)
|
||||||
|
self.filter_min_price_box.setStyleSheet("")
|
||||||
|
self.filter_min_price_box.setMaximum(10000000)
|
||||||
|
self.filter_min_price_box.setObjectName("filter_min_price_box")
|
||||||
|
self.verticalLayout_3.addWidget(self.filter_min_price_box)
|
||||||
|
self.filter_max_price_label = QtWidgets.QLabel(self.filter_lay)
|
||||||
|
self.filter_max_price_label.setObjectName("filter_max_price_label")
|
||||||
|
self.verticalLayout_3.addWidget(self.filter_max_price_label)
|
||||||
|
self.filter_max_price_box = QtWidgets.QSpinBox(self.filter_lay)
|
||||||
|
self.filter_max_price_box.setMaximum(10000000)
|
||||||
|
self.filter_max_price_box.setProperty("value", 10000000)
|
||||||
|
self.filter_max_price_box.setObjectName("filter_max_price_box")
|
||||||
|
self.verticalLayout_3.addWidget(self.filter_max_price_box)
|
||||||
|
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||||
|
self.verticalLayout_3.addItem(spacerItem1)
|
||||||
|
self.filters_apply_button = QtWidgets.QPushButton(self.filter_lay)
|
||||||
|
self.filters_apply_button.setMinimumSize(QtCore.QSize(0, 0))
|
||||||
|
self.filters_apply_button.setObjectName("filters_apply_button")
|
||||||
|
self.verticalLayout_3.addWidget(self.filters_apply_button)
|
||||||
|
self.horizontalLayout_3.addWidget(self.filter_lay)
|
||||||
self.items_list = QtWidgets.QListWidget(self.content_layout)
|
self.items_list = QtWidgets.QListWidget(self.content_layout)
|
||||||
self.items_list.setMaximumSize(QtCore.QSize(16777215, 16777215))
|
self.items_list.setMaximumSize(QtCore.QSize(16777215, 16777215))
|
||||||
self.items_list.setStyleSheet("QListWidget:item {\n"
|
self.items_list.setStyleSheet("QListWidget:item {\n"
|
||||||
@@ -98,6 +153,57 @@ class Ui_MainWindow(object):
|
|||||||
self.items_list.setIconSize(QtCore.QSize(16777215, 56))
|
self.items_list.setIconSize(QtCore.QSize(16777215, 56))
|
||||||
self.items_list.setObjectName("items_list")
|
self.items_list.setObjectName("items_list")
|
||||||
self.horizontalLayout_3.addWidget(self.items_list)
|
self.horizontalLayout_3.addWidget(self.items_list)
|
||||||
|
self.item_properties_lay = QtWidgets.QWidget(self.content_layout)
|
||||||
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
|
||||||
|
sizePolicy.setHorizontalStretch(0)
|
||||||
|
sizePolicy.setVerticalStretch(0)
|
||||||
|
sizePolicy.setHeightForWidth(self.item_properties_lay.sizePolicy().hasHeightForWidth())
|
||||||
|
self.item_properties_lay.setSizePolicy(sizePolicy)
|
||||||
|
self.item_properties_lay.setMinimumSize(QtCore.QSize(0, 0))
|
||||||
|
self.item_properties_lay.setMaximumSize(QtCore.QSize(0, 16777215))
|
||||||
|
self.item_properties_lay.setObjectName("item_properties_lay")
|
||||||
|
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.item_properties_lay)
|
||||||
|
self.verticalLayout_2.setContentsMargins(9, 0, 0, 0)
|
||||||
|
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||||
|
self.properties_image = QtWidgets.QLabel(self.item_properties_lay)
|
||||||
|
self.properties_image.setMinimumSize(QtCore.QSize(0, 0))
|
||||||
|
self.properties_image.setMaximumSize(QtCore.QSize(480, 270))
|
||||||
|
self.properties_image.setStyleSheet("")
|
||||||
|
self.properties_image.setText("")
|
||||||
|
self.properties_image.setScaledContents(True)
|
||||||
|
self.properties_image.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
|
self.properties_image.setObjectName("properties_image")
|
||||||
|
self.verticalLayout_2.addWidget(self.properties_image)
|
||||||
|
self.properties_name = QtWidgets.QLabel(self.item_properties_lay)
|
||||||
|
self.properties_name.setStyleSheet("font: 16pt \"Segoe UI\";")
|
||||||
|
self.properties_name.setObjectName("properties_name")
|
||||||
|
self.verticalLayout_2.addWidget(self.properties_name)
|
||||||
|
self.properties_price = QtWidgets.QLabel(self.item_properties_lay)
|
||||||
|
self.properties_price.setObjectName("properties_price")
|
||||||
|
self.verticalLayout_2.addWidget(self.properties_price)
|
||||||
|
self.properties_class_type = QtWidgets.QLabel(self.item_properties_lay)
|
||||||
|
self.properties_class_type.setObjectName("properties_class_type")
|
||||||
|
self.verticalLayout_2.addWidget(self.properties_class_type)
|
||||||
|
self.properties_shop = QtWidgets.QLabel(self.item_properties_lay)
|
||||||
|
self.properties_shop.setObjectName("properties_shop")
|
||||||
|
self.verticalLayout_2.addWidget(self.properties_shop)
|
||||||
|
spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||||
|
self.verticalLayout_2.addItem(spacerItem2)
|
||||||
|
self.own_items_buttons = QtWidgets.QWidget(self.item_properties_lay)
|
||||||
|
self.own_items_buttons.setObjectName("own_items_buttons")
|
||||||
|
self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.own_items_buttons)
|
||||||
|
self.horizontalLayout_4.setContentsMargins(0, 0, 0, 0)
|
||||||
|
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
|
||||||
|
self.own_button = QtWidgets.QPushButton(self.own_items_buttons)
|
||||||
|
self.own_button.setMinimumSize(QtCore.QSize(0, 30))
|
||||||
|
self.own_button.setObjectName("own_button")
|
||||||
|
self.horizontalLayout_4.addWidget(self.own_button)
|
||||||
|
self.delete_item_button = QtWidgets.QPushButton(self.own_items_buttons)
|
||||||
|
self.delete_item_button.setMinimumSize(QtCore.QSize(0, 30))
|
||||||
|
self.delete_item_button.setObjectName("delete_item_button")
|
||||||
|
self.horizontalLayout_4.addWidget(self.delete_item_button)
|
||||||
|
self.verticalLayout_2.addWidget(self.own_items_buttons)
|
||||||
|
self.horizontalLayout_3.addWidget(self.item_properties_lay)
|
||||||
self.verticalLayout.addWidget(self.content_layout)
|
self.verticalLayout.addWidget(self.content_layout)
|
||||||
self.content.addWidget(self.main_page)
|
self.content.addWidget(self.main_page)
|
||||||
self.add_page = QtWidgets.QWidget()
|
self.add_page = QtWidgets.QWidget()
|
||||||
@@ -120,6 +226,20 @@ class Ui_MainWindow(object):
|
|||||||
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><img src=\":/img/img/icon.ico\" /></p>\n"
|
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><img src=\":/img/img/icon.ico\" /></p>\n"
|
||||||
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:12pt;\">Press add button on top right corner to add item</span></p>\n"
|
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:12pt;\">Press add button on top right corner to add item</span></p>\n"
|
||||||
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:12pt;\">To use own options create profile on profile page</span></p></body></html>"))
|
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:12pt;\">To use own options create profile on profile page</span></p></body></html>"))
|
||||||
|
self.filter_class_label.setText(_translate("MainWindow", "Item class:"))
|
||||||
|
self.filter_type_label.setText(_translate("MainWindow", "Item type:"))
|
||||||
|
self.filter_shop_label.setText(_translate("MainWindow", "Shop:"))
|
||||||
|
self.filter_min_price_label.setText(_translate("MainWindow", "Min price:"))
|
||||||
|
self.filter_min_price_box.setPrefix(_translate("MainWindow", "$"))
|
||||||
|
self.filter_max_price_label.setText(_translate("MainWindow", "Max price:"))
|
||||||
|
self.filter_max_price_box.setPrefix(_translate("MainWindow", "$"))
|
||||||
|
self.filters_apply_button.setText(_translate("MainWindow", "Apply filters"))
|
||||||
|
self.properties_name.setText(_translate("MainWindow", "item_name"))
|
||||||
|
self.properties_price.setText(_translate("MainWindow", "item_price"))
|
||||||
|
self.properties_class_type.setText(_translate("MainWindow", "item_class - item_type"))
|
||||||
|
self.properties_shop.setText(_translate("MainWindow", "item_shop"))
|
||||||
|
self.own_button.setText(_translate("MainWindow", "Mark this item as owned"))
|
||||||
|
self.delete_item_button.setText(_translate("MainWindow", "Delete this item"))
|
||||||
import gui.images_rc
|
import gui.images_rc
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
319
gui/gui.ui
319
gui/gui.ui
@@ -7,9 +7,15 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>800</width>
|
<width>800</width>
|
||||||
<height>435</height>
|
<height>489</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>GTABuyBase</string>
|
<string>GTABuyBase</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -241,7 +247,27 @@ QTabBar::tab:left:only-one, QTabBar::tab:right:only-one
|
|||||||
{
|
{
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
</string>
|
|
||||||
|
QSpinBox,
|
||||||
|
QSpinBox:editable,
|
||||||
|
QSpinBox:hover,
|
||||||
|
QSpinBox:pressed {
|
||||||
|
border-width: 1px;
|
||||||
|
border-radius: 5px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #303030;
|
||||||
|
background-color: #242424;
|
||||||
|
font: 10pt "Segoe UI";
|
||||||
|
}
|
||||||
|
|
||||||
|
QSpinBox::up-button {
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
QSpinBox::down-button {
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
}</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
@@ -426,6 +452,9 @@ QTabBar::tab:left:only-one, QTabBar::tab:right:only-one
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="content_layout" native="true">
|
<widget class="QWidget" name="content_layout" native="true">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
@@ -442,7 +471,7 @@ QTabBar::tab:left:only-one, QTabBar::tab:right:only-one
|
|||||||
<widget class="QTextBrowser" name="logo_if_empty">
|
<widget class="QTextBrowser" name="logo_if_empty">
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>0</width>
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@@ -461,6 +490,138 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="filter_lay" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="filter_class_label">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Item class:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item alignment="Qt::AlignTop">
|
||||||
|
<widget class="QComboBox" name="filter_class_box"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="filter_type_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Item type:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="filter_type_box"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="filter_shop_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Shop:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="filter_shop_box"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="filter_min_price_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Min price:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="filter_min_price_box">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="prefix">
|
||||||
|
<string>$</string>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>10000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="filter_max_price_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Max price:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="filter_max_price_box">
|
||||||
|
<property name="prefix">
|
||||||
|
<string>$</string>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>10000000</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>10000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="filters_apply_button">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Apply filters</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QListWidget" name="items_list">
|
<widget class="QListWidget" name="items_list">
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
@@ -483,6 +644,158 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="item_properties_lay" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="properties_image">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>480</width>
|
||||||
|
<height>270</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="properties_name">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font: 16pt "Segoe UI";</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>item_name</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="properties_price">
|
||||||
|
<property name="text">
|
||||||
|
<string>item_price</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="properties_class_type">
|
||||||
|
<property name="text">
|
||||||
|
<string>item_class - item_type</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="properties_shop">
|
||||||
|
<property name="text">
|
||||||
|
<string>item_shop</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="own_items_buttons" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="own_button">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Mark this item as owned</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="delete_item_button">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Delete this item</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
0
gui/modules/core/__init__.py
Normal file
0
gui/modules/core/__init__.py
Normal file
0
gui/modules/handlers/__init__.py
Normal file
0
gui/modules/handlers/__init__.py
Normal file
36
gui/modules/handlers/fill_info.py
Normal file
36
gui/modules/handlers/fill_info.py
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
import requests
|
||||||
|
from PyQt5 import QtWidgets, QtGui, QtCore
|
||||||
|
from gui.gui import Ui_MainWindow
|
||||||
|
from modules.database import Database
|
||||||
|
|
||||||
|
|
||||||
|
def on_item_click(ui: Ui_MainWindow, mode: str):
|
||||||
|
item = Database.get().items[
|
||||||
|
ui.items_list.currentItem().text().removesuffix(' - ' + ui.items_list.currentItem().text().split(' - ')[-1])
|
||||||
|
]
|
||||||
|
|
||||||
|
pixmap = QtGui.QPixmap()
|
||||||
|
pixmap.loadFromData(requests.get(item.image).content)
|
||||||
|
ui.properties_image.setPixmap(pixmap)
|
||||||
|
|
||||||
|
ui.properties_name.setText(item.item_name)
|
||||||
|
ui.properties_price.setText(f'${"{:,}".format(item.price)}')
|
||||||
|
ui.properties_class_type.setText(f'{item.item_class} - {item.item_type}')
|
||||||
|
ui.properties_shop.setText(item.shop)
|
||||||
|
|
||||||
|
width = ui.item_properties_lay.geometry().width()
|
||||||
|
Ui_MainWindow.animation = QtCore.QPropertyAnimation(ui.item_properties_lay, b"minimumWidth")
|
||||||
|
Ui_MainWindow.animation.setDuration(300)
|
||||||
|
|
||||||
|
if width == 0:
|
||||||
|
Ui_MainWindow.animation.setStartValue(0)
|
||||||
|
Ui_MainWindow.animation.setEndValue(480)
|
||||||
|
|
||||||
|
Ui_MainWindow.animation.setEasingCurve(QtCore.QEasingCurve.InOutQuart)
|
||||||
|
Ui_MainWindow.animation.start()
|
||||||
|
elif mode == 'close':
|
||||||
|
Ui_MainWindow.animation.setStartValue(width)
|
||||||
|
Ui_MainWindow.animation.setEndValue(0)
|
||||||
|
|
||||||
|
Ui_MainWindow.animation.setEasingCurve(QtCore.QEasingCurve.InOutQuart)
|
||||||
|
Ui_MainWindow.animation.start()
|
||||||
0
gui/modules/handlers/on_item_remove.py
Normal file
0
gui/modules/handlers/on_item_remove.py
Normal file
7
gui/modules/handlers/register.py
Normal file
7
gui/modules/handlers/register.py
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
from gui.gui import Ui_MainWindow
|
||||||
|
from gui.modules.handlers import fill_info
|
||||||
|
|
||||||
|
|
||||||
|
def register_handlers(ui: Ui_MainWindow):
|
||||||
|
ui.items_list.currentItemChanged.connect(lambda: fill_info.on_item_click(ui, 'open'))
|
||||||
|
ui.items_list.itemDoubleClicked.connect(lambda: fill_info.on_item_click(ui, 'close'))
|
||||||
0
gui/modules/initialize/__init__.py
Normal file
0
gui/modules/initialize/__init__.py
Normal file
@@ -1,7 +1,7 @@
|
|||||||
import requests
|
import requests
|
||||||
from gui.gui import Ui_MainWindow
|
from gui.gui import Ui_MainWindow
|
||||||
from .blur import GlobalBlur
|
from gui.modules.core.blur import GlobalBlur
|
||||||
from gui.modules import styles
|
from gui.modules.initialize import styles
|
||||||
from PyQt5 import QtWidgets, QtGui
|
from PyQt5 import QtWidgets, QtGui
|
||||||
from PyQt5.QtWidgets import QMainWindow
|
from PyQt5.QtWidgets import QMainWindow
|
||||||
from modules.config import Config
|
from modules.config import Config
|
||||||
@@ -263,6 +263,23 @@ QTabBar::tab:left:only-one, QTabBar::tab:right:only-one
|
|||||||
{
|
{
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QSpinBox {
|
||||||
|
border-width: 1px;
|
||||||
|
border-radius: 5px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: rgba(48, 48, 48);
|
||||||
|
background-color: rgba(36, 36, 36, 0);
|
||||||
|
font: 10pt "Segoe UI";
|
||||||
|
}
|
||||||
|
QSpinBox::up-button {
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
QSpinBox::down-button {
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
menupage_b = """
|
menupage_b = """
|
||||||
@@ -511,6 +528,23 @@ QTabBar::tab:left:only-one, QTabBar::tab:right:only-one
|
|||||||
{
|
{
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QSpinBox {
|
||||||
|
border-width: 1px;
|
||||||
|
border-radius: 5px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #303030;
|
||||||
|
background-color: #242424;
|
||||||
|
font: 10pt "Segoe UI";
|
||||||
|
}
|
||||||
|
QSpinBox::up-button {
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
QSpinBox::down-button {
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
menupage_g = """
|
menupage_g = """
|
||||||
Reference in New Issue
Block a user