Exemplo n.º 1
0
        void Dial::editorSetup() {
            auto _editor = this->editorAs<editor_type>();

            connect(_editor, SIGNAL(valueChanged(double)), this,
                    SLOT(setValue(double)));
            _editor->setFrame(false);
            _editor->setAlignment(Qt::AlignRight);
            _editor->setButtonSymbols(QAbstractSpinBox::PlusMinus);
            mixin_range_type::apply(_editor);
            valueChangedEvent();
        }
Exemplo n.º 2
0
void FwDigitInputWidget::setValue(int value)
{
    if(!m_digitsCount)
    {
        if(m_value != value && maxValueCheck(value))
        {
            m_value = value;
            valueChangedEvent(m_value);
        }
        m_digitsLabel->setString(QString::number(m_value));
    }
}
Exemplo n.º 3
0
void SeekLineEdit::initialize(NI2PlaybackControler* _controler, AbstractAction* _action) {
    controler = _controler;
    action = _action;
    
    if(controler != 0) {
        int maxFrame = controler->getNumberOfFrames();
        maxFrame = (maxFrame == -1 ? INT_MAX : maxFrame);
        setValidator(new QIntValidator(0, maxFrame));
        setEnabled(true);
    } else {
        setEnabled(false);
    }
        
    if(!connected) {
        connect(this, SIGNAL(editingFinished()), this, SLOT(valueChangedEvent()));
        connected = true;
    }
}