Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
/***************************************************************************
* Copyright (C) 2009 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef DLG_MAIN_H
#define DLG_MAIN_H
#include <QtGui/QMainWindow>
#include <QtGui/QLineEdit>
#include <QtGui/QCheckBox>
#include <QtGui/QLabel>
#include <QtGui/QFont>
#include <QTcpServer>
#include <QTcpSocket>
#include <qwt_plot_curve.h>
#include <qwt_plot_grid.h>
#include <qwt_legend.h>
#include <qwt_plot.h>
#include "ui_dlg_Main.h"
#include "../Defines.h"
#include "../TypeDefs.h"
#include "../Classes/cSettings.h"
#include "../../Global/Kopter.h"
#include "../../Global/Class_Input/Input.h"
#include "../../Global/Class_Input/Input_TCP.h"
#include "../../Global/Class_Input/Input_TTY.h"
#include "../../Global/Class_HandlerIP/HandlerIP.h"
#include "../../Global/Class_HandlerMK/HandlerMK.h"
class dlg_Main : public QMainWindow, public Ui::dlg_Main_UI
{
Q_OBJECT
public:
dlg_Main();
~dlg_Main();
private:
// Input Device.
Input *o_Input;
// Settings-Object
cSettings *o_Settings;
QLabel *lb_Debug[MAX_DebugData];
QLineEdit *le_Debug[MAX_DebugData];
QCheckBox *cb_Debug[MAX_DebugData];
QFont Font_1;
// Info über die Hardware
s_Hardware VersionInfo;
// Datenspeicher zum Senden.
char c_Data[150];
bool get_Analoglabels;
int Debug_Data[MAX_DebugData];
// Plots für die Analogwerte
QwtPlotCurve *Plot[MAX_DebugData];
// Datenspeicher für die Plots
double pl_Data[MAX_DebugData][50000];
double pl_ID[50000];
int NextPlot;
// Programm-Initialisirungen
void init_GUI();
void init_Connections();
void init_Plotter();
void update_Plotter();
void config_Plotter();
// Einkommende Datenpackete zerlegen.
void parse_MK_Data(QString t_Data);
void parse_IP_Data(QString t_Data);
private slots:
void slot_ac_About();
void slot_ac_Connect();
void slot_ac_Plotter();
void slot_ac_Debug();
void slot_ac_Chose();
void slot_ac_ReadLabels();
void slot_btn_ChoseOK();
void slot_rb_Hardware();
void slot_Plotter_Start();
void slot_Plotter_Scroll(int Position);
void slot_sb_Intervall(int t_Intervall);
// Einkommende Datenpackete.
void slot_Input_Data(QString t_Data);
void slot_Input_Disconnected(int Error);
void slot_Input_Connected();
};
#endif // DLG_MAIN_H