void DSPEngine::handleSetSource(SampleSource* source)
{
	gotoIdle();
	if(m_sampleSource != NULL)
		disconnect(m_sampleSource->getSampleFifo(), SIGNAL(dataReady()), this, SLOT(handleData()));
	m_sampleSource = source;
	if(m_sampleSource != NULL)
		connect(m_sampleSource->getSampleFifo(), SIGNAL(dataReady()), this, SLOT(handleData()), Qt::QueuedConnection);
	generateReport();
}
inline void AudioDataOutput::packetReady(const int samples, const qint16 *buffer, const qint64 vpts)
{
    //TODO: support floats, we currently only handle ints
    if (m_format == Phonon::AudioDataOutput::FloatFormat)
        return;

    if (m_channels < 0 || m_channels > 2)
        return;

    // Check if it has been cleared
    if (m_pendingFrames.isEmpty())
        m_pendingFrames.append(Frame());

    for (int i=0; i<samples; i++) {
        if (m_pendingFrames.first().map[Phonon::AudioDataOutput::LeftChannel].size() >= m_dataSize) {
            m_pendingFrames.prepend(Frame());
            m_pendingFrames.first().timestamp = vpts;

            // Tell the QVector how much data we're expecting, speeds things up a bit
            m_pendingFrames.first().map[Phonon::AudioDataOutput::LeftChannel].reserve(m_dataSize);
            if (m_channels == 2)
                m_pendingFrames.first().map[Phonon::AudioDataOutput::RightChannel].reserve(m_dataSize);
        }

        m_pendingFrames.first().map[Phonon::AudioDataOutput::LeftChannel].append(buffer[i]);
        if (m_channels == 2)
            m_pendingFrames.first().map[Phonon::AudioDataOutput::RightChannel].append(buffer[i++]);
    }

    // Are we supposed to keep our signals in sync?
    if (m_keepInSync) {
        /*while (m_mediaObject && !m_pendingFrames.isEmpty() &&
               m_pendingFrames.first().timestamp < m_mediaObject->stream()->currentVpts() &&
               m_pendingFrames.first().map[Phonon::AudioDataOutput::LeftChannel].size() >= m_dataSize) {
            emit dataReady(m_pendingFrames.takeFirst().map);
        }*/
        for (int i=0; i<m_pendingFrames.size(); i++) {
            if (m_pendingFrames[i].timestamp < m_mediaObject->stream()->currentVpts() &&
                    m_pendingFrames[i].map[Phonon::AudioDataOutput::LeftChannel].size() >= m_dataSize) {
                emit dataReady(m_pendingFrames.takeAt(i).map);
            }
        }
    } else { // Fire at will, as long as there is enough data
        while (!m_pendingFrames.isEmpty() &&
                m_pendingFrames.last().map[Phonon::AudioDataOutput::LeftChannel].size() >= m_dataSize)
            emit dataReady(m_pendingFrames.takeLast().map);
    }
}
Example #3
0
void TerminalWindow::lineEditReady()
{
    QString s;
    QByteArray a;
    s = lineEdit->text();
#if QT_VERSION >= 0x050000
    a = s.toLatin1();
#else
    a = s.toAscii();
#endif
    a.append('\n');
#ifdef Q_WS_WIN
    DWORD n=a.length();
    DWORD res;
    if ( s == "EOF" )
    {
        a[0] = 3;
        a[1] = '\n';
        WriteFile(toChild,a.data(),2,&res,NULL);
    }
    else if ( ! WriteFile(toChild,a.data(),n,&res,NULL) )
    {
        qDebug() << tr("error writing to child on lineEditReady");
    }
    dataReady(s+"\n");
#else
    if (write(pty, a.data(), a.length()) < 1) {
        qDebug() << tr("error writing to pty on lineEditReady");
    }
#endif
    lineEdit->clear();
}
Example #4
0
void MjpegClient::dataReady()
{
	m_blockSize = m_socket->bytesAvailable();
	
	char * data = (char*)malloc(m_blockSize * sizeof(char));
	if(data == NULL)
	{
		qDebug() << "Error allocating memory for incomming data - asked for "<<m_blockSize<<" bytes, got nothing, exiting.";
		exit();
		return;
	}
	
	int bytesRead = m_socket->read(data,m_blockSize);
	if(bytesRead > 0)
	{
		m_dataBlock.append(data,m_blockSize);
		processBlock();
	}
	
	free(data);
	data = 0;
	
	if(m_socket->bytesAvailable())
	{
		QTimer::singleShot(0, this, SLOT(dataReady()));
	}
}
Example #5
0
bool MjpegClient::connectTo(const QString& host, int port, QString url, const QString& user, const QString& pass)
{
    if(url.isEmpty())
        url = "/";

    m_host = host;
    m_port = port > 0 ? port : 80;
    m_url = url;
    m_user = user;
    m_pass = pass;

    if(m_socket)
    {
        m_socket->abort();
        delete m_socket;
        m_socket = 0;
    }

    m_socket = new QTcpSocket(this);
    connect(m_socket, SIGNAL(readyRead()),    this,   SLOT(dataReady()));
    connect(m_socket, SIGNAL(disconnected()), this,   SLOT(lostConnection()));
    connect(m_socket, SIGNAL(disconnected()), this, SIGNAL(socketDisconnected()));
    connect(m_socket, SIGNAL(connected()),    this, SIGNAL(socketConnected()));
    connect(m_socket, SIGNAL(connected()),    this,   SLOT(connectionReady()));
    connect(m_socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SIGNAL(socketError(QAbstractSocket::SocketError)));
    connect(m_socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(lostConnection(QAbstractSocket::SocketError)));

    m_socket->connectToHost(host,port);
    m_socket->setReadBufferSize(1024 * 1024);

    return true;
}
Example #6
0
QTweetDeck::QTweetDeck(QWidget *parent) : QMainWindow(parent) {
  setWindowTitle("QTweetDeck");

  QByteArray key, secret;
  QFile file;
  file.setFileName("../qtweet_private/consumer.key");
  if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
    key = file.readLine();
    file.close();
  }

  file.setFileName("../qtweet_private/consumer.secret");
  if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
    secret = file.readLine();
    file.close();
  }

  QTweet::setConsumer(key, secret);

  QTweet::User u;
  u.setUserId(12065042);
  c = new QTweet::Client();
  r = c->requestUserTimeLine(u);

  connect(r, SIGNAL(dataReady()), this, SLOT(printStatusList()));
}
Example #7
0
TKN_Window::TKN_Window(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::TKN_Window)
{
    /* Ui setup */
    ui->setupUi(this);
    ui->buttonStartStop->setText(buttonStartText);
    self = this;
    mTime = new QTime();
    int i;

    /* available ports */
    char** port_list = listSerialPorts();
    if (port_list){
        for (i=0; *port_list; i++, port_list++)
            ui->comboBox_ComPort->insertItem(i, QString(*port_list));
    }

    /* baud rates */
    for (i=0; i<sizeof(baudList)/sizeof(baudList[0]) ; i++)
        ui->comboBox_Baud->insertItem(i, baudList[i]);

    this->mTknStarted = false;

    /* Signal connections */
    connect(this, SIGNAL(tokenReceived()), this, SLOT(onTokenReceived()), Qt::QueuedConnection);
    connect(this, SIGNAL(dataReady()), this, SLOT(dataReceive()), Qt::QueuedConnection);

    this->ui->labelAVR->setPixmap( QPixmap(":/AVR_Chip-W180px.png"));
    this->updateUI();
}
Example #8
0
void SSH1Channel::receiveData()
{
    m_in->getUInt8();
    QByteArray data = m_in->getString();
    m_data += data;
    emit dataReady();
}
/**
  * @brief receive chunk of data from a socket to this packet
  */
void OpenNICPacket::recv(QTcpSocket* socket)
{
	QByteArray chunk;
	QDataStream stream(socket);
	switch(mRXState)
	{
	case 0:
		mRXData.clear();
		stream >> mRXLength;
		if (mRXLength == 0xFFFFFFFF)
		{
			return;
		}
		mRXState=1;
	case 1:
		chunk = stream.device()->readAll();
		mRXData.append(chunk);
		if (mRXData.length()<(int)mRXLength)
		{
			return;
		}
		mRXState=0;
		break;
	}
	QDataStream dataStream(&mRXData,QIODevice::ReadOnly);
	dataStream >> mData;
	emit dataReady();
}
Example #10
0
void WebCamData::trackFace() {
  CvConnectedComp comps;
  updateHugeImage(d->data);

  cvCalcBackProject(&d->hueImage, d->prob, d->histogram);
  cvAnd(d->prob, d->mask, d->prob, 0);
  CvBox2D box;
  cvCamShift(d->prob, d->faceRect,
             cvTermCriteria(CV_TERMCRIT_EPS | CV_TERMCRIT_ITER, 10, 1), &comps,
             &box);

  d->faceRect = comps.rect;

  int radius = cvRound((d->faceRect.width + d->faceRect.height) * 0.25);
  CvPoint center;
  center.x = cvRound(d->faceRect.x + d->faceRect.width * 0.5);
  center.y = cvRound(d->faceRect.y + d->faceRect.height * 0.5);
  /*
      qDebug() << Q_FUNC_INFO
      << comps.rect.x
      << comps.rect.y
      << comps.rect.width
      << comps.rect.height
      << box.angle
      << center.x
      << center.y
      << radius;
   */
  d->dataMap.clear();
  d->dataMap["z"] = QVariant(radius);
  d->dataMap["x"] = QVariant(center.x);
  d->dataMap["y"] = QVariant(center.y);
  d->dataMap["angle"] = QVariant(box.angle);
  Q_EMIT dataReady();
}
void SerialPort::checkPort()
{
	if(serial->bytesAvailable()>0)
	{
		emit(dataReady());
	}
}
void FileDownloader::downloadComplete()
{
    fileData = reply->readAll();

    reply->deleteLater();
    emit dataReady();
}
Example #13
0
ReportManager::ReportManager(_structs * data, QWidget *parent) :
    QDialog(parent),
    ui(new Ui::ReportManager)
{
    processSwitch = 0;
    connect(&socketConn, SIGNAL(dataReady(QString)), this, SLOT(processData(QString)));

    ui->setupUi(this);

    for(int i = 1; i <= 12; i++ )
    {
        ui->monthSelector->addItem(QString::number(i));
    }
    // Build list of years
    QDate now = QDate::currentDate();
    int year = now.year();
    QStringList years;
    for(int i =0; i < 5; i++)
    {
        years.append(QString::number(year-i));
    }

    // Add to combo
    ui->yearSelector->addItems(years);

    dataStructs = data;
    ui->startDate->setDate(QDate::currentDate().addDays(-7));
    ui->endDate->setDate(QDate::currentDate());

}
void PreviewFileLoader::run()
{
    QImage pixmap;

    // make sure this function doesn't crash because of some exiv issues.
    ExivFacade* exiv = ExivFacade::createExivReader();

    if (!exiv->openFile(mPath))
    {
        qDebug() << "Failed to load embedded preview";
        return;
    }
    qDebug() << "Reading image:" << mPath;

    pixmap = exiv->getPreview();

    // if the image contained no thumbnail attempt to load it from disk directly
    if (pixmap.isNull())
        pixmap.load(mPath);
    QImage image = pixmap.scaled(QSize(PREVIEW_IMG_WIDTH,
            PREVIEW_IMG_HEIGHT), Qt::KeepAspectRatio);

    emit dataReady(mModelIndex, image);
    delete exiv;
}
Example #15
0
bool Caen785Module::pollTrigger()
{
    printf("Polling.\n");fflush(stdout);
    bool triggered = true;
    uint32_t pollcount = 0;
    conf.pollcount = 100000;

    while(!dataReady())
    {
        pollcount++;
        if(pollcount == conf.pollcount)
        {
            triggered = false;
            break;
        }
    }

    if(!triggered)
    {
        printf("No trigger in %d polls.\n",pollcount);fflush(stdout);
        return false;
    }
    else
    {
        printf("Triggered after %d polls.\n",pollcount);fflush(stdout);
        return true;
    }
}
Example #16
0
cExternalTrackers::cExternalTrackers(QObject *parent) : QObject(parent),m_HTTPServer(EXTERNAL_TRACKERS_HTTP_PORT)
{
    m_Server.bind(QHostAddress::LocalHost, EXTERNAL_TRACKERS_UDP_PORT);
    connect(&m_Server, SIGNAL(readyRead()), this, SLOT(readyRead()));

    connect(&m_HTTPServer,SIGNAL(dataReady(QString)), this, SLOT(onDataReady(QString)));
}
Example #17
0
double AD770X::readADResult(byte channel, float refOffset) {
    while (!dataReady(channel)) {
    };
    setNextOperation(REG_DATA, channel, 1);

    return readADResult() * 1.0 / 65536.0 * VRef - refOffset;
}
Example #18
0
void NetworkClient::dataReady()
{
	if (m_blockSize == 0) 
	{
		char data[256];
		int bytes = m_socket->readLine((char*)&data,256);
		
		if(bytes == -1)
			qDebug() << "NetworkClient::dataReady: Could not read line from socket";
		else
			sscanf((const char*)&data,"%d",&m_blockSize);
		//qDebug() << "Read:["<<data<<"], size:"<<m_blockSize;
		//log(QString("[DEBUG] NetworkClient::dataReady(): blockSize: %1 (%2)").arg(m_blockSize).arg(m_socket->bytesAvailable()));
	}
	
	if (m_socket->bytesAvailable() < m_blockSize)
		return;
	
	m_dataBlock = m_socket->read(m_blockSize);
	m_blockSize = 0;
	
	if(m_dataBlock.size() > 0)
	{
		//qDebug() << "Data ("<<m_dataBlock.size()<<"/"<<m_blockSize<<"): "<<m_dataBlock;
		//log(QString("[DEBUG] NetworkClient::dataReady(): dataBlock: \n%1").arg(QString(m_dataBlock)));

		processBlock();
	}
	
	
	if(m_socket->bytesAvailable())
	{
		QTimer::singleShot(0, this, SLOT(dataReady()));
	}
}
Example #19
0
/** This method will parse the
 * XML and add entries to the QList: mRssEntries*/
void UtubeData::parseXml() {
  while (!mXml.atEnd()) {
    mXml.readNext();
    if (mXml.isStartElement()) {
      // if (mXml.name() == "item"){
      // mLinkString = mXml.attributes().value("rss:about").toString();
      //}
      mCurrentTag = mXml.name().toString();
    } else if (mXml.isEndElement()) {
      // qDebug() << mXml.name().toString()<<" ::: " << endl;
      if (mXml.name() == "item") {

        mVideoID = (mLinkString.split("v=")).at(1);
        mThumbString = "http://img.youtube.com/vi/" + mVideoID + "/1.jpg";

        // qDebug() << "UTUBE: " << mThumbString << " : " << endl;

        // mEntry.clear();

        mEntry["title"] = mTitleString;
        mEntry["link"] = mLinkString;
        mEntry["description"] = mDescString;
        mEntry["thumb"] = mThumbString; // 97 130

        // mThumbString = mThumbString.split(QRegExp("\\s+"));

        QVariant rssitem(mEntry);

        // mRssEntries.append(rssitem);
        dataItem = rssitem;
        emit dataReady();

        // mTitleString.clear();
        // mLinkString.clear();
        // mDescString.clear();
        // mThumbString.clear();
      }

    } else if (mXml.isCharacters() && !mXml.isWhitespace()) {
      if (mCurrentTag == "title") {
        mTitleString = mXml.text().toString();
      } else if (mCurrentTag == "link") {
        mLinkString = mXml.text().toString();
      } else if (mCurrentTag == "description") {
        mDescString = mXml.text().toString();
      }
    }
  }

  if (mXml.error() &&
      mXml.error() != QXmlStreamReader::PrematureEndOfDocumentError) {
    qDebug() << "UTUBE: XML ERROR:" << mXml.lineNumber() << ": "
             << mXml.errorString();
    mHttp->abort();
    return;
  }

  // QVariant rss(mRssEntries);
  // emit data(rss);
}
Example #20
0
/**
 * Calls readData() in a loop until commanded to disconnect and possibly
 * shut down the thread.
 */
void CUXInterface::runServiceLoop()
{
    ReadResult res = ReadResult_NoStatement;

    bool connected = c14cux_isConnected(&m_cuxinfo);

    while (!m_stopPolling && !m_shutdownThread && connected)
    {
        res = readData();
        if (res == ReadResult_Success)
        {
            emit readSuccess();
            emit dataReady();
        }
        else if (res == ReadResult_Failure)
        {
            emit readError();
        }
        QCoreApplication::processEvents();
    }

    if (connected)
    {
        c14cux_disconnect(&m_cuxinfo);
    }
    emit disconnected();

    clearFlagsAndData();

    if (m_shutdownThread)
    {
        QThread::currentThread()->quit();
    }
}
Example #21
0
void TheGamesDB::processRequest(QNetworkReply* reply)
{
    qCDebug(phxLibrary) << "processing rquest";
    switch (reply->property("state").toInt()) {
        case RequestingId:
        {
            QString id = parseXMLforId(reply->property("gameName").toString(), reply);

            auto secondReply = manager->get(QNetworkRequest(QUrl(BASE_URL + "GetGame.php?id=" + id)));
            secondReply->setProperty("gameId", id);
            secondReply->setProperty("gameName", reply->property("gameName"));
            secondReply->setProperty("gameSystem", reply->property("gameSystem"));
            secondReply->setProperty("state", RequestingData);
            break;
        }
        case RequestingData:
        {
            qDebug() << "Parsing XML for game";
            GameData* game_data = findXMLGame(reply->property("gameId").toString(), reply);
            game_data->libraryName = reply->property("gameName").toString();
            game_data->librarySystem = reply->property("gameSystem").toString();
            emit dataReady(game_data);
            break;
        }
        default:
            break;
    }

    reply->deleteLater();
}
Example #22
0
qint64 AudioSource::readData(char *data, qint64 maxlen)
{
    QVector<QByteArray> chunks;
    qint64 tmp = QBuffer::readData(data, maxlen);
    chunks.append(QByteArray((const char*)data, tmp));
    emit dataReady(chunks);
    return tmp;
}
Example #23
0
inline void AudioDataOutput::convertAndEmit(const QVector<qint16> &leftBuffer, const QVector<qint16> &rightBuffer)
{
    //TODO: Floats
    IntMap map;
    map.insert(Phonon::AudioDataOutput::LeftChannel, leftBuffer);
    map.insert(Phonon::AudioDataOutput::RightChannel, rightBuffer);
    emit dataReady(map);
}
void QQmlProfiler::reportData()
{
    QList<QQmlProfilerData> result;
    result.reserve(m_data.size());
    for (int i = 0; i < m_data.size(); ++i)
        result.append(m_data[i]);
    emit dataReady(result);
}
Example #25
0
TagModel::TagModel(QObject *parent) :
    QAbstractListModel(parent)
{
    m_api = new HashTockApi("http://hashtock.appspot.com/api/tag/", this);
    connect(m_api, SIGNAL(dataReady(QJsonDocument)), this, SLOT(processData(QJsonDocument)), Qt::QueuedConnection);

    m_order = new OrderApi(this);
}
Example #26
0
void SocketHandler::SubmitQuery(int request_type, QString data)
{
    // Make a new tcp socket, and connect to the server
    socket = new QTcpSocket(this);
    socket->connectToHost(host, port);

    // Wait a few seconds for a connection
    if (socket->waitForConnected(5000))
    {
        // When connected, build a socket query based on parameters
        QString temp;
        qDebug() << "[SOCKET HANDLER] : Connected.";
        // Byte array for converting qstring to const char *
        QByteArray bytes;
        const char * query;

        switch(request_type)
        {
            case REQ_NEW_ITEM:
                qDebug() << "[SOCKET HANDLER] : Requesting new job.";
                temp = "n^" + data;
                break;
            case UPD_CUR_ITEM:
                qDebug() << "[SOCKET HANDLER] : Requesting update on job.";
                temp = "u^" + data;
                break;
            default:
                break;
        }

        // Convert data for sending
        bytes = temp.toLocal8Bit();
        query = bytes.data();

        // Send query
        socket->write(query);
        socket->waitForBytesWritten(10000);

        // Recieve a response from the server
        QByteArray arr;
        while(!arr.contains(SERVER_RECV_DELIMITER))
        {
            socket->waitForReadyRead();
            arr += socket->readAll();
        }

        int b = arr.indexOf(SERVER_RECV_DELIMITER);
        QByteArray message = arr.left(b);
        arr = arr.mid(b);
        qDebug() << "[SOCKET HANDLER] : DONE." ;
        emit dataReady(message);
        socket->close();
    }
    else
    {
        qDebug() << "[SOCKET HANDLER] : COULD NOT CONNECT.";
    }
}
bool TracesProvider::qt_emit( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: dataReady((Array<dataType>&)*((Array<dataType>*)static_QUType_ptr.get(_o+1)),(QObject*)static_QUType_ptr.get(_o+2)); break;
    default:
	return DataProvider::qt_emit(_id,_o);
    }
    return TRUE;
}
Example #28
0
void AI_logPlayer::playLog()
{
    if( frameNumber < chunks.size() )
    {
        current_chunk = chunks.at(frameNumber++);
        QTimer::singleShot(15, this, SLOT(timerShot()));
        emit dataReady();
    }
}
QmlProfilerApplication::QmlProfilerApplication(int &argc, char **argv) :
    QCoreApplication(argc, argv),
    m_runMode(LaunchMode),
    m_process(0),
    m_hostName(QLatin1String("127.0.0.1")),
    m_port(3768),
    m_pendingRequest(REQUEST_NONE),
    m_verbose(false),
    m_recording(true),
    m_interactive(false),
    m_qmlProfilerClient(&m_connection),
    m_v8profilerClient(&m_connection),
    m_connectionAttempts(0),
    m_qmlDataReady(false),
    m_v8DataReady(false)
{
    m_connectTimer.setInterval(1000);
    connect(&m_connectTimer, SIGNAL(timeout()), this, SLOT(tryToConnect()));

    connect(&m_connection, SIGNAL(connected()), this, SLOT(connected()));
    connect(&m_connection, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(connectionStateChanged(QAbstractSocket::SocketState)));
    connect(&m_connection, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(connectionError(QAbstractSocket::SocketError)));

    connect(&m_qmlProfilerClient, SIGNAL(enabledChanged()), this, SLOT(traceClientEnabled()));
    connect(&m_qmlProfilerClient, SIGNAL(range(QQmlProfilerDefinitions::RangeType,QQmlProfilerDefinitions::BindingType,qint64,qint64,QStringList,QmlEventLocation)),
            &m_profilerData, SLOT(addQmlEvent(QQmlProfilerDefinitions::RangeType,QQmlProfilerDefinitions::BindingType,qint64,qint64,QStringList,QmlEventLocation)));
    connect(&m_qmlProfilerClient, SIGNAL(traceFinished(qint64)), &m_profilerData, SLOT(setTraceEndTime(qint64)));
    connect(&m_qmlProfilerClient, SIGNAL(traceStarted(qint64)), &m_profilerData, SLOT(setTraceStartTime(qint64)));
    connect(&m_qmlProfilerClient, SIGNAL(traceStarted(qint64)), this, SLOT(notifyTraceStarted()));
    connect(&m_qmlProfilerClient, SIGNAL(frame(qint64,int,int,int)), &m_profilerData, SLOT(addFrameEvent(qint64,int,int,int)));
    connect(&m_qmlProfilerClient, SIGNAL(sceneGraphFrame(QQmlProfilerDefinitions::SceneGraphFrameType,
                                         qint64,qint64,qint64,qint64,qint64,qint64)),
            &m_profilerData, SLOT(addSceneGraphFrameEvent(QQmlProfilerDefinitions::SceneGraphFrameType,
                                  qint64,qint64,qint64,qint64,qint64,qint64)));
    connect(&m_qmlProfilerClient, SIGNAL(pixmapCache(QQmlProfilerDefinitions::PixmapEventType,qint64,
                                                     QmlEventLocation,int,int,int)),
            &m_profilerData, SLOT(addPixmapCacheEvent(QQmlProfilerDefinitions::PixmapEventType,qint64,
                                                      QmlEventLocation,int,int,int)));
    connect(&m_qmlProfilerClient, SIGNAL(memoryAllocation(QQmlProfilerDefinitions::MemoryType,qint64,
                                                          qint64)),
            &m_profilerData, SLOT(addMemoryEvent(QQmlProfilerDefinitions::MemoryType,qint64,
                                                 qint64)));
    connect(&m_qmlProfilerClient, SIGNAL(inputEvent(QQmlProfilerDefinitions::EventType,qint64)),
            &m_profilerData, SLOT(addInputEvent(QQmlProfilerDefinitions::EventType,qint64)));

    connect(&m_qmlProfilerClient, SIGNAL(complete()), this, SLOT(qmlComplete()));

    connect(&m_v8profilerClient, SIGNAL(enabledChanged()), this, SLOT(profilerClientEnabled()));
    connect(&m_v8profilerClient, SIGNAL(range(int,QString,QString,int,double,double)),
            &m_profilerData, SLOT(addV8Event(int,QString,QString,int,double,double)));
    connect(&m_v8profilerClient, SIGNAL(complete()), this, SLOT(v8Complete()));

    connect(&m_profilerData, SIGNAL(error(QString)), this, SLOT(logError(QString)));
    connect(&m_profilerData, SIGNAL(dataReady()), this, SLOT(traceFinished()));

}
Example #30
0
void AD770X::init(byte channel, byte clkDivider, byte polarity, byte gain, byte updRate) {
    setNextOperation(REG_CLOCK, channel, 0);
    writeClockRegister(0, clkDivider, updRate);

    setNextOperation(REG_SETUP, channel, 0);
    writeSetupRegister(MODE_SELF_CAL, gain, polarity, 0, 0);

    while (!dataReady(channel)) {
    };
}