Example #1
0
void App::setWorkingPath(QString workingPath)
{
    QString strippedPath = workingPath.replace("file://", "");

    if (m_workingPath == strippedPath)
        return;

    m_workingPath = strippedPath;

    QSettings settings;
    settings.setValue(SETTINGS_WORKINGPATH, m_workingPath);

    emit workingPathChanged(strippedPath);
}
Example #2
0
void nodeDock::added()
{
    connect( app(), SIGNAL(entityAdded(AEntity*)), this, SLOT(centreNode(AEntity*)) );
    connect( app(), SIGNAL(entityRemoved(AEntity*)), this, SLOT(removeNode(AEntity*)) );
    connect( app(), SIGNAL(entityRemoved(AEntity*)), this, SLOT(entityRemoved(AEntity*)) );

    connect( app(), SIGNAL(selectionChanged()), this, SLOT(appSelectionChanged()) );
    connect( app(), SIGNAL(insertState()), this, SLOT(rebuildGui()) );
    connect( app(), SIGNAL(cleanState()), this, SLOT(rebuildGui()) );
    connect( app(), SIGNAL(openState()), this, SLOT(rebuildGui()) );
    connect( app(), SIGNAL(workingPathChanged()), this, SLOT(rebuildGui()) );

    mView->setApp(app());

    mScene->addItem( new propertiesWidget( app(), mView ) );

    qRegisterMetaType<AEntityLocation>();

    directoryListing *dir( new directoryListing( app(), mView ) );
    mScene->addItem( dir );
    connect( dir, SIGNAL(changeDirectory(AEntityLocation)), this, SLOT(changeDirectory(AEntityLocation)), Qt::QueuedConnection );
}