Example #1
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    m_curve = new Curve;
    m_sinPanel = new sinPanel;
    m_cwPanel = new cwPanel;
    m_lfmPanel = new lfmPanel;
    m_hfmPanel = new hfmPanel;
    m_noisePanel = new noisePanel;
    m_customPanel = new customPanel;

    QVBoxLayout *layout = new QVBoxLayout;
    layout->maximumSize();
    layout->addWidget(m_curve);
    ui->curveWidget->setLayout(layout);

    m_stackedWidget = new QStackedWidget;
    m_stackedWidget->addWidget(m_sinPanel);
    m_stackedWidget->addWidget(m_cwPanel);
    m_stackedWidget->addWidget(m_lfmPanel);
    m_stackedWidget->addWidget(m_hfmPanel);
    m_stackedWidget->addWidget(m_noisePanel);
    m_stackedWidget->addWidget(m_customPanel);

    QVBoxLayout *layout1 = new QVBoxLayout;
    layout1->maximumSize();
    layout1->addWidget(m_stackedWidget);
    ui->parameterPanelWidget->setLayout(layout1);

    m_createActions();
    m_createToolbars();

    ui->outputButton->setIcon(QIcon("/images/outputOff.png"));
    ui->logoLabel->setPixmap(QPixmap("/images/ss.png").scaled(ui->logoLabel->size().width(),ui->logoLabel->size().height()));

    m_output = 0;
    m_form = 1;
    m_length = 600;
    m_data = new int[m_length];
    m_doubleData = new double[m_length];
    m_dataGenerate(0);

    connect(this->m_sinPanel,SIGNAL(parametersChanged()),this,SLOT(valueChanged()));
    connect(this,SIGNAL(parameterChanged(int,int*)),this->m_curve,SLOT(setParameters(int,int*)));
}