Contains utility functions for working with map scales.  
 More...
#include <qgsscaleutils.h>
 | 
| static bool  | equalToOrGreaterThanMinimumScale (const double scale, const double minScale) | 
|   | Returns whether the scale is equal to or greater than the minScale, taking non-round numbers into account.  
  | 
|   | 
| static bool  | lessThanMaximumScale (const double scale, const double maxScale) | 
|   | Returns whether the scale is less than the maxScale, taking non-round numbers into account.  
  | 
|   | 
| static bool  | loadScaleList (const QString &fileName, QStringList &scales, QString &errorMessage) | 
|   | Load scales from the given file.  
  | 
|   | 
| static bool  | saveScaleList (const QString &fileName, const QStringList &scales, QString &errorMessage) | 
|   | Save scales to the given file.  
  | 
|   | 
Contains utility functions for working with map scales. 
Definition at line 28 of file qgsscaleutils.h.
 
◆ equalToOrGreaterThanMinimumScale()
  
  
      
        
          | bool QgsScaleUtils::equalToOrGreaterThanMinimumScale  | 
          ( | 
          const double  | 
          scale,  | 
         
        
           | 
           | 
          const double  | 
          minScale  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Returns whether the scale is equal to or greater than the minScale, taking non-round numbers into account. 
- Parameters
 - 
  
    | scale | The current scale to be compared.  | 
    | minScale | The minimum map scale (i.e. most "zoomed out" scale) at which features, labels or diagrams will be visible. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.  | 
  
   
- See also
 - lessThanMaximumScale()
 
- Since
 - QGIS 3.40 
 
Definition at line 89 of file qgsscaleutils.cpp.
 
 
◆ lessThanMaximumScale()
  
  
      
        
          | bool QgsScaleUtils::lessThanMaximumScale  | 
          ( | 
          const double  | 
          scale,  | 
         
        
           | 
           | 
          const double  | 
          maxScale  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Returns whether the scale is less than the maxScale, taking non-round numbers into account. 
- Parameters
 - 
  
    | scale | The current scale to be compared.  | 
    | maxScale | The maximum map scale (i.e. most "zoomed in" scale) at which features, labels or diagrams will be visible. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.  | 
  
   
- See also
 - equalToOrGreaterThanMinimumScale()
 
- Since
 - QGIS 3.40 
 
Definition at line 94 of file qgsscaleutils.cpp.
 
 
◆ loadScaleList()
  
  
      
        
          | bool QgsScaleUtils::loadScaleList  | 
          ( | 
          const QString &  | 
          fileName,  | 
         
        
           | 
           | 
          QStringList &  | 
          scales,  | 
         
        
           | 
           | 
          QString &  | 
          errorMessage  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Load scales from the given file. 
- Parameters
 - 
  
    | fileName | the name of the file to process  | 
    | scales | it will contain loaded scales  | 
    | errorMessage | it will contain the error message if something went wrong  | 
  
   
- Returns
 true on success and false if failed 
Definition at line 49 of file qgsscaleutils.cpp.
 
 
◆ saveScaleList()
  
  
      
        
          | bool QgsScaleUtils::saveScaleList  | 
          ( | 
          const QString &  | 
          fileName,  | 
         
        
           | 
           | 
          const QStringList &  | 
          scales,  | 
         
        
           | 
           | 
          QString &  | 
          errorMessage  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Save scales to the given file. 
- Parameters
 - 
  
    | fileName | the name of the output file  | 
    | scales | the list of scales to save  | 
    | errorMessage | it will contain the error message if something went wrong  | 
  
   
- Returns
 true on success and false if failed 
Definition at line 23 of file qgsscaleutils.cpp.
 
 
The documentation for this class was generated from the following files: