#include "account-item.h"
#include "_gen/account-item.moc.hpp"
#include <TelepathyQt/AccountManager>
#include <TelepathyQt/PendingReady>
#include <QDebug>
#include <QComboBox>
#include <QTableWidget>
mAcc(acc),
mTable(table),
mRow(row)
{
init();
}
AccountItem::~AccountItem()
{
}
void AccountItem::setupGui()
{
mTable->setItem(mRow, ColumnConnectionManager,
new QTableWidgetItem(mAcc->cmName()));
mTable->setItem(mRow, ColumnProtocol,
new QTableWidgetItem(mAcc->protocolName()));
mTable->setItem(mRow, ColumnDisplayName,
new QTableWidgetItem(mAcc->displayName()));
mTable->setItem(mRow, ColumnConnectsAutomatically,
new QTableWidgetItem(mAcc->connectsAutomatically() ?
mTable->setItem(mRow, ColumnAutomaticPresence,
new QTableWidgetItem(mAcc->automaticPresence().status()));
mTable->setItem(mRow, ColumnCurrentPresence,
new QTableWidgetItem(mAcc->currentPresence().status()));
mTable->setItem(mRow, ColumnRequestedPresence,
new QTableWidgetItem(mAcc->requestedPresence().status()));
mTable->setItem(mRow, ColumnChangingPresence,
new QTableWidgetItem(mAcc->isChangingPresence() ?
mAcc->connection().isNull() ?
QLatin1String(
"") : mAcc->connection()->objectPath()));
}
void AccountItem::init()
{
setupGui();
connect(acc,
SIGNAL(validityChanged(bool)),
SLOT(onValidityChanged(bool)));
connect(acc,
SIGNAL(stateChanged(bool)),
SLOT(onStateChanged(bool)));
connect(acc,
SIGNAL(displayNameChanged(
const QString &)),
SLOT(onDisplayNameChanged(
const QString &)));
connect(acc,
SIGNAL(nicknameChanged(
const QString &)),
SLOT(onNicknameChanged(
const QString &)));
connect(acc,
SIGNAL(connectsAutomaticallyPropertyChanged(bool)),
SLOT(onConnectsAutomaticallyPropertyChanged(bool)));
connect(acc,
SIGNAL(changingPresence(bool)),
SLOT(onChangingPresenceChanged(bool)));
connect(acc,
connect(acc,
connect(acc,
connect(acc,
const QString &,
const QVariantMap &)),
const QString &,
const QVariantMap &)));
connect(acc,
SIGNAL(haveConnectionChanged(bool)),
SLOT(onHaveConnectionChanged(bool)));
}
void AccountItem::onValidityChanged(bool valid)
{
}
void AccountItem::onStateChanged(bool enabled)
{
}
void AccountItem::onDisplayNameChanged(
const QString &name)
{
}
void AccountItem::onNicknameChanged(
const QString &name)
{
}
void AccountItem::onConnectsAutomaticallyPropertyChanged(
bool value)
{
}
void AccountItem::onChangingPresenceChanged(bool value)
{
}
{
}
{
}
{
}
const QVariantMap &errorDetails)
{
}
void AccountItem::onHaveConnectionChanged(bool haveConnection)
{
item->
setText(mAcc->connection().isNull() ?
}