/***********************************************************************
**
**   wpeditdialog.h
**
**   This file is part of Cumulus.
**
************************************************************************
**
**   Copyright (c):  2002 by André Somers
**
**   This file is distributed under the terms of the General Public
**   Licence. See the file COPYING for more information.
**
**   $Id: wpeditdialog.h,v 1.1.1.1 2002/09/22 12:06:03 heiner Exp $
**
***********************************************************************/

#ifndef WPEDITDIALOG_H
#define WPEDITDIALOG_H

#include <qwidget.h>
#include <qtabdialog.h>
#include <qmultilineedit.h>
#include "wp.h"

/**The WPEditDialog allows the editing of waypoint.
  *@author André Somers
  */

class WPEditDialog : public QTabDialog  {
   Q_OBJECT
public: 
	WPEditDialog(QWidget *parent=0, const char *name=0, wayPoint * wp=0);
	~WPEditDialog();
  /** Called if OK button is pressed? */
  void accept();

private slots: // Private slots
  /** This slot is called just before showing the dialog, and loads the current settings. */
  void slot_LoadCurrent();

signals: // Signals
  /** Signal emitted to indicate the settings should be saved to the configurationfile */
  void save(wayPoint *);

  /** Emitted to indicate that the settings should be (re-) loaded from the configurationfile. */
  void load(wayPoint *);

  /** this signal is emitted after a save procedure has occured. It gives connected objects the change to adjust to new settings. */
  void settingsChanged();

private:
  wayPoint * _wp;
  QMultiLineEdit * comment;

signals: // Signals
  /** This signal is emitted after a waypoint has been saved. It is used to re-fill the waypointlist. */
  void wpListChanged(wayPoint *);
};

#endif
