Beispiel #1
0
MainKnob::MainKnob(String n, int i, double minimum, double maximum, double interval) : 
                                           MidiSlider(), id(i)
{
    setSliderStyle(Slider::SliderStyle::RotaryVerticalDrag);
    setTextBoxStyle(Slider::TextEntryBoxPosition::NoTextBox, true, 0, 0);
    setRange(minimum, maximum, interval);
    setName(n);
}
Beispiel #2
0
MainVerticalSlider::MainVerticalSlider(String n, int i, double minimum, double maximum, double interval) : 
                                       MidiSlider(), id(i), image(nullptr)
{
    setSliderStyle(Slider::SliderStyle::LinearVertical);
    setTextBoxStyle(Slider::TextEntryBoxPosition::NoTextBox, true, 0, 0);
    setRange(minimum, maximum, interval);
    setName(n);
}
ThresholdSlider::ThresholdSlider(Font f) : Slider("name"), font(f)
{

    setSliderStyle(Slider::Rotary);
    setRange(-400,400.0f,10.0f);
    setValue(-20.0f);
    setTextBoxStyle(Slider::NoTextBox, false, 40, 20);

}
 ParamSlider (AudioProcessor& owner_, const int index_)
     : owner (owner_),
       index (index_)
 {
     setRange (0.0, 1.0, 0.0);
     setSliderStyle (Slider::LinearBar);
     setTextBoxIsEditable (false);
     setScrollWheelEnabled (false);
 }
ChannelSlider::ChannelSlider(const String& componentName, int nNumChannels) : Slider(componentName)
{
    setRange(-1.0f, nNumChannels, 1.0f);
    setSliderStyle(Slider::IncDecButtons);
    setTextBoxStyle(Slider::TextBoxLeft, true, 30, 20);
    setIncDecButtonsMode(Slider::incDecButtonsNotDraggable);

    setValue(-1, dontSendNotification);
}
Beispiel #6
0
RotaryKnob::RotaryKnob()
{
    setColour(Slider::rotarySliderOutlineColourId, Colours::white);
    setColour(Slider::rotarySliderFillColourId, Colours::white);
    setColour(Slider::textBoxTextColourId, Colours::white);
    setColour(Slider::textBoxOutlineColourId, Colours::transparentWhite);
    setColour(Slider::textBoxBackgroundColourId, Colours::transparentBlack);
    setSliderStyle (Slider::RotaryHorizontalVerticalDrag);
}
Beispiel #7
0
ParameterSlider::ParameterSlider(float min, float max, 
						float def, Font labelFont) : Slider("name"), font(labelFont), isEnabled(true)
{

	setSliderStyle(Slider::Rotary);
    setRange(min,max,1.0f);
    setValue(def);
    setTextBoxStyle(Slider::NoTextBox, false, 40, 20);

}
Beispiel #8
0
CSpeedControl::CSpeedControl (Param& param)
  : m_param (param)
{
  m_param.addListener (this, vf::MessageThread::getInstance ());

  setSliderStyle (Slider::LinearVertical);
  setTextBoxStyle (Slider::NoTextBox, true, 0, 0);
  setRange (-1, 1);
  setValue (0);
}
Beispiel #9
0
//==============================================================================
Knob::Knob(const String &name, const int &_singleImageWidth, const int &_singleImageHeight, Image _image)
    : Slider(name)
    , singleImageWidth(_singleImageWidth)
    , singleImageHeight(_singleImageHeight)
    , image(_image)
{
    setSliderStyle(Slider::RotaryVerticalDrag);
    setTextBoxStyle(Slider::NoTextBox, true, 0, 0);
    setSize(singleImageWidth, singleImageHeight);
}
Beispiel #10
0
SliderSwitch::SliderSwitch(const String &componentName, ParameterJuggler *pParameters, int nParameterIndex) : Slider(componentName)
{
    pSwitch = dynamic_cast<PluginParameterSwitch *>(pParameters->getPluginParameter(nParameterIndex));
    jassert(pSwitch != nullptr);

    setRange(0.0f, 1.0f, pSwitch->getStepSize());
    setSliderStyle(Slider::RotaryVerticalDrag);
    colourRotary = Colours::white;

    setDoubleClickReturnValue(true, pSwitch->getDefaultFloat());
}
Beispiel #11
0
SliderSwitch::SliderSwitch(parameters::Juggler *pParameters, int nParameterIndex)
{
    pSwitch = dynamic_cast<parameters::ParSwitch *>(pParameters->getPluginParameter(nParameterIndex));
    jassert(pSwitch != nullptr);

    setRange(0.0f, 1.0f, pSwitch->getStepSize());
    setVelocityModeParameters(1.0, 1, 0.0, true);
    setSliderStyle(Slider::RotaryHorizontalVerticalDrag);
    colourRotary = Colours::white;

    setDoubleClickReturnValue(true, pSwitch->getDefaultFloat());
}
Beispiel #12
0
void ControlBar::setupUI(){
    layout=new QHBoxLayout(this);
    setLayout(layout);

    playBtn=new PicturePushButton();
    playBtn->setPixmapPath(ICON_PATH+"play.png");
    playBtn->setSizeExt(QSize(24,24));

    subtitleBtn=new QPushButton("字幕");
    subtitleBtn->setFlat(true);
    subtitleBtn->setMaximumWidth(32);

    playSlider=new QSlider(Qt::Horizontal,this);
    setSliderStyle(playSlider);
    playSlider->setRange(0,1000);


    totleTimeLabel=new QLabel("00:00/00:00");

    volumeSlider=new QSlider(Qt::Horizontal);
    volumeSlider->setRange(0,100);
    volumeSlider->setValue(50);
    setSliderStyle(volumeSlider);

    fullScreenBtn=new PicturePushButton();
    fullScreenBtn->setPixmapPath(ICON_PATH+"view-fullscreen.png");
    fullScreenBtn->setSizeExt(QSize(24,24));

    layout->addWidget(playBtn);
    layout->addWidget(playSlider);
    layout->addWidget(totleTimeLabel);
    layout->addStretch();
    layout->addWidget(subtitleBtn);
    layout->addWidget(volumeSlider);
    layout->addWidget(fullScreenBtn);
}
        ParamSlider (AudioProcessor& p, int paramIndex)  : owner (p), index (paramIndex)
        {
            const int steps = owner.getParameterNumSteps (index);
            const AudioProcessorParameter::Category category = p.getParameterCategory (index);
            const bool isLevelMeter = (((category & 0xffff0000) >> 16) == 2);

            if (steps > 1 && steps < 0x7fffffff)
                setRange (0.0, 1.0, 1.0 / (steps - 1.0));
            else
                setRange (0.0, 1.0);

            setEnabled (! isLevelMeter);
            setSliderStyle (Slider::LinearBar);
            setTextBoxIsEditable (false);
            setScrollWheelEnabled (true);
        }
Beispiel #14
0
ParamSlider::ParamSlider (AudioProcessor& p, const int index_)
: owner (p),
index (index_)
{
  //      int steps = owner.getParameterNumSteps(index);
  
  float div = 0.;
  
  //      if (steps > 0) {
  //        div = 1.f/steps;
  //      }
  
  setRange (0.0, 1.0, div);
  setSliderStyle (Slider::LinearHorizontal);
  setTextBoxIsEditable (false);
  setScrollWheelEnabled (false);
}
AlphaRotarySlider::AlphaRotarySlider(const float startAngleRadians,
									  const float endAngleRadians, const float _theWidth)
{
	setSliderStyle(Slider::Rotary);
	setTextBoxStyle(Slider::NoTextBox, false, 80, 40);
    
	rotaryStart = startAngleRadians;
	rotaryEnd = endAngleRadians;
	theWidth = _theWidth;
	hitPath.addPieSegment (0, 0, theWidth, theWidth, rotaryStart, rotaryEnd, ((1 - 0.2) + (0.2 * (theWidth * 0.5) * 0.003)));
    
    addChildComponent (textBox = new TextEditor());
    textBox->setOpaque(true);
    textBox->setSelectAllWhenFocused (true);
    textBox->addListener(this);
    
    //set this component to listen to itself
    addKeyListener(this);
	
}
//==============================================================================
LoudnessBarRangeSlider::LoudnessBarRangeSlider ()
{
    setSliderStyle (Slider::TwoValueHorizontal);
}