KOSMIndoorMap::MapCSSParser

Search for usage in LXR

KOSMIndoorMap::MapCSSParser Class Reference

#include <mapcssparser.h>

Public Types

enum  Error {
  NoError , SyntaxError , FileNotFoundError , FileIOError ,
  NetworkError
}
 

Public Member Functions

Error error () const
 
QString errorMessage () const
 
bool hasError () const
 
MapCSSStyle parse (const QString &fileName)
 
MapCSSStyle parse (const QUrl &url)
 
QUrl url () const
 

Detailed Description

MapCSS parser.

Definition at line 24 of file mapcssparser.h.

Member Enumeration Documentation

◆ Error

enum KOSMIndoorMap::MapCSSParser::Error

Definition at line 45 of file mapcssparser.h.

Constructor & Destructor Documentation

◆ MapCSSParser()

MapCSSParser::MapCSSParser ( )
explicit

Definition at line 68 of file mapcssparser.cpp.

Member Function Documentation

◆ error()

MapCSSParser::Error MapCSSParser::error ( ) const
nodiscard

Definition at line 80 of file mapcssparser.cpp.

◆ errorMessage()

QString MapCSSParser::errorMessage ( ) const
nodiscard

Definition at line 90 of file mapcssparser.cpp.

◆ hasError()

bool MapCSSParser::hasError ( ) const
nodiscard

Returns true if an error occured during parsing and the returned style is invalid.

Definition at line 75 of file mapcssparser.cpp.

◆ parse() [1/2]

MapCSSStyle MapCSSParser::parse ( const QString & fileName)
nodiscard

Definition at line 99 of file mapcssparser.cpp.

◆ parse() [2/2]

MapCSSStyle MapCSSParser::parse ( const QUrl & url)
nodiscard

Parse MapCSS style sheet at url.

This can be a local file, qrc resource or a HTTP URL.

Note
Attempting to parse a HTTP URL that isn't already downloaded will fail with FileNotFoundError. When using remote MapCSS files, don't use this directly but use MapCSSLoader which will handle necesary downloads itself.
See also
MapCSSLoader.

Definition at line 104 of file mapcssparser.cpp.

◆ url()

QUrl MapCSSParser::url ( ) const
nodiscard

URL of the parsed MapCSS style sheet.

This can be a local file, QRC asset or HTTP remote content.

Definition at line 85 of file mapcssparser.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.