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 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
|
//---------------------------------------------------------------------------
#ifndef navimainH
#define navimainH
//---------------------------------------------------------------------------
#include <QDialog>
#include <QColor>
#include <QSystemTrayIcon>
#include <QTimer>
#include <QMenu>
#include "rtklib.h"
#include "ui_navimain.h"
#define MAXSCALE 18
#define MAXMAPPNT 10
class AboutDialog;
class OptDialog;
class InputStrDialog;
class OutputStrDialog;
class LogStrDialog;
class MonitorDialog;
//---------------------------------------------------------------------------
class MainWindow : public QDialog, private Ui::MainForm
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
public slots:
void TimerTimer ();
void BtnStartClick ();
void BtnStopClick ();
void BtnPlotClick ();
void BtnOptClick ();
void BtnExitClick ();
void BtnTimeSysClick ();
void BtnInputStrClick ();
void BtnOutputStrClick ();
void BtnLogStrClick ();
void BtnSolTypeClick ();
void BtnPlotType1Click ();
void BtnMonitorClick ();
void BtnSaveClick ();
void BtnAboutClick ();
void BtnTaskTrayClick ();
void MenuExpandClick ();
void MenuStartClick ();
void MenuStopClick ();
void MenuPlotClick ();
void MenuMonitorClick ();
void MenuExitClick ();
void ScbSolChange ();
void TrayIconClick (QSystemTrayIcon::ActivationReason);
void BtnFreqType1Click();
void BtnPanelClick();
void BtnPlotType2Click();
void BtnFreqType2Click();
protected:
void showEvent (QShowEvent*);
void closeEvent (QCloseEvent *);
private:
tle_t TLEData;
AboutDialog *aboutDialog;
OptDialog *optDialog;
InputStrDialog *inputStrDialog;
OutputStrDialog *outputStrDialog;
LogStrDialog *logStrDialog;
MonitorDialog *monitor;
QSystemTrayIcon *systemTray;
QMenu * trayMenu;
QAction *MenuStartAction,*MenuStopAction,*MenuExitAction;
void UpdateLog (int stat, gtime_t time, double *rr, float *qr,
double *rb, int ns, double age, double ratio);
void SvrStart (void);
void SvrStop (void);
void UpdatePanel (void);
void UpdateTimeSys(void);
void UpdateSolType(void);
void UpdateFont (void);
void UpdateTime (void);
void UpdatePos (void);
void UpdateStr (void);
void DrawPlot (QLabel *plot, int type, int freq);
void UpdatePlot (void);
void ChangePlot (void);
int ConfOverwrite(const QString &path);
void DrawSnr (QPainter *c, int w, int h, int top, int index, int freq);
void DrawSat (QPainter *c, int w, int h, int x0, int y0, int index, int freq);
void DrawBL (QPainter *c, int w, int h);
void DrawSky (QPainter *c, int w, int h, int x0, int y0);
void DrawText (QPainter *c, int x, int y, const QString &s,
const QColor &color, int align);
void DrawArrow (QPainter *c, int x, int y, int siz,
int ang, const QColor &color);
void OpenMoniPort (int port);
void InitSolBuff (void);
void SaveLog (void);
void LoadNav (nav_t *nav);
void SaveNav (nav_t *nav);
void LoadOpt (void);
void SaveOpt (void);
void SetTrayIcon (int index);
int ExecCmd (const QString &cmd, int show);
QColor SnrColor (int snr);
public:
QString IniFile;
int PanelStack,PanelMode;
int SvrCycle,SvrBuffSize,Scale,SolBuffSize,NavSelect,SavedSol;
int NmeaReq,NmeaCycle,InTimeTag,OutTimeTag,OutAppend,LogTimeTag,LogAppend;
int TimeoutTime,ReconTime,SbasCorr,DgpsCorr,TideCorr,FileSwapMargin;
int Stream[MAXSTRRTK],StreamC[MAXSTRRTK],Format[MAXSTRRTK];
int CmdEna[3][2],CmdEnaTcp[3][2];
int TimeSys,SolType,PlotType1,FreqType1,PlotType2,FreqType2;
int MoniPort,OpenPort;
int PSol,PSolS,PSolE,Nsat[2],SolCurrentStat;
int Sat[2][MAXSAT],Snr[2][MAXSAT][NFREQ],Vsat[2][MAXSAT];
double Az[2][MAXSAT],El[2][MAXSAT];
gtime_t *Time;
int *SolStat,*Nvsat;
double *SolRov,*SolRef,*Qr,*VelRov,*Age,*Ratio;
QString Paths[MAXSTRRTK][4],Cmds[3][2],CmdsTcp[3][2];
QString InTimeStart,InTimeSpeed,ExSats;
QString RcvOpt[3],ProxyAddr;
QString OutSwapInterval,LogSwapInterval;
prcopt_t PrcOpt;
solopt_t SolOpt;
QFont PosFont;
int DebugTraceF,DebugStatusF,OutputGeoidF,BaselineC;
int RovPosTypeF,RefPosTypeF,RovAntPcvF,RefAntPcvF;
QString RovAntF,RefAntF,SatPcvFileF,AntPcvFileF;
double RovAntDel[3],RefAntDel[3],RovPos[3],RefPos[3],NmeaPos[2];
double Baseline[2];
QString History[10],MntpHist[10];
QTimer Timer;
QString GeoidDataFileF,StaPosFileF,DCBFileF,EOPFileF,TLEFileF;
QString TLESatFileF,LocalDirectory,PntName[MAXMAPPNT];
double PntPos[MAXMAPPNT][3];
int NMapPnt;
};
extern MainWindow *mainForm;
//---------------------------------------------------------------------------
#endif
|