Main Page | Class List | File List | Class Members | Related Pages

dlgeditprofile.h

00001 /***************************************************************************
00002                            dlgeditprofile.h
00003                            -------------------
00004     begin                : 2004-08-11 18:51
00005     copyright            : (C) 2004-2005 by Michael Menne
00006     email                : menne@users.sourceforge.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  This program is free software; you can redistribute it and/or
00011  modify it under the terms of the GNU General Public License
00012  as published by the Free Software Foundation; either version 2
00013  of the License, or (at your option) any later version.
00014 
00015  This program is distributed in the hope that it will be useful,
00016  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  GNU General Public License for more details.
00019 
00020  You should have received a copy of the GNU General Public License
00021  along with this program; if not, write to the Free Software
00022  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00023  ***************************************************************************/
00024 
00025 #ifndef DLGEDITPROFILE_H
00026 #define DLGEDITPROFILE_H
00027 
00028 #include "global.h"
00029 #include <wx/statline.h>
00030 
00031 namespace WDS
00032 {
00033 
00034 class CProfile;
00035 
00061 class CDlgEditProfile : public wxDialog
00062 {
00063 public:
00070     CDlgEditProfile( wxWindow *pParent, int type, CProfile* pProfile );
00071     ~CDlgEditProfile();
00072 
00073     wxString GetName       ( ) { return m_pEdtName    ->GetValue(); }
00074     wxString GetTerrainFile( ) { return m_pEdtCSV     ->GetValue(); }
00075     wxString GetCitiesFile ( ) { return m_pEdtDAT     ->GetValue(); }
00076     bool     GetUsePhpmap  ( ) { return m_pRbPhpmap   ->GetValue(); }
00077     wxString GetServer     ( ); // tricky
00078     wxString GetUser       ( ) { return m_pEdtUser    ->GetValue(); }
00079     wxString GetPassword   ( ) { return m_pEdtPassword->GetValue(); }
00080 
00081     // type, needed in constructor
00082     enum {
00083         ADD = 0,
00084         EDIT
00085     };
00086 
00087 protected:
00088     bool ValidateFiles( );
00089 
00090     void OnBtnTerrain(wxCommandEvent &event);
00091     void OnBtnCities(wxCommandEvent &event);
00092     void OnOK(wxCommandEvent &event);
00093     void OnRbDAT(wxCommandEvent &event);
00094     void OnRbPhpmap(wxCommandEvent &event);
00095 
00096 private:
00097     CProfile   *m_pProfile;
00098 
00099     wxTextCtrl *m_pEdtName;
00100     wxTextCtrl *m_pEdtCSV;
00101     wxTextCtrl *m_pEdtDAT;
00102     wxButton   *m_pBtnCSV;
00103     wxButton   *m_pBtnDAT;
00104     wxRadioButton *m_pRbPhpmap;
00105 
00106     wxTextCtrl *m_pEdtServer;
00107     wxTextCtrl *m_pEdtUser;
00108     wxTextCtrl *m_pEdtPassword;
00109 
00110     enum {
00111         IDC_EDT_NAME,
00112         IDC_EDT_CSV,
00113         IDC_EDT_DAT,
00114         IDC_BTN_CSV,
00115         IDC_BTN_DAT,
00116 
00117         IDC_RB_DAT,
00118         IDC_RB_PHPMAP,
00119 
00120         IDC_EDT_SERVER,
00121         IDC_EDT_USER,
00122         IDC_EDT_PASSWORD
00123     };
00124 
00125     DECLARE_EVENT_TABLE()
00126 };
00127 
00128 }
00129 
00130 #endif // DLGEDITPROFILE_H
00131 
00132 // kate: space-indent off; tab-width 4; replace-tabs off;

Generated on Sun Jan 16 18:20:26 2005 for WDSMap by  doxygen 1.3.9.1