mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-02-02 13:54:35 +01:00
This whole screenshot thing was really janky, as I added it in half a day or so. But this commit should make everything smooth. Sadly there is no real lazy loading yet (icons are loaded async, but indiscriminately).
32 lines
532 B
C++
32 lines
532 B
C++
#pragma once
|
|
|
|
#include <QWidget>
|
|
|
|
class flow_layout;
|
|
|
|
class flow_widget_item : public QWidget
|
|
{
|
|
public:
|
|
using QWidget::QWidget;
|
|
void paintEvent(QPaintEvent* event) override;
|
|
|
|
bool got_visible{};
|
|
std::function<void()> cb_on_first_visibility{};
|
|
};
|
|
|
|
class flow_widget : public QWidget
|
|
{
|
|
public:
|
|
flow_widget(QWidget* parent);
|
|
virtual ~flow_widget();
|
|
|
|
void add_widget(flow_widget_item* widget);
|
|
void clear();
|
|
|
|
QList<flow_widget_item*>& items();
|
|
|
|
private:
|
|
flow_layout* m_flow_layout{};
|
|
QList<flow_widget_item*> m_widgets{};
|
|
};
|