void PLFO::initialize(PVirtualPort* out, PDimmer* k, PDimmer* range, PDimmer* offset, PSelector* selector) { TextWidget* title = new TextWidget(tr("LFO"), this); title->setFont(QFont("Courier", 18, QFont::Bold)); k->setSize(80, 80); range->setSize(80, 80); offset->setSize(80, 80); selector->setMaximumSize(120, 155); // Layout bottomArea()->addCornerAnchors(k, Qt::BottomLeftCorner, bottomArea(), Qt::BottomLeftCorner); bottomArea()->addCornerAnchors(k, Qt::BottomRightCorner, offset, Qt::BottomLeftCorner); bottomArea()->addCornerAnchors(k, Qt::TopRightCorner, range, Qt::BottomLeftCorner); bottomArea()->addCornerAnchors(range, Qt::BottomRightCorner, offset, Qt::TopRightCorner); bottomArea()->addCornerAnchors(offset, Qt::BottomRightCorner, selector, Qt::BottomLeftCorner); bottomArea()->addCornerAnchors(selector, Qt::BottomRightCorner, bottomArea(), Qt::BottomRightCorner); bottomArea()->addCornerAnchors(selector, Qt::TopRightCorner, bottomArea(), Qt::TopRightCorner); rightArea()->addAnchors(out, rightArea()); centerArea()->addAnchors(title, centerArea()); bottomArea()->activate(); layout()->activate(); }
void PSampler::initialize(PVirtualPort* in, PVirtualPort* out, PVirtualPort* gate, PDimmer* bpm, PPushButton* record, PPushButton* stop, PPushButton* play) { TextWidget* title = new TextWidget(tr("Sampler"), this); title->setFont(QFont("Courier", 18, QFont::Bold)); bpm->setSize(80, 80); record->setIcon(QIcon(":/src/resources/images/record-icon.png")); stop->setIcon(QIcon(":/src/resources/images/stop-icon.png")); play->setIcon(QIcon(":/src/resources/images/play-icon.png")); ProgressBarWidget* progressBar = new ProgressBarWidget(this); connect(this, SIGNAL(valueChanged(int)), progressBar, SLOT(setValue(int))); connect(this, SIGNAL(lengthChanged(int)), progressBar, SLOT(setMaximum(int))); // Layout bottomArea()->addCornerAnchors(record, Qt::TopLeftCorner, bottomArea(), Qt::TopLeftCorner); bottomArea()->addCornerAnchors(record, Qt::TopRightCorner, stop, Qt::TopLeftCorner); bottomArea()->addCornerAnchors(stop, Qt::TopRightCorner, play, Qt::TopLeftCorner); bottomArea()->addCornerAnchors(progressBar, Qt::BottomLeftCorner, bottomArea(), Qt::BottomLeftCorner); bottomArea()->addCornerAnchors(progressBar, Qt::BottomRightCorner, gate, Qt::BottomLeftCorner); bottomArea()->addCornerAnchors(gate, Qt::BottomRightCorner, bpm, Qt::BottomLeftCorner); bottomArea()->addCornerAnchors(bpm, Qt::TopRightCorner, bottomArea(), Qt::TopRightCorner); bottomArea()->addCornerAnchors(bpm, Qt::BottomRightCorner, bottomArea(), Qt::BottomRightCorner); leftArea()->addAnchors(in, leftArea()); centerArea()->addAnchors(title, centerArea()); rightArea()->addAnchors(out, rightArea()); bottomArea()->activate(); layout()->activate(); }
void PDelay::initialize(PVirtualPort* in, PVirtualPort* out, PDimmer* duration, PDimmer* decay) { TextWidget* title = new TextWidget(tr("Delay"), this); title->setFont(QFont("Courier", 18, QFont::Bold)); duration->setSize(80, 80); decay->setSize(80, 80); // Layout bottomArea()->addCornerAnchors(duration, Qt::TopLeftCorner, bottomArea(), Qt::TopLeftCorner); bottomArea()->addCornerAnchors(decay, Qt::TopRightCorner, bottomArea(), Qt::TopRightCorner); bottomArea()->addCornerAnchors(duration, Qt::BottomLeftCorner, bottomArea(), Qt::BottomLeftCorner); bottomArea()->addCornerAnchors(decay, Qt::BottomRightCorner, bottomArea(), Qt::BottomRightCorner); bottomArea()->addAnchor(duration, Qt::AnchorRight, decay, Qt::AnchorLeft); leftArea()->addAnchors(in, leftArea()); rightArea()->addAnchors(out, rightArea()); centerArea()->addAnchors(title, centerArea()); bottomArea()->activate(); layout()->activate(); }