diff --git a/mainwindow.cpp b/mainwindow.cpp index 6f728fd2..4c57191f 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -7,6 +7,7 @@ MainWindow::MainWindow(QWidget *parent) : { ui->setupUi(this); + myButton = new QPushButton(this); myButton->setIcon(QIcon(":/res/icon128.png")); myButton->setIconSize(QSize(128, 128)); @@ -76,3 +77,20 @@ void MainWindow::displayPinDialog(QString pin = tr("ERROR")) { void MainWindow::closePinDialog() { pinMsgBox->close(); } + + +void MainWindow::addHostToDisplay(QMap hostMdnsMap) { + + QMapIterator i(hostMdnsMap); + while (i.hasNext()) { + i.next(); + ui->hostSelectCombo->addItem(i.key()); + // we can ignore the mdns for now, it's only useful for displaying unpairing options + } +} + +void MainWindow::on_selectHostComboBox_activated(const QString &selectedHostname) +{ + // TODO: get all the applications that "selectedHostname" has listed + // probably populate another combobox of applications for the time being +} diff --git a/mainwindow.h b/mainwindow.h index 8edff78b..91b02c6f 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -24,6 +24,8 @@ private slots: void on_newHostBtn_clicked(); void displayPinDialog(QString pin); void closePinDialog(); + void addHostToDisplay(QMap); + void on_selectHostComboBox_activated(const QString &); private: Ui::MainWindow *ui; diff --git a/mainwindow.ui b/mainwindow.ui index 577f74a3..bb2092ec 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -23,7 +23,7 @@ 191 - + QLayout::SetDefaultConstraint @@ -54,436 +54,7 @@ - - - - - - - - 0 - 0 - 0 - - - - - - - 50 - 166 - 255 - - - - - - - 178 - 222 - 255 - - - - - - - 114 - 194 - 255 - - - - - - - 25 - 83 - 127 - - - - - - - 33 - 110 - 170 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 50 - 166 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 152 - 210 - 255 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - 50 - 166 - 255 - - - - - - - 178 - 222 - 255 - - - - - - - 114 - 194 - 255 - - - - - - - 25 - 83 - 127 - - - - - - - 33 - 110 - 170 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 50 - 166 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 152 - 210 - 255 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 25 - 83 - 127 - - - - - - - 50 - 166 - 255 - - - - - - - 178 - 222 - 255 - - - - - - - 114 - 194 - 255 - - - - - - - 25 - 83 - 127 - - - - - - - 33 - 110 - 170 - - - - - - - 25 - 83 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - 25 - 83 - 127 - - - - - - - 50 - 166 - 255 - - - - - - - 50 - 166 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 50 - 166 - 255 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - PointingHandCursor - - - false - - - dummy host 1 - - - - :/res/ic_tv_white_48px.svg:/res/ic_tv_white_48px.svg - - +