repository for casafeather app
Source
xxxxxxxxxx
int rowCount = gridSize.first;
int columnCount = gridSize.second;
if ( rowCount > 0 && columnCount > 0 ){
//Add the legend/remove legend.
if ( legendVisible ){
if ( legendHolder == NULL ){
legendHolder = new QWidget( this);
legendHolder->setMinimumSize( 800, 50 );
legendHolder->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred );
}
gridLayout->addWidget(legendHolder,rowCount, 0, 1, columnCount, Qt::AlignHCenter);
// Add legend to next row, spanning all columns
gridLayout->addWidget(
legendHolder, rowCount, 0, 1, columnCount, Qt::AlignHCenter | Qt::AlignTop);
if ( xAxisUV ){
plots[SLICE_X]->insertLegend( legendHolder );
}
else {
plots[SLICE_DISTANCE]->insertLegend( legendHolder );
}
}
}
setLayout( gridLayout );
}