File: convmain.h

package info (click to toggle)
rtklib 2.4.3%2Bdfsg1-2.1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 41,796 kB
  • sloc: cpp: 51,592; ansic: 50,584; fortran: 987; makefile: 861; sh: 45
file content (139 lines) | stat: -rw-r--r-- 3,868 bytes parent folder | download | duplicates (2)
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
//---------------------------------------------------------------------------
#ifndef convmainH
#define convmainH
//---------------------------------------------------------------------------
#include <QMainWindow>
#include <QThread>

#include "ui_convmain.h"

#include "rtklib.h"

class QShowEvent;
class QCloseEvent;
class QSettings;
class QComboBox;
class ConvOptDialog;
class TimeDialog;
class KeyDialog;
class AboutDialog;
class StartDialog;

//Helper Class ------------------------------------------------------------------

class ConversionThread : public QThread
{
    Q_OBJECT
public:
    char ifile[1024],*ofile[7];
    rnxopt_t rnxopt;
    int format;

    explicit ConversionThread(QObject *parent):QThread(parent){
        for (int i=0;i<7;i++)
        {
            ofile[i]=new char[1024];
            ofile[i][0]='\0';
        };
        memset(&rnxopt,0,sizeof(rnxopt_t));
        format=0;
        ifile[0]='\0';
    }

    ~ConversionThread() {
        for (int i=0;i<7;i++) delete[] ofile[i];
    }

protected:
    void run() {
        // convert to rinex
        convrnx(format,&rnxopt,ifile,ofile);
    }
};

//---------------------------------------------------------------------------
class MainWindow : public QMainWindow, public Ui::MainWindow
{
    Q_OBJECT
protected:
    void showEvent           (QShowEvent*);
    void closeEvent          (QCloseEvent*);
    void dragEnterEvent      (QDragEnterEvent *event);
    void dropEvent           (QDropEvent *event);
public slots:
    void FormCreate          ();

    void BtnPlotClick        ();
    void BtnConvertClick     ();
    void BtnOptionsClick     ();
    void BtnExitClick        ();
    void BtnAboutClick       ();
    void BtnTime1Click       ();
    void BtnTime2Click       ();
    void BtnInFileClick      ();
    void BtnOutFile1Click    ();
    void BtnOutFile2Click    ();
    void BtnOutFile3Click    ();
    void BtnOutFile4Click    ();
    void BtnOutFileView1Click();
    void BtnOutFileView2Click();
    void BtnOutFileView3Click();
    void BtnOutFileView4Click();
	
    void TimeStartFClick     ();
    void TimeEndFClick       ();
    void TimeIntFClick       ();
    void OutDirEnaClick     ();
	
    void InFileChange();
    void BtnOutFileView5Click();
    void BtnOutFile5Click();
    void FormatChange();
    void BtnOutFileView6Click();
    void BtnOutFile6Click();
    void OutDirChange();
    void BtnOutDirClick();
    void BtnKeyClick();
    void BtnPostClick();
    void BtnOutFile7Click();
    void BtnOutFileView7Click();
    void BtnInFileViewClick();
    void ConversionFinished();
    void UpdateEnable();

private:
    QString IniFile,CmdPostExe;
    ConversionThread *conversionThread;
//    void DropFiles(TWMDropFiles msg); // for files drop
	
    void ReadList(QComboBox* combo, QSettings *ini, const QString &key);
    void WriteList(QSettings *ini, const QString &key, const QComboBox *combo);
    void AddHist(QComboBox *combo);
	
    int  AutoFormat(const QString &File);
    void ConvertFile(void);
    void SetOutFiles(const QString &infile);
    void GetTime(gtime_t *ts, gtime_t *te, double *tint, double *tunit);
    int  ExecCmd(const QString &cmd);
    QString RepPath(const QString &File);
    void LoadOpt(void);
    void SaveOpt(void);
		
    ConvOptDialog *convOptDialog;
    TimeDialog *timeDialog;
    KeyDialog* keyDialog;
    AboutDialog* aboutDialog;
    StartDialog* startDialog;
public:
	gtime_t RnxTime;
    QString RunBy,Marker,MarkerNo,MarkerType,Name[2],Rec[3],Ant[3];
    QString RnxCode,Comment[2],RcvOption,ExSats;
    QString CodeMask[6];
	double AppPos[3],AntDel[3];
	int RnxVer,RnxFile,NavSys,ObsType,FreqType,TraceLevel,EventEna;
	int AutoPos,ScanObs,OutIono,OutTime,OutLeaps;
	
    explicit MainWindow(QWidget *parent=0);
};
//---------------------------------------------------------------------------
#endif