455 }; |
455 }; |
456 |
456 |
457 struct HB_CORE_PRIVATE_EXPORT ValueExtractor //krazy:exclude=multiclasses |
457 struct HB_CORE_PRIVATE_EXPORT ValueExtractor //krazy:exclude=multiclasses |
458 { |
458 { |
459 ValueExtractor(const HbVector<Declaration> &declarations, const HbDeviceProfile &profile); |
459 ValueExtractor(const HbVector<Declaration> &declarations, const HbDeviceProfile &profile); |
460 ValueExtractor(const HbVector<Declaration> &declarations, const HbLayoutParameters &layoutParameters, |
460 ValueExtractor(const HbDeviceProfile &profile = HbDeviceProfile()); |
461 const HbDeviceProfile &profile); |
461 |
462 ValueExtractor(const HbVector<Declaration> &varDeclarations, bool isVariable, const HbDeviceProfile &profile = HbDeviceProfile()); |
462 void setLayoutParameters(const HbLayoutParameters &layoutParams) { layoutParameters = &layoutParams; } |
463 ValueExtractor(const HbLayoutParameters &layoutParameters, bool isVariable, const HbDeviceProfile &profile = HbDeviceProfile()); |
463 void setVariables(const QHash<quint32, HbCss::Declaration> &vars) { variables = &vars; } |
464 void setVariableDeclarationHash(const QHash<QString, HbCss::Declaration> &varDeclarations) { variableDeclarationsHash = varDeclarations; } |
464 |
465 |
465 bool extractVariableValue(quint32 hashValue, HbCss::Value &value) const; |
466 bool extractVariableValue(const QString &variableName, qreal& value); |
466 bool extractVariableValue(quint32 hashValue, qreal &value); |
467 bool extractVariableValue(const QString &variableName, HbCss::Value &value) const; |
467 bool extractVariableValue(const QString &variableName, HbCss::Value &value) const; |
|
468 bool extractVariableValue(const QString &variableName, qreal &value); |
468 bool extractExpressionValue(QString &expression, qreal &value); |
469 bool extractExpressionValue(QString &expression, qreal &value); |
469 |
470 |
470 bool extractKnownProperties(KnownProperties &prop); |
471 bool extractKnownProperties(KnownProperties &prop); |
471 bool extractCustomProperties(const QList<QString> &keys, QList<QVariant> &values); |
472 bool extractCustomProperties(const QList<QString> &keys, QList<QVariant> &values); |
472 bool extractLayout(QString &layoutName, QString §ionName); |
473 bool extractLayout(QString &layoutName, QString §ionName); |
496 int mPrecedence; |
497 int mPrecedence; |
497 qreal mValue; |
498 qreal mValue; |
498 }; |
499 }; |
499 |
500 |
500 HbVector<Declaration> declarations; |
501 HbVector<Declaration> declarations; |
501 HbVector<Declaration> variableDeclarations; //for variables |
502 |
502 const HbLayoutParameters *layoutParameters; |
503 const HbLayoutParameters *layoutParameters; |
503 QHash<QString, HbCss::Declaration> variableDeclarationsHash; |
504 const QHash<quint32, HbCss::Declaration> *variables; |
|
505 |
504 HbDeviceProfile currentProfile; |
506 HbDeviceProfile currentProfile; |
505 QList<ExpressionValue> expressionValues; // for parsed expression string |
507 QList<ExpressionValue> expressionValues; // for parsed expression string |
506 }; |
508 }; |
507 |
509 |
508 struct StyleSheet; |
510 struct StyleSheet; |
721 bool hasOrientationSpecificStyleRules(NodePtr node) const; |
723 bool hasOrientationSpecificStyleRules(NodePtr node) const; |
722 QVector<WeightedRule> weightedStyleRulesForNode(NodePtr node, const Qt::Orientation orientation) const; |
724 QVector<WeightedRule> weightedStyleRulesForNode(NodePtr node, const Qt::Orientation orientation) const; |
723 QVector<WeightedDeclaration> weightedDeclarationsForNode(NodePtr node, const Qt::Orientation orientation, const char *extraPseudo = 0) const; |
725 QVector<WeightedDeclaration> weightedDeclarationsForNode(NodePtr node, const Qt::Orientation orientation, const char *extraPseudo = 0) const; |
724 HbVector<StyleRule> styleRulesForNode(NodePtr node, const Qt::Orientation orientation) const; |
726 HbVector<StyleRule> styleRulesForNode(NodePtr node, const Qt::Orientation orientation) const; |
725 HbVector<Declaration> declarationsForNode(NodePtr node, const Qt::Orientation orientation, const char *extraPseudo = 0) const; |
727 HbVector<Declaration> declarationsForNode(NodePtr node, const Qt::Orientation orientation, const char *extraPseudo = 0) const; |
726 void variableRuleSets(QHash<QString, HbCss::Declaration> *variables) const; |
728 void variableRuleSets(QHash<quint32, HbCss::Declaration> *variables) const; |
727 |
729 |
728 virtual int nodeNameEquals(NodePtr node, const HbString& nodeName) const = 0; |
730 virtual int nodeNameEquals(NodePtr node, const HbString& nodeName) const = 0; |
729 virtual bool attributeMatches(NodePtr node, const AttributeSelector &attr) const = 0; |
731 virtual bool attributeMatches(NodePtr node, const AttributeSelector &attr) const = 0; |
730 virtual bool hasAttributes(NodePtr node) const = 0; |
732 virtual bool hasAttributes(NodePtr node) const = 0; |
731 virtual QStringList nodeIds(NodePtr node) const = 0; |
733 virtual QStringList nodeIds(NodePtr node) const = 0; |