Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 169 → Rev 170

/QMK-Groundstation/tags/V0.6.0/Forms/mktool.h
0,0 → 1,172
/***************************************************************************
* Copyright (C) 2008 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 MKTOOL_H
#define MKTOOL_H
 
#include <QMainWindow>
#include <QSettings>
#include <QString>
#include <QTimer>
#include <QComboBox>
#include <QIcon>
#include <QProcess>
 
#include <qwt_plot_curve.h>
#include <qwt_plot_grid.h>
#include <qwt_legend.h>
#include <qwt_plot.h>
#include "ui_mktool.h"
#include "wdg_Settings.h"
 
#include "../SerialPort/ManageSerialPort.h"
#include "../cSettings.h"
 
class QextSerialPort;
 
class MKTool : public QMainWindow, public Ui::dlg_mktool_UI
{
Q_OBJECT
 
public:
MKTool();
~MKTool();
 
private:
bool AllowSend;
 
// Object für Serielport
ManageSerialPort *serialPort;
 
// Settings-Object (Programmeinstellungen)
cSettings *Settings;
 
// Settings-Widget (FC-Settings)
wdg_Settings *f_Settings;
 
// Default-Ticker
QTimer *Ticker;
 
// Kopie der Tabs des Hauptfensters
QWidget *TabWidgets[6];
 
// Analogwert-Beschreibungen
QLabel *lb_Analog[MaxAnalog];
 
// Analogwerte
int AnalogData[MaxAnalog];
 
// Plots für die Analogwerte
QwtPlotCurve *Plot[MaxAnalog];
 
// Datenspeicher für die Plots
double aData[MaxAnalog][MaxPlot];
double aID[MaxPlot];
int NextPlot;
 
// Ticker-Event-Array
bool TickerEvent[MaxTickerEvents];
bool TickerDiv;
 
// Aktuelle und Max-Anzahl der LCD-Seiten
int LCD_Page;
int LCD_MAX_Page;
 
// Object für das Datenfile;
QFile *CSVFile;
 
sMode Mode;
sRxData RxData;
 
QString RXS;
QString LastSend;
 
// Softwareupdate
QProcess *Update;
 
// Sendedatenbuffer
char TX_Data[150];
 
// FC-Settings
int FCSettings[MaxParameter];
 
// Programm Initialisieren
void init_GUI();
void init_Objects();
void init_Connections();
void init_Arrays();
void init_Plot();
 
// Daten-Plotter
void update_Plot();
void config_Plot();
 
// Daten Senden, Empfangen und verarbeiten
void send_Data(char CMD, int Address, char Data[150],unsigned int Length, bool Resend = true);
void new_RXData(sRxData RX);
 
// Debugdaten anzeigen und speichern.
void show_DebugData();
void write_CSV();
 
// Programmeinstellungen speichern
void set_Preferences();
 
private slots:
void slot_ac_Config();
void slot_ac_Preferences();
void slot_ac_StartPlotter();
void slot_ac_View();
void slot_ac_MehrDaten();
void slot_ac_KeineDaten();
void slot_ac_About();
void slot_ac_GetLabels();
void slot_ac_Motortest();
void slot_pb_HexFile();
 
// Default-Ticker
void slot_Ticker();
 
// LCD-Seite vor / zurück
void slot_LCD_UP();
void slot_LCD_DOWN();
 
void slot_Motortest(int Motor1, int Motor2, int Motor3, int Motor4);
 
// Firmeware-Update
void slot_pb_Update();
void slot_UpdateShell();
 
// Seriell-Port Slots
void slot_newDataReceived(const QByteArray &dataReceived);
void slot_OpenPort();
 
void slot_TabChanged(int Tab);
 
void slot_RecordCSV();
 
void slot_ScrollPlot(int Pos);
 
// FC-Settings lesen / Schreiben
void slot_GetFCSettings();
void slot_SetFCSettings();
};
 
#endif