build: update parfait spec with a parfait-agent package
[pcp.git] / src / pmview / modobj.h
blob0d65f4b0d6ac42edd2bab1db6c4611f2467ca8c1
1 /*
2 * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
3 * Copyright (c) 2009 Aconex. All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
15 #ifndef _MODOBJ_H_
16 #define _MODOBJ_H_
18 #include "baseobj.h"
20 class ModObj : public BaseObj
22 public:
23 ModObj(bool onFlag,
24 const DefaultObj &defaults,
25 int x, int y,
26 int cols = 1, int rows = 1,
27 BaseObj::Alignment align = BaseObj::center)
28 : BaseObj (onFlag, defaults, x, y, cols, rows, align)
29 , _history(0)
30 , _colors()
31 , _metrics ()
32 { _objtype |= MODOBJ; }
34 void setColorList(const char *list) { _colors = list; }
35 void addMetric(const char * m, double s) { _metrics.add(m, s, _history); }
36 void setHistory(int history) { _history = history; }
38 protected:
39 int _history;
40 QString _colors;
41 MetricList _metrics;
43 #endif