void AccountsComboBox::setController(PsiCon* controller) { if (controller_) { disconnect(controller_, SIGNAL(accountCountChanged()), this, SLOT(updateAccounts())); disconnect(controller_, SIGNAL(accountActivityChanged()), this, SLOT(updateAccounts())); } controller_ = controller; if (controller_) { connect(controller_, SIGNAL(accountCountChanged()), this, SLOT(updateAccounts())); connect(controller_, SIGNAL(accountActivityChanged()), this, SLOT(updateAccounts())); } if (controller_->contactList()->haveEnabledAccounts()) { setAccount(controller_->contactList()->enabledAccounts().first()); } updateAccounts(); }
Settings::Settings() : QObject() { updateAccounts(); }
void AccountsComboBox::setOnlineOnly(bool onlineOnly) { onlineOnly_ = onlineOnly; updateAccounts(); }
void AccountsComboBox::setAccount(PsiAccount* account) { account_ = account; updateAccounts(); }