| 544 | |
| 545 | |
| 546 | void CsvWindow::showInfoWindow() { |
| 547 | My_Fl_Small_Window *modal; |
| 548 | Fl_Help_View *helpView; |
| 549 | std::ostringstream htmlStream; |
| 550 | CsvDefinition definition; |
| 551 | |
| 552 | definition = table->getDefinition(); |
| 553 | |
| 554 | std::string separator = CsvDefinition::getDelimiterName(definition.delimiter);; |
| 555 | std::string quote(1,definition.quote); |
| 556 | std::string escape(1,definition.escape); |
| 557 | std::string encoding = CsvDefinition::getEncodingName(definition.encoding); |
| 558 | std::string filePath = getPath(); |
| 559 | if( filePath == "" ) { |
| 560 | filePath = getName(); |
| 561 | } |
| 562 | |
| 563 | |
| 564 | htmlStream << |
| 565 | "<html>" << |
| 566 | "<body bgcolor=\"" << TCRUNCHER_SMALL_WINDOW_BACKGROUND_HTMLCODE << "\">" << |
| 567 | "<h2>File</h2>" |
| 568 | "<br>" << |
| 569 | filePath << |
| 570 | "<h2>Table Size</h2>" |
| 571 | "<br>" << |
| 572 | "Rows: " << |
| 573 | table->getNumberRows() << |
| 574 | "<br>" << |
| 575 | "Columns: " << |
| 576 | table->getNumberCols() << |
| 577 | "<br>" << |
| 578 | "Flagged Rows: " << |
| 579 | table->countFlaggedRows() << |
| 580 | "<h2>CSV Format</h2>" |
| 581 | "<br>" << |
| 582 | "Encoding: " << |
| 583 | encoding << |
| 584 | "<br>" << |
| 585 | "Separator: " << |
| 586 | separator << |
| 587 | "<br>" << |
| 588 | "Enclosed: " << |
| 589 | quote << |
| 590 | "</body>" << |
| 591 | "</html>"; |
| 592 | |
| 593 | |
| 594 | modal = new My_Fl_Small_Window(640,480); |
| 595 | modal->set_modal(); |
| 596 | modal->color(TCRUNCHER_SMALL_WINDOW_BACKGROUND); |
| 597 | modal->label("CSV Information"); |
| 598 | |
| 599 | helpView = new Fl_Help_View(20,20, 600,440); |
| 600 | helpView->textsize(12); |
| 601 | helpView->textfont(FL_HELVETICA); |
| 602 | helpView->box(FL_FLAT_BOX); |
| 603 | helpView->value( htmlStream.str().c_str() ); |
no test coverage detected