mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 10:47:11 +02:00
rename FILENAME constants
This commit is contained in:
parent
dc64065668
commit
07e6b766b5
5 changed files with 12 additions and 8 deletions
|
@ -61,22 +61,26 @@ Preference {
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id: dataTextField
|
id: dataTextField
|
||||||
|
label: root.label
|
||||||
placeholderText: root.placeholderText
|
placeholderText: root.placeholderText
|
||||||
text: preference.value
|
text: preference.value
|
||||||
label: root.label
|
colorScheme: dataTextField.acceptableInput ? hifi.colorSchemes.dark : hifi.colorSchemes.light
|
||||||
|
validator: RegExpValidator {
|
||||||
|
regExp: /.*\.(?:fst).*\?*/ig
|
||||||
|
}
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
bottom: bookmarkAvatarButton.top
|
bottom: bookmarkAvatarButton.top
|
||||||
bottomMargin: hifi.dimensions.contentSpacing.y
|
bottomMargin: hifi.dimensions.contentSpacing.y
|
||||||
}
|
}
|
||||||
colorScheme: hifi.colorSchemes.dark
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QueuedButton {
|
QueuedButton {
|
||||||
id: bookmarkAvatarButton
|
id: bookmarkAvatarButton
|
||||||
text: "Bookmark Avatar"
|
text: "Bookmark Avatar"
|
||||||
width: 140
|
width: 140
|
||||||
|
visible: dataTextField.acceptableInput
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
|
@ -90,9 +94,9 @@ Preference {
|
||||||
text: "Browse Avatars"
|
text: "Browse Avatars"
|
||||||
width: 140
|
width: 140
|
||||||
anchors {
|
anchors {
|
||||||
left: bookmarkAvatarButton.right
|
left: dataTextField.acceptableInput ? bookmarkAvatarButton.right : parent.left
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
leftMargin: hifi.dimensions.contentSpacing.x
|
leftMargin: dataTextField.acceptableInput ? hifi.dimensions.contentSpacing.x : 0
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
// Load dialog via OffscreenUi so that JavaScript EventBridge is available.
|
// Load dialog via OffscreenUi so that JavaScript EventBridge is available.
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include <QtQuick/QQuickWindow>
|
#include <QtQuick/QQuickWindow>
|
||||||
|
|
||||||
AvatarBookmarks::AvatarBookmarks() {
|
AvatarBookmarks::AvatarBookmarks() {
|
||||||
_bookmarksFilename = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + "/" + AvatarBookmarks_FILENAME;
|
_bookmarksFilename = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + "/" + AVATARBOOKMARKS_FILENAME;
|
||||||
readFromFile();
|
readFromFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ protected:
|
||||||
void addBookmarkToMenu(Menu* menubar, const QString& name, const QString& address) override;
|
void addBookmarkToMenu(Menu* menubar, const QString& name, const QString& address) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const QString AvatarBookmarks_FILENAME = "avatarbookmarks.json";
|
const QString AVATARBOOKMARKS_FILENAME = "avatarbookmarks.json";
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void changeToBookmarkedAvatar();
|
void changeToBookmarkedAvatar();
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
const QString LocationBookmarks::HOME_BOOKMARK = "Home";
|
const QString LocationBookmarks::HOME_BOOKMARK = "Home";
|
||||||
|
|
||||||
LocationBookmarks::LocationBookmarks() {
|
LocationBookmarks::LocationBookmarks() {
|
||||||
_bookmarksFilename = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + "/" + LocationBookmarks_FILENAME;
|
_bookmarksFilename = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + "/" + LOCATIONBOOKMARKS_FILENAME;
|
||||||
readFromFile();
|
readFromFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ protected:
|
||||||
void addBookmarkToMenu(Menu* menubar, const QString& name, const QString& address) override;
|
void addBookmarkToMenu(Menu* menubar, const QString& name, const QString& address) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const QString LocationBookmarks_FILENAME = "bookmarks.json";
|
const QString LOCATIONBOOKMARKS_FILENAME = "bookmarks.json";
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void setHomeLocation();
|
void setHomeLocation();
|
||||||
|
|
Loading…
Reference in a new issue