QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
qgsticksscalebarstyle.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsticksscalebarstyle.h
3  -----------------------------
4  begin : June 2008
5  copyright : (C) 2008 by Marco Hugentobler
6  email : marco.hugentobler@karto.baug.ethz.ch
7  ***************************************************************************/
8 /***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 
17 #ifndef QGSTICKSSCALEBARSTYLE_H
18 #define QGSTICKSSCALEBARSTYLE_H
19 
20 #include "qgsscalebarstyle.h"
21 
25 class CORE_EXPORT QgsTicksScaleBarStyle: public QgsScaleBarStyle
26 {
27  public:
29  {
32  TicksMiddle
33  };
34 
37 
38  QString name() const;
39 
44  void draw( QPainter* p, double xOffset = 0 ) const;
45 
46  void setTickPosition( TickPosition p ) {mTickPosition = p;}
47 
48  private:
49  QgsTicksScaleBarStyle(); //forbidden
50 
51  TickPosition mTickPosition;
52 };
53 
54 #endif
A scale bar item that can be added to a map composition.
Definition: qgscomposerscalebar.h:30
virtual QString name() const =0
A scale bar that draws segments using short ticks.
Definition: qgsticksscalebarstyle.h:25
TickPosition
Definition: qgsticksscalebarstyle.h:28
virtual void draw(QPainter *p, double xOffset=0) const =0
Draws the style.
Definition: qgsticksscalebarstyle.h:30
Abstraction of composer scale bar style.
Definition: qgsscalebarstyle.h:30
Definition: qgsticksscalebarstyle.h:31
void setTickPosition(TickPosition p)
Definition: qgsticksscalebarstyle.h:46