Blame toonz/sources/toonzqt/palettedata.cpp
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "palettedata.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tpalette.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//=============================================================================
|
|
Toshihiro Shimizu |
890ddd |
// PaletteData
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
PaletteData *PaletteData::clone() const {
|
|
Shinya Kitaoka |
120a6e |
PaletteData *data = new PaletteData();
|
|
Shinya Kitaoka |
120a6e |
data->setPaletteData(m_palette, m_pageIndex, m_styleIndicesInPage);
|
|
Shinya Kitaoka |
120a6e |
return data;
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
void PaletteData::setPaletteData(TPalette *palette, int pageIndex,
|
|
Shinya Kitaoka |
120a6e |
std::set<int> styleIndicesInPage) {</int>
|
|
Shinya Kitaoka |
120a6e |
m_palette = palette;
|
|
Shinya Kitaoka |
120a6e |
m_pageIndex = pageIndex;
|
|
Shinya Kitaoka |
120a6e |
m_styleIndicesInPage = styleIndicesInPage;
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void PaletteData::setPalette(TPalette *palette) {
|
|
Shinya Kitaoka |
120a6e |
m_palette = palette;
|
|
Shinya Kitaoka |
120a6e |
m_pageIndex = -1;
|
|
Shinya Kitaoka |
120a6e |
m_styleIndicesInPage.clear();
|
|
Toshihiro Shimizu |
890ddd |
}
|