Line data Source code
1 : #include "section.hpp" 2 : 3 : namespace qtreports 4 : { 5 : namespace detail 6 : { 7 : 8 67 : Section::Section() : 9 : m_width( 0 ), 10 67 : m_height( 0 ) 11 67 : {} 12 : 13 79 : Section::~Section() {} 14 : 15 0 : void Section::setWidth( int width ) 16 : { 17 0 : m_width = width; 18 0 : } 19 : 20 0 : int Section::getWidth() const 21 : { 22 0 : return m_width; 23 : } 24 : 25 11 : int Section::getHeight() const 26 : { 27 11 : return m_height; 28 : } 29 : 30 70 : void Section::addBand( const BandPtr & band ) 31 : { 32 70 : m_bands.append( band ); 33 70 : m_height += band->getHeight(); 34 70 : } 35 : 36 38 : const BandPtr Section::getBand( int index ) const 37 : { 38 38 : return m_bands.value( index ); 39 : } 40 : 41 6 : int Section::getBandsSize() const 42 : { 43 6 : return m_bands.size(); 44 : } 45 : 46 1011 : const QVector< BandPtr > Section::getBands() const 47 : { 48 1011 : return m_bands; 49 : } 50 : 51 : } 52 : }