Moved OpenSessions/Waveforms calls to Day object

This commit is contained in:
Mark Watkins 2011-06-02 13:28:11 +10:00
parent 288911ed15
commit e09f88a8e3
7 changed files with 45 additions and 29 deletions

View File

@ -99,6 +99,9 @@
<Changes_Log show_changes_editor="0" app_title="released version %M.%m.%b of %p" changeslog_path="ChangesLog.txt" /> <Changes_Log show_changes_editor="0" app_title="released version %M.%m.%b of %p" changeslog_path="ChangesLog.txt" />
<Code header_guard="VERSION_H" namespace="AutoVersion" prefix="" /> <Code header_guard="VERSION_H" namespace="AutoVersion" prefix="" />
</AutoVersioning> </AutoVersioning>
<wxsmith version="1">
<gui name="wxWidgets" src="" main="" init_handlers="necessary" language="CPP" />
</wxsmith>
</Extensions> </Extensions>
</Project> </Project>
</CodeBlocks_project_file> </CodeBlocks_project_file>

View File

@ -7838,7 +7838,7 @@
"sleeplib/machine.h" "sleeplib/machine.h"
"graphs/graph.h" "graphs/graph.h"
1306942290 /home/mark/projects/git/sleepyhead/libs/sleeplib/machine.h 1306984890 /home/mark/projects/git/sleepyhead/libs/sleeplib/machine.h
<wx/string.h> <wx/string.h>
<wx/variant.h> <wx/variant.h>
<wx/dir.h> <wx/dir.h>
@ -7876,7 +7876,7 @@
<sleeplib/machine.h> <sleeplib/machine.h>
<list> <list>
1306942431 /home/mark/projects/git/sleepyhead/version.h 1306985082 /home/mark/projects/git/sleepyhead/version.h
1306724655 /home/mark/projects/git/sleepyhead/libs/sleeplib/prs1_loader.h 1306724655 /home/mark/projects/git/sleepyhead/libs/sleeplib/prs1_loader.h
"machine.h" "machine.h"
@ -7893,7 +7893,7 @@
"preferences.h" "preferences.h"
"tinyxml/tinyxml.h" "tinyxml/tinyxml.h"
1306942373 source:/home/mark/projects/git/sleepyhead/SleepyHeadMain.cpp 1306984959 source:/home/mark/projects/git/sleepyhead/SleepyHeadMain.cpp
"wx_pch.h" "wx_pch.h"
"version.h" "version.h"
<wx/app.h> <wx/app.h>
@ -7927,7 +7927,7 @@
<wx/ffile.h> <wx/ffile.h>
<wx/utils.h> <wx/utils.h>
1306942428 source:/home/mark/projects/git/sleepyhead/libs/sleeplib/machine.cpp 1306985082 source:/home/mark/projects/git/sleepyhead/libs/sleeplib/machine.cpp
<tr1/random> <tr1/random>
<wx/colour.h> <wx/colour.h>
<wx/log.h> <wx/log.h>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file> <CodeBlocks_layout_file>
<ActiveTarget name="Release" /> <ActiveTarget name="Windows" />
<File name="GUIFrame.cpp" open="0" top="0" tabpos="11"> <File name="GUIFrame.cpp" open="0" top="0" tabpos="11">
<Cursor position="8034" topLine="105" /> <Cursor position="8034" topLine="105" />
</File> </File>
@ -10,17 +10,17 @@
<File name="SleepyHeadApp.cpp" open="0" top="0" tabpos="9"> <File name="SleepyHeadApp.cpp" open="0" top="0" tabpos="9">
<Cursor position="1346" topLine="14" /> <Cursor position="1346" topLine="14" />
</File> </File>
<File name="SleepyHeadMain.cpp" open="1" top="1" tabpos="3"> <File name="SleepyHeadMain.cpp" open="1" top="0" tabpos="3">
<Cursor position="17212" topLine="492" /> <Cursor position="36337" topLine="796" />
</File> </File>
<File name="SleepyHeadMain.h" open="1" top="0" tabpos="4"> <File name="SleepyHeadMain.h" open="1" top="1" tabpos="4">
<Cursor position="1835" topLine="43" /> <Cursor position="550" topLine="0" />
</File> </File>
<File name="graphs/graph.cpp" open="1" top="0" tabpos="6"> <File name="graphs/graph.cpp" open="1" top="0" tabpos="6">
<Cursor position="22153" topLine="873" /> <Cursor position="48082" topLine="1834" />
</File> </File>
<File name="graphs/graph.h" open="1" top="0" tabpos="5"> <File name="graphs/graph.h" open="1" top="0" tabpos="5">
<Cursor position="13624" topLine="386" /> <Cursor position="12238" topLine="318" />
</File> </File>
<File name="libs/sleeplib/binary_file.cpp" open="0" top="0" tabpos="11"> <File name="libs/sleeplib/binary_file.cpp" open="0" top="0" tabpos="11">
<Cursor position="0" topLine="0" /> <Cursor position="0" topLine="0" />
@ -29,10 +29,10 @@
<Cursor position="0" topLine="0" /> <Cursor position="0" topLine="0" />
</File> </File>
<File name="libs/sleeplib/machine.cpp" open="1" top="0" tabpos="1"> <File name="libs/sleeplib/machine.cpp" open="1" top="0" tabpos="1">
<Cursor position="89" topLine="0" /> <Cursor position="18088" topLine="629" />
</File> </File>
<File name="libs/sleeplib/machine.h" open="1" top="0" tabpos="2"> <File name="libs/sleeplib/machine.h" open="1" top="0" tabpos="2">
<Cursor position="8757" topLine="288" /> <Cursor position="7729" topLine="251" />
</File> </File>
<File name="libs/sleeplib/machine_loader.cpp" open="0" top="0" tabpos="8"> <File name="libs/sleeplib/machine_loader.cpp" open="0" top="0" tabpos="8">
<Cursor position="0" topLine="0" /> <Cursor position="0" topLine="0" />
@ -47,13 +47,13 @@
<Cursor position="31" topLine="0" /> <Cursor position="31" topLine="0" />
</File> </File>
<File name="libs/sleeplib/profiles.cpp" open="1" top="0" tabpos="7"> <File name="libs/sleeplib/profiles.cpp" open="1" top="0" tabpos="7">
<Cursor position="4026" topLine="142" /> <Cursor position="1125" topLine="52" />
</File> </File>
<File name="libs/sleeplib/profiles.h" open="1" top="0" tabpos="8"> <File name="libs/sleeplib/profiles.h" open="1" top="0" tabpos="8">
<Cursor position="628" topLine="5" /> <Cursor position="628" topLine="5" />
</File> </File>
<File name="libs/sleeplib/prs1_loader.cpp" open="0" top="0" tabpos="9"> <File name="libs/sleeplib/prs1_loader.cpp" open="1" top="0" tabpos="9">
<Cursor position="12801" topLine="357" /> <Cursor position="10261" topLine="276" />
</File> </File>
<File name="libs/sleeplib/prs1_loader.h" open="0" top="0" tabpos="8"> <File name="libs/sleeplib/prs1_loader.h" open="0" top="0" tabpos="8">
<Cursor position="1115" topLine="0" /> <Cursor position="1115" topLine="0" />

View File

@ -691,13 +691,6 @@ void Daily::RefreshData()
} }
} }
if (d) {
for (auto s=d->begin();s!=d->end();s++) {
(*s)->OpenEvents();
(*s)->OpenWaveforms();
}
}
UpdateGraphs(d); UpdateGraphs(d);
if (d) { if (d) {
@ -898,6 +891,10 @@ void Daily::OnCalendarDay( wxCalendarEvent& event )
void Daily::UpdateGraphs(Day *day) void Daily::UpdateGraphs(Day *day)
{ {
//if (!day) return; //if (!day) return;
if (day) {
day->OpenEvents();
day->OpenWaveforms();
}
for (auto g=Data.begin();g!=Data.end();g++) { for (auto g=Data.begin();g!=Data.end();g++) {
if (day==NULL) { if (day==NULL) {

View File

@ -551,6 +551,19 @@ const wxDateTime & Day::last(MachineCode code)
return date; return date;
} }
void Day::OpenEvents()
{
for (auto s=begin();s!=end();s++) {
(*s)->OpenEvents();
}
}
void Day::OpenWaveforms()
{
for (auto s=begin();s!=end();s++) {
(*s)->OpenWaveforms();
}
}
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////

View File

@ -126,6 +126,9 @@ public:
size_t size() { return sessions.size(); }; size_t size() { return sessions.size(); };
Machine *machine; Machine *machine;
void OpenEvents();
void OpenWaveforms();
protected: protected:
vector<Session *> sessions; vector<Session *> sessions;
wxDateTime d_first,d_last; wxDateTime d_first,d_last;

View File

@ -16,14 +16,14 @@ namespace AutoVersion{
//Standard Version Type //Standard Version Type
static const long MAJOR = 0; static const long MAJOR = 0;
static const long MINOR = 7; static const long MINOR = 7;
static const long BUILD = 2740; static const long BUILD = 2743;
static const long REVISION = 9616; static const long REVISION = 9632;
//Miscellaneous Version Types //Miscellaneous Version Types
static const long BUILDS_COUNT = 8197; static const long BUILDS_COUNT = 8204;
#define RC_FILEVERSION 0,7,2740,9616 #define RC_FILEVERSION 0,7,2743,9632
#define RC_FILEVERSION_STRING "0, 7, 2740, 9616\0" #define RC_FILEVERSION_STRING "0, 7, 2743, 9632\0"
static const char FULLVERSION_STRING[] = "0.7.2740.9616"; static const char FULLVERSION_STRING[] = "0.7.2743.9632";
//These values are to keep track of your versioning state, don't modify them. //These values are to keep track of your versioning state, don't modify them.
static const long BUILD_HISTORY = 62; static const long BUILD_HISTORY = 62;