Qwt User's Guide: qwt_plot_scaleitem.h Source File

- Main Page
- Classes
- Files
- Related Pages

- File List
- File Members

# qwt_plot_scaleitem.h

    00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
    00002  * Qwt Widget Library
    00003  * Copyright (C) 1997   Josef Wilgen
    00004  * Copyright (C) 2002   Uwe Rathmann
    00005  *
    00006  * This library is free software; you can redistribute it and/or
    00007  * modify it under the terms of the Qwt License, Version 1.0
    00008  *****************************************************************************/
    00009
    00010 #ifndef QWT_PLOT_SCALE_ITEM_H
    00011 #define QWT_PLOT_SCALE_ITEM_H
    00012
    00013 #include "qwt_global.h"
    00014 #include "qwt_plot_item.h"
    00015 #include "qwt_scale_draw.h"
    00016
    00017 #if QT_VERSION < 0x040000
    00018 class QColorGroup;
    00019 #else
    00020 class QPalette;
    00021 #endif
    00022
    00051 class QWT_EXPORT QwtPlotScaleItem: public QwtPlotItem
    00052 {
    00053 public:
    00054     explicit QwtPlotScaleItem(
    00055         QwtScaleDraw::Alignment = QwtScaleDraw::BottomScale,
    00056         const double pos = 0.0);
    00057     virtual ~QwtPlotScaleItem();
    00058
    00059     virtual int rtti() const;
    00060
    00061     void setScaleDiv(const QwtScaleDiv& );
    00062     const QwtScaleDiv& scaleDiv() const;
    00063
    00064     void setScaleDivFromAxis(bool on);
    00065     bool isScaleDivFromAxis() const;
    00066
    00067 #if QT_VERSION < 0x040000
    00068     void setColorGroup(const QColorGroup &);
    00069     QColorGroup colorGroup() const;
    00070 #else
    00071     void setPalette(const QPalette &);
    00072     QPalette palette() const;
    00073 #endif
    00074
    00075     void setFont(const QFont&);
    00076     QFont font() const;
    00077
    00078     void setScaleDraw(QwtScaleDraw *);
    00079
    00080     const QwtScaleDraw *scaleDraw() const;
    00081     QwtScaleDraw *scaleDraw();
    00082
    00083     void setPosition(double pos);
    00084     double position() const;
    00085
    00086     void setBorderDistance(int numPixels);
    00087     int borderDistance() const;
    00088
    00089     void setAlignment(QwtScaleDraw::Alignment);
    00090
    00091     virtual void draw(QPainter *p,
    00092         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
    00093         const QRect &rect) const;
    00094
    00095     virtual void updateScaleDiv(const QwtScaleDiv&,
    00096         const QwtScaleDiv&);
    00097
    00098 private:
    00099     void updateBorders();
    00100
    00101     class PrivateData;
    00102     PrivateData *d_data;
    00103 };
    00104
    00105 #endif