//TODO void MainWindow::on_ContactsList_itemClicked(QListWidgetItem *item) { if(item == NULL) return; QString login = item->text(); int status = DataBase::getStatus(login); switch(status){ case static_cast<int>(contact_status::denied): if(deniedEvent(login) == status_codes::OK) loadContacts(ui->lineFindLogin->text()); return; case static_cast<int>(contact_status::requested_from): additionEvent(login); loadContacts(ui->lineFindLogin->text()); return; } ui->ChatWindow->clear(); ui->ChatWindow->setHtml(DataBase::getMessages(item->text())); VerticalScroll.setValue(VerticalScroll.maximum()); item->setIcon(QIcon()); }
void CDlgAddUser::OnTextUpdated( wxCommandEvent& event ) { if ( event.GetEventType() == wxEVT_COMMAND_TEXT_UPDATED ) { loadContacts(event.GetString()); } }
void HistoryContactListModel::updateContacts(PsiCon *psi, const QString &id) { beginResetModel(); clear(); loadContacts(psi, id); endResetModel(); }
void WAccount::loadSettings() { Config mainGroup = Config( "weather" ).group( "main" ); m_timer->stop(); m_timer->start( mainGroup.value( "interval", 25 ) * 1000 ); s_showStatusRow = ( mainGroup.value( "showStatus", true ) ? Qt::Checked : Qt::Unchecked ); s_themePath = ( mainGroup.value( "useDefaultTheme", true ) ? ":/themes/default/" : mainGroup.value( "themePath", QString() ) ); loadContacts(); }
void MainWindow::windowInit(QString _login) { ui->sortContacts->setIcon(QIcon(":/images/up.png")); ui->sortContacts->setWindowTitle("UP"); qDebug() << ui->sortContacts->windowTitle(); login = _login; loadContacts(); styleInit(); if(ui->ChatWindow->verticalScrollBar() != &VerticalScroll) ui->ChatWindow->setVerticalScrollBar(&VerticalScroll); this->show(); }
void WAccount::loadSettings() { Config config = Config(QLatin1String("weather")); config.beginGroup(QLatin1String("main")); int minutesInterval = config.value(QLatin1String("interval"), 25); m_timer.start(minutesInterval * 60 * 1000, this); m_showStatusRow = config.value(QLatin1String("showStatus"), true); QString themeName = config.value(QLatin1String("themeName"), QLatin1String("default")); m_themePath = ThemeManager::path(QLatin1String("weatherthemes"), themeName); if (m_themePath.isEmpty() && themeName != QLatin1String("default")) m_themePath = ThemeManager::path(QLatin1String("weatherthemes"), QLatin1String("default")); m_themePath += QLatin1Char('/'); loadContacts(); }
void QNetsoul::connectActionsSignals(void) { // QNetsoul connect(actionConnect, SIGNAL(triggered()), SLOT(connectToServer())); connect(actionDisconnect, SIGNAL(triggered()), SLOT(disconnect())); connect(actionCheckForUpdates, SIGNAL(triggered()), this->_internUpdater, SLOT(startUpdater())); connect(actionQuit, SIGNAL(triggered()), SLOT(saveStateBeforeQuiting())); // Contacts connect(actionAddG, SIGNAL(triggered()), this->tree, SLOT(addGroup())); connect(actionAddC, SIGNAL(triggered()), this->tree, SLOT(addContact())); connect(actionRefresh, SIGNAL(triggered()), this->tree, SLOT(refreshContacts())); connect(actionLoadContacts, SIGNAL(triggered()), this->tree, SLOT(loadContacts())); connect(actionSaveContacts, SIGNAL(triggered()), this->tree, SLOT(saveContacts())); connect(actionSaveContactsAs, SIGNAL(triggered()), this->tree, SLOT(saveContactsAs())); // Plugins connect(actionPluginsManager, SIGNAL(triggered()), this->_pluginsManager, SLOT(show())); connect(actionVDM, SIGNAL(triggered()), this->_vdm, SLOT(getVdm())); connect(actionCNF, SIGNAL(triggered()), this->_cnf, SLOT(getFact())); connect(actionPastebin, SIGNAL(triggered()), this->_pastebin, SLOT(pastebinIt())); // Options connect(actionPreferences, SIGNAL(triggered()), SLOT(openOptionsDialog())); // Help connect(actionAbout_QNetSoul, SIGNAL(triggered()), SLOT(aboutQNetSoul())); connect(actionAbout_Qt, SIGNAL(triggered()), qApp, SLOT(aboutQt())); // Status connect(statusComboBox, SIGNAL(currentIndexChanged(int)), this->_network, SLOT(sendStatus(const int&))); // From Option widget connect(this->_options->mainWidget, SIGNAL(loginPasswordFilled()), SLOT(connectToServer())); }
void MainWindow::findContact(const QString& text){ qDebug() << text; loadContacts(text); }
void MainWindow::updateWindow(){ qDebug() << "Update MainWindow"; loadContacts(ui->lineFindLogin->text()); loadMsg(ui->findMsgButton->text() == tr("Clear") ? ui->lineFindMsg->text() : 0); }
void MainWindow::addContact() { loadContacts(ui->lineFindLogin->text()); }