<commit_before>/***************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (<EMAIL>)
**
** This file is part of Testability Driver.
**
** If you have questions regarding the use of this file, please contact
** Nokia at <EMAIL> .
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation
** and appearing in the file LICENSE.LGPL included in the packaging
** of this file.
**
****************************************************************************/



#include "tdriver_main_window.h"
#include "tdriver_image_view.h"

#include "../common/version.h"

#include "tdriver_tabbededitor.h"

#include <QUrl>
#include <QScrollArea>
#include <QToolBar>

#include "tdriver_debug_macros.h"

void MainWindow::setupTableWidgetHeader( QString headers, QTableWidget * table)
{

    QStringList tableHeader = headers.split("|");
    table->setColumnCount( tableHeader.count() );

    for( int i = 0; i < tableHeader.count(); i++ ) {
        QTableWidgetItem *item = new QTableWidgetItem( tableHeader.at(i) );
        //item->setFont( *defaultFont );
        table->setHorizontalHeaderItem( i, item );
    }

}

void MainWindow::showAboutVisualizer() {

    QMessageBox::about(
            this,
            tr("About Visualizer"),
            tr("<table><tr><td width=\"250\" align=\"center\" valign=\"middle\">") +
            tr("TDriver Visualizer") +
            tr("<br>Build number: <b>") + VISUALIZER_VERSION + tr("</b>") +
            tr("</tr></td></table>")
            );

}

//    Shows the Visualizer help page.
void MainWindow::showVisualizerHelp()
{
    //showContextVisualizerAssistant("howto-visualizer.html");
    //QUrl helpUrl("https://cwiki.nokia.com/Testability/TDriverVisualizer");

    QUrl helpUrl(TDriverUtil::helpUrlString("/howto-use-visualizer.html"));
    QDesktopServices::openUrl(helpUrl);
}

//    Shows the main TDriver Visualizer help page.
void MainWindow::showMainVisualizerAssistant()
{
    QUrl helpUrl(TDriverUtil::helpUrlString("index.html"));
    QDesktopServices::openUrl(helpUrl);
}

//    Shows the defined help page
void MainWindow::showContextVisualizerAssistant(const QString& page)
{

    Q_UNUSED( page );

    //QStringList argList;
    //argList << "/C" << "help\\index.html";

    //QProcess* helpProc = new QProcess(this);<commit_msg>Updated help to open the public wiki pages<commit_after>/***************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (<EMAIL>)
**
** This file is part of Testability Driver.
**
** If you have questions regarding the use of this file, please contact
** Nokia at <EMAIL> .
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation
** and appearing in the file LICENSE.LGPL included in the packaging
** of this file.
**
****************************************************************************/



#include "tdriver_main_window.h"
#include "tdriver_image_view.h"

#include "../common/version.h"

#include "tdriver_tabbededitor.h"

#include <QUrl>
#include <QScrollArea>
#include <QToolBar>

#include "tdriver_debug_macros.h"

void MainWindow::setupTableWidgetHeader( QString headers, QTableWidget * table)
{

    QStringList tableHeader = headers.split("|");
    table->setColumnCount( tableHeader.count() );

    for( int i = 0; i < tableHeader.count(); i++ ) {
        QTableWidgetItem *item = new QTableWidgetItem( tableHeader.at(i) );
        //item->setFont( *defaultFont );
        table->setHorizontalHeaderItem( i, item );
    }

}

void MainWindow::showAboutVisualizer() {

    QMessageBox::about(
            this,
            tr("About Visualizer"),
            tr("<table><tr><td width=\"250\" align=\"center\" valign=\"middle\">") +
            tr("TDriver Visualizer") +
            tr("<br>Build number: <b>") + VISUALIZER_VERSION + tr("</b>") +
            tr("</tr></td></table>")
            );

}

//    Shows the Visualizer help page.
void MainWindow::showVisualizerHelp()
{
    //showContextVisualizerAssistant("howto-visualizer.html");
    //QUrl helpUrl("https://cwiki.nokia.com/Testability/TDriverVisualizer");

    QUrl helpUrl("https://projects.forum.nokia.com/Testabilitydriver/wiki/FeatureVisualizer");
    QDesktopServices::openUrl(helpUrl);
}

//    Shows the main TDriver Visualizer help page.
void MainWindow::showMainVisualizerAssistant()
{
    QUrl helpUrl("https://projects.forum.nokia.com/Testabilitydriver/wiki/FeatureDocumentation");
    QDesktopServices::openUrl(helpUrl);
}

//    Shows the defined help page
void MainWindow::showContextVisualizerAssistant(const QString& page)
{

    Q_UNUSED( page );

    //QStringList argList;
    //argList << "/C" << "help\\index.html";

    //QProcess* helpProc = new QProcess(this);
{'fraction_non_alphanumeric': 0.1904304381245196, 'fraction_numerical': 0.003843197540353574, 'mean_word_length': 3.9808612440191387, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 37, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6136299', 'n_tokens_mistral': 1552, 'n_tokens_neox': 1479, 'n_words': 384}