comparison layer/Colour3DPlotLayer.cpp @ 908:4a578a360011 cxx11

More type fixes
author Chris Cannam
date Tue, 10 Mar 2015 13:22:10 +0000
parents e0f08e108064
children 94e4952a6774 1c37aa13bfd8
comparison
equal deleted inserted replaced
907:28d05ae8741c 908:4a578a360011
78 if (!m_model || !m_model->isOK()) return; 78 if (!m_model || !m_model->isOK()) return;
79 79
80 connectSignals(m_model); 80 connectSignals(m_model);
81 81
82 connect(m_model, SIGNAL(modelChanged()), this, SLOT(modelChanged())); 82 connect(m_model, SIGNAL(modelChanged()), this, SLOT(modelChanged()));
83 connect(m_model, SIGNAL(modelChangedWithin(int, int)), 83 connect(m_model, SIGNAL(modelChangedWithin(sv_frame_t, sv_frame_t)),
84 this, SLOT(modelChangedWithin(int, int))); 84 this, SLOT(modelChangedWithin(sv_frame_t, sv_frame_t)));
85 85
86 m_peakResolution = 256; 86 m_peakResolution = 256;
87 if (model->getResolution() > 512) { 87 if (model->getResolution() > 512) {
88 m_peakResolution = 16; 88 m_peakResolution = 16;
89 } else if (model->getResolution() > 128) { 89 } else if (model->getResolution() > 128) {
107 m_cacheValidStart = 0; 107 m_cacheValidStart = 0;
108 m_cacheValidEnd = 0; 108 m_cacheValidEnd = 0;
109 } 109 }
110 110
111 void 111 void
112 Colour3DPlotLayer::cacheInvalid(int startFrame, int endFrame) 112 Colour3DPlotLayer::cacheInvalid(sv_frame_t startFrame, sv_frame_t endFrame)
113 { 113 {
114 if (!m_cache || !m_model) return; 114 if (!m_cache || !m_model) return;
115 115
116 int modelResolution = m_model->getResolution(); 116 int modelResolution = m_model->getResolution();
117 int start = startFrame / modelResolution; 117 int start = int(startFrame / modelResolution);
118 int end = endFrame / modelResolution + 1; 118 int end = int(endFrame / modelResolution + 1);
119 if (m_cacheValidStart < end) m_cacheValidStart = end; 119 if (m_cacheValidStart < end) m_cacheValidStart = end;
120 if (m_cacheValidEnd > start) m_cacheValidEnd = start; 120 if (m_cacheValidEnd > start) m_cacheValidEnd = start;
121 if (m_cacheValidStart > m_cacheValidEnd) m_cacheValidEnd = m_cacheValidStart; 121 if (m_cacheValidStart > m_cacheValidEnd) m_cacheValidEnd = m_cacheValidStart;
122 } 122 }
123 123
135 } 135 }
136 cacheInvalid(); 136 cacheInvalid();
137 } 137 }
138 138
139 void 139 void
140 Colour3DPlotLayer::modelChangedWithin(int startFrame, int endFrame) 140 Colour3DPlotLayer::modelChangedWithin(sv_frame_t startFrame, sv_frame_t endFrame)
141 { 141 {
142 if (!m_colourScaleSet && m_colourScale == LinearScale) { 142 if (!m_colourScaleSet && m_colourScale == LinearScale) {
143 if (m_model && m_model->getWidth() > 50) { 143 if (m_model && m_model->getWidth() > 50) {
144 if (m_model->shouldUseLogValueScale()) { 144 if (m_model->shouldUseLogValueScale()) {
145 setColourScale(LogScale); 145 setColourScale(LogScale);