tahoma2d/toonz/sources/toonzqt/styledata.h

34 lines
756 B
C
Raw Normal View History

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
//-----------------------------------------------------------------------------
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