summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtRosterHeader.cpp')
-rw-r--r--Swift/QtUI/QtRosterHeader.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/Swift/QtUI/QtRosterHeader.cpp b/Swift/QtUI/QtRosterHeader.cpp
index 7401b30..c479643 100644
--- a/Swift/QtUI/QtRosterHeader.cpp
+++ b/Swift/QtUI/QtRosterHeader.cpp
@@ -23,7 +23,7 @@ QtRosterHeader::QtRosterHeader(QWidget* parent) : QWidget(parent) {
statusWidget_ = new QtStatusWidget(this);
toolBar_->addWidget(statusWidget_);
statusWidget_->resize(50, statusWidget_->height());
- connect(statusWidget_, SIGNAL(onChangeStatusRequest(StatusShow::Type, const QString&)), this, SIGNAL(onChangeStatusRequest(StatusShow::Type, const QString&)));
+ connect(statusWidget_, SIGNAL(onChangeStatusRequest(StatusShow::Type)), this, SLOT(handleChangeStatusRequest(StatusShow::Type)));
nameLabel_ = new QLabel(this);
setName("Me");
@@ -50,6 +50,14 @@ QtRosterHeader::QtRosterHeader(QWidget* parent) : QWidget(parent) {
setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed));
}
+void QtRosterHeader::handleChangeStatusRequest(StatusShow::Type type) {
+ emitStatus();
+}
+
+void QtRosterHeader::emitStatus() {
+ emit onChangeStatusRequest(statusWidget_->getSelectedStatusShow(), statusEdit_->toPlainText());
+}
+
void QtRosterHeader::setStatusText(const QString& statusMessage) {
statusEdit_->setText(statusMessage);
}