Subversion Repositories Projects

Rev

Rev 750 | 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 "wgt_Index.h"

#include "../Defines.h"
#include "../TypeDefs.h"

#include "../Classes/cSettings.h"


class dlg_Main : public QMainWindow, public Ui::dlg_Main_UI
{
    Q_OBJECT

    public:
        dlg_Main();
        ~dlg_Main();

    private:
        // Settings-Object
        cSettings *o_Settings;

        wgt_Index *wg_Index[MAX_DebugData];

        // Info über die Hardware
        s_Hardware gs_Version;

        // Datenspeicher zum Senden.
        char c_Data[150];

        s_MK_Debug gs_Debug;

        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();

    private slots:
        void slot_ac_About();

        void slot_ConnectionStatus(int li_Status);
        void slot_MK_Version(s_Hardware ls_Version);
        void slot_MK_Debug(s_MK_Debug ls_Debug);
        void slot_MK_DebugLabels(s_MK_DebugLabels MK_DebugLabels);

//        void slot_ac_Plotter();
//        void slot_ac_Debug();
//        void slot_ac_Chose();

        void slot_ac_ReadLabels();

        void slot_btn_ChoseOK();

        void slot_Plotter_Start();
        void slot_Plotter_Scroll(int Position);
};

#endif // DLG_MAIN_H