Applications/DTIAtlasFiberAnalyzer/DTIAtlasFiberAnalyzerguiwindow.cxx
/* Change the header of a column */
Change the header of a column
Change the header of a column
void DTIAtlasFiberAnalyzerguiwindow::ChangeHeader(int col)
{
    bool ok;
    QTableWidgetItem *header=  new QTableWidgetItem;
    QString headername = QInputDialog::getText(this,"header", "name of the column :", QLineEdit::Normal,
                                               QString::null, &ok);
    if(ok && !headername.isEmpty())
    {
        header->setData( 0, headername );
        CSVtable->setHorizontalHeaderItem(col,header);
        if(col == m_DataCol)
        {
            ColorCol(1);
        }
        if(col == m_DeformationCol)
        {
            ColorCol(2);
        }
        if(col == m_NameCol)
        {
            ColorCol(3);
        }
    }
}
void DTIAtlasFiberAnalyzerguiwindow :: ChangeHeader ( int col ) { bool ok ; QTableWidgetItem * header = new QTableWidgetItem ; QString headername = QInputDialog :: getText ( this , " " , " " , QLineEdit :: Normal , QString :: null , & ok ) ; if ( ok && ! headername . isEmpty ( ) ) { header -> setData ( 0 , headername ) ; CSVtable -> setHorizontalHeaderItem ( col , header ) ; if ( col == m_DataCol ) { ColorCol ( 1 ) ; } if ( col == m_DeformationCol ) { ColorCol ( 2 ) ; } if ( col == m_NameCol ) { ColorCol ( 3 ) ; } } }
Change the header of a column
Change the header of a column
//New header //ask the name