[nostalgia/core/studio] Cleanup pixel data QML exposure
This commit is contained in:
@@ -26,20 +26,20 @@ class SheetData: public QObject {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(int columns READ columns WRITE setColumns NOTIFY columnsChanged)
|
||||
Q_PROPERTY(int rows READ rows WRITE setRows NOTIFY rowsChanged)
|
||||
Q_PROPERTY(QVector<int> pixels READ pixels NOTIFY pixelsChanged)
|
||||
Q_PROPERTY(QStringList palette READ palette NOTIFY paletteChanged)
|
||||
|
||||
private:
|
||||
QQuickItem *m_prevPixelUpdated = nullptr;
|
||||
uint64_t m_cmdIdx = 0;
|
||||
QUndoStack m_cmdStack;
|
||||
QStringList m_palette;
|
||||
QVector<uint8_t> m_pixels;
|
||||
QVector<int> m_pixels;
|
||||
int m_columns = 2;
|
||||
int m_rows = 2;
|
||||
int m_selectedColor = 0;
|
||||
|
||||
public:
|
||||
Q_INVOKABLE QString pixel(int index);
|
||||
|
||||
Q_INVOKABLE void updatePixel(QVariant pixel);
|
||||
|
||||
Q_INVOKABLE void beginCmd();
|
||||
@@ -54,6 +54,8 @@ class SheetData: public QObject {
|
||||
|
||||
void setRows(int rows);
|
||||
|
||||
const QVector<int> &pixels();
|
||||
|
||||
QStringList palette();
|
||||
|
||||
void updatePixels(const studio::Context *ctx, QString ngPath, QString palPath = "");
|
||||
@@ -70,6 +72,10 @@ class SheetData: public QObject {
|
||||
|
||||
void rowsChanged();
|
||||
|
||||
void pixelsChanged();
|
||||
|
||||
void paletteChanged();
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user