All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Stylish::Declaration Class Reference

A CSS declaration that consists of a name and the associated value. More...

#include <Stylish/Declaration.hpp>

Public Member Functions

 Declaration (const QByteArray &name, const Valuable::StyleValue &value, bool important=false)
 Constructs a new declaration with the given values. More...
 
int id () const
 ID of a declaration is used to track the source location of the declaration. More...
 
bool important () const
 Is this "!important" declaration.
 
const QByteArray & name () const
 
void setId (int id)
 
Valuable::StyleValuevalue ()
 
const Valuable::StyleValuevalue () const
  More...
 

Detailed Description

A CSS declaration that consists of a name and the associated value.

Constructor & Destructor Documentation

Stylish::Declaration::Declaration ( const QByteArray &  name,
const Valuable::StyleValue value,
bool  important = false 
)
inline

Constructs a new declaration with the given values.

Parameters
namename of the property
valuevalue of the property
importantis this declaration !important declaration with higher priority

Member Function Documentation

int Stylish::Declaration::id ( ) const
inline

ID of a declaration is used to track the source location of the declaration.

Returns
declaration id that is unique within its owner StyleSheet object
const QByteArray& Stylish::Declaration::name ( ) const
inline
Returns
the name of the declared parameter
void Stylish::Declaration::setId ( int  id)
inline
Parameters
idnew declaration id, this is called from StyleSheet
Valuable::StyleValue& Stylish::Declaration::value ( )
inline
Returns
the value of the declared parameter
const Valuable::StyleValue& Stylish::Declaration::value ( ) const
inline

Returns
the value of the declared parameter