@@ -47,6 +47,8 @@ LfpChannelDisplayInfo::LfpChannelDisplayInfo (LfpDisplaySplitter* canvas_, LfpDi
47
47
: LfpChannelDisplay (canvas_, display_, options_, ch),
48
48
x (-1 .0f ),
49
49
y (-1 .0f ),
50
+ rms (0 .0f ),
51
+ mean (0 .0f ),
50
52
isSingleChannel (false )
51
53
{
52
54
enableButton = std::make_unique<UtilityButton> (" " );
@@ -213,11 +215,16 @@ void LfpChannelDisplayInfo::paint (Graphics& g)
213
215
: getName ());
214
216
bool isCentered = ! getEnabledButtonVisibility ();
215
217
218
+ if (isSingleChannel)
219
+ g.setFont (FontOptions (16 .0f ).withStyle (" SemiBold" ));
220
+ else
221
+ g.setFont (FontOptions (14 .0f ));
222
+
216
223
g.drawText (channelString,
217
- showChannelNumbers ? 6 : 2 ,
224
+ showChannelNumbers ? 6 : 3 ,
218
225
center - 4 ,
219
226
getWidth (),
220
- 10 ,
227
+ 12 ,
221
228
isCentered ? Justification::centred : Justification::centredLeft,
222
229
false );
223
230
@@ -227,29 +234,25 @@ void LfpChannelDisplayInfo::paint (Graphics& g)
227
234
if (getChannelTypeStringVisibility ())
228
235
{
229
236
g.setFont (FontOptions (13 .0f ));
230
- g.drawText (typeStr, 5 , center + 10 , 41 , 10 , Justification::centred, false );
237
+ g.drawText (typeStr, 5 , center + 10 , 50 , 14 , Justification::centred, false );
231
238
}
232
239
233
- g.setFont (FontOptions (11 .0f ));
234
-
235
240
if (isSingleChannel)
236
241
{
237
- g.setColour (Colours::darkgrey);
238
- g.drawText (" STD:" , 5 , center + 90 , 41 , 10 , Justification::centred, false );
239
- g.drawText (" MEAN:" , 5 , center + 40 , 41 , 10 , Justification::centred, false );
242
+ g.setColour (Colours::grey);
243
+ g.setFont (FontOptions (13 .0f ));
240
244
241
- if (x > 0 )
242
- {
243
- g.drawText (" uV:" , 5 , center + 140 , 41 , 10 , Justification::centred, false );
244
- }
245
+ g.drawText (" MEAN:" , 5 , center + 40 , 50 , 12 , Justification::centred, false );
246
+ g.drawText (String (mean, 2 ), 5 , center + 60 , 50 , 12 , Justification::centred, false );
245
247
246
- g.setColour (Colours::grey);
247
- g.drawText (String (canvasSplit->getStd (chan)), 5 , center + 110 , 41 , 10 , Justification::centred, false );
248
- g.drawText (String (canvasSplit->getMean (chan)), 5 , center + 60 , 41 , 10 , Justification::centred, false );
248
+ g.drawText (String (rms, 2 ), 5 , center + 110 , 50 , 12 , Justification::centred, false );
249
+ g.drawText (" RMS:" , 5 , center + 90 , 50 , 12 , Justification::centred, false );
249
250
250
251
if (x > 0 )
251
252
{
252
- g.drawText (String (y), 5 , center + 160 , 41 , 10 , Justification::centred, false );
253
+ g.setColour (Colours::darkgrey);
254
+ g.drawText (" uV:" , 5 , center + 140 , 50 , 12 , Justification::centred, false );
255
+ g.drawText (String (y, 2 ), 5 , center + 160 , 50 , 10 , Justification::centred, false );
253
256
}
254
257
}
255
258
}
@@ -260,6 +263,14 @@ void LfpChannelDisplayInfo::updateXY (float x_, float y_)
260
263
y = y_;
261
264
}
262
265
266
+ void LfpChannelDisplayInfo::updateMeanAndRMS ()
267
+ {
268
+ rms = canvasSplit->getRMS (chan);
269
+ mean = canvasSplit->getDisplayBufferMean (chan);
270
+
271
+ repaint ();
272
+ }
273
+
263
274
void LfpChannelDisplayInfo::resized ()
264
275
{
265
276
int center = getHeight () / 2 - (isSingleChannel ? (75 ) : (0 ));
0 commit comments