f6396f488a
Important changes: * Refactored QtRequests to accept parameters for `GET` operations * Infer response data type from content-type header * Support caching to disk, a manager with this set prefers the cache * Support multiple handlers for a single request (unused, possibly pointeless) * Subclass `ShopImageWidget` for all widgets used in the shop * Request a resized image instead of the original one * Fix the search and browse functions
38 lines
932 B
Python
38 lines
932 B
Python
import sys
|
|
|
|
from PyQt5.QtCore import QSize
|
|
from PyQt5.QtWidgets import QDialog, QApplication, QVBoxLayout
|
|
from legendary.core import LegendaryCore
|
|
|
|
from . import StoreTab
|
|
|
|
|
|
class StoreWindow(QDialog):
|
|
def __init__(self):
|
|
super().__init__()
|
|
|
|
self.core = LegendaryCore()
|
|
self.core.login()
|
|
self.store_tab = StoreTab(self.core, self)
|
|
|
|
layout = QVBoxLayout(self)
|
|
layout.addWidget(self.store_tab)
|
|
|
|
self.store_tab.load()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
from rare.utils.misc import set_style_sheet
|
|
import rare.resources.static_css
|
|
import rare.resources.stylesheets.RareStyle
|
|
|
|
app = QApplication(sys.argv)
|
|
app.setApplicationName("Rare")
|
|
app.setOrganizationName("Rare")
|
|
|
|
set_style_sheet("RareStyle")
|
|
window = StoreWindow()
|
|
window.setWindowTitle(f"{app.applicationName()} - Store")
|
|
window.resize(QSize(1280, 800))
|
|
window.show()
|
|
app.exec() |