2011-08-25 06:11:44 +00:00
|
|
|
/*
|
2011-06-26 08:30:44 +00:00
|
|
|
gXAxis Header
|
|
|
|
Copyright (c)2011 Mark Watkins <jedimark@users.sourceforge.net>
|
|
|
|
License: GPL
|
2011-08-25 06:11:44 +00:00
|
|
|
*/
|
2011-06-26 08:30:44 +00:00
|
|
|
|
|
|
|
#ifndef GXAXIS_H
|
|
|
|
#define GXAXIS_H
|
2011-08-25 06:11:44 +00:00
|
|
|
#include "gGraphView.h"
|
2011-06-26 08:30:44 +00:00
|
|
|
|
2011-08-25 06:11:44 +00:00
|
|
|
class gXAxis:public Layer
|
2011-06-26 08:30:44 +00:00
|
|
|
{
|
|
|
|
public:
|
2011-08-26 08:18:14 +00:00
|
|
|
gXAxis(QColor col=QColor("black"),bool fadeout=true);
|
2011-06-26 08:30:44 +00:00
|
|
|
virtual ~gXAxis();
|
2011-08-25 06:11:44 +00:00
|
|
|
virtual void paint(gGraph & w,int left,int top, int width, int height);
|
2011-06-28 09:19:35 +00:00
|
|
|
static const int Margin=25; // How much room does this take up. (Bottom margin)
|
2011-07-11 04:54:53 +00:00
|
|
|
void SetShowMinorLines(bool b) { m_show_minor_lines=b; }
|
|
|
|
void SetShowMajorLines(bool b) { m_show_major_lines=b; }
|
|
|
|
bool ShowMinorLines() { return m_show_minor_lines; }
|
|
|
|
bool ShowMajorLines() { return m_show_major_lines; }
|
|
|
|
void SetShowMinorTicks(bool b) { m_show_minor_ticks=b; }
|
|
|
|
void SetShowMajorTicks(bool b) { m_show_major_ticks=b; }
|
|
|
|
bool ShowMinorTicks() { return m_show_minor_ticks; }
|
|
|
|
bool ShowMajorTicks() { return m_show_major_ticks; }
|
2011-09-03 01:24:11 +00:00
|
|
|
void setUtcFix(bool b) { m_utcfix=b; }
|
2011-09-13 02:51:50 +00:00
|
|
|
|
2011-06-26 08:30:44 +00:00
|
|
|
protected:
|
|
|
|
// virtual const wxString & Format(double v) { static wxString t; wxDateTime d; d.Set(v); t=d.Format(wxT("%H:%M")); return t; };
|
|
|
|
bool m_show_major_lines;
|
|
|
|
bool m_show_minor_lines;
|
|
|
|
bool m_show_minor_ticks;
|
|
|
|
bool m_show_major_ticks;
|
|
|
|
|
2011-09-03 01:24:11 +00:00
|
|
|
bool m_utcfix;
|
2011-08-26 08:18:14 +00:00
|
|
|
|
2011-08-02 04:20:26 +00:00
|
|
|
QColor m_line_color;
|
|
|
|
QColor m_text_color;
|
|
|
|
QColor m_major_color;
|
|
|
|
QColor m_minor_color;
|
2011-08-26 08:18:14 +00:00
|
|
|
bool m_fadeout;
|
2011-08-06 08:34:24 +00:00
|
|
|
qint64 tz_offset;
|
2011-06-26 08:30:44 +00:00
|
|
|
};
|
|
|
|
#endif // GXAXIS_H
|