mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-02-04 06:44:25 +01:00
Apparently Qt wants us to implement each comparison on our own, and there is no simple replacement for this.
21 lines
581 B
C++
21 lines
581 B
C++
#pragma once
|
|
|
|
#include <QTableWidgetItem>
|
|
|
|
class custom_table_widget_item : public QTableWidgetItem
|
|
{
|
|
private:
|
|
int m_sort_role = Qt::DisplayRole;
|
|
|
|
public:
|
|
using QTableWidgetItem::setData;
|
|
|
|
custom_table_widget_item(){}
|
|
custom_table_widget_item(const std::string& text, int sort_role = Qt::DisplayRole, const QVariant& sort_value = 0);
|
|
custom_table_widget_item(const QString& text, int sort_role = Qt::DisplayRole, const QVariant& sort_value = 0);
|
|
|
|
bool operator<(const QTableWidgetItem& other) const;
|
|
|
|
void setData(int role, const QVariant& value, bool assign_sort_role);
|
|
};
|