Quantum GIS API Documentation  1.7.4
src/core/composer/qgsnumericscalebarstyle.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                             qgsnumericscalebarstyle.h
00003                             ---------------------------
00004     begin                : June 2008
00005     copyright            : (C) 2008 by Marco Hugentobler
00006     email                : marco.hugentobler@karto.baug.ethz.ch
00007  ***************************************************************************/
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 
00017 #ifndef QGSNUMERICSCALEBARSTYLE_H
00018 #define QGSNUMERICSCALEBARSTYLE_H
00019 
00020 #include "qgsscalebarstyle.h"
00021 
00025 class CORE_EXPORT QgsNumericScaleBarStyle: public QgsScaleBarStyle
00026 {
00027   public:
00028     QgsNumericScaleBarStyle( QgsComposerScaleBar* bar );
00029     ~QgsNumericScaleBarStyle();
00030 
00031     QString name() const;
00032 
00033     void draw( QPainter* p, double xOffset = 0 ) const;
00034 
00035     //calculation of box size is different compared to segment based scale bars
00036     QRectF calculateBoxSize() const;
00037 
00038   private:
00039     QgsNumericScaleBarStyle(); //forbidden
00041     QString scaleText() const;
00042 };
00043 
00044 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines