Skip to content
Snippets Groups Projects
Commit 6c565191 authored by jsiegle's avatar jsiegle
Browse files

Add component for changing headstage parameters

parent b33e4374
No related branches found
No related tags found
No related merge requests found
......@@ -26,10 +26,69 @@
RHD2000Editor::RHD2000Editor(GenericProcessor* parentNode, bool useDefaultParameterEditors=true)
: GenericEditor(parentNode, useDefaultParameterEditors)
{
desiredWidth = 600;
desiredWidth = 400;
for (int i = 0; i < 4; i++)
{
HeadstageOptionsInterface* hsOptions = new HeadstageOptionsInterface(i);
headstageOptionsInterfaces.add(hsOptions);
addAndMakeVisible(hsOptions);
}
}
RHD2000Editor::~RHD2000Editor()
{
}
void RHD2000Editor::resized()
{
int width = getWidth()/4 - 20;
for (int i = 0; i < headstageOptionsInterfaces.size(); i++)
{
headstageOptionsInterfaces[i]->setBounds(10+i*width,30, width,getHeight()-50);
}
}
// --------------------------------------------------------------------
HeadstageOptionsInterface::HeadstageOptionsInterface(int hsNum) :
hsNumber(hsNum)
{
switch (hsNumber)
{
case 0 :
name = "A";
break;
case 1:
name = "B";
break;
case 2:
name = "C";
break;
case 3:
name = "D";
break;
default:
name = "X";
}
}
HeadstageOptionsInterface::~HeadstageOptionsInterface()
{
}
void HeadstageOptionsInterface::paint(Graphics& g)
{
g.setColour(Colours::lightgrey);
g.fillRoundedRectangle(5,0,getWidth()-10,getHeight(),4.0f);
}
\ No newline at end of file
......@@ -35,21 +35,42 @@
*/
class HeadstageOptionsInterface;
class RHD2000Editor : public GenericEditor
{
public:
RHD2000Editor(GenericProcessor* parentNode, bool useDefaultParameterEditors);
virtual ~RHD2000Editor();
~RHD2000Editor();
void resized();
private:
OwnedArray<HeadstageOptionsInterface> headstageOptionsInterfaces;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(RHD2000Editor);
};
class HeadstageOptionsInterface : public Component
{
public:
HeadstageOptionsInterface(int hsNum);
~HeadstageOptionsInterface();
void paint(Graphics& g);
private:
int hsNumber;
String name;
};
#endif // __RHD2000EDITOR_H_2AD3C591__
......@@ -198,7 +198,7 @@ AudioProcessorEditor* SourceNode::createEditor()
if (getName().equalsIgnoreCase("RHD2000 USB Board"))
{
editor = new RHD2000Editor(this, false);
editor = new RHD2000Editor(this, true);
}
else
{
......
......@@ -26,12 +26,14 @@
InfoLabel::InfoLabel()
{
MemoryInputStream mis(BinaryData::misoserialized,
BinaryData::misoserializedSize,
false);
Typeface::Ptr tp = new CustomTypeface(mis);
labelFont = Font(tp);
labelFont.setHeight(24);
labelFont = Font("Paragraph", 24, Font::plain);
// MemoryInputStream mis(BinaryData::misoserialized,
// BinaryData::misoserializedSize,
// false);
// Typeface::Ptr tp = new CustomTypeface(mis);
// labelFont = Font(tp);
// labelFont.setHeight(24);
infoString = "Welcome to the Open Ephys GUI!\n \n"
"To get starting using the GUI, drag a processor from the list "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment