Showing the changes to interface/src/ui/AddressBarDialog.cpp (1 of 4 files). Show all
Unified · Split
| @@ -9,6 +9,8 @@ · 8 unmodified lines | |||
| 9 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html | 9 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html |
| 10 | // | 10 | // |
| 11 | 11 | ||
| 12 | #include <QMessageBox> | ||
| 13 | |||
| 12 | #include "AddressBarDialog.h" | 14 | #include "AddressBarDialog.h" |
| 13 | #include "AddressManager.h" | 15 | #include "AddressManager.h" |
| 14 | #include "Application.h" | 16 | #include "Application.h" |
| @@ -21,6 +23,11 @@ AddressBarDialog::AddressBarDialog() : · 6 unmodified lines | |||
| 21 | { | 23 | { |
| 22 | setAttribute(Qt::WA_DeleteOnClose, false); | 24 | setAttribute(Qt::WA_DeleteOnClose, false); |
| 23 | setupUI(); | 25 | setupUI(); |
| 26 | |||
| 27 | AddressManager* addressManager = DependencyManager::get<AddressManager>(); | ||
| 28 | |||
| 29 | connect(addressManager, &AddressManager::lookupResultIsOffline, this, &AddressBarDialog::displayAddressOfflineMessage); | ||
| 30 | connect(addressManager, &AddressManager::lookupResultIsNotFound, this, &AddressBarDialog::displayAddressNotFoundMessage); | ||
| 24 | } | 31 | } |
| 25 | 32 | ||
| 26 | void AddressBarDialog::setupUI() { | 33 | void AddressBarDialog::setupUI() { |
| @@ -125,4 +132,14 @@ void AddressBarDialog::accept() { · 98 unmodified lines | |||
| 125 | connect(addressManager, &AddressManager::lookupResultsFinished, this, &QDialog::hide); | 132 | connect(addressManager, &AddressManager::lookupResultsFinished, this, &QDialog::hide); |
| 126 | addressManager->handleLookupString(_addressLineEdit->text()); | 133 | addressManager->handleLookupString(_addressLineEdit->text()); |
| 127 | } | 134 | } |
| 135 | } | ||
| 136 | |||
| 137 | void AddressBarDialog::displayAddressOfflineMessage() { | ||
| 138 | QMessageBox::information(Application::getInstance()->getWindow(), "Address offline", | ||
| 139 | "That user or place is currently offline."); | ||
| 140 | } | ||
| 141 | |||
| 142 | void AddressBarDialog::displayAddressNotFoundMessage() { | ||
| 143 | QMessageBox::information(Application::getInstance()->getWindow(), "Address not found", | ||
| 144 | "There is no address information for that user or place."); | ||
| 128 | } | 145 | } |