X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditor.h;h=a0cf8602b3fce69a10198bf25c63f9384d49728f;hb=5482d15a8b8fa45ff634f183fa3af669de55e4b9;hp=7123fc52f42a19c1641e4ea6c0d4c0f5029f3ae9;hpb=616fa8b7c718ffaf13815ba5bad3d7b54f55c6b1;p=xestiaab%2F.git diff --git a/source/contacteditor/frmContactEditor.h b/source/contacteditor/frmContactEditor.h index 7123fc5..a0cf860 100644 --- a/source/contacteditor/frmContactEditor.h +++ b/source/contacteditor/frmContactEditor.h @@ -1,3 +1,21 @@ +// frmContactEditor.h - frmContactEditor form header. +// +// (c) 2012-2015 Xestia Software Development. +// +// This file is part of Xestia Address Book. +// +// Xestia Address Book is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by the +// Free Software Foundation, version 3 of the license. +// +// Xestia Address Book is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with Xestia Address Book. If not, see + #ifndef __frmContactEditor__ #define __frmContactEditor__ @@ -19,9 +37,11 @@ Subclass of frmContactEditorADT, which is generated by wxFormBuilder. #include "../common/etag.h" #include "../common/timers.h" -#include "../frmActivityMgr.h" +#include "../actmgr/frmActivityMgr.h" #include "../frmMain.h" +#include "cdo/ContactDataObject.h" + #define CE_NICKNAME wxT("Nickname") #define CE_ADDRESS wxT("Address") #define CE_EMAIL wxT("Email") @@ -66,63 +86,6 @@ public: void OnMusicEnd() { } bool GetPlayingStatus(){ return FilePlaying; } - -/* - void load(const sf::SoundBuffer& buffer) - { - // extract the audio samples from the sound buffer to our own container - m_samples.assign(buffer.getSamples(), buffer.getSamples() + buffer.getSampleCount()); - - // reset the current playing position - m_currentSample = 0; - - // initialize the base class - initialize(buffer.getChannelCount(), buffer.getSampleRate()); - } - - bool GetPlayingStatus(){ return FilePlaying; } - -private: - - virtual bool onGetData(Chunk& data) - { - // number of samples to stream every time the function is called; - // in a more robust implementation, it would rather be a fixed - // amount of time rather than an arbitrary number of samples - const int samplesToStream = 50000; - - // set the pointer to the next audio samples to be played - data.samples = &m_samples[m_currentSample]; - - // have we reached the end of the sound? - if (m_currentSample + samplesToStream <= m_samples.size()) - { - // end not reached: stream the samples and continue - data.sampleCount = samplesToStream; - m_currentSample += samplesToStream; - FilePlaying = TRUE; - return true; - } - else - { - // end of stream reached: stream the remaining samples and stop playback - data.sampleCount = m_samples.size() - m_currentSample; - m_currentSample = m_samples.size(); - FilePlaying = FALSE; - return false; - } - } - - virtual void onSeek(sf::Time TimeOffset) - { - // compute the corresponding sample index according to the sample rate and channel count - m_currentSample = static_cast(TimeOffset.asSeconds() * getSampleRate() * getChannelCount()); - } - - std::vector m_samples; - std::size_t m_currentSample; - - */ bool FilePlaying = TRUE; }; @@ -293,13 +256,16 @@ class frmContactEditor : public frmContactEditorADT void ModifyPicture( wxCommandEvent& event ); void DeletePicture( wxCommandEvent& event ); void LoadPicture( wxListEvent& event ); + void SavePicture( wxCommandEvent& event); void AddLogo( wxCommandEvent& event ); void ModifyLogo( wxCommandEvent& event ); void DeleteLogo( wxCommandEvent& event ); - void LoadLogo( wxListEvent& event ); + void LoadLogo( wxListEvent& event ); + void SaveLogo( wxCommandEvent& event); void AddSound( wxCommandEvent& event ); void ModifySound( wxCommandEvent& event ); void DeleteSound( wxCommandEvent& event ); + void SaveSound( wxCommandEvent& event); void PlaySoundDetach(); void PlaySound( wxCommandEvent& event ); void StopSound( wxCommandEvent& event ); @@ -672,12 +638,64 @@ class frmContactEditor : public frmContactEditorADT void LoadCalAdrURI(wxString wxSPropertySeg1, wxString wxSPropertySeg2, int *CalReqAdrCount); void LoadCalFreeBusy(wxString wxSPropertySeg1, wxString wxSPropertySeg2, int *FreeBusyCount); void LoadKey(wxString wxSPropertySeg1, wxString wxSPropertySeg2, int *KeyCount); + + void LoadData(std::map *GeneralList, + std::map *GeneralListPref, + wxListCtrl *GeneralListCtrl, + std::map *HomeList, + std::map *HomeListPref, + wxListCtrl *HomeListCtrl, + std::map *BusinessList, + std::map *BusinessTZPref, + wxListCtrl *BusinessListCtrl, + int *DataCount); + + void LoadGender(wxString *GenderComponent, wxString *GenderIdentity); + void LoadBirthday(wxString *BirthdayData, bool *BirthdayText); + void LoadAnniversary(wxString *AnniversaryData, bool *AnniversaryText); + void LoadKind(ContactKindType *KindType); + void LoadName(wxString *NameTitle, wxString *NameForename, + wxString *NameSurname, wxString *NameOtherNames, + wxString *NameSuffix); + void LoadMember(std::map *GroupsList); + void LoadAddress(std::map *GeneralAddressList, + std::map *GeneralAddressListTown, + std::map *GeneralAddressListCounty, + std::map *GeneralAddressListPostCode, + std::map *GeneralAddressListPref, + std::map *HomeAddressList, + std::map *HomeAddressListTown, + std::map *HomeAddressListCounty, + std::map *HomeAddressListPostCode, + std::map *HomeAddressListPref, + std::map *BusinessAddressList, + std::map *BusinessAddressListTown, + std::map *BusinessAddressListCounty, + std::map *BusinessAddressListPostCode, + std::map *BusinessAddressListPref, + int *AddressCount); + void LoadTimeZone(std::map *GeneralTZListPtr, + std::map *GeneralTZListPrefPtr, + std::map *HomeTZListPtr, + std::map *HomeTZListPrefPtr, + std::map *BusinessTZListPtr, + std::map *BusinessTZListPrefPtr, + int *TZCount); + void LoadEmail(std::map *GeneralEmailListPtr, + std::map *GeneralEmailListPrefPtr, + std::map *HomeEmailListPtr, + std::map *HomeEmailListPrefPtr, + std::map *BusinessEmailListPtr, + std::map *BusinessEmailListPrefPtr, + int *EmailCount); int intValueSeek = 1; bool IsGroup = FALSE; /* Items on General Tab */ + ContactDataObject ContactEditorData; + wxString NameTitle; wxString NameForename; wxString NameSurname;