/***********************************************************************
**
**   preflightdialog.h
**
**   This file is part of Cumulus.
**
************************************************************************
**
**   Copyright (c):  2003 by André Somers
**
**   This file is distributed under the terms of the General Public
**   Licence. See the file COPYING for more information.
**
**   $Id: preflightdialog.h,v 1.7 2004/04/20 19:39:44 axel Exp $
**
***********************************************************************/

#ifndef PREFLIGHTDIALOG_H
#define PREFLIGHTDIALOG_H

#include <qtabdialog.h>
#include "tasklist.h"

/**
  *@short dialog for pre-flight settings
  *This dialog provides an interface to set all the pre-flight settings like
  *glidertype, co-pilot, task, amount of water taken on, etc.
  *@author André Somers
  */

class PreFlightGliderPage;
class PreFlightMiscPage;

class PreFlightDialog : public QTabDialog  {
  Q_OBJECT
public:
  /**
   * Constructor
   * @argument parent Pointer to parentwidget
   * @argument name Name of the page to be displayed. Current options: "taskselection".
   *                Any other string will select glider page.
   */
	PreFlightDialog(QWidget * parent, const char * name);
  /**
   * Destructor
   */
	~PreFlightDialog();

protected slots:
  /**
   * Called if dialog is accepted (OK button is clicked)
   */
  virtual void accept();
  /**
   * Called if dialog is rejected (X button is clicked)
   */
  virtual void reject();

private slots:

  void keyLeft();
  void keyRight();

private:

  TaskList * taskpage;
  PreFlightGliderPage * gliderpage;
  PreFlightMiscPage * miscpage;

signals:
  void settingsChanged();

};

#endif
