00001 #include <connection.h> 00002 #include "btconnectionitem.h" 00003 00004 using namespace OpieTooth; 00005 00006 BTConnectionItem::BTConnectionItem( QListView* parent, const ConnectionState& con ) 00007 : BTListItem( parent ){ 00008 m_con = con; 00009 setText(0, m_con.mac() ); 00010 setText(1, m_con.connectionMode() ); 00011 } 00012 BTConnectionItem::~BTConnectionItem() { 00013 00014 } 00015 QString BTConnectionItem::type() const { 00016 return QString::fromLatin1("connection"); 00017 } 00018 int BTConnectionItem::typeId() const { 00019 return Connection; 00020 } 00021 ConnectionState BTConnectionItem::connection() const { 00022 return m_con; 00023 } 00024 00025 void BTConnectionItem::setName( QString name ) { 00026 m_name = name; 00027 setText( 0, m_name ); 00028 } 00029 00030 QString BTConnectionItem::name() { 00031 return m_name; 00032 } 00033 00034 00035 void BTConnectionItem::setSignalStrength( QString strength ) { 00036 m_signalStrength = strength; 00037 setText( 2, m_signalStrength ); 00038 } 00039 00040 QString BTConnectionItem::signalStrength() { 00041 return m_signalStrength; 00042 }
1.4.2