void DeleteItem::setLocalName(QString arg) { if (m_localName != arg) { m_localName = arg; emit localNameChanged(arg); } }
LocalIdentityWidget::LocalIdentityWidget(EndpointManager* endpointManager, QWidget* parent) : QWidget(parent), mEndpointManager(endpointManager) { mLayout = new QHBoxLayout(this); setLayout(mLayout); mLocalPixmapButton = new QPushButton(this); updatePixmap(); connect(mLocalPixmapButton, SIGNAL(clicked()), this, SLOT(selectNewPixmap())); mLayout->addWidget(mLocalPixmapButton); mLocalNameLabel = new QLabel("Name:", this); mLayout->addWidget(mLocalNameLabel); mLocalNameBox = new QLineEdit(this); mLocalNameBox->setText(mEndpointManager->localName()); connect(mLocalNameBox, SIGNAL(returnPressed()), this, SLOT(sendNewLocalName())); connect(mEndpointManager, SIGNAL(localNameChanged()), this, SLOT(retrieveNewLocalName())); mLayout->addWidget(mLocalNameBox); connect(mEndpointManager, SIGNAL(localPixmapChanged()), this, SLOT(updatePixmap())); }