Line data Source code
1 : #include "style.hpp" 2 : 3 : namespace qtreports { 4 : namespace detail { 5 : 6 38 : Style::Style() : 7 : m_isDefault( false ), 8 : m_isBold( false ), 9 : m_isItalic( false ), 10 : m_isUnderline( false ), 11 : m_isStrikeThrough( false ), 12 : m_fontSize( 12 ), 13 38 : m_isPDFEmbedded( false ) {} 14 : 15 76 : Style::~Style() {} 16 : 17 3 : bool Style::isDefault() const { 18 3 : return m_isDefault; 19 : } 20 : 21 37 : void Style::setAsDefault( bool flag ) { 22 37 : m_isDefault = flag; 23 37 : } 24 : 25 27 : const QString Style::getFontName() const 26 : { 27 27 : return m_fontName; 28 : } 29 : 30 37 : void Style::setFontName( const QString &name ) 31 : { 32 37 : m_fontName = name; 33 37 : } 34 : 35 27 : int Style::getFontSize() const { 36 27 : return m_fontSize; 37 : } 38 : 39 37 : void Style::setFontSize( int size ) { 40 37 : m_fontSize = size; 41 37 : } 42 : 43 25 : const QColor Style::getFontColor() const { 44 25 : return m_fontColor; 45 : } 46 : 47 7 : void Style::setFontColor( const QColor & color ) { 48 7 : m_fontColor = color; 49 7 : } 50 : 51 26 : bool Style::isBold() const 52 : { 53 26 : return m_isBold; 54 : } 55 : 56 7 : void Style::setBold( bool flag ) 57 : { 58 7 : m_isBold = flag; 59 7 : } 60 : 61 26 : bool Style::isItalic() const 62 : { 63 26 : return m_isItalic; 64 : } 65 : 66 7 : void Style::setItalic( bool flag ) 67 : { 68 7 : m_isItalic = flag; 69 7 : } 70 : 71 12 : bool Style::isUnderline() const 72 : { 73 12 : return m_isUnderline; 74 : } 75 : 76 6 : void Style::setUnderline( bool flag ) 77 : { 78 6 : m_isUnderline = flag; 79 6 : } 80 : 81 12 : bool Style::isStrikeThrough() const 82 : { 83 12 : return m_isStrikeThrough; 84 : } 85 : 86 6 : void Style::setStrikeThrough( bool flag ) 87 : { 88 6 : m_isStrikeThrough = flag; 89 6 : } 90 : 91 4 : const QString Style::getPDFFontName() const { 92 4 : return m_pdfFontName; 93 : } 94 : 95 37 : void Style::setPDFFontName( const QString & name ) { 96 37 : m_pdfFontName = name; 97 37 : } 98 : 99 4 : const QString Style::getPDFEncoding() const { 100 4 : return m_pdfEncoding; 101 : } 102 : 103 37 : void Style::setPDFEncoding( const QString & encoding ) { 104 37 : m_pdfEncoding = encoding; 105 37 : } 106 : 107 2 : bool Style::isPDFEmbedded() const { 108 2 : return m_isPDFEmbedded; 109 : } 110 : 111 37 : void Style::setPDFEmbedded( bool isEmbedded ) { 112 37 : m_isPDFEmbedded = isEmbedded; 113 37 : } 114 : 115 : } 116 : }