Esempio n. 1
0
bool dbfirebird::connectDB(QString strUser, QString strPsw){
    m_strPSW=strPsw;
    m_strUser=strUser;    
    if(!tryToConnect()){            
        return false;
    };
    return true;
}
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()));

}
Esempio n. 3
0
/**
 * \brief Given a node, this method expands the nearest node in a list, where the new expanded neighbor is the closest neighbor with respect to the given node.
 * \param[in] randomNode The reference node based on which the list should be expanded.
 * \param[in] closestNodeIndex The index of the closest node in the list to the randomNode.
 * \param[in,out] list The list of nodes that should be expanded for the closest node.
 * \param[in] map The grid map of the environment.
 * \return The connection node if both trees are connected, or NULL otherwise.
 */
AbstractNode * RRT::extendClosestNode(GridNode * const randomNode, GridNode * const closestNode,
		std::vector<AbstractNode *> & list, const GridMap& map,
		const std::vector<AbstractNode *> & otherList) const {

	// Nothing to do in this method - we've already implemented it for you :-)

	const std::vector<AbstractNode *> neighbors = getNeighbors(closestNode, list, map);
	AbstractNode * connectionNode = tryToConnect(closestNode, neighbors, otherList);
	if (connectionNode == NULL && !neighbors.empty()) {
		addNearestNeighbor(closestNode, neighbors, randomNode, list);
	}
	return connectionNode;
}
Esempio n. 4
0
void MainWindow::do_connect(const QString & host, const QString & port) {
	if (tryToConnect(host, port)) {
		setup(client);
		m_connected = true;
		ui->actionConnect->setIcon(QIcon(":/icons/disconnect"));

		ui->dockWidget->show();
		ui->dockWidget_2->show();
		ui->mainToolBar->show();
		ui->menuBar->show();
		ui->scrollArea->takeWidget();
	}
}
QmlProfilerApplication::QmlProfilerApplication(int &argc, char **argv) :
    QCoreApplication(argc, argv),
    m_runMode(LaunchMode),
    m_process(0),
    m_tracePrefix(QLatin1String("trace")),
    m_hostName(QLatin1String("127.0.0.1")),
    m_port(3768),
    m_verbose(false),
    m_quitAfterSave(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(recordingChanged(bool)), this, SLOT(recordingChanged()));
    connect(&m_qmlProfilerClient, SIGNAL(range(QQmlProfilerService::RangeType,QQmlProfilerService::BindingType,qint64,qint64,QStringList,QmlEventLocation)),
            &m_profilerData, SLOT(addQmlEvent(QQmlProfilerService::RangeType,QQmlProfilerService::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(frame(qint64,int,int)), &m_profilerData, SLOT(addFrameEvent(qint64,int,int)));
    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()));

}
Esempio n. 6
0
/**
 * Attempts to Sign on
 * Occurs when the signOn button is clicked.
 */
void Login::signOnButtonClicked(){
  if(aolName->currentText() == QString("<new user>")){
    int choice = -1;
    choice = QMessageBox::information(0, "Kinkatta - Error",(
"Kinkatta can't register new aim users at this time.\nYou must goto aol's website and register for\na new account. (http://aim.aol.com)"), "Ok", "Goto web site to register.");
    if (choice == 1)
      kApp->invokeBrowser(QString( "http://aim.aol.com/ "));
    return;
  }
  if ((aolName->currentText().length() == 0 ) || (aolPass->text().length() == 0) ){
    QMessageBox::information(this, "Kinkatta - Message",("Please enter a name and password."), QMessageBox::Ok);
    return;
  }
  
  i_aimSettings->login_password = aolPass->text();
  i_aimSettings->login_name = aolName->currentText();
  i_aimSettings->login_enable_save = save->isChecked();
  i_aimSettings->login_enable_auto = autoLogin->isChecked();
  if (i_aimSettings->login_enable_save == true)
    savePassword(i_aimSettings->login_name);
  else
    removePassword(aolName->currentText());
  tryToConnect();
}