QDesignerPropertyEditor::QDesignerPropertyEditor(QWidget *parent, Qt::WindowFlags flags) :
    QDesignerPropertyEditorInterface(parent, flags),
    m_propertyChangedForwardingBlocked(false)
{
    // Make old signal work for  compatibility
    connect(this, SIGNAL(propertyChanged(QString,QVariant)), this, SLOT(slotPropertyChanged(QString,QVariant)));
}
Пример #2
0
PE_PaneWidget::PE_PaneWidget(PaneWidget * _pane, QObject * _target, const char * propertyName, QObject * parent)
  : PE_TypeControl<PaneWidget>(_pane, _target, propertyName, parent)
{
    // read initial value and link to property changes
    slotPropertyChanged();
    PE_LISTEN_TO_PROPERTY(slotPropertyChanged());

    // link to the slider changes
    connect(m_control.data(), SIGNAL(valueChanged(const QPointF &)), this, SLOT(slotPaneValueChanged(const QPointF &)));

    // allow Int and Double properties only
    if (m_property.type() != QVariant::PointF)
        qWarning("PE_PaneWidget: unhandled property '%s' of type %d", propertyName, (int)m_property.type());
    else
        m_isValid = true;
}
staffPropFrm::staffPropFrm(QWidget *parent)  : staffPropForm(parent, 0, true)
{
	mbApply = true;
	for (int i = 0; i < 128; ++i)
		staffVoice->insertItem(i18n("%1. %2").arg(i).arg(i18n(NResource::instrTab[i])));
	for (int i = 0; i < 16; ++i)
		staffChannel->insertItem(i18n("Channel %1").arg(i + 1 ));

	this->staffVol->setAll(0, 127, 80);
	this->staffOver->setAll(1, 200, 60);
	this->staffUnder->setAll(1, 200, 60);
	this->staffLyrics->setAll(1, 200, 60);
	this->staffStereo->setAll(0, 127, 80);
	this->staffReverb->setAll(0, 127, 0);
	this->staffChorus->setAll(0, 127, 0);
	this->staffPlay->setAll(-12, 17, 0);

	mw_ = (NMainFrameWidget *) parent;
	this->staffOk->setFocus();
	
	// I wish this could be done in another way..
	// For every change with the NScaleEdit widgets, go to the slotPropertyChanged slot
    connect( staffPlay, SIGNAL( returnPressed() ), this, SLOT( slotPropertyChanged() ) );
    connect( staffChorus, SIGNAL( returnPressed() ), this, SLOT( slotPropertyChanged() ) );
    connect( staffReverb, SIGNAL( returnPressed() ), this, SLOT( slotPropertyChanged() ) );
    connect( staffStereo, SIGNAL( returnPressed() ), this, SLOT( slotPropertyChanged() ) );
    connect( staffLyrics, SIGNAL( returnPressed() ), this, SLOT( slotPropertyChanged() ) );
    connect( staffUnder, SIGNAL( returnPressed() ), this, SLOT( slotPropertyChanged() ) );
    connect( staffOver, SIGNAL( returnPressed() ), this, SLOT( slotPropertyChanged() ) );
    connect( staffVol, SIGNAL( returnPressed() ), this, SLOT( slotPropertyChanged() ) );
    connect( staffPlay, SIGNAL( valueChanged(int) ), this, SLOT( slotPropertyChanged() ) );
    connect( staffChorus, SIGNAL( valueChanged(int) ), this, SLOT( slotPropertyChanged() ) );
    connect( staffReverb, SIGNAL( valueChanged(int) ), this, SLOT( slotPropertyChanged() ) );
    connect( staffStereo, SIGNAL( valueChanged(int) ), this, SLOT( slotPropertyChanged() ) );
    connect( staffLyrics, SIGNAL( valueChanged(int) ), this, SLOT( slotPropertyChanged() ) );
    connect( staffUnder, SIGNAL( valueChanged(int) ), this, SLOT( slotPropertyChanged() ) );
    connect( staffOver, SIGNAL( valueChanged(int) ), this, SLOT( slotPropertyChanged() ) );
    connect( staffVol, SIGNAL( valueChanged(int) ), this, SLOT( slotPropertyChanged() ) );
    mbApply = false;
}