void Plot2DProfile::setLegendLine( bool showLegendLine ){ QwtText text = title(); if ( showLegendLine ){ setLegendIconSize(QSize(36,8)); text.setColor( "black"); } else { setLegendIconSize(QSize(0,0)); text.setColor( m_defaultColor ); } setTitle( text ); }
BarChart(const QString & title = QString::null) : QwtPlotBarChart(title) { setLegendMode(QwtPlotBarChart::LegendBarTitles); setLegendIconSize(QSize(0, 0)); setLayoutPolicy( AutoAdjustSamples ); setLayoutHint(2.0); // minimum width for a single bar setSpacing(0); // spacing between bars }
DistroChartItem(): QwtPlotBarChart( "Page Hits" ) { setLegendMode( QwtPlotBarChart::LegendBarTitles ); setLegendIconSize( QSize( 10, 14 ) ); setLayoutPolicy( AutoAdjustSamples ); setLayoutHint( 4.0 ); // minimum width for a single bar setSpacing( 10 ); // spacing between bars }
/*! \brief Assign a symbol \param symbol New symbol \sa symbol() */ void QwtPlotMarker::setSymbol( const QwtSymbol *symbol ) { if ( symbol != d_data->symbol ) { delete d_data->symbol; d_data->symbol = symbol; if ( symbol ) setLegendIconSize( symbol->boundingRect().size() ); legendChanged(); itemChanged(); } }