2017-12-31 02:43:56 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
2021-04-15 22:52:40 +02:00
|
|
|
#include "movie_item.h"
|
2017-12-31 02:43:56 +01:00
|
|
|
|
2021-04-15 22:52:40 +02:00
|
|
|
class custom_table_widget_item : public movie_item
|
2017-12-31 02:43:56 +01:00
|
|
|
{
|
2018-04-07 19:52:42 +02:00
|
|
|
private:
|
|
|
|
|
int m_sort_role = Qt::DisplayRole;
|
|
|
|
|
|
2017-12-31 02:43:56 +01:00
|
|
|
public:
|
2020-04-11 22:15:35 +02:00
|
|
|
using QTableWidgetItem::setData;
|
|
|
|
|
|
2021-04-07 23:05:18 +02:00
|
|
|
custom_table_widget_item() = default;
|
2021-01-07 20:00:48 +01:00
|
|
|
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);
|
2018-05-02 17:22:21 +02:00
|
|
|
|
2021-02-15 16:45:54 +01:00
|
|
|
bool operator<(const QTableWidgetItem& other) const override;
|
2018-05-02 17:22:21 +02:00
|
|
|
|
2021-01-07 20:00:48 +01:00
|
|
|
void setData(int role, const QVariant& value, bool assign_sort_role);
|
2017-12-31 02:43:56 +01:00
|
|
|
};
|