void MainWindow::planCanceled() { // while planning we might have modified the displayed_dive // let's refresh what's shown on the profile showProfile(); ui.newProfile->replot(); refreshDisplay(false); ui.newProfile->plotDive(get_dive(selected_dive)); DivePictureModel::instance()->updateDivePictures(); }
void UserWin::manageWin() { this->_serverText = "Serveur: "; this->_serverText.append(this->getServer()); this->_portText = " | Port: "; this->_portText.append(QString::number(this->getTcpPort())); this->_idText = "Identifiant: "; this->_idText.append(this->getClientId()); this->_call.setText("Appeler"); this->_mContact->addAction(this->_aAddContact); this->_mContact->addAction(this->_aDelContact); this->_mContact->addAction(this->_aSearchContact); this->_mContact->addAction(this->_aDisconnect); this->_mContact->addAction(this->_aQuit); this->_mAccount->addAction(this->_aProfile); this->_mHelp->addAction(this->_aHelp); this->_online.setText("Contacts en ligne"); this->_offline.setText("Contacts hors ligne"); this->_idLabel.setText(this->_idText); this->_infoLabel.setText(this->_serverText.append(this->_portText)); this->_call.setFont(QFont("Default", 14)); this->_call.setCursor(Qt::PointingHandCursor); this->_call.setIcon(QIcon(QCoreApplication::applicationDirPath() + "/ressources/Logo.png")); this->_modelOn.setStringList(this->getContactOn()); this->_modelOff.setStringList(this->getContactOff()); this->_viewOn.setModel(&this->_modelOn); this->_viewOn.setEditTriggers(QAbstractItemView::NoEditTriggers); this->_viewOff.setModel(&this->_modelOff); this->_viewOff.setEditTriggers(QAbstractItemView::NoEditTriggers); this->_viewOff.setSelectionMode(QAbstractItemView::NoSelection); this->_layout.addWidget(&this->_infoLabel); this->_layout.addWidget(&this->_idLabel); this->_layout.addWidget(&this->_online, Qt::AlignCenter); this->_layout.addWidget(&this->_viewOn); this->_layout.addWidget(&this->_offline, Qt::AlignCenter); this->_layout.addWidget(&this->_viewOff); this->_layout.addWidget(&this->_call); this->_core.setLayout(&this->_layout); this->getUdpSocket()->bind(this->getUdpPort()); this->setCentralWidget(&this->_core); this->setWindowIcon(QIcon(QCoreApplication::applicationDirPath() + "/ressources/babybel.png")); connect(&this->_call, SIGNAL(clicked()), this, SLOT(selectContact())); connect(this->_aQuit, SIGNAL(triggered()), qApp, SLOT(quit())); connect(this->_aAddContact, SIGNAL(triggered()), this, SLOT(addContact())); connect(this->_aDelContact, SIGNAL(triggered()), this, SLOT(delContact())); connect(this->_aSearchContact, SIGNAL(triggered()), this, SLOT(searchContact())); connect(this->_aDisconnect, SIGNAL(triggered()), this, SLOT(aDisconnect())); connect(this->_aHelp, SIGNAL(triggered()), this, SLOT(showHelp())); connect(this->_aProfile, SIGNAL(triggered()), this, SLOT(showProfile())); connect(this->getTcpSocket(), SIGNAL(readyRead()), this, SLOT(receivedTcpData())); connect(this->getUdpSocket(), SIGNAL(readyRead()), this, SLOT(receivedUdpData())); }
void MainWindow::planCreated() { // get the new dive selected and assign a number if reasonable ui.newProfile->setProfileState(); if (displayed_dive.id == 0) { // we might have added a new dive (so displayed_dive was cleared out by clone_dive() dive_list()->unselectDives(); select_dive(dive_table.nr - 1); dive_list()->selectDive(selected_dive); set_dive_nr_for_current_dive(); } // make sure our UI is in a consistent state ui.InfoWidget->updateDiveInfo(); showProfile(); refreshDisplay(); }
void LLNetMap::handleShowProfile() { showProfile(); }
void rosterListView::showProfile_helper() { QString bareJid = selectedBareJid(); if(!bareJid.isEmpty()) emit showProfile(bareJid); }
Xmpp_client::Xmpp_client(QString a_login, QString a_password, int a_xmpp_client_port, QObject *parent) : m_login(a_login), m_password(a_password), m_xmpp_client_port(a_xmpp_client_port), QXmppClient(parent) { bool check; Q_UNUSED(check); m_capabilitiesCache = new capabilitiesCache(this); m_vCardCache = new vCardCache(this); qDebug() << "Xmpp_client::Xmpp_client !!!"; QXmppLogger::getLogger()->setLoggingType(QXmppLogger::SignalLogging); transfer_manager = new QXmppTransferManager; this->addExtension (transfer_manager); // uncomment one of the following if you only want to use a specific transfer method: // //transfer_manager->setSupportedMethods(QXmppTransferJob::InBandMethod); // manager->setSupportedMethods(QXmppTransferJob::SocksMethod); transfer_manager->setProxy("proxy.nodecast.net"); transfer_manager->setSupportedMethods(QXmppTransferJob::InBandMethod); muc_manager = new QXmppMucManager; this->addExtension(muc_manager); check = connect(&this->rosterManager(), SIGNAL(rosterReceived()), this, SLOT(rosterReceived())); Q_ASSERT(check); check = connect(&this->rosterManager(), SIGNAL(itemChanged(QString)), this, SLOT(rosterChanged(QString))); Q_ASSERT(check); check = connect(&this->rosterManager(), SIGNAL(presenceChanged(QString,QString)), this, SLOT(presenceChanged(QString,QString))); Q_ASSERT(check); check = connect(this, SIGNAL(messageReceived(const QXmppMessage&)), SLOT(messageReceived(const QXmppMessage&))); Q_ASSERT(check); Q_UNUSED(check); check = connect(this, SIGNAL(presenceReceived(const QXmppPresence&)), SLOT(presenceReceived(const QXmppPresence&))); check = connect(this, SIGNAL(connected()), SLOT(updateStatusWidget())); Q_ASSERT(check); // check = connect(&m_xmppClient, SIGNAL(connected()), SLOT(addAccountToCache())); // Q_ASSERT(check); check = connect(this, SIGNAL(connected()), SLOT(connectedToServer())); Q_ASSERT(check); check = connect(this, SIGNAL(disconnected()), SLOT(disconnectedToServer())); Q_ASSERT(check); check = connect(this, SIGNAL(error(QXmppClient::Error)), SLOT(connectedError())); Q_ASSERT(check); check = connect(transfer_manager, SIGNAL(fileReceived(QXmppTransferJob*)), SLOT(file_received(QXmppTransferJob*))); Q_ASSERT(check); check = connect(transfer_manager, SIGNAL(jobFinished(QXmppTransferJob*)), SLOT(job_finished(QXmppTransferJob*))); Q_ASSERT(check); check = connect(&this->vCardManager(), SIGNAL(vCardReceived(QXmppVCardIq)), m_vCardCache, SLOT(vCardReceived(QXmppVCardIq))); Q_ASSERT(check); check = connect(m_vCardCache, SIGNAL(vCardReadyToUse(QString)), SLOT(updateVCard(QString))); Q_ASSERT(check); check = connect(QXmppLogger::getLogger(), SIGNAL(message(QXmppLogger::MessageType,QString)), &m_consoleDlg, SLOT(message(QXmppLogger::MessageType,QString))); Q_ASSERT(check); //this->logger()->setLoggingType(QXmppLogger::StdoutLogging); //this->logger()->setLoggingType(QXmppLogger::FileLogging); m_rosterItemSortFilterModel = new rosterItemSortFilterProxyModel(this); m_rosterItemModel = new rosterItemModel(this); roster = new Ui::Roster; roster_widget= new QWidget; roster->setupUi(roster_widget); layoutRoster = new QVBoxLayout; layoutRoster->addWidget(&m_statusWidget); layoutRoster->addWidget(roster_widget); m_stacked_tab_chat = new QStackedWidget; vRosterSplitter = new QSplitter(Qt::Horizontal); groupBoxContact = new QGroupBox; groupBoxContact->setLayout(layoutRoster); vRosterSplitter->addWidget(groupBoxContact); vRosterSplitter->addWidget(m_stacked_tab_chat); check = connect(roster->lineEdit_filter, SIGNAL(textChanged(QString)), this, SLOT(filterChanged(QString))); Q_ASSERT(check); m_rosterItemSortFilterModel->setSourceModel(m_rosterItemModel); roster->listView->setModel(m_rosterItemSortFilterModel); m_rosterItemSortFilterModel->sort(0); connect(roster->listView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(rosterItemSelectionChanged(QItemSelection))); rosterItemDelegate *delegate = new rosterItemDelegate(); roster->listView->setItemDelegate(delegate); roster->verticalLayout->insertWidget(0, &m_statusWidget); check = connect(&m_statusWidget, SIGNAL(statusTextChanged(QString)), SLOT(statusTextChanged(QString))); Q_ASSERT(check); check = connect(&m_statusWidget, SIGNAL(presenceTypeChanged(QXmppPresence::Type)), SLOT(presenceTypeChanged(QXmppPresence::Type))); Q_ASSERT(check); check = connect(&m_statusWidget, SIGNAL(presenceStatusTypeChanged(QXmppPresence::AvailableStatusType)), SLOT(presenceStatusTypeChanged(QXmppPresence::AvailableStatusType))); Q_ASSERT(check); check = connect(&m_statusWidget, SIGNAL(avatarChanged(QImage)), SLOT(avatarChanged(QImage))); Q_ASSERT(check); check = connect(roster->listView, SIGNAL(showProfile(QString)), this, SLOT(showProfile(QString))); Q_ASSERT(check); check = connect(roster->listView, SIGNAL(removeContact(QString)), this, SLOT(action_removeContact(QString))); Q_ASSERT(check); check = connect(roster->pushButton_addContact, SIGNAL(clicked()), SLOT(action_addContact())); Q_ASSERT(check); this->configuration().setPort(m_xmpp_client_port); this->configuration().setJid(m_login); this->configuration().setPassword(m_password); this->configuration().setResource("nodecast"); this->configuration().setStreamSecurityMode(QXmppConfiguration::StreamSecurityMode::TLSRequired); this->connectToServer(this->configuration()); }