SignalGenerator::SignalGenerator() :QDialog() { running = false; deckLink = NULL; deckLinkOutput = NULL; videoFrameBlack = NULL; videoFrameBars = NULL; audioBuffer = NULL; timeCode = NULL; ui = new Ui::SignalGeneratorDialog(); ui->setupUi(this); layout = new QGridLayout(ui->previewContainer); layout->setMargin(0); previewView = new CDeckLinkGLWidget(this); previewView->resize(ui->previewContainer->size()); previewView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); layout->addWidget(previewView, 0, 0, 0, 0); previewView->DrawFrame(NULL); ui->outputSignalPopup->addItem("Pip", QVariant::fromValue((int)kOutputSignalPip)); ui->outputSignalPopup->addItem("Dropout", QVariant::fromValue((int)kOutputSignalDrop)); ui->audioChannelPopup->addItem("2", QVariant::fromValue(2)); ui->audioChannelPopup->addItem("8", QVariant::fromValue(8)); ui->audioChannelPopup->addItem("16", QVariant::fromValue(16)); ui->audioSampleDepthPopup->addItem("16", QVariant::fromValue(16)); ui->audioSampleDepthPopup->addItem("32", QVariant::fromValue(32)); connect(ui->startButton, SIGNAL(clicked()), this, SLOT(toggleStart())); enableInterface(false); show(); }
MCWorld::MCWorld() { TravelingPixmap* object; for(int i = 0; i < 3; i++) { object = new TravelingPixmap("images/MCWorld/italian.png"); italians << object; object = new TravelingPixmap("images/MCWorld/maiden.png"); maidens << object; } boat = new TravelingPixmap("images/MCWorld/boat.png"); makeObjectsList(); shore1 = Coordinate(300, 100); shore2 = Coordinate(400, 400); boat1 = Coordinate(150, 250); boat2 = Coordinate(350, 450); setShore1(shore1, boat1); setShore2(shore2, boat2); preferedSpeed = Speed(60, 60, 0).speedModule(); reset(); moving = true; //initialise the rides to make the objects move: for(int i = 0; i < 3; i++) { Ride x; x.nrItalians = i + 1; x.nrMaidens = i + 1; rides << x; rides << x; } //seems like Qt is smart enough to know what to do with the widget: ui.show(); QObject::connect(&ui, SIGNAL(back()), this, SLOT(back())); QObject::connect(&ui, SIGNAL(forward()), this, SLOT(forward())); QObject::connect(&ui, SIGNAL(fileChosen(QString)), this, SLOT(openFile(QString))); QObject::connect(&ui, SIGNAL(speedChanged(double)), this, SLOT(changeSpeed(double))); QObject::connect(&ui, SIGNAL(start()), this, SLOT(toggleStart())); QObject::connect(&ui, SIGNAL(random()), this, SLOT(random())); }