22 #include <QVBoxLayout>
27 const std::string gray{
"#aab7b8"};
28 const std::string blue{
"#1b4f72"};
36 , m_tabWidget(new QTabWidget)
38 auto layout =
new QVBoxLayout(
this);
39 layout->setContentsMargins(0, 0, 0, 0);
52 for (
size_t index = 0; index < parser->
totalLineCount(); ++index) {
53 auto line_data = parser->
getLine(index);
56 m_textView->appendHtml(QString::fromStdString(string_to_show));
Text view to show imported data.
void showData(const ParserInterface *parser)
Sets raw text to the TextView.
ImportTextView * m_textView
LoaderPreviewPanel(QWidget *parent=nullptr)
std::vector< ColumnInfo > columnInfo() const
ImportTableWidget * m_tableWidget
Interface for all classes capable of parsing ASCII data into multicolumn presentation.
virtual std::vector< std::string > parseResults(size_t index) const =0
Returns parsed text for given line index.
virtual std::string getLine(size_t index) const =0
Returns original line.
virtual std::vector< std::vector< std::string > > parsedData() const =0
Returns 2D vector representing parsed text. Skipped lines are not present.
virtual size_t totalLineCount() const =0
Returns total number of lines in raw data.
DAREFLCORE_EXPORT std::string AddHtmlColorTagToParts(const std::string &line, const std::vector< std::string > &parts, const std::string &color_parts, const std::string &color_rest)
Returns string representing original 'line', where 'parts' are surrounded with color tag.
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.