rpcsx/rpcs3/rpcs3qt/game_list_grid_delegate.h
Megamouse a3d1f7b7b0 Grid Mode + Tool Bar (#2857)
* Grid layout

* Add Tiny Mode
fix scrolling
fix maxGamesPerRow calculation

* prime empty toolbar

* Add Search Bar, Icon Size and List Mode to ToolBar
Fix some minor glitches

* fix toolbar save and adjust default margin

* fix toolbar regression
minor simplification in Refresh

* Implement search and rename PopulateUI to PopulateGameList

* minor refactoring hehehehehehe

* Fix crash

* refresh speedboost optimizations

* Small refactoring of refresh to have default argument of false.

* add icons to toolbar

* fix scrambed order

* search for serial as well
2017-06-11 15:07:00 +01:00

23 lines
682 B
C++

#ifndef GAME_LIST_GRID_DELEGATE
#define GAME_LIST_GRID_DELEGATE
#include <QPainter>
#include <QAbstractItemDelegate>
class game_list_grid_delegate : public QAbstractItemDelegate
{
public:
game_list_grid_delegate(const QSize& imageSize, const qreal& margin_factor, const qreal& margin_ratio, QObject *parent = 0);
void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const;
QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const;
void setItemSize(const QSize& size) { m_size = size; };
virtual ~game_list_grid_delegate();
private:
QSize m_size;
qreal m_margin_factor;
qreal m_text_factor;
};
#endif