[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: CSSStyleSelector?
From:       Martijn Klingens <mklingens () yahoo ! com>
Date:       2001-09-26 17:28:29
[Download RAW message or body]

On Wednesday 26 September 2001 16:37, Lars Knoll wrote:
> The construtor of the CSSStyleSelector takes a document, and then traverses
> the list of style sheets from the document doc->stlyeSheets() calling
> append for each of them. You'll have to do your work in this append() call.

Thanks!!!! Before reading this I was completely and utterly stuck. After 
reading this it took me about an hour to properly traverse the tree and to 
test and debug my code that built the tree...

Next step is actually storing the list of media types and doing something 
with them.

Any idea how to emulate 

QString mediaTypeString = "print, screen";
QStringList mediaTypes = QStringList::split( ',',
     mediaTypeString.stripWhiteSpace() );

using DOM code? Besides the fact that the above code might not be robust 
enough, though given the checks before and after the part where the media 
list is extracted I don't expect serious problems.

From what I understood now I have to walk through the curP pointer until I 
encounter a ',', then skip all whitespace and so forth until I am at endP. 
And store the data in a QValueList/QList. Right?

Martijn

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic