OSCAR-code/Graphs/gFlagsLine.h

48 lines
1.3 KiB
C
Raw Normal View History

2011-06-26 08:30:44 +00:00
/********************************************************************
gFlagsLine Header
Copyright (c)2011 Mark Watkins <jedimark@users.sourceforge.net>
License: GPL
*********************************************************************/
#ifndef GFLAGSLINE_H
#define GFLAGSLINE_H
#include "graphlayer.h"
class gFlagsGroup;
2011-06-26 08:30:44 +00:00
class gFlagsLine:public gLayer
{
friend class gFlagsGroup;
2011-06-26 08:30:44 +00:00
public:
gFlagsLine(MachineCode code,QColor col=Qt::black,QString label="",bool always_visible=false,FlagType flt=FT_Bar);
2011-06-26 08:30:44 +00:00
virtual ~gFlagsLine();
virtual void Plot(gGraphWindow & w,float scrx,float scry);
2011-07-20 16:01:31 +00:00
bool isAlwaysVisible() { return m_always_visible; }
void setAlwaysVisible(bool b) { m_always_visible=b; }
QString label() { return m_label; }
void setLabel(QString s) { m_label=s; }
2011-07-27 09:21:53 +00:00
void setTotalLines(int i) { total_lines=i; }
void setLineNum(int i) { line_num=i; }
2011-06-26 08:30:44 +00:00
protected:
QString m_label;
2011-07-20 16:01:31 +00:00
bool m_always_visible;
2011-07-24 17:50:27 +00:00
int total_lines,line_num;
FlagType m_flt;
2011-06-26 08:30:44 +00:00
};
class gFlagsGroup:public gLayerGroup
{
public:
gFlagsGroup();
virtual ~gFlagsGroup();
virtual void Plot(gGraphWindow &w, float scrx, float scry);
2011-07-27 09:21:53 +00:00
virtual qint64 Minx();
virtual qint64 Maxx();
};
2011-06-26 08:30:44 +00:00
#endif // GFLAGSLINE_H