#pragma once
#include "FractoriumPch.h"
///
/// PaletteTableWidgetItem class.
///
///
/// A thin derivation of QTableWidgetItem which keeps a pointer to a palette object.
/// The lifetime of the palette object must be greater than or equal to
/// the lifetime of this object.
///
class PaletteTableWidgetItem : public QTableWidgetItem
{
public:
PaletteTableWidgetItem(Palette* palette)
: m_Palette(palette)
{
}
size_t Index() const { return m_Palette->m_Index; }
Palette* GetPalette() const { return m_Palette; }
private:
Palette* m_Palette;
};