Beispiel #1
0
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();
}
Beispiel #2
0
Settings::Settings()
    : QObject()
{
    updateAccounts();
}
Beispiel #3
0
void AccountsComboBox::setOnlineOnly(bool onlineOnly)
{
	onlineOnly_ = onlineOnly;
	updateAccounts();
}
Beispiel #4
0
void AccountsComboBox::setAccount(PsiAccount* account)
{
	account_ = account;
	updateAccounts();
}