Ejemplo n.º 1
0
/**
 * Destroys the PsiContactList along with all PsiAccounts.
 */
PsiContactList::~PsiContactList()
{
	emit destroying();
	accountsLoaded_ = false;

	// PsiAccount calls some signals while being deleted prior to being unlinked,
	// which in result could cause calls to PsiContactList::accounts()
	QList<PsiAccount*> toDelete(accounts_);

	enabledAccounts_.clear();

	foreach(PsiAccount* account, toDelete)
		delete account;
}
void PlaybackMarkersController::
        setupGui()
{
    Ui::SaweMainWindow* main = render_view_->model->project()->mainWindow();
    Ui::MainWindow* ui = main->getItems();

    // Connect enabled/disable actions,
    connect(ui->actionSetPlayMarker, SIGNAL(toggled(bool)), SLOT(enableMarkerTool(bool)));
    connect(this, SIGNAL(enabledChanged(bool)), ui->actionSetPlayMarker, SLOT(setChecked(bool)));
    connect(ui->actionJumpForward, SIGNAL(triggered()), SLOT(receiveNextMarker()));
    connect(ui->actionJumpBackward, SIGNAL(triggered()), SLOT(receivePreviousMarker()));


    // Close this widget before the OpenGL context is destroyed to perform
    // proper cleanup of resources
    connect(render_view_, SIGNAL(destroying()), SLOT(close()));
}
Ejemplo n.º 3
0
ContactListModel::ContactListModel(PsiContactList* contactList)
    : AbstractTreeModel(new ContactListItem(this, ContactListItem::Type::RootType))
    , d(new Private(this))
{
    d->contactList = contactList;

    connect(contactList, SIGNAL(addedContact(PsiContact*)), d, SLOT(addContact(PsiContact*)));
    connect(contactList, SIGNAL(removedContact(PsiContact*)), d, SLOT(removeContact(PsiContact*)));

    connect(d->contactList, SIGNAL(destroying()), SLOT(destroyingContactList()));
    connect(d->contactList, SIGNAL(showOfflineChanged(bool)), SIGNAL(showOfflineChanged()));
    connect(d->contactList, SIGNAL(showHiddenChanged(bool)), SIGNAL(showHiddenChanged()));
    connect(d->contactList, SIGNAL(showSelfChanged(bool)), SIGNAL(showSelfChanged()));
    connect(d->contactList, SIGNAL(showAgentsChanged(bool)), SIGNAL(showTransportsChanged()));
    connect(d->contactList, SIGNAL(rosterRequestFinished()), SLOT(rosterRequestFinished()));
    connect(d->contactList, SIGNAL(contactSortStyleChanged(QString)), SIGNAL(contactSortStyleChanged()));
}
Ejemplo n.º 4
0
ConnectionPointer<ShupitoConnection> ConnectionManager2::createAutoShupito(PortConnection * parentConn)
{
    Q_ASSERT(parentConn);

    if (m_autoShupitos.contains(parentConn))
    {
        ShupitoConnection * res = m_autoShupitos[parentConn];
        res->addRef();
        return ConnectionPointer<ShupitoConnection>(res);
    }

    ConnectionPointer<PortShupitoConnection> res(new PortShupitoConnection());
    res->setName("Shupito at " % parentConn->name(), /*isDefault=*/true);
    res->setPort(ConnectionPointer<PortConnection>::fromPtr(parentConn));
    this->addConnection(res.data());
    connect(res.data(), SIGNAL(destroying()), this, SLOT(autoShupitoDestroyed()));

    // TODO: exception safety
    m_autoShupitos[parentConn] = res.data();
    m_autoShupitosRev[res.data()] = parentConn;
    parentConn->addRef();

    return res;
}
Ejemplo n.º 5
0
void ConnectionManager2::addConnection(Connection * conn)
{
    connect(conn, SIGNAL(destroying()), this, SLOT(connectionDestroyed()));
    m_conns.append(conn);
    emit connAdded(conn);
}
Ejemplo n.º 6
0
void LibybUsbEnumerator::registerUserOwnedConn(STM32Connection * conn)
{
    connect(conn, SIGNAL(destroying()), this, SLOT(stm32ConnDestroying()));
    m_user_owned_stm32_conns.insert(conn);
}
Ejemplo n.º 7
0
void LibybUsbEnumerator::registerUserOwnedConn(UsbAcmConnection2 * conn)
{
    connect(conn, SIGNAL(destroying()), this, SLOT(acmConnDestroying()));
    m_user_owned_acm_conns.insert(conn);
}
Ejemplo n.º 8
0
DeliverDotLock::~DeliverDotLock()
{
	destroying();
}
Ejemplo n.º 9
0
AstSipPeer::~AstSipPeer()
{
  emit destroying(this);
}
Ejemplo n.º 10
0
InputLink::~InputLink()
{
    destroying(*this);
}
Ejemplo n.º 11
0
bool CatanRoom::AddUser( CatanUser *user )
{
    if( GetNumPlayers() >= config->GetMaxPlayers() ) return false;
    if( user->InGame() || user->InLobby() ) return false;

    int id = getNextPID( players );
    CatanPlayer* player = new CatanPlayer(id, user, this);

    //set the host
    if( !host )
        setHost( player );

    players[id] = player;
    playerCount++;

    LOG_DEBUG( "Lobby player count: " << GetNumPlayers() << endl );
    player->SetState(PLAYER_STATE::IN_LOBBY);

    //tell the current players in the room that this user has joined
    for( int i = 0; i < GetMaxPlayers(); i++ )
    {
        CatanPlayer *occupant = players[i];
        if( !occupant ) continue;

        net::Begin(NETWORK_COMMAND::SERVER_ROOM_USER_JOINED);
            net::AddShort(this->GetID());
            net::AddByte(player->GetID());
            net::AddString(player->GetName());
        net::Send(occupant->GetUser());
    }

    //tell this user about the current players in the room
    net::Begin(NETWORK_COMMAND::SERVER_ROOM_PLAYERS);
        net::AddByte(GetNumPlayers()-1); //don't include the new player
        //send the host first.
        net::AddByte(host->GetID());
        net::AddString(host->GetName());
        net::AddBool(readyPlayers[host->GetID()]);
        for( int i = 0; i < GetMaxPlayers(); i++ )
        {
            CatanPlayer *occupant = players[i];
            if( !occupant ) continue;

            if( occupant != host && occupant != player )
            {
                net::AddByte(occupant->GetID());
                net::AddString(occupant->GetName());
                net::AddBool(readyPlayers[occupant->GetID()]);
            }
        }
    net::Send(user);

    //send the game configuration
    transmitConfigFull(user);

    //if the user gets destroyed, remove him from the room
    connect( player, SIGNAL(destroying()),
             this, SLOT(onPlayerDestroying()));
    connect( player, SIGNAL(requestLeaveRoom()),
             this, SLOT(onPlayerLeave()));
    connect( player, SIGNAL(readyUp(bool)),
             this, SLOT(readyUp(bool)));

    emit addedPlayer(player);
    return true;

}
Ejemplo n.º 12
0
 ~ModuleInput(){destroying(*this);}
Ejemplo n.º 13
0
OutputLink::~OutputLink()
{
    destroying(*this);
}
Ejemplo n.º 14
0
 ~ModuleOutput(){destroying(*this);}