/***********************************************************************
**
**   variomodedialog.h
**
**   This file is part of Cumulus.
**
************************************************************************
**
**   Copyright (c): 2004 by Axel Pauli (axel.pauli@onlinehome.de)
**
**   This file is distributed under the terms of the General Public
**   Licence. See the file COPYING for more information.
**
**   $Id: variomodedialog.h,v 1.4 2004/06/16 16:06:10 axel Exp $
**
***********************************************************************/

#ifndef VARIOMODEDIALOG_H
#define VARIOMODEDIALOG_H

#include <qdialog.h>
#include <qpushbutton.h>
#include <qbuttongroup.h>
#include <qtimer.h>
#include <qspinbox.h>
#include <qlabel.h>
#include <qcheckbox.h>

/**
  * @author Axel Pauli
  */

class VarioModeDialog : public QDialog
{
   Q_OBJECT
public:

  VarioModeDialog(QWidget *parent);
  ~VarioModeDialog();

private:
  QButtonGroup* stepGroup;
  QSpinBox*    spinTime;
  QSpinBox*    spinTEK;
  QPushButton* buttonOK;
  QPushButton* buttonCancel;
  QCheckBox*   TEK;
  QLabel*      TekAdj;

  QTimer* timer;
  int     _timeout;
  int     _intTime;
  int     _curWidth;
  bool    _TEKComp;
  int     _TEKAdjust;

private slots:

  void setTimer();
  void accept();
  void reject();
  void change(int newStep);
  void TekChanged( bool newState );
public slots:

  void load();
  void save();

signals:

  /** This slot is called, if the integration time has been changed. Passed
      value in seconds*/
  void newVarioTime(int newTime);
  /** This slot is called, if thei TEK Mode has been changed */
  void newTEKMode(bool newMode);
  /** This slot is called, if thei TEK Mode has been changed */
  void newTEKAdjust(int newAdjust);

};

#endif
