Chat-O-Matic/application/preferences/AccountListItem.cpp

53 lines
740 B
C++
Raw Normal View History

/*
* Copyright 2009-2010, Pier Luigi Fiorini. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Pier Luigi Fiorini, pierluigi.fiorini@gmail.com
*/
#include <View.h>
#include "AccountListItem.h"
#include "ProtocolSettings.h"
2010-05-20 16:31:55 -05:00
AccountListItem::AccountListItem(ProtocolSettings* settings,
const char* account)
:
BStringItem(account),
fSettings(settings),
fAccount(account),
fBaselineOffset(0)
{
}
AccountListItem::~AccountListItem()
{
}
ProtocolSettings*
AccountListItem::Settings() const
{
return fSettings;
}
const char*
AccountListItem::Account() const
{
return fAccount.String();
}
void
AccountListItem::SetAccount(const char* name)
{
fAccount = name;
SetText(fAccount);
}