mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-27 12:56:18 +00:00
47 lines
1.1 KiB
C++
47 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "game_list_table.h"
|
|
#include "shadps4gui.h"
|
|
|
|
#include <QHeaderView>
|
|
#include <QScrollbar>
|
|
#include <QWidget>
|
|
|
|
class game_list_frame : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public :
|
|
explicit game_list_frame(std::shared_ptr<gui_settings> gui_settings,QWidget* parent = nullptr);
|
|
~game_list_frame();
|
|
/** Fix columns with width smaller than the minimal section size */
|
|
void FixNarrowColumns() const;
|
|
|
|
/** Loads from settings. Public so that main frame can easily reset these settings if needed. */
|
|
void LoadSettings();
|
|
|
|
/** Saves settings. Public so that main frame can save this when a caching of column widths is needed for settings backup */
|
|
void SaveSettings();
|
|
|
|
/** Resizes the columns to their contents and adds a small spacing */
|
|
void ResizeColumnsToContents(int spacing = 20) const;
|
|
|
|
private Q_SLOTS:
|
|
void OnHeaderColumnClicked(int col);
|
|
private:
|
|
void SortGameList() const;
|
|
|
|
// Game List
|
|
game_list_table* m_game_list = nullptr;
|
|
QList<QAction*> m_columnActs;
|
|
Qt::SortOrder m_col_sort_order;
|
|
int m_sort_column;
|
|
|
|
// data
|
|
std::shared_ptr<gui_settings> m_gui_settings;
|
|
QList<game_info> m_game_data;
|
|
|
|
// Icons
|
|
QSize m_icon_size;
|
|
|
|
};
|
|
|