//==============================================================================
DaalDelAudioProcessor::DaalDelAudioProcessor()
#ifndef JucePlugin_PreferredChannelConfigurations
     : AudioProcessor (BusesProperties()
                     #if ! JucePlugin_IsMidiEffect
                      #if ! JucePlugin_IsSynth
                       .withInput  ("Input",  AudioChannelSet::stereo(), true)
                      #endif
                       .withOutput ("Output", AudioChannelSet::stereo(), true)
                     #endif
                       ),
        tree(*this, nullptr, "Parameters", createParameterLayout())
#endif
{
}
Screenshot::Screenshot()
{
        imageLabel = new QLabel;
        imageLabel->setSizePolicy(QSizePolicy::Expanding,
                                   QSizePolicy::Expanding);
        imageLabel->setAlignment(Qt::AlignCenter);

        imageScrollArea = new QScrollArea;
        imageScrollArea->setWidget(imageLabel);
        imageScrollArea->setMinimumSize(320,240);

        createButtonsLayout();

        createGroupBoxesLayout();

        createParameterLayout();

        buttonsLayout->addLayout(GroupBoxesLayoutLayout);

        detectLayout = new QVBoxLayout;
        detectLayout->addLayout(parameterLayout);
        detectLayout->addWidget(imageScrollArea);

        mainLayout = new QHBoxLayout;
        mainLayout->addLayout(buttonsLayout);
        mainLayout->addLayout(detectLayout);
        setLayout(mainLayout);

        zoomSpinBox->setValue(100);
        brightnessSpinBox->setValue(0);
        contrastSpinBox->setValue(100);
        gammaSpinBox->setValue(0);

        rhoSpinBox->setValue(1);
        thetaSpinBox->setValue(180);
        thresholdSpinBox->setValue(50);
        minLineLengthSpinBox->setValue(50);
        maxGapSpinBox->setValue(10);

        setWindowTitle(tr("Line detecting via Hough Transform Demo"));

        lineDetected = false;
        scaleFator = 100;
        dumpFullScreen();
        updatePreview();
}