From 231ebc5d0ae84e4117b48ab79c00253b1b66d92d Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Mon, 28 Dec 2015 18:44:14 +0000 Subject: [PATCH] Included the ContactDataObject, removed unused variables and introduced a simple LoadGender subroutine. --- source/contacteditor/frmContactEditor.h | 63 +++---------------------- 1 file changed, 6 insertions(+), 57 deletions(-) diff --git a/source/contacteditor/frmContactEditor.h b/source/contacteditor/frmContactEditor.h index bdd393c..873fd82 100644 --- a/source/contacteditor/frmContactEditor.h +++ b/source/contacteditor/frmContactEditor.h @@ -40,6 +40,8 @@ Subclass of frmContactEditorADT, which is generated by wxFormBuilder. #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") @@ -84,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; }; @@ -693,12 +638,16 @@ 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 LoadGender(wxString *GenderComponent, wxString *GenderIdentity); int intValueSeek = 1; bool IsGroup = FALSE; /* Items on General Tab */ + ContactDataObject ContactEditorData; + wxString NameTitle; wxString NameForename; wxString NameSurname; -- 2.39.5