mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 13:11:43 +02:00
Calling AddressManager back and forward functions
This commit is contained in:
parent
5fcf8e5922
commit
1328ea6199
3 changed files with 30 additions and 3 deletions
|
@ -58,6 +58,15 @@ DialogContainer {
|
||||||
topMargin: parent.inputAreaStep + parent.inputAreaStep + hifi.layout.spacing
|
topMargin: parent.inputAreaStep + parent.inputAreaStep + hifi.layout.spacing
|
||||||
bottomMargin: parent.inputAreaStep + parent.inputAreaStep + hifi.layout.spacing
|
bottomMargin: parent.inputAreaStep + parent.inputAreaStep + hifi.layout.spacing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
acceptedButtons: Qt.LeftButton
|
||||||
|
onClicked: {
|
||||||
|
event.accepted = true
|
||||||
|
addressBarDialog.loadBack()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
|
@ -73,8 +82,14 @@ DialogContainer {
|
||||||
bottomMargin: parent.inputAreaStep + parent.inputAreaStep + hifi.layout.spacing
|
bottomMargin: parent.inputAreaStep + parent.inputAreaStep + hifi.layout.spacing
|
||||||
}
|
}
|
||||||
|
|
||||||
width: parent.width * 0.5
|
MouseArea {
|
||||||
height: parent.height * 0.5
|
anchors.fill: parent
|
||||||
|
acceptedButtons: Qt.LeftButton
|
||||||
|
onClicked: {
|
||||||
|
event.accepted = true
|
||||||
|
addressBarDialog.loadForward()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TextInput {
|
TextInput {
|
||||||
|
|
|
@ -31,10 +31,20 @@ void AddressBarDialog::hide() {
|
||||||
void AddressBarDialog::loadAddress(const QString& address) {
|
void AddressBarDialog::loadAddress(const QString& address) {
|
||||||
qDebug() << "Called LoadAddress with address " << address;
|
qDebug() << "Called LoadAddress with address " << address;
|
||||||
if (!address.isEmpty()) {
|
if (!address.isEmpty()) {
|
||||||
DependencyManager::get<AddressManager>()->handleLookupString(address);
|
DependencyManager::get<AddressManager>()->handleLookupString(address);;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AddressBarDialog::loadBack() {
|
||||||
|
qDebug() << "Called LoadBack";
|
||||||
|
DependencyManager::get<AddressManager>()->goBack();
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddressBarDialog::loadForward() {
|
||||||
|
qDebug() << "Called LoadForward";
|
||||||
|
DependencyManager::get<AddressManager>()->goForward();
|
||||||
|
}
|
||||||
|
|
||||||
void AddressBarDialog::displayAddressOfflineMessage() {
|
void AddressBarDialog::displayAddressOfflineMessage() {
|
||||||
OffscreenUi::error("That user or place is currently offline");
|
OffscreenUi::error("That user or place is currently offline");
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,8 @@ protected:
|
||||||
void hide();
|
void hide();
|
||||||
|
|
||||||
Q_INVOKABLE void loadAddress(const QString& address);
|
Q_INVOKABLE void loadAddress(const QString& address);
|
||||||
|
Q_INVOKABLE void loadBack();
|
||||||
|
Q_INVOKABLE void loadForward();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue