CSS 2.1 parser.
More...
#include <Stylish/CSSParser.hpp>
| float Stylish::CSSParser::dpi |
( |
| ) |
const |
- Parameters
-
| str | one CSS value, without the property name, color or semicolon |
- Returns
- parsed StyleValue object
| const QString& Stylish::CSSParser::media |
( |
| ) |
const |
|
inline |
- Returns
- active media type, default value is "screen"
| static QList<Selector> Stylish::CSSParser::parseSelectors |
( |
const QString & |
str | ) |
|
|
static |
- Parameters
-
| str | string that has any number of selectors, optionally separated by comma |
- Returns
- list of all successfully parsed CSS selectors
Read the declarations from a file to the given StyleSheet.
- Parameters
-
| [out] | sheet | the style sheet to update. |
| [in] | filename | the name of the CSS file. |
| [out] | files | if not null, will contain the list of included files |
| [in] | origin | used origin with the created declarations |
- Returns
- Return true when the parsing succeeds, and false otherwise.
| static SimpleSelector Stylish::CSSParser::parseSimpleSelector |
( |
const QString & |
str | ) |
|
|
static |
- Parameters
-
| str | string that has any number of selectors, optionally separated by comma |
- Returns
- first simple selector from the first selector that was parsed successfully
Read declarations from a string to the given StyleSheet.
- Parameters
-
| [out] | sheet | the style sheet to update. |
| [in] | str | CSS contents in a string |
| [out] | files | if not null, will contain the list of included files |
| [in] | origin | used origin with the created declarations |
- Returns
- Return true when the parsing succeeds, and false otherwise.
- Parameters
-
| str | one CSS value, without the property name, color or semicolon |
- Returns
- parsed StyleValue object
| QList<Selector> Stylish::CSSParser::selectors |
( |
const QString & |
str | ) |
|
- Parameters
-
| str | string that has any number of selectors, optionally separated by comma |
- Returns
- list of all successfully parsed CSS selectors
| static void Stylish::CSSParser::setDefaultDpi |
( |
float |
dpi | ) |
|
|
static |
- Parameters
-
| dpi | default DPI value to use, if there is no explicit DPI value set |
| void Stylish::CSSParser::setDpi |
( |
float |
dpi | ) |
|
- Parameters
-
| dpi | explicit DPI value, overrides the default DPI value |
| void Stylish::CSSParser::setMedia |
( |
const QString & |
media | ) |
|
|
inline |