///////////////////////////////////////////////////////////
// File:			pg_dlg_average_gauges.h
//
// Author:			Stefan Liersch
// Contact:			stefan.liersch@googlemail.com,
//					stefan.liersch@ufz.de
//
// Date:			2007-08-30
// last modified:	2007-09-02
//
//---------------------------------------------------------
// DESCRIPTION
//---------------------------------------------------------
// DIALOG for
// Calculating an average time series of selected gauges
// This dialog is using functions declared in
// class: 'Crr_dlg_preproc'
//
//---------------------------------------------------------
// ToDo
//---------------------------------------------------------
// 
//
///////////////////////////////////////////////////////////

//---------------------------------------------------------

#ifndef __PG_DLG_AVERAGE_GAUGES_H__
#define __PG_DLG_AVERAGE_GAUGES_H__

#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
    #pragma interface "pg_dlg_average_gauges"
#endif

// Include wxWidgets' headers
#ifndef WX_PRECOMP
    #include <wx/wx.h>
#endif

#include "wx/datetime.h"
#include <wx/arrstr.h>

#include "saga_gui/wksp_shapes.h"
#include "saga_gui/res_commands.h"

#include "hydrology/rr_dlg_preproc.h"
#include "hydrology/rr_preprocessing.h"
#include "hydrology/pg_timeseries.h"	// Class CTimeSeries
#include "pgsql/pgdatabase.h"			// database functions
#include "pgsql/pg_lu_table.h"			// Class CLU_Table


//---------------------------------------------------------

class C_dlg_ave_gauges : public wxDialog
{
public:
	C_dlg_ave_gauges(wxWindow *parent, wxWindowID id, const wxString &title);
	C_dlg_ave_gauges();

	~C_dlg_ave_gauges();

private:

	void				_CreateDlg();
	void				_ZeroAll();

	// Event Table Functions
	void				_On_Button_Select_Gauges(wxCommandEvent& event);
	void				_On_Button_GetTimeSeries(wxCommandEvent &event);
	void				_On_Button_OK(wxCommandEvent& event);
	void				_On_Button_Weight(wxCommandEvent& event);

	// in order to use functions from rr_dialog
	Crr_dlg_preproc		m_RRdlg;
	// look up table
	CLU_Table4Col		*m_pLUT;

	// Time series variables
	CTimeSeries			*m_pTS;
	int					m_nIDs;

	// Time series functions
	void				_Create_TimeSeries();

	// Controls
	wxButton			*m_pButSelectGauges;
	wxChoice			*m_pChoiceGauges;
	wxButton			*m_pButOK;
	wxButton			*m_pButGetTimeSeries;
	wxBitmapButton		*m_pButWeight;

	DECLARE_EVENT_TABLE()
};


#endif /*__PG_DLG_AVERAGE_GAUGES_H__*/