Добавил:
nyan
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:4 курс - Трояновский / ПИУС / ПЦР / ПЦР-2005 / Drawer_1 / DSeries2
.h//---------------------------------------------------------------------------
#ifndef DSeries2H
#define DSeries2H
//---------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
//---------------------------------------------------------------------------
#include <vector>
using namespace std;
class TDSeries2
{
public:
typedef enum{typeContinuous, typeDiscontinuous} SeriesType;
private:
vector<TPaintBox *> targets;
protected:
int nMaxData;
double fMaxY;
vector<double> data;
AnsiString caption;
int nScale;
int nLimit;
SeriesType type;
void __fastcall Paint(TObject *pSender);
public:
__fastcall TDSeries2();
__property double MaxY = {read = fMaxY, write = fMaxY};
__property int MaxData = {read = nMaxData, write = nMaxData};
int MarkStart, MarkEnd;
void Bind(TPaintBox *pTarget);
void SetSize(int nSize){ data.resize(nSize); }
int GetSize(){ return data.size(); }
void SetData(const vector<double>& dta){ data = dta; }
const vector<double>& GetData(){ return data; }
double & operator[](int n){ return data[n]; }
void Update();
void SetCaption(AnsiString &str){ caption = str; }
void SetScale(int n){ nScale = n; }
void SetType(SeriesType t){ type = t; }
void SetLimit(int n){ nLimit = n; }
};
//---------------------------------------------------------------------------
#endif
Соседние файлы в папке Drawer_1