\section{DOM::CSSStyle\-Declaration Class Reference}
\label{classDOM_1_1CSSStyleDeclaration}\index{DOM::CSSStyleDeclaration@{DOM::CSSStyleDeclaration}}
The {\tt {\bf CSSStyle\-Declaration}{\rm (p.\,\pageref{classDOM_1_1CSSStyleDeclaration})}} interface represents a single {\tt CSS declaration block } .  


{\tt \#include $<$css\_\-value.h$>$}

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf CSSStyle\-Declaration} (const {\bf CSSStyle\-Declaration} \&other)\label{classDOM_1_1CSSStyleDeclaration_a1}

\item 
{\bf CSSStyle\-Declaration} (CSSStyle\-Declaration\-Impl $\ast$impl)\label{classDOM_1_1CSSStyleDeclaration_a2}

\item 
{\bf CSSStyle\-Declaration} \& {\bf operator=} (const {\bf CSSStyle\-Declaration} \&other)\label{classDOM_1_1CSSStyleDeclaration_a3}

\item 
{\bf DOM::DOMString} {\bf css\-Text} () const 
\item 
void {\bf set\-Css\-Text} (const {\bf DOM::DOMString} \&)
\item 
unsigned long {\bf length} () const 
\item 
{\bf CSSRule} {\bf parent\-Rule} () const 
\item 
{\bf DOM::DOMString} {\bf get\-Property\-Value} (const {\bf DOM::DOMString} \&property\-Name) const 
\item 
{\bf DOM::DOMString} {\bf get\-Property\-Value} (const {\bf DOM::DOMString} \&property\-Name)\label{classDOM_1_1CSSStyleDeclaration_a10}

\item 
{\bf CSSValue} {\bf get\-Property\-CSSValue} (const {\bf DOM::DOMString} \&property\-Name) const 
\item 
{\bf CSSValue} {\bf get\-Property\-CSSValue} (const {\bf DOM::DOMString} \&property\-Name)\label{classDOM_1_1CSSStyleDeclaration_a12}

\item 
{\bf DOM::DOMString} {\bf remove\-Property} (const {\bf DOM::DOMString} \&property\-Name)
\item 
{\bf DOM::DOMString} {\bf get\-Property\-Priority} (const {\bf DOM::DOMString} \&property\-Name) const 
\item 
{\bf DOM::DOMString} {\bf get\-Property\-Priority} (const {\bf DOM::DOMString} \&property\-Name)\label{classDOM_1_1CSSStyleDeclaration_a15}

\item 
void {\bf set\-Property} (const {\bf DOM::DOMString} \&property\-Name, const {\bf DOM::DOMString} \&value, const {\bf DOM::DOMString} \&priority)
\item 
{\bf DOM::DOMString} {\bf item} (unsigned long index) const 
\item 
{\bf DOM::DOMString} {\bf item} (unsigned long index)\label{classDOM_1_1CSSStyleDeclaration_a18}

\item 
CSSStyle\-Declaration\-Impl $\ast$ {\bf handle} () const \label{classDOM_1_1CSSStyleDeclaration_a19}

\item 
bool {\bf is\-Null} () const \label{classDOM_1_1CSSStyleDeclaration_a20}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
CSSStyle\-Declaration\-Impl $\ast$ {\bf impl}\label{classDOM_1_1CSSStyleDeclaration_p0}

\end{CompactItemize}


\subsection{Detailed Description}
The {\tt {\bf CSSStyle\-Declaration}{\rm (p.\,\pageref{classDOM_1_1CSSStyleDeclaration})}} interface represents a single {\tt CSS declaration block } . 

This interface may be used to determine the style properties currently set in a block or to set style properties explicitly within the block.

While an implementation may not recognize all CSS properties within a CSS declaration block, it is expected to provide access to all specified properties through the {\tt {\bf CSSStyle\-Declaration}{\rm (p.\,\pageref{classDOM_1_1CSSStyleDeclaration})}} interface. Furthermore, implementations that support a specific level of CSS should correctly handle {\tt CSS shorthand } properties for that level. For a further discussion of shorthand properties, see the {\tt {\bf CSS2Properties}{\rm (p.\,\pageref{classDOM_1_1CSS2Properties})}} interface. 



Definition at line 60 of file css\_\-value.h.

\subsection{Member Function Documentation}
\index{DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}!cssText@{cssText}}
\index{cssText@{cssText}!DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMString} DOM::CSSStyle\-Declaration::css\-Text () const}\label{classDOM_1_1CSSStyleDeclaration_a5}


The parsable textual representation of the declaration block (including the surrounding curly braces). 

Setting this attribute will result in the parsing of the new value and resetting of the properties in the declaration block. 

Definition at line 63 of file css\_\-value.cpp.\index{DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}!setCssText@{setCssText}}
\index{setCssText@{setCssText}!DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void DOM::CSSStyle\-Declaration::set\-Css\-Text (const {\bf DOM::DOMString} \&)}\label{classDOM_1_1CSSStyleDeclaration_a6}


see css\-Text 

\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em CSSException}]SYNTAX\_\-ERR: Raised if the specified CSS string value has a syntax error and is unparsable.\item[{\em DOMException}]NO\_\-MODIFICATION\_\-ALLOWED\_\-ERR: Raised if this declaration is readonly. \end{description}
\end{Desc}


Definition at line 69 of file css\_\-value.cpp.\index{DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}!length@{length}}
\index{length@{length}!DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned long DOM::CSSStyle\-Declaration::length () const}\label{classDOM_1_1CSSStyleDeclaration_a7}


The number of properties that have been explicitly set in this declaration block. 



Definition at line 135 of file css\_\-value.cpp.\index{DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}!parentRule@{parentRule}}
\index{parentRule@{parentRule}!DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf CSSRule} DOM::CSSStyle\-Declaration::parent\-Rule () const}\label{classDOM_1_1CSSStyleDeclaration_a8}


The CSS rule that contains this declaration block. 



Definition at line 151 of file css\_\-value.cpp.\index{DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}!getPropertyValue@{getPropertyValue}}
\index{getPropertyValue@{getPropertyValue}!DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMString} DOM::CSSStyle\-Declaration::get\-Property\-Value (const {\bf DOM::DOMString} \& {\em property\-Name}) const}\label{classDOM_1_1CSSStyleDeclaration_a9}


Used to retrieve the value of a CSS property if it has been explicitly set within this declaration block. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em property\-Name}]The name of the CSS property. See the {\tt CSS property index } .\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Returns the value of the property if it has been explicitly set for this declaration block. Returns the empty string if the property has not been set. \end{Desc}


Definition at line 80 of file css\_\-value.cpp.\index{DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}!getPropertyCSSValue@{getPropertyCSSValue}}
\index{getPropertyCSSValue@{getPropertyCSSValue}!DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf CSSValue} DOM::CSSStyle\-Declaration::get\-Property\-CSSValue (const {\bf DOM::DOMString} \& {\em property\-Name}) const}\label{classDOM_1_1CSSStyleDeclaration_a11}


Used to retrieve the object representation of the value of a CSS property if it has been explicitly set within this declaration block. 

This method returns null if the property is a {\tt shorthand } property. Shorthand property values can only be accessed and modified as strings, using the {\tt get\-Property\-Value} and {\tt set\-Property} methods.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em property\-Name}]The name of the CSS property. See the {\tt CSS property index } .\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Returns the value of the property if it has been explicitly set for this declaration block. Returns the {\tt null} if the property has not been set. \end{Desc}


Definition at line 93 of file css\_\-value.cpp.\index{DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}!removeProperty@{removeProperty}}
\index{removeProperty@{removeProperty}!DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMString} DOM::CSSStyle\-Declaration::remove\-Property (const {\bf DOM::DOMString} \& {\em property\-Name})}\label{classDOM_1_1CSSStyleDeclaration_a13}


Used to remove a CSS property if it has been explicitly set within this declaration block. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em property\-Name}]The name of the CSS property. See the {\tt CSS property index } .\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Returns the value of the property if it has been explicitly set for this declaration block. Returns the empty string if the property has not been set or the property name does not correspond to a valid CSS2 property.\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em DOMException}]NO\_\-MODIFICATION\_\-ALLOWED\_\-ERR: Raised if this declaration is readonly. \end{description}
\end{Desc}


Definition at line 101 of file css\_\-value.cpp.\index{DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}!getPropertyPriority@{getPropertyPriority}}
\index{getPropertyPriority@{getPropertyPriority}!DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMString} DOM::CSSStyle\-Declaration::get\-Property\-Priority (const {\bf DOM::DOMString} \& {\em property\-Name}) const}\label{classDOM_1_1CSSStyleDeclaration_a14}


Used to retrieve the priority of a CSS property (e.g. 

the {\tt \char`\"{}important\char`\"{}} qualifier) if the property has been explicitly set in this declaration block.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em property\-Name}]The name of the CSS property. See the {\tt CSS property index } .\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A string representing the priority (e.g. {\tt \char`\"{}important\char`\"{}} ) if one exists. The empty string if none exists. \end{Desc}


Definition at line 113 of file css\_\-value.cpp.\index{DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}!setProperty@{setProperty}}
\index{setProperty@{setProperty}!DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void DOM::CSSStyle\-Declaration::set\-Property (const {\bf DOM::DOMString} \& {\em property\-Name}, const {\bf DOM::DOMString} \& {\em value}, const {\bf DOM::DOMString} \& {\em priority})}\label{classDOM_1_1CSSStyleDeclaration_a16}


Used to set a property value and priority within this declaration block. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em property\-Name}]The name of the CSS property. See the {\tt CSS property index } .\item[{\em value}]The new value of the property.\item[{\em priority}]The new priority of the property (e.g. {\tt \char`\"{}important\char`\"{}} ).\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em CSSException}]SYNTAX\_\-ERR: Raised if the specified value has a syntax error and is unparsable.\item[{\em DOMException}]NO\_\-MODIFICATION\_\-ALLOWED\_\-ERR: Raised if this declaration is readonly. \end{description}
\end{Desc}


Definition at line 122 of file css\_\-value.cpp.

References QString::find().\index{DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}!item@{item}}
\index{item@{item}!DOM::CSSStyleDeclaration@{DOM::CSSStyle\-Declaration}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMString} DOM::CSSStyle\-Declaration::item (unsigned long {\em index}) const}\label{classDOM_1_1CSSStyleDeclaration_a17}


Used to retrieve the properties that have been explicitly set in this declaration block. 

The order of the properties retrieved using this method does not have to be the order in which they were set. This method can be used to iterate over all properties in this declaration block.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em index}]Index of the property name to retrieve.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The name of the property at this ordinal position. The empty string if no property exists at this position. \end{Desc}


Definition at line 146 of file css\_\-value.cpp.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
css\_\-value.h\item 
css\_\-value.cpp\end{CompactItemize}
