- removed Timer git-svn-id: http://moon:8086/svn/software/trunk/projects/mpsk_rx_gui@109 b431acfa-c32f-4a4a-93f1-934dc6c82436
130 lines
3.4 KiB
C++
130 lines
3.4 KiB
C++
/*
|
|
==============================================================================
|
|
|
|
This is an automatically generated GUI class created by the Introjucer!
|
|
|
|
Be careful when adding custom code to these files, as only the code within
|
|
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
|
|
and re-saved.
|
|
|
|
Created with Introjucer version: 3.1.0
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
The Introjucer is part of the JUCE library - "Jules' Utility Class Extensions"
|
|
Copyright 2004-13 by Raw Material Software Ltd.
|
|
|
|
==============================================================================
|
|
*/
|
|
|
|
//[Headers] You can add your own extra header files here...
|
|
//[/Headers]
|
|
|
|
#include "IQPoint.h"
|
|
|
|
|
|
//[MiscUserDefs] You can add your own user definitions and misc code here...
|
|
//[/MiscUserDefs]
|
|
|
|
//==============================================================================
|
|
IQPoint::IQPoint (uint32 id)
|
|
: m_id(id)
|
|
{
|
|
|
|
//[UserPreSize]
|
|
//[/UserPreSize]
|
|
|
|
setSize (10, 10);
|
|
|
|
|
|
//[Constructor] You can add your own custom stuff here..
|
|
m_alpha = 1.0f;
|
|
setVisible(false);
|
|
//[/Constructor]
|
|
}
|
|
|
|
IQPoint::~IQPoint()
|
|
{
|
|
//[Destructor_pre]. You can add your own custom destruction code here..
|
|
//[/Destructor_pre]
|
|
|
|
|
|
|
|
//[Destructor]. You can add your own custom destruction code here..
|
|
//[/Destructor]
|
|
}
|
|
|
|
//==============================================================================
|
|
void IQPoint::paint (Graphics& g)
|
|
{
|
|
//[UserPrePaint] Add your own custom painting code here..
|
|
//[/UserPrePaint]
|
|
|
|
//[UserPaint] Add your own custom painting code here..
|
|
g.setColour (m_color.withMultipliedAlpha(m_alpha));
|
|
drawCross(g);
|
|
//[/UserPaint]
|
|
}
|
|
|
|
void IQPoint::resized()
|
|
{
|
|
//[UserResized] Add your own custom resize handling here..
|
|
//[/UserResized]
|
|
}
|
|
|
|
|
|
|
|
//[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
|
|
void IQPoint::drawPoint(Graphics& g)
|
|
{
|
|
g.fillEllipse (getLocalBounds().toFloat());
|
|
}
|
|
|
|
void IQPoint::drawCross(Graphics& g)
|
|
{
|
|
Rectangle<float> coord;
|
|
coord = getLocalBounds().toFloat();
|
|
|
|
g.drawLine(coord.getTopLeft().getX(), coord.getTopLeft().getY(), coord.getBottomRight().getX(), coord.getBottomRight().getY(), 1.f);
|
|
g.drawLine(coord.getTopRight().getX(), coord.getTopRight().getY(), coord.getBottomLeft().getX(), coord.getBottomLeft().getY(), 1.f);
|
|
}
|
|
|
|
void IQPoint::drawPlusSign(Graphics& g)
|
|
{
|
|
(void)g;
|
|
}
|
|
|
|
void IQPoint::setColor(Colour color)
|
|
{
|
|
m_color = color;
|
|
repaint();
|
|
}
|
|
|
|
//[/MiscUserCode]
|
|
|
|
|
|
//==============================================================================
|
|
#if 0
|
|
/* -- Introjucer information section --
|
|
|
|
This is where the Introjucer stores the metadata that describe this GUI layout, so
|
|
make changes in here at your peril!
|
|
|
|
BEGIN_JUCER_METADATA
|
|
|
|
<JUCER_COMPONENT documentType="Component" className="IQPoint" componentName=""
|
|
parentClasses="public Component" constructorParams="uint32 id"
|
|
variableInitialisers="m_id(id)" snapPixels="8" snapActive="1"
|
|
snapShown="1" overlayOpacity="0.330" fixedSize="0" initialWidth="10"
|
|
initialHeight="10">
|
|
<BACKGROUND backgroundColour="ffffff"/>
|
|
</JUCER_COMPONENT>
|
|
|
|
END_JUCER_METADATA
|
|
*/
|
|
#endif
|
|
|
|
|
|
//[EndFile] You can add extra defines here...
|
|
//[/EndFile]
|