Check-in [7c1d5a319f]

Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added full report creation using cli arg -report
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:7c1d5a319f3f8e8520067753a31e989bc565ea8d
User & Date: avi 2014-09-19 09:48:45
Context
2014-09-19
09:51
Removed unused classes and added fullreportgenerator class check-in: 11b8c3ef2b user: avi tags: trunk
09:48
Added full report creation using cli arg -report check-in: 7c1d5a319f user: avi tags: trunk
2014-07-10
22:03
Fixed bug: when calling RR2 from CLI it continue running after killing app. check-in: 52bbf539a1 user: avi tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to RapidReporter2/Flags.h.

5
6
7
8
9
10
11
12
{
public:
    Flags() {}
    enum OpenCloseTag {OPEN,CLOSE};
    enum HtmlTags {html, head, title, SCRIPT, style, body, div, h1, input, table, th};
};

#endif // AVI_H







|
5
6
7
8
9
10
11
12
{
public:
    Flags() {}
    enum OpenCloseTag {OPEN,CLOSE};
    enum HtmlTags {html, head, title, SCRIPT, style, body, div, h1, input, table, th};
};

#endif

Changes to RapidReporter2/RR2.pro.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

28
29
30
31
32
33
34
35
36
37
38
39
40
41

42
43
44
45
46
47

TARGET = RR2
TEMPLATE = app


SOURCES += main.cpp\
        mainwindow.cpp \
    logger.cpp \
    cliparser.cpp \
    applauncher.cpp \
    htmlstring.cpp \
    screenshot.cpp \
    test.cpp \
    session.cpp \
    note.cpp \
    keyenterreceiver.cpp \
    csv2html.cpp \
    dialogrtf.cpp


HEADERS  += mainwindow.h \
    logger.h \
    cliparser.h \
    applauncher.h \
    htmlstring.h \
    screenshot.h \
    test.h \
    Flags.h \
    session.h \
    note.h \
    keyenterreceiver.h \
    csv2html.h \
    dialogrtf.h


FORMS    += mainwindow.ui \
    dialogrtf.ui

OTHER_FILES += \
    RevisionHistory.txt







<




<

<


|
>


<




<


<


|
>






10
11
12
13
14
15
16

17
18
19
20

21

22
23
24
25
26
27

28
29
30
31

32
33

34
35
36
37
38
39
40
41
42
43

TARGET = RR2
TEMPLATE = app


SOURCES += main.cpp\
        mainwindow.cpp \

    cliparser.cpp \
    applauncher.cpp \
    htmlstring.cpp \
    screenshot.cpp \

    session.cpp \

    keyenterreceiver.cpp \
    csv2html.cpp \
    dialogrtf.cpp \
    fullreportgenerator.cpp

HEADERS  += mainwindow.h \

    cliparser.h \
    applauncher.h \
    htmlstring.h \
    screenshot.h \

    Flags.h \
    session.h \

    keyenterreceiver.h \
    csv2html.h \
    dialogrtf.h \
    fullreportgenerator.h

FORMS    += mainwindow.ui \
    dialogrtf.ui

OTHER_FILES += \
    RevisionHistory.txt

Changes to RapidReporter2/applauncher.cpp.

2
3
4
5
6
7
8

9
10
11
12
13

14
15

16
17

18
19
20


21
22
23


AppLauncher::AppLauncher(int argc, char *argv[], QObject *parent) :
    QObject(parent)
{
    CliParser cliPraser;
    Csv2Html csv2Html;


    MainWindow * w = new MainWindow();

    connect(&cliPraser,SIGNAL(EmitStartRR2Gui()),
            w,SLOT(show()));

    connect(&cliPraser,SIGNAL(EmitStartWithSpecialUserTypes(QStringList)),
            w,SLOT(StartWithSpecialUserTypes(QStringList)));

    connect(&cliPraser,SIGNAL(EmitConvertCsvToHtml(QString)),
            &csv2Html,SLOT(StartConvertSlot(QString)));

    connect(&cliPraser,SIGNAL(EmitShowHelp()),
            w,SLOT(ShowHelp()));




    cliPraser.ParseCliArgs(argc,argv);
}







>





>


>


>



>
>



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29


AppLauncher::AppLauncher(int argc, char *argv[], QObject *parent) :
    QObject(parent)
{
    CliParser cliPraser;
    Csv2Html csv2Html;
    FullReportGenerator fullReportGenerator;

    MainWindow * w = new MainWindow();

    connect(&cliPraser,SIGNAL(EmitStartRR2Gui()),
            w,SLOT(show()));

    connect(&cliPraser,SIGNAL(EmitStartWithSpecialUserTypes(QStringList)),
            w,SLOT(StartWithSpecialUserTypes(QStringList)));

    connect(&cliPraser,SIGNAL(EmitConvertCsvToHtml(QString)),
            &csv2Html,SLOT(StartConvertSlot(QString)));

    connect(&cliPraser,SIGNAL(EmitShowHelp()),
            w,SLOT(ShowHelp()));

    connect(&cliPraser,SIGNAL(EmitGenerateFullReport()),
            &fullReportGenerator,SLOT(GenerateFullReport()));

    cliPraser.ParseCliArgs(argc,argv);
}

Changes to RapidReporter2/applauncher.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

23
24
25
26
27
28
29
#ifndef APPLAUNCHER_H
#define APPLAUNCHER_H

#include <QApplication>
#include <QDebug>
#include <iostream>
#include <QString>
#include <logger.h>
#include <qlogging.h>
#include <QPixmap>
#include <QtWidgets>

#include "mainwindow.h"
#include "applauncher.h"
#include "screenshot.h"
#include <QBitmap>
#include <QPixmap>
#include <QWidget>
#include "Flags.h"
#include "session.h"
#include "cliparser.h"
#include "csv2html.h"


class AppLauncher : public QObject
{
    Q_OBJECT
public:
    explicit AppLauncher(int argc, char *argv[],QObject *parent = 0);








<
<













>







1
2
3
4
5
6
7


8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef APPLAUNCHER_H
#define APPLAUNCHER_H

#include <QApplication>
#include <QDebug>
#include <iostream>
#include <QString>


#include <QPixmap>
#include <QtWidgets>

#include "mainwindow.h"
#include "applauncher.h"
#include "screenshot.h"
#include <QBitmap>
#include <QPixmap>
#include <QWidget>
#include "Flags.h"
#include "session.h"
#include "cliparser.h"
#include "csv2html.h"
#include "fullreportgenerator.h"

class AppLauncher : public QObject
{
    Q_OBJECT
public:
    explicit AppLauncher(int argc, char *argv[],QObject *parent = 0);

Changes to RapidReporter2/cliparser.cpp.

20
21
22
23
24
25
26


27
28
29
30
31
32
33
    if (1 == argc)
    {
        emit EmitStartRR2Gui();
        return;
    }

    QString firstArg = (QString)argv[1];



    // Parse help
    if (helpStrings.contains(firstArg,Qt::CaseInsensitive))
    {
        emit(CliParser::EmitShowHelp());
        exit(0);
    }







>
>







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
    if (1 == argc)
    {
        emit EmitStartRR2Gui();
        return;
    }

    QString firstArg = (QString)argv[1];
    firstArg = firstArg.toLower();


    // Parse help
    if (helpStrings.contains(firstArg,Qt::CaseInsensitive))
    {
        emit(CliParser::EmitShowHelp());
        exit(0);
    }

Changes to RapidReporter2/csv2html.cpp.

12
13
14
15
16
17
18



19
20
21
22
23
24
25
void Csv2Html::setCSVfile(QString csvFileName)
{
    csvFile = csvFileName;
}

void Csv2Html::StartConvert(bool relativePath)
{



    if (csvFile.isEmpty() || csvFile.isNull())
    {
        // add error to logger
        return;
    }









>
>
>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
void Csv2Html::setCSVfile(QString csvFileName)
{
    csvFile = csvFileName;
}

void Csv2Html::StartConvert(bool relativePath)
{

    qDebug() << "StartConvert was called with relativePath = " + relativePath;

    if (csvFile.isEmpty() || csvFile.isNull())
    {
        // add error to logger
        return;
    }


Changes to RapidReporter2/main.cpp.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#include <QApplication>
#include <QDebug>
#include <iostream>
#include <QString>
#include <logger.h>
#include <qlogging.h>
#include <QPixmap>
#include <QtWidgets>

#include "mainwindow.h"
#include "applauncher.h"
#include "screenshot.h"
#include <QBitmap>
#include <QPixmap>
#include <QWidget>
#include "Flags.h"
#include "session.h"
#include "cliparser.h"

//using namespace std;

class QProcess;
class QTime;
class QDate;


int main(int argc, char *argv[])
{
    //for later use
//    QString absoluteFilePath = QDir::currentPath();
//    QString exeFilePath = qApp->applicationDirPath();

    ///todo - add identation func
    ///
    ///
    ///
    ///

    QApplication app(argc, argv);

//    Session s("Avi","Test RR2");
//    s.StartSession();
//    QThread::sleep(2);
//    s.CloseSession();

    AppLauncher appLauncher(argc,argv);



//    Convert_Csv2Html c2html("RR2_12162013_191548.csv");
//    c2html.StartConvert(false);

//    MainWindow w;
//    w.show();

    //    QString wd = qApp->applicationDirPath();

//     Csv2HtmlConverter converter("20131110_132124.csv");
//     converter.writeHtmlTag(Flags::html,Flags::OPEN);

//    Screenshot s;
//    s.ShootScreenSlot();

    //UiTempConnector uiTempConnector;

    return app.exec();
}






<
<













<
<






|
<
<
<
<
<
<
<
<
<



<
<
<
<
<


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




1
2
3
4


5
6
7
8
9
10
11
12
13
14
15
16
17


18
19
20
21
22
23
24









25
26
27





28
29


















30
31
32
33
#include <QApplication>
#include <QDebug>
#include <iostream>
#include <QString>


#include <QPixmap>
#include <QtWidgets>

#include "mainwindow.h"
#include "applauncher.h"
#include "screenshot.h"
#include <QBitmap>
#include <QPixmap>
#include <QWidget>
#include "Flags.h"
#include "session.h"
#include "cliparser.h"



class QProcess;
class QTime;
class QDate;


int main(int argc, char *argv[])
{   










    QApplication app(argc, argv);






    AppLauncher appLauncher(argc,argv);



















    return app.exec();
}


Changes to RapidReporter2/session.h.

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

#include <QObject>
#include <QTimer>
#include <QDateTime>
#include <QString>
#include <QStringList>
#include <QFile>
#include "note.h"
#include "screenshot.h"
#include "dialogrtf.h"

class Session : public QObject
{
    Q_OBJECT








<







3
4
5
6
7
8
9

10
11
12
13
14
15
16

#include <QObject>
#include <QTimer>
#include <QDateTime>
#include <QString>
#include <QStringList>
#include <QFile>

#include "screenshot.h"
#include "dialogrtf.h"

class Session : public QObject
{
    Q_OBJECT