diff --git a/scripts/remove_temporary_files.sh b/scripts/remove_temporary_files.sh index 87cef16fcea..b2bfce8c13f 100755 --- a/scripts/remove_temporary_files.sh +++ b/scripts/remove_temporary_files.sh @@ -22,6 +22,7 @@ find . -name "*.orig" -exec rm -rf {} \; find . -name "*.prepare" -exec rm -rf {} \; find . -name "astyle*.diff" -exec rm -rf {} \; +find . -name "*.astyle" -exec rm -rf {} \; find . -name "sha*.diff" -exec rm -rf {} \; diff --git a/src/app/qgsversioninfo.cpp b/src/app/qgsversioninfo.cpp index c9be59fa5e1..ab52327865e 100644 --- a/src/app/qgsversioninfo.cpp +++ b/src/app/qgsversioninfo.cpp @@ -18,7 +18,7 @@ #include "qgsnetworkaccessmanager.h" -QgsVersionInfo::QgsVersionInfo( QObject *parent ) : QObject(parent) +QgsVersionInfo::QgsVersionInfo( QObject *parent ) : QObject( parent ) { } diff --git a/src/core/qgsconditionalstyle.cpp b/src/core/qgsconditionalstyle.cpp index 56085d567c6..5daa93e8221 100644 --- a/src/core/qgsconditionalstyle.cpp +++ b/src/core/qgsconditionalstyle.cpp @@ -1,144 +1,144 @@ -#include - -#include "qgsconditionalstyle.h" -#include "qgsexpression.h" -#include "qgsfontutils.h" -#include "qgssymbollayerv2utils.h" -#include "qgsmarkersymbollayerv2.h" - -QgsConditionalStyle::QgsConditionalStyle() - : mValid( false ) - , mSymbol( 0 ) -{} - -QgsConditionalStyle::QgsConditionalStyle( QString rule ) - : mValid( false ) - , mSymbol( 0 ) -{ - setRule( rule ); -} - -QgsConditionalStyle::QgsConditionalStyle( const QgsConditionalStyle &other ) - : mValid( other.mValid ) - , mRule( other.mRule ) - , mFont( other.mFont ) - , mBackColor( other.mBackColor ) - , mTextColor( other.mTextColor ) - , mIcon( other.mIcon ) -{ - if ( other.mSymbol.data() ) - mSymbol.reset( other.mSymbol->clone() ); -} - -QgsConditionalStyle& QgsConditionalStyle::operator=( const QgsConditionalStyle & other ) -{ - mValid = other.mValid; - mRule = other.mRule; - mFont = other.mFont; - mBackColor = other.mBackColor; - mTextColor = other.mTextColor; - mIcon = other.mIcon; - if ( other.mSymbol.data() ) - { - mSymbol.reset( other.mSymbol->clone() ); - } - else - { - mSymbol.reset(); - } - return ( *this ); -} - -QgsConditionalStyle::~QgsConditionalStyle() -{ -} - -void QgsConditionalStyle::setSymbol( QgsSymbolV2* value ) -{ - mValid = true; - if ( value ) - { - mSymbol.reset( value->clone() ); - mIcon = QgsSymbolLayerV2Utils::symbolPreviewPixmap( mSymbol.data(), QSize( 16, 16 ) ); - } - else - { - mSymbol.reset(); - } -} - -bool QgsConditionalStyle::matches( QVariant value, QgsFeature *feature ) -{ - // TODO Replace with expression context - QgsExpression exp( QString( mRule ).replace( "@value", value.toString() ) ); - if ( feature ) - { - return exp.evaluate( feature, *feature->fields() ).toBool(); - } - { - return exp.evaluate().toBool(); - } -} - -QPixmap QgsConditionalStyle::renderPreview() -{ - QPixmap pixmap( 64, 32 ); - QPainter painter( &pixmap ); - - if ( mBackColor.isValid() ) - painter.setBrush( mBackColor ); - else - painter.setBrush( QColor( Qt::white ) ); - - QRect rect = QRect( 0, 0, 64, 32 ); - painter.setPen( Qt::NoPen ); - painter.drawRect( rect ); - painter.drawPixmap( 8, 8, icon() ); - - if ( mTextColor.isValid() ) - painter.setPen( mTextColor ); - else - painter.setPen( Qt::black ); - - painter.setRenderHint( QPainter::Antialiasing ); - painter.setRenderHint( QPainter::HighQualityAntialiasing ); - painter.setFont( font() ); - rect = QRect( 32, 0, 32, 32 ); - painter.drawText( rect, Qt::AlignCenter, "abc\n123" ); - painter.end(); - return pixmap; -} - -bool QgsConditionalStyle::writeXml( QDomNode &node, QDomDocument &doc ) -{ - QDomElement stylesel = doc.createElement( "style" ); - stylesel.setAttribute( "rule", mRule ); - stylesel.setAttribute( "background_color", mBackColor.name() ); - stylesel.setAttribute( "text_color", mTextColor.name() ); - QDomElement labelFontElem = QgsFontUtils::toXmlElement( mFont, doc, "font" ); - stylesel.appendChild( labelFontElem ); - if ( ! mSymbol.isNull() ) - { - QDomElement symbolElm = QgsSymbolLayerV2Utils::saveSymbol( "icon", mSymbol.data(), doc ); - stylesel.appendChild( symbolElm ); - } - node.appendChild( stylesel ); - return true; -} - -bool QgsConditionalStyle::readXml( const QDomNode &node ) -{ - QDomElement styleElm = node.toElement(); - setRule( styleElm.attribute( "rule" ) ); - setBackgroundColor( QColor( styleElm.attribute( "background_color" ) ) ); - setTextColor( QColor( styleElm.attribute( "text_color" ) ) ); - QgsFontUtils::setFromXmlChildNode( mFont, styleElm, "font" ); - QDomElement symbolElm = styleElm.firstChildElement( "symbol" ); - if ( !symbolElm.isNull() ) - { - QgsSymbolV2* symbol = QgsSymbolLayerV2Utils::loadSymbol( symbolElm ); - setSymbol( symbol ); - } - return true; -} - +#include + +#include "qgsconditionalstyle.h" +#include "qgsexpression.h" +#include "qgsfontutils.h" +#include "qgssymbollayerv2utils.h" +#include "qgsmarkersymbollayerv2.h" + +QgsConditionalStyle::QgsConditionalStyle() + : mValid( false ) + , mSymbol( 0 ) +{} + +QgsConditionalStyle::QgsConditionalStyle( QString rule ) + : mValid( false ) + , mSymbol( 0 ) +{ + setRule( rule ); +} + +QgsConditionalStyle::QgsConditionalStyle( const QgsConditionalStyle &other ) + : mValid( other.mValid ) + , mRule( other.mRule ) + , mFont( other.mFont ) + , mBackColor( other.mBackColor ) + , mTextColor( other.mTextColor ) + , mIcon( other.mIcon ) +{ + if ( other.mSymbol.data() ) + mSymbol.reset( other.mSymbol->clone() ); +} + +QgsConditionalStyle& QgsConditionalStyle::operator=( const QgsConditionalStyle & other ) +{ + mValid = other.mValid; + mRule = other.mRule; + mFont = other.mFont; + mBackColor = other.mBackColor; + mTextColor = other.mTextColor; + mIcon = other.mIcon; + if ( other.mSymbol.data() ) + { + mSymbol.reset( other.mSymbol->clone() ); + } + else + { + mSymbol.reset(); + } + return ( *this ); +} + +QgsConditionalStyle::~QgsConditionalStyle() +{ +} + +void QgsConditionalStyle::setSymbol( QgsSymbolV2* value ) +{ + mValid = true; + if ( value ) + { + mSymbol.reset( value->clone() ); + mIcon = QgsSymbolLayerV2Utils::symbolPreviewPixmap( mSymbol.data(), QSize( 16, 16 ) ); + } + else + { + mSymbol.reset(); + } +} + +bool QgsConditionalStyle::matches( QVariant value, QgsFeature *feature ) +{ + // TODO Replace with expression context + QgsExpression exp( QString( mRule ).replace( "@value", value.toString() ) ); + if ( feature ) + { + return exp.evaluate( feature, *feature->fields() ).toBool(); + } + { + return exp.evaluate().toBool(); + } +} + +QPixmap QgsConditionalStyle::renderPreview() +{ + QPixmap pixmap( 64, 32 ); + QPainter painter( &pixmap ); + + if ( mBackColor.isValid() ) + painter.setBrush( mBackColor ); + else + painter.setBrush( QColor( Qt::white ) ); + + QRect rect = QRect( 0, 0, 64, 32 ); + painter.setPen( Qt::NoPen ); + painter.drawRect( rect ); + painter.drawPixmap( 8, 8, icon() ); + + if ( mTextColor.isValid() ) + painter.setPen( mTextColor ); + else + painter.setPen( Qt::black ); + + painter.setRenderHint( QPainter::Antialiasing ); + painter.setRenderHint( QPainter::HighQualityAntialiasing ); + painter.setFont( font() ); + rect = QRect( 32, 0, 32, 32 ); + painter.drawText( rect, Qt::AlignCenter, "abc\n123" ); + painter.end(); + return pixmap; +} + +bool QgsConditionalStyle::writeXml( QDomNode &node, QDomDocument &doc ) +{ + QDomElement stylesel = doc.createElement( "style" ); + stylesel.setAttribute( "rule", mRule ); + stylesel.setAttribute( "background_color", mBackColor.name() ); + stylesel.setAttribute( "text_color", mTextColor.name() ); + QDomElement labelFontElem = QgsFontUtils::toXmlElement( mFont, doc, "font" ); + stylesel.appendChild( labelFontElem ); + if ( ! mSymbol.isNull() ) + { + QDomElement symbolElm = QgsSymbolLayerV2Utils::saveSymbol( "icon", mSymbol.data(), doc ); + stylesel.appendChild( symbolElm ); + } + node.appendChild( stylesel ); + return true; +} + +bool QgsConditionalStyle::readXml( const QDomNode &node ) +{ + QDomElement styleElm = node.toElement(); + setRule( styleElm.attribute( "rule" ) ); + setBackgroundColor( QColor( styleElm.attribute( "background_color" ) ) ); + setTextColor( QColor( styleElm.attribute( "text_color" ) ) ); + QgsFontUtils::setFromXmlChildNode( mFont, styleElm, "font" ); + QDomElement symbolElm = styleElm.firstChildElement( "symbol" ); + if ( !symbolElm.isNull() ) + { + QgsSymbolV2* symbol = QgsSymbolLayerV2Utils::loadSymbol( symbolElm ); + setSymbol( symbol ); + } + return true; +} + diff --git a/src/core/qgsconditionalstyle.h b/src/core/qgsconditionalstyle.h index 53fa7126ca4..24de19246e9 100644 --- a/src/core/qgsconditionalstyle.h +++ b/src/core/qgsconditionalstyle.h @@ -1,131 +1,131 @@ -#ifndef QGSCONDITIONALSTYLE_H -#define QGSCONDITIONALSTYLE_H - -#include -#include -#include -#include -#include - -#include "qgsfeature.h" -#include "qgssymbolv2.h" - -/** \class QgsFieldFormat - * Conditional styling for a rule. - */ -class CORE_EXPORT QgsConditionalStyle -{ - public: - QgsConditionalStyle(); - QgsConditionalStyle( const QgsConditionalStyle& other ); - QgsConditionalStyle( QString rule ); - ~QgsConditionalStyle(); - - QgsConditionalStyle& operator=( const QgsConditionalStyle& other ); - - /** - * @brief Check if the rule matches using the given value and feature - * @param value The current value being checked. \@value is replaced in the rule with this value. - * @param feature The feature to match the values from. - * @return True of the rule matches against the given feature - */ - bool matches( QVariant value, QgsFeature *feature = 0 ); - - /** - * @brief Render a preview icon of the rule. - * @return QPixmap preview of the style - */ - QPixmap renderPreview(); - - /** - * @brief Set the rule for the style. Rules should be of QgsExpression syntax. - * Special value of \@value is replaced at run time with the check value - * @param value The QgsExpression style rule to use for this style - */ - void setRule( QString value ) { mRule = value; mValid = true; } - - /** - * @brief Set the background color for the style - * @param value QColor for background color - */ - void setBackgroundColor( QColor value ) { mBackColor = value; mValid = true; } - - /** - * @brief Set the text color for the style - * @param value QColor for text color - */ - void setTextColor( QColor value ) { mTextColor = value; mValid = true; } - - /** - * @brief Set the font for the the style - * @param value QFont to be used for text - */ - void setFont( QFont value ) { mFont = value; mValid = true; } - - /** - * @brief Set the icon for the style. Icons are generated from symbols - * @param value QgsSymbolV2 to be used when generating the icon - */ - void setSymbol( QgsSymbolV2* value ); - - /** - * @brief The icon set for style generated from the set symbol - * @return A QPixmap that was set for the icon using the symbol - */ - QPixmap icon() const { return mIcon; } - - /** - * @brief The symbol used to generate the icon for the style - * @return The QgsSymbolV2 used for the icon - */ - QgsSymbolV2* symbol() const { return mSymbol.data(); } - - /** - * @brief The text color set for style - * @return QColor for text color - */ - QColor textColor() const { return mTextColor; } - - /** - * @brief The background color for style - * @return QColor for background color - */ - QColor backgroundColor() const { return mBackColor; } - /** - * @brief The font for the style - * @return QFont for the style - */ - QFont font() const { return mFont; } - - /** - * @brief The condtion rule set for the style. Rule may contain variable \@value - * to represent the current value - * @return QString of the current set rule - */ - QString rule() const { return mRule; } - - /** - * @brief isValid Check if this rule is valid. A valid rule has one or more properties - * set. - * @return True if the rule is valid. - */ - bool isValid() const { return mValid; } - - /** Reads vector conditional style specific state from layer Dom node. - */ - virtual bool readXml( const QDomNode& node ); - - /** Write vector conditional style specific state from layer Dom node. - */ - virtual bool writeXml( QDomNode & node, QDomDocument & doc ); - - bool mValid; - QString mRule; - QScopedPointer mSymbol; - QFont mFont; - QColor mBackColor; - QColor mTextColor; - QPixmap mIcon; -}; - -#endif // QGSCONDITIONALSTYLE_H +#ifndef QGSCONDITIONALSTYLE_H +#define QGSCONDITIONALSTYLE_H + +#include +#include +#include +#include +#include + +#include "qgsfeature.h" +#include "qgssymbolv2.h" + +/** \class QgsFieldFormat + * Conditional styling for a rule. + */ +class CORE_EXPORT QgsConditionalStyle +{ + public: + QgsConditionalStyle(); + QgsConditionalStyle( const QgsConditionalStyle& other ); + QgsConditionalStyle( QString rule ); + ~QgsConditionalStyle(); + + QgsConditionalStyle& operator=( const QgsConditionalStyle& other ); + + /** + * @brief Check if the rule matches using the given value and feature + * @param value The current value being checked. \@value is replaced in the rule with this value. + * @param feature The feature to match the values from. + * @return True of the rule matches against the given feature + */ + bool matches( QVariant value, QgsFeature *feature = 0 ); + + /** + * @brief Render a preview icon of the rule. + * @return QPixmap preview of the style + */ + QPixmap renderPreview(); + + /** + * @brief Set the rule for the style. Rules should be of QgsExpression syntax. + * Special value of \@value is replaced at run time with the check value + * @param value The QgsExpression style rule to use for this style + */ + void setRule( QString value ) { mRule = value; mValid = true; } + + /** + * @brief Set the background color for the style + * @param value QColor for background color + */ + void setBackgroundColor( QColor value ) { mBackColor = value; mValid = true; } + + /** + * @brief Set the text color for the style + * @param value QColor for text color + */ + void setTextColor( QColor value ) { mTextColor = value; mValid = true; } + + /** + * @brief Set the font for the the style + * @param value QFont to be used for text + */ + void setFont( QFont value ) { mFont = value; mValid = true; } + + /** + * @brief Set the icon for the style. Icons are generated from symbols + * @param value QgsSymbolV2 to be used when generating the icon + */ + void setSymbol( QgsSymbolV2* value ); + + /** + * @brief The icon set for style generated from the set symbol + * @return A QPixmap that was set for the icon using the symbol + */ + QPixmap icon() const { return mIcon; } + + /** + * @brief The symbol used to generate the icon for the style + * @return The QgsSymbolV2 used for the icon + */ + QgsSymbolV2* symbol() const { return mSymbol.data(); } + + /** + * @brief The text color set for style + * @return QColor for text color + */ + QColor textColor() const { return mTextColor; } + + /** + * @brief The background color for style + * @return QColor for background color + */ + QColor backgroundColor() const { return mBackColor; } + /** + * @brief The font for the style + * @return QFont for the style + */ + QFont font() const { return mFont; } + + /** + * @brief The condtion rule set for the style. Rule may contain variable \@value + * to represent the current value + * @return QString of the current set rule + */ + QString rule() const { return mRule; } + + /** + * @brief isValid Check if this rule is valid. A valid rule has one or more properties + * set. + * @return True if the rule is valid. + */ + bool isValid() const { return mValid; } + + /** Reads vector conditional style specific state from layer Dom node. + */ + virtual bool readXml( const QDomNode& node ); + + /** Write vector conditional style specific state from layer Dom node. + */ + virtual bool writeXml( QDomNode & node, QDomDocument & doc ); + + bool mValid; + QString mRule; + QScopedPointer mSymbol; + QFont mFont; + QColor mBackColor; + QColor mTextColor; + QPixmap mIcon; +}; + +#endif // QGSCONDITIONALSTYLE_H diff --git a/src/core/qgsfielduiproperties.cpp b/src/core/qgsfielduiproperties.cpp index c1caa2ca373..3528fc1ea89 100644 --- a/src/core/qgsfielduiproperties.cpp +++ b/src/core/qgsfielduiproperties.cpp @@ -1,56 +1,56 @@ -#include - -#include "qgsconditionalstyle.h" -#include "qgsfielduiproperties.h" - - -QgsFieldUIProperties::QgsFieldUIProperties() - : mStyles( QList() ) -{} - -void QgsFieldUIProperties::setConditionalStyles( QList styles ) -{ - mStyles = styles; -} - -QList QgsFieldUIProperties::getConditionalStyles() -{ - return mStyles; -} - -QgsConditionalStyle QgsFieldUIProperties::matchingConditionalStyle( QVariant value, QgsFeature *feature ) -{ - foreach ( QgsConditionalStyle style, mStyles ) - { - if ( style.matches( value, feature ) ) - return style; - } - return QgsConditionalStyle(); -} - -bool QgsFieldUIProperties::writeXml( QDomNode &node, QDomDocument &doc ) -{ - QDomElement stylesel = doc.createElement( "conditionalstyles" ); - foreach ( QgsConditionalStyle style, mStyles ) - { - style.writeXml( stylesel, doc ); - } - node.appendChild( stylesel ); - return true; -} - -bool QgsFieldUIProperties::readXml( const QDomNode &node ) -{ - mStyles.clear(); - QDomElement condel = node.firstChildElement( "conditionalstyles" ); - QDomNodeList stylesList = condel.elementsByTagName( "style" ); - for ( int i = 0; i < stylesList.size(); ++i ) - { - QDomElement styleElm = stylesList.at( i ).toElement(); - QgsConditionalStyle style = QgsConditionalStyle(); - style.readXml( styleElm ); - mStyles.append( style ); - } - return true; -} - +#include + +#include "qgsconditionalstyle.h" +#include "qgsfielduiproperties.h" + + +QgsFieldUIProperties::QgsFieldUIProperties() + : mStyles( QList() ) +{} + +void QgsFieldUIProperties::setConditionalStyles( QList styles ) +{ + mStyles = styles; +} + +QList QgsFieldUIProperties::getConditionalStyles() +{ + return mStyles; +} + +QgsConditionalStyle QgsFieldUIProperties::matchingConditionalStyle( QVariant value, QgsFeature *feature ) +{ + foreach ( QgsConditionalStyle style, mStyles ) + { + if ( style.matches( value, feature ) ) + return style; + } + return QgsConditionalStyle(); +} + +bool QgsFieldUIProperties::writeXml( QDomNode &node, QDomDocument &doc ) +{ + QDomElement stylesel = doc.createElement( "conditionalstyles" ); + foreach ( QgsConditionalStyle style, mStyles ) + { + style.writeXml( stylesel, doc ); + } + node.appendChild( stylesel ); + return true; +} + +bool QgsFieldUIProperties::readXml( const QDomNode &node ) +{ + mStyles.clear(); + QDomElement condel = node.firstChildElement( "conditionalstyles" ); + QDomNodeList stylesList = condel.elementsByTagName( "style" ); + for ( int i = 0; i < stylesList.size(); ++i ) + { + QDomElement styleElm = stylesList.at( i ).toElement(); + QgsConditionalStyle style = QgsConditionalStyle(); + style.readXml( styleElm ); + mStyles.append( style ); + } + return true; +} + diff --git a/src/core/qgsfielduiproperties.h b/src/core/qgsfielduiproperties.h index 67834cb064b..cf787d7b177 100644 --- a/src/core/qgsfielduiproperties.h +++ b/src/core/qgsfielduiproperties.h @@ -1,56 +1,56 @@ -#ifndef QGSFIELDUIPROPERTIES_H -#define QGSFIELDUIPROPERTIES_H - -#include -#include - -#include "qgsfeature.h" -#include "qgsconditionalstyle.h" - -/** \class QgsFieldUIProperties - * Holds extra UI properties for a field. - * - * Currently this object holds informations about condtional styles but in future will hold - * things like field widgets, etc - * - * TODO Move UI field related stuff from QgsVectorLayer here - */ -class CORE_EXPORT QgsFieldUIProperties -{ - public: - QgsFieldUIProperties(); - - /** - * @brief Set the condtional styles for the field UI properties. - * @param styles - */ - void setConditionalStyles( QList styles ); - - /** - * @brief Returns the condtional styles set for the field UI properties - * @return A list of condtional styles that have been set. - */ - QList getConditionalStyles(); - - /** - * @brief Find and return the matching style for the value and feature. - * If no match is found a invalid QgsCondtionalStyle is return. - * - * @return A condtional style that matches the value and feature. - * Check with QgsCondtionalStyle::isValid() - */ - QgsConditionalStyle matchingConditionalStyle( QVariant value, QgsFeature* feature ); - - /** Reads field ui properties specific state from Dom node. - */ - virtual bool readXml( const QDomNode& node ); - - /** Write field ui properties specific state from Dom node. - */ - virtual bool writeXml( QDomNode & node, QDomDocument & doc ); - - private: - QList mStyles; -}; - -#endif // QGSFIELDUIPROPERTIES_H +#ifndef QGSFIELDUIPROPERTIES_H +#define QGSFIELDUIPROPERTIES_H + +#include +#include + +#include "qgsfeature.h" +#include "qgsconditionalstyle.h" + +/** \class QgsFieldUIProperties + * Holds extra UI properties for a field. + * + * Currently this object holds informations about condtional styles but in future will hold + * things like field widgets, etc + * + * TODO Move UI field related stuff from QgsVectorLayer here + */ +class CORE_EXPORT QgsFieldUIProperties +{ + public: + QgsFieldUIProperties(); + + /** + * @brief Set the condtional styles for the field UI properties. + * @param styles + */ + void setConditionalStyles( QList styles ); + + /** + * @brief Returns the condtional styles set for the field UI properties + * @return A list of condtional styles that have been set. + */ + QList getConditionalStyles(); + + /** + * @brief Find and return the matching style for the value and feature. + * If no match is found a invalid QgsCondtionalStyle is return. + * + * @return A condtional style that matches the value and feature. + * Check with QgsCondtionalStyle::isValid() + */ + QgsConditionalStyle matchingConditionalStyle( QVariant value, QgsFeature* feature ); + + /** Reads field ui properties specific state from Dom node. + */ + virtual bool readXml( const QDomNode& node ); + + /** Write field ui properties specific state from Dom node. + */ + virtual bool writeXml( QDomNode & node, QDomDocument & doc ); + + private: + QList mStyles; +}; + +#endif // QGSFIELDUIPROPERTIES_H diff --git a/src/ui/qgsfieldconditionalformatwidget.ui b/src/ui/qgsfieldconditionalformatwidget.ui index 25f940fb372..bfda9e3aae2 100644 --- a/src/ui/qgsfieldconditionalformatwidget.ui +++ b/src/ui/qgsfieldconditionalformatwidget.ui @@ -6,8 +6,8 @@ 0 0 - 380 - 336 + 410 + 337 @@ -666,6 +666,31 @@ 1 + + mFieldCombo + listView + mNewButton + mRuleEdit + btnBuildExpression + mDefault1 + mDefault3 + mDefault2 + pushButton_3 + pushButton_8 + pushButton_7 + btnBackgroundColor + btnTextColor + checkIcon + btnChangeIcon + mFontBoldBtn + mFontItalicBtn + mFontUnderlineBtn + mFontStrikethroughBtn + mFontFamilyCmbBx + mSaveRule + mCancelButton + mDeleteButton +