diff options
Diffstat (limited to 'Swift/QtUI/QtAdHocCommandWithJIDWindow.cpp')
-rw-r--r-- | Swift/QtUI/QtAdHocCommandWithJIDWindow.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/Swift/QtUI/QtAdHocCommandWithJIDWindow.cpp b/Swift/QtUI/QtAdHocCommandWithJIDWindow.cpp index ac2a603..1b114d9 100644 --- a/Swift/QtUI/QtAdHocCommandWithJIDWindow.cpp +++ b/Swift/QtUI/QtAdHocCommandWithJIDWindow.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2015 Isode Limited. + * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -23,42 +23,42 @@ namespace Swift { QtAdHocCommandWithJIDWindow::QtAdHocCommandWithJIDWindow(UIEventStream* uiEventStream) : uiEventStream_(uiEventStream) { - QVBoxLayout* hlayout = new QVBoxLayout(this); + QVBoxLayout* hlayout = new QVBoxLayout(this); - QLabel* jidLabel = new QLabel("JID:", this); - hlayout->addWidget(jidLabel); - jid_ = new QLineEdit(this); - hlayout->addWidget(jid_); + QLabel* jidLabel = new QLabel("JID:", this); + hlayout->addWidget(jidLabel); + jid_ = new QLineEdit(this); + hlayout->addWidget(jid_); - QLabel* commandLabel = new QLabel("Command:", this); - hlayout->addWidget(commandLabel); - node_ = new QLineEdit(this); - hlayout->addWidget(node_); + QLabel* commandLabel = new QLabel("Command:", this); + hlayout->addWidget(commandLabel); + node_ = new QLineEdit(this); + hlayout->addWidget(node_); - QDialogButtonBox* buttonBox = new QDialogButtonBox(this); - QPushButton* rejectButton = buttonBox->addButton("Cancel", QDialogButtonBox::RejectRole); - connect(rejectButton, SIGNAL(clicked()), this, SLOT(handleRejectClick())); - QPushButton* acceptButton = buttonBox->addButton("Complete", QDialogButtonBox::AcceptRole); - connect(acceptButton, SIGNAL(clicked()), this, SLOT(handleAcceptClick())); - hlayout->addWidget(buttonBox); + QDialogButtonBox* buttonBox = new QDialogButtonBox(this); + QPushButton* rejectButton = buttonBox->addButton("Cancel", QDialogButtonBox::RejectRole); + connect(rejectButton, SIGNAL(clicked()), this, SLOT(handleRejectClick())); + QPushButton* acceptButton = buttonBox->addButton("Complete", QDialogButtonBox::AcceptRole); + connect(acceptButton, SIGNAL(clicked()), this, SLOT(handleAcceptClick())); + hlayout->addWidget(buttonBox); - setLayout(hlayout); - show(); + setLayout(hlayout); + show(); } QtAdHocCommandWithJIDWindow::~QtAdHocCommandWithJIDWindow() { } void QtAdHocCommandWithJIDWindow::handleAcceptClick() { - const JID jid = JID(Q2PSTRING(jid_->text())); - const std::string node = Q2PSTRING(node_->text()); - boost::shared_ptr<UIEvent> event(new RequestAdHocWithJIDUIEvent(jid, node)); - uiEventStream_->send(event); - accept(); + const JID jid = JID(Q2PSTRING(jid_->text())); + const std::string node = Q2PSTRING(node_->text()); + std::shared_ptr<UIEvent> event(new RequestAdHocWithJIDUIEvent(jid, node)); + uiEventStream_->send(event); + accept(); } void QtAdHocCommandWithJIDWindow::handleRejectClick() { - reject(); + reject(); } } |