Beispiel #1
0
 void paint( QPainter * painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const override {
     if ( index.column() == 1 ) {
         if ( auto enzyme = MainWindow::instance()->get_protease() ) {
             std::string worded, richText;
             ProteinTable::split( index.data().toString().toStdString(), worded );
             adprot::protease::digest( *enzyme, worded, richText );
             render_sequence( painter, option, QString::fromStdString( richText ) );
         } else
             render_sequence( painter, option, index.data( Qt::DisplayRole ).toString() );
     } else {
         QItemDelegate::paint( painter, option, index );
     }
 }
Beispiel #2
0
int main(int argc, char **argv) {
    struct sequence *seq;

    parse_args(argc, argv);
    detect_columns();
    seq = read_sequence();
    render_sequence(seq,opt_columns,opt_rows);
    return 0;
}