File: GeneratorWindow.hpp

package info (click to toggle)
vite 1.2%2Bsvn1430-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 20,164 kB
  • ctags: 3,915
  • sloc: cpp: 26,903; makefile: 455; sh: 111; ansic: 67
file content (115 lines) | stat: -rw-r--r-- 3,376 bytes parent folder | download | duplicates (6)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#ifndef _VITE_GENERATORWINDOW_
#define _VITE_GENERATORWINDOW_

#include <QMainWindow>
#include <QtGui/QApplication>

#include "ui_mainWindowGenerate.h"
#include "Generator.hpp"


    // Default values
static const QString NAME          = "trace";
static const int     DEPTH         = 2;
static const int     PROCNBR       = 16;
static const int     NUMBEROFSTATE = 10;
static const int     NUMBEROFLINE  = 10000;
static const bool    COUNTER       = true;
static const bool    EVENT         = true;
static const bool    LINK          = true;
static const int     LINKNBR       = 8;
static const int     EVENTNBR      = 8;
static const int     COUNTERNBR    = 8;
static const int     LINKTYPENBR   = 5;
static const int     EVENTTYPENBR  = 5;


class GeneratorWindow : public QMainWindow, protected Ui_generatorBody{
    Q_OBJECT
private :
    QApplication* _app;

    // Values 
    QString _name          ; // Name of the file to create
    int     _depth         ; // Depth of the container tree
    int     _procNbr       ; // Number of procs
    int     _numberOfState ; // Number of different states
    int     _numberOfLine  ; // Number of lines in the file
    bool    _counter       ; // If counter are enabled
    bool    _event         ; // If events are enabled
    bool    _link          ; // If link are enabled
    int     _linkNbr       ; // Number of proc with links
    int     _eventNbr      ; // Number of proc with events
    int     _linkTypeNbr   ; // Number of type of links
    int     _eventTypeNbr  ; // Number of type of events
    int     _counterNbr    ; // Number of proc with counters
    bool    _paje          ; // If paje enabled
    bool    _tau           ; // If tau enabled
    bool    _otf           ; // If otf enabled

    // Trace Writers
    Generator* _gene;


    // UI Elements
    QLineEdit* _ui_name         ;
    QLineEdit* _ui_depth        ;
    QLineEdit* _ui_procNbr      ;
    QLineEdit* _ui_numberOfState;
    QLineEdit* _ui_numberOfLine ;
    QLineEdit* _ui_counterNbr   ;
    QLineEdit* _ui_linkNbr      ;
    QLineEdit* _ui_eventNbr     ;
    QLineEdit* _ui_linkTypeNbr  ;
    QLineEdit* _ui_eventTypeNbr ;
    QCheckBox* _ui_counter      ;
    QCheckBox* _ui_link         ;
    QCheckBox* _ui_event        ;
    QLabel   * _ui_counterLabel ;
    QLabel   * _ui_linkLabel    ;
    QLabel   * _ui_eventLabel   ;
    QCheckBox* _ui_paje         ;
    QCheckBox* _ui_tau          ;
    QCheckBox* _ui_otf          ;
    QPushButton* generateButton;
    QPushButton* resetButton;

    // To hide the counter edit line
    void hideCounter ();
    // To hide the link edit line
    void hideLink    ();
    // To hide the event edit line
    void hideEvent   ();
    // To show the counter edit line
    void showCounter ();
    // To show the link edit line
    void showLink    ();
    // To show the event edit line
    void showEvent   ();
    // To set the param to launch
    void setParam    ();
    // To end the creation
    void finishGeneration ();

public :

    // Constructor
    GeneratorWindow  (QWidget* parent, QApplication* app);
    // Destructor
    ~GeneratorWindow ();
    // Main function that launch the creation of the traces
    void generate    ();
    void cleanParam ();
    int run ();

protected slots :
    void generateButton_clicked ();
    void resetButton_clicked    ();



};


#endif