2016-05-17 03:04:11 +12:00
|
|
|
#pragma once
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
#ifndef STYLE_DATA_INCLUDED
|
|
|
|
#define STYLE_DATA_INCLUDED
|
|
|
|
|
|
|
|
#include "toonzqt/dvmimedata.h"
|
|
|
|
#include "tpalette.h"
|
|
|
|
#include <set>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class TColorStyle;
|
|
|
|
|
|
|
|
//=============================================================================
|
|
|
|
// StyleData
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2016-06-29 18:17:12 +12:00
|
|
|
class StyleData final : public DvMimeData {
|
2016-06-15 18:43:10 +12:00
|
|
|
std::vector<std::pair<int, TColorStyle *>> m_styles;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
public:
|
2016-06-15 18:43:10 +12:00
|
|
|
StyleData();
|
|
|
|
~StyleData();
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-19 20:06:29 +12:00
|
|
|
StyleData *clone() const override;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
void addStyle(int styleIndex, TColorStyle *style); // gets ownership
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
int getStyleCount() const { return (int)m_styles.size(); }
|
|
|
|
TColorStyle *getStyle(int index) const;
|
|
|
|
int getStyleIndex(int index) const;
|
2016-03-19 06:57:51 +13:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|