summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/rfcommassigndialogitem.cpp
blob: a41f304035359eb55f50e9356cfb9c63709b330a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

#include "rfcommassigndialogitem.h"

#include <qlineedit.h>
#include <qcombobox.h>
#include <qgroupbox.h>

using namespace OpieTooth;


RfcommDialogItem::RfcommDialogItem( QWidget* parent,  const char* name, WFlags fl )
    : RfcommDialogItemBase( parent, name, fl ) {

}

RfcommDialogItem::~RfcommDialogItem()  {
}


int RfcommDialogItem::ident()  {
    return m_ident;
}

QString RfcommDialogItem::mac()  {
    return m_macAddress->text();
}

int RfcommDialogItem::channel()  {
    return m_channelDropdown->currentItem();
}

QString RfcommDialogItem::comment()  {
    return m_commentLine->text();
}

void RfcommDialogItem::setIdent( int ident )  {
    m_ident = ident;
    m_identLabel->setTitle( QString( "rfcomm%1").arg( ident ) );
}

void RfcommDialogItem::setMac( const QString &mac )  {
    m_macAddress->setText( mac );
}

void RfcommDialogItem::setChannel( int channel )  {
    m_channelDropdown->setCurrentItem( channel );
}

void RfcommDialogItem::setComment( const QString &comment ) {
    m_commentLine->setText( comment );
}