Skip to content

Commit

Permalink
Update Utility buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
anjaldoshi committed Jul 6, 2024
1 parent ddc2696 commit 1e36c1a
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion Source/Basestations/SimulatedBasestation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ SimulatedBasestationConfigWindow::SimulatedBasestationConfigWindow (SimulatedBas
comboBox->setBounds (65, 50 + 35 * i, 200, 20);
}

acceptButton = std::make_unique<UtilityButton> ("LAUNCH", FontOptions ("Small Text", 13, Font::plain));
acceptButton = std::make_unique<UtilityButton> ("LAUNCH");
acceptButton->setBounds (120, 200, 80, 20);
acceptButton->addListener (this);
addAndMakeVisible (acceptButton.get());
Expand Down
4 changes: 2 additions & 2 deletions Source/NeuropixEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ NeuropixEditor::NeuropixEditor (GenericProcessor* parentNode, NeuropixThread* t)
int x_pos = i * 90 + 70;
int y_pos = 50;

UtilityButton* b = new UtilityButton ("", FontOptions ("Small Text", 13, Font::plain));
UtilityButton* b = new UtilityButton ("");
b->setBounds (x_pos, y_pos, 30, 20);
b->addListener (this);
//addAndMakeVisible(b);
Expand Down Expand Up @@ -499,7 +499,7 @@ NeuropixEditor::NeuropixEditor (GenericProcessor* parentNode, NeuropixThread* t)
background->toBack();
background->repaint();

addSyncChannelButton = std::make_unique<UtilityButton> ("+", FontOptions ("Small Text", 13, Font::plain));
addSyncChannelButton = std::make_unique<UtilityButton> ("+");
addSyncChannelButton->setBounds (90 * basestations.size() + 78, 40, 20, 20);
addSyncChannelButton->addListener (this);
addSyncChannelButton->setTooltip ("Add sync channel to the continuous data stream.");
Expand Down
2 changes: 1 addition & 1 deletion Source/Probes/Neuropixels_QuadBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ void Neuropixels_QuadBase::startAcquisition()
shank,
quadBaseBuffers[shank],
this,
apView));
apView.get()));
}
}

Expand Down
36 changes: 18 additions & 18 deletions Source/UI/NeuropixInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ NeuropixInterface::NeuropixInterface (DataSource* p,
electrodesLabel->setBounds (446, currentHeight - 20, 100, 20);
addAndMakeVisible (electrodesLabel.get());

enableViewButton = std::make_unique<UtilityButton> ("VIEW", FontOptions ("Inter", "Regular", 12.0f));
enableViewButton = std::make_unique<UtilityButton> ("VIEW");
enableViewButton->setRadius (3.0f);
enableViewButton->setBounds (530, currentHeight + 2, 45, 18);
enableViewButton->addListener (this);
enableViewButton->setTooltip ("View electrode enabled state");
addAndMakeVisible (enableViewButton.get());

enableButton = std::make_unique<UtilityButton> ("ENABLE", FontOptions ("Inter", "Regular", 13.0f));
enableButton = std::make_unique<UtilityButton> ("ENABLE");
enableButton->setRadius (3.0f);
enableButton->setBounds (450, currentHeight, 65, 22);
enableButton->addListener (this);
Expand Down Expand Up @@ -126,7 +126,7 @@ NeuropixInterface::NeuropixInterface (DataSource* p,
apGainComboBox->setSelectedId (probe->settings.apGainIndex + 1, dontSendNotification);
addAndMakeVisible (apGainComboBox.get());

apGainViewButton = std::make_unique<UtilityButton> ("VIEW", FontOptions ("Inter", "Regular", 12.0f));
apGainViewButton = std::make_unique<UtilityButton> ("VIEW");
apGainViewButton->setRadius (3.0f);
apGainViewButton->setBounds (530, currentHeight + 2, 45, 18);
apGainViewButton->addListener (this);
Expand All @@ -153,7 +153,7 @@ NeuropixInterface::NeuropixInterface (DataSource* p,
lfpGainComboBox->setSelectedId (probe->settings.lfpGainIndex + 1, dontSendNotification);
addAndMakeVisible (lfpGainComboBox.get());

lfpGainViewButton = std::make_unique<UtilityButton> ("VIEW", FontOptions ("Inter", "Regular", 12.0f));
lfpGainViewButton = std::make_unique<UtilityButton> ("VIEW");
lfpGainViewButton->setRadius (3.0f);
lfpGainViewButton->setBounds (530, currentHeight + 2, 45, 18);
lfpGainViewButton->addListener (this);
Expand Down Expand Up @@ -182,7 +182,7 @@ NeuropixInterface::NeuropixInterface (DataSource* p,
referenceComboBox->setSelectedId (probe->settings.referenceIndex + 1, dontSendNotification);
addAndMakeVisible (referenceComboBox.get());

referenceViewButton = std::make_unique<UtilityButton> ("VIEW", FontOptions ("Inter", "Regular", 12.0f));
referenceViewButton = std::make_unique<UtilityButton> ("VIEW");
referenceViewButton->setRadius (3.0f);
referenceViewButton->setBounds (530, currentHeight + 2, 45, 18);
referenceViewButton->addListener (this);
Expand Down Expand Up @@ -215,7 +215,7 @@ NeuropixInterface::NeuropixInterface (DataSource* p,

currentHeight += 55;

activityViewButton = std::make_unique<UtilityButton> ("VIEW", FontOptions ("Inter", "Regular", 12.0f));
activityViewButton = std::make_unique<UtilityButton> ("VIEW");
activityViewButton->setRadius (3.0f);

activityViewButton->addListener (this);
Expand Down Expand Up @@ -323,7 +323,7 @@ NeuropixInterface::NeuropixInterface (DataSource* p,
bistComboBox->setSelectedId (1, dontSendNotification);
addAndMakeVisible (bistComboBox.get());

bistButton = std::make_unique<UtilityButton> ("RUN", FontOptions ("Inter", "Regular", 12.0f));
bistButton = std::make_unique<UtilityButton> ("RUN");
bistButton->setRadius (3.0f);
bistButton->setBounds (880, 500, 50, 22);
bistButton->addListener (this);
Expand All @@ -336,49 +336,49 @@ NeuropixInterface::NeuropixInterface (DataSource* p,
addAndMakeVisible (bistLabel.get());

// COPY / PASTE / UPLOAD
copyButton = std::make_unique<UtilityButton> ("COPY", FontOptions ("Inter", "Regular", 12.0f));
copyButton = std::make_unique<UtilityButton> ("COPY");
copyButton->setRadius (3.0f);
copyButton->setBounds (45, 637, 60, 22);
copyButton->addListener (this);
copyButton->setTooltip ("Copy probe settings");
addAndMakeVisible (copyButton.get());

pasteButton = std::make_unique<UtilityButton> ("PASTE", FontOptions ("Inter", "Regular", 12.0f));
pasteButton = std::make_unique<UtilityButton> ("PASTE");
pasteButton->setRadius (3.0f);
pasteButton->setBounds (115, 637, 60, 22);
pasteButton->addListener (this);
pasteButton->setTooltip ("Paste probe settings");
addAndMakeVisible (pasteButton.get());

applyToAllButton = std::make_unique<UtilityButton> ("APPLY TO ALL", FontOptions ("Inter", "Regular", 12.0f));
applyToAllButton = std::make_unique<UtilityButton> ("APPLY TO ALL");
applyToAllButton->setRadius (3.0f);
applyToAllButton->setBounds (185, 637, 120, 22);
applyToAllButton->addListener (this);
applyToAllButton->setTooltip ("Apply this probe's settings to all others");
addAndMakeVisible (applyToAllButton.get());

saveImroButton = std::make_unique<UtilityButton> ("SAVE TO IMRO", FontOptions ("Inter", "Regular", 12.0f));
saveImroButton = std::make_unique<UtilityButton> ("SAVE TO IMRO");
saveImroButton->setRadius (3.0f);
saveImroButton->setBounds (45, 672, 120, 22);
saveImroButton->addListener (this);
saveImroButton->setTooltip ("Save settings map to .imro file");
addAndMakeVisible (saveImroButton.get());

loadImroButton = std::make_unique<UtilityButton> ("LOAD FROM IMRO", FontOptions ("Inter", "Regular", 12.0f));
loadImroButton = std::make_unique<UtilityButton> ("LOAD FROM IMRO");
loadImroButton->setRadius (3.0f);
loadImroButton->setBounds (175, 672, 130, 22);
loadImroButton->addListener (this);
loadImroButton->setTooltip ("Load settings map from .imro file");
addAndMakeVisible (loadImroButton.get());

saveJsonButton = std::make_unique<UtilityButton> ("SAVE TO JSON", FontOptions ("Inter", "Regular", 12.0f));
saveJsonButton = std::make_unique<UtilityButton> ("SAVE TO JSON");
saveJsonButton->setRadius (3.0f);
saveJsonButton->setBounds (45, 707, 120, 22);
saveJsonButton->addListener (this);
saveJsonButton->setTooltip ("Save channel map to probeinterface .json file");
addAndMakeVisible (saveJsonButton.get());

loadJsonButton = std::make_unique<UtilityButton> ("LOAD FROM JSON", FontOptions ("Inter", "Regular", 12.0f));
loadJsonButton = std::make_unique<UtilityButton> ("LOAD FROM JSON");
loadJsonButton->setRadius (3.0f);
loadJsonButton->setBounds (175, 707, 130, 22);
loadJsonButton->addListener (this);
Expand Down Expand Up @@ -425,7 +425,7 @@ NeuropixInterface::NeuropixInterface (DataSource* p,
verticalOffset = 250;

// FIRMWARE
firmwareToggleButton = std::make_unique<UtilityButton> ("UPDATE FIRMWARE...", FontOptions ("Inter", "Regular", 12.0f));
firmwareToggleButton = std::make_unique<UtilityButton> ("UPDATE FIRMWARE...");
firmwareToggleButton->setRadius (3.0f);
firmwareToggleButton->addListener (this);
firmwareToggleButton->setBounds (650, verticalOffset, 150, 22);
Expand All @@ -442,7 +442,7 @@ NeuropixInterface::NeuropixInterface (DataSource* p,
if (thread->type == PXI)
addChildComponent (bscFirmwareComboBox.get());

bscFirmwareButton = std::make_unique<UtilityButton> ("UPLOAD", FontOptions ("Inter", "Regular", 12.0f));
bscFirmwareButton = std::make_unique<UtilityButton> ("UPLOAD");
bscFirmwareButton->setRadius (3.0f);
bscFirmwareButton->setBounds (930, verticalOffset + 70, 60, 22);
bscFirmwareButton->addListener (this);
Expand All @@ -466,7 +466,7 @@ NeuropixInterface::NeuropixInterface (DataSource* p,
if (thread->type == PXI)
addChildComponent (bsFirmwareComboBox.get());

bsFirmwareButton = std::make_unique<UtilityButton> ("UPLOAD", FontOptions ("Inter", "Regular", 12.0f));
bsFirmwareButton = std::make_unique<UtilityButton> ("UPLOAD");
bsFirmwareButton->setRadius (3.0f);
bsFirmwareButton->setBounds (930, verticalOffset + 140, 60, 22);
bsFirmwareButton->addListener (this);
Expand Down Expand Up @@ -507,7 +507,7 @@ NeuropixInterface::NeuropixInterface (DataSource* p,
infoLabel->setJustificationType (Justification::topLeft);

// ANNOTATIONS
annotationButton = std::make_unique<UtilityButton> ("ADD", FontOptions ("Inter", "Regular", 12.0f));
annotationButton = std::make_unique<UtilityButton> ("ADD");
annotationButton->setRadius (3.0f);
annotationButton->setBounds (400, 680, 40, 18);
annotationButton->addListener (this);
Expand Down
8 changes: 4 additions & 4 deletions Source/UI/WavePlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,25 +97,25 @@ WavePlayer::WavePlayer (OneBoxDAC* dac_)
patternSelector->setEditableText (true);
addAndMakeVisible (patternSelector.get());

startStopButton = std::make_unique<UtilityButton> ("RUN", FontOptions ("Small Text", 15, Font::plain));
startStopButton = std::make_unique<UtilityButton> ("RUN");
startStopButton->setBounds (30, 85, 55, 30);
startStopButton->addListener (this);
addAndMakeVisible (startStopButton.get());

pulsePatternButton = std::make_unique<UtilityButton> ("Pulse", FontOptions ("Small Text", 10, Font::plain));
pulsePatternButton = std::make_unique<UtilityButton> ("Pulse");
pulsePatternButton->setCorners (true, false, true, false);
pulsePatternButton->setBounds (140, 40, 50, 20);
pulsePatternButton->addListener (this);
pulsePatternButton->setToggleState (true, false);
addAndMakeVisible (pulsePatternButton.get());

sinePatternButton = std::make_unique<UtilityButton> ("Sine", FontOptions ("Small Text", 10, Font::plain));
sinePatternButton = std::make_unique<UtilityButton> ("Sine");
sinePatternButton->setCorners (false, false, false, false);
sinePatternButton->setBounds (190, 40, 50, 20);
sinePatternButton->addListener (this);
addAndMakeVisible (sinePatternButton.get());

customPatternButton = std::make_unique<UtilityButton> ("Custom", FontOptions ("Small Text", 10, Font::plain));
customPatternButton = std::make_unique<UtilityButton> ("Custom");
customPatternButton->setCorners (false, true, false, true);
customPatternButton->setBounds (240, 40, 60, 20);
customPatternButton->addListener (this);
Expand Down

0 comments on commit 1e36c1a

Please sign in to comment.