GText::GText(std::string content, sf::Font * font, STYLE style, float x, float y) : /*sf::Text(), */_font(font) { setString(content); setFont(*_font); setPosition(x, y); resetStyle(style); }
/** * Resets the style to use the default properties. * @param node The style node to reset */ void LexerStyleModel::resetStyle(Node* node) { StyleData* data = static_cast<StyleData*>(node->data()); QsciLexer* lexer = data->lexer_; int style = data->style_; for (uint i = 0; i != _LastProperty; i++) { StyleProperty prop = static_cast<StyleProperty>(i); setProperty(QVariant(), node, prop, propertyDefaultValue(lexer, style, prop)); } // Recursive call. for (int i = 0; i < node->childCount(); i++) resetStyle(node->child(i)); }
/** * Restores the default styles. */ void LexerStyleModel::resetStyles() { resetStyle(root_.child(0)); reset(); }