mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-15 06:36:44 +02:00
merge
This commit is contained in:
commit
fd3b317c09
13 changed files with 31 additions and 38 deletions
|
@ -74,11 +74,6 @@ file (GLOB_RECURSE QT_UI_FILES ui/*.ui)
|
|||
# have qt5 wrap them and generate the appropriate header files
|
||||
qt5_wrap_ui(QT_UI_HEADERS "${QT_UI_FILES}")
|
||||
|
||||
# grab the resource files in resources
|
||||
file (GLOB_RECURSE QT_RESOURCE_FILES resources/*.qrc)
|
||||
# have qt5 wrap them and generate the appropriate source files
|
||||
qt5_add_resources(QT_RESOURCES "${QT_RESOURCE_FILES}")
|
||||
|
||||
# add them to the interface source files
|
||||
set(INTERFACE_SRCS ${INTERFACE_SRCS} "${QT_UI_HEADERS}" "${QT_RESOURCES}")
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>styles/search.svg</file>
|
||||
<file>images/close.svg</file>
|
||||
<file>images/kill-script.svg</file>
|
||||
<file>images/reload.svg</file>
|
||||
<file>images/stop.svg</file>
|
||||
<file>images/pin.svg</file>
|
||||
<file>images/pinned.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
|
@ -251,6 +251,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) :
|
|||
QMetaObject::invokeMethod(&accountManager, "checkAndSignalForAccessToken", Qt::QueuedConnection);
|
||||
|
||||
_settings = new QSettings(this);
|
||||
_numChangedSettings = 0;
|
||||
|
||||
// Check to see if the user passed in a command line option for loading a local
|
||||
// Voxel File.
|
||||
|
@ -407,6 +408,7 @@ void Application::saveSettings() {
|
|||
_voxelImporter->saveSettings(_settings);
|
||||
}
|
||||
_settings->sync();
|
||||
_numChangedSettings = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1322,6 +1324,9 @@ void Application::idle() {
|
|||
// After finishing all of the above work, restart the idle timer, allowing 2ms to process events.
|
||||
idleTimer->start(2);
|
||||
}
|
||||
if (_numChangedSettings > 0) {
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1668,6 +1673,7 @@ void Application::init() {
|
|||
connect(_rearMirrorTools, SIGNAL(restoreView()), SLOT(restoreMirrorView()));
|
||||
connect(_rearMirrorTools, SIGNAL(shrinkView()), SLOT(shrinkMirrorView()));
|
||||
connect(_rearMirrorTools, SIGNAL(resetView()), SLOT(resetSensors()));
|
||||
connect(_myAvatar, SIGNAL(transformChanged()), this, SLOT(bumpSettings()));
|
||||
}
|
||||
|
||||
void Application::closeMirrorView() {
|
||||
|
|
|
@ -286,6 +286,8 @@ public slots:
|
|||
void uploadHead();
|
||||
void uploadSkeleton();
|
||||
|
||||
void bumpSettings() { ++_numChangedSettings; }
|
||||
|
||||
private slots:
|
||||
void timer();
|
||||
void idle();
|
||||
|
@ -376,6 +378,7 @@ private:
|
|||
QNetworkAccessManager* _networkAccessManager;
|
||||
QMutex _settingsMutex;
|
||||
QSettings* _settings;
|
||||
int _numChangedSettings;
|
||||
|
||||
QUndoStack _undoStack;
|
||||
|
||||
|
|
|
@ -684,6 +684,7 @@ QAction* Menu::addCheckableActionToQMenuAndActionHash(QMenu* destinationMenu,
|
|||
QAction::NoRole, menuItemLocation);
|
||||
action->setCheckable(true);
|
||||
action->setChecked(checked);
|
||||
connect(action, SIGNAL(changed()), Application::getInstance(), SLOT(bumpSettings()));
|
||||
|
||||
return action;
|
||||
}
|
||||
|
@ -917,7 +918,6 @@ void Menu::goToLocation() {
|
|||
QString currentLocation = QString("%1, %2, %3").arg(QString::number(avatarPos.x),
|
||||
QString::number(avatarPos.y), QString::number(avatarPos.z));
|
||||
|
||||
|
||||
QInputDialog coordinateDialog(Application::getInstance()->getWindow());
|
||||
coordinateDialog.setWindowTitle("Go to Location");
|
||||
coordinateDialog.setLabelText("Coordinate as x,y,z:");
|
||||
|
|
|
@ -1172,6 +1172,7 @@ void MyAvatar::goToLocationFromResponse(const QJsonObject& jsonObject) {
|
|||
glm::vec3 newPosition = glm::vec3(coordinateItems[0].toFloat(), coordinateItems[1].toFloat(),
|
||||
coordinateItems[2].toFloat()) - newOrientation * IDENTITY_FRONT * DISTANCE_TO_USER;
|
||||
setPosition(newPosition);
|
||||
emit transformChanged();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -106,6 +106,9 @@ public slots:
|
|||
glm::vec3 getThrust() { return _thrust; };
|
||||
void setThrust(glm::vec3 newThrust) { _thrust = newThrust; }
|
||||
|
||||
signals:
|
||||
void transformChanged();
|
||||
|
||||
private:
|
||||
bool _mousePressed;
|
||||
float _bodyPitchDelta; // degrees
|
||||
|
|
|
@ -118,8 +118,6 @@ void LocationManager::checkForMultipleDestinations() {
|
|||
Application::getInstance()->getAvatar()->goToLocationFromResponse(_placeData);
|
||||
return;
|
||||
}
|
||||
|
||||
emit locationChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -178,6 +176,7 @@ void LocationManager::goToOrientation(QString orientation) {
|
|||
glm::quat avatarOrientation = myAvatar->getOrientation();
|
||||
if (newAvatarOrientation != avatarOrientation) {
|
||||
myAvatar->setOrientation(newAvatarOrientation);
|
||||
emit myAvatar->transformChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -211,6 +210,7 @@ bool LocationManager::goToDestination(QString destination) {
|
|||
|
||||
qDebug("Going To Location: %f, %f, %f...", x, y, z);
|
||||
myAvatar->setPosition(newAvatarPos);
|
||||
emit myAvatar->transformChanged();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -48,7 +48,6 @@ private:
|
|||
signals:
|
||||
void creationCompleted(LocationManager::NamedLocationCreateResponse response);
|
||||
void multipleDestinationsFound(const QJsonObject& userData, const QJsonObject& placeData);
|
||||
void locationChanged();
|
||||
|
||||
private slots:
|
||||
void namedLocationDataReceived(const QJsonObject& data);
|
||||
|
|
|
@ -140,6 +140,7 @@ void PreferencesDialog::savePreferences() {
|
|||
|
||||
if (shouldDispatchIdentityPacket) {
|
||||
myAvatar->sendIdentityPacket();
|
||||
Application::getInstance()->bumpSettings();
|
||||
}
|
||||
|
||||
myAvatar->getHead()->setPupilDilation(ui.pupilDilationSlider->value() / (float)ui.pupilDilationSlider->maximum());
|
||||
|
|
|
@ -77,7 +77,7 @@ void RunningScriptsWidget::setRunningScripts(const QStringList& list)
|
|||
scriptName->setToolTip(list.at(i));
|
||||
scriptName->setTextAlignment(Qt::AlignCenter);
|
||||
QTableWidgetItem *closeIcon = new QTableWidgetItem;
|
||||
closeIcon->setIcon(QIcon(":/images/kill-script.svg"));
|
||||
closeIcon->setIcon(QIcon(Application::resourcesPath() + "/images/kill-script.svg"));
|
||||
|
||||
ui->runningScriptsTableWidget->setItem(i, 0, scriptName);
|
||||
ui->runningScriptsTableWidget->setItem(i, 1, closeIcon);
|
||||
|
|
|
@ -100,9 +100,9 @@
|
|||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources/resources.qrc">
|
||||
<normaloff>:/images/pin.svg</normaloff>
|
||||
<normalon>:/images/pinned.svg</normalon>:/images/pin.svg</iconset>
|
||||
<iconset>
|
||||
<normaloff>../resources/images/pin.svg</normaloff>
|
||||
<normalon>../resources/images/pinned.svg</normalon>../resources/images/pin.svg</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
|
@ -139,8 +139,8 @@
|
|||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources/resources.qrc">
|
||||
<normaloff>:/images/close.svg</normaloff>:/images/close.svg</iconset>
|
||||
<iconset>
|
||||
<normaloff>../resources/images/close.svg</normaloff>../resources/images/close.svg</iconset>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
|
@ -239,9 +239,7 @@
|
|||
<tabstop>messagePlainTextEdit</tabstop>
|
||||
<tabstop>messagesScrollArea</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../resources/resources.qrc"/>
|
||||
</resources>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>togglePinnedButton</sender>
|
||||
|
|
|
@ -70,8 +70,8 @@ border-radius: 6px;</string>
|
|||
<string>Reload All</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources/resources.qrc">
|
||||
<normaloff>:/images/reload.svg</normaloff>:/images/reload.svg</iconset>
|
||||
<iconset>
|
||||
<normaloff>../resources/images/reload.svg</normaloff>../resources/images/reload.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="stopAllButton">
|
||||
|
@ -95,8 +95,8 @@ border-radius: 6px;</string>
|
|||
<string>Stop All</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources/resources.qrc">
|
||||
<normaloff>:/images/stop.svg</normaloff>:/images/stop.svg</iconset>
|
||||
<iconset>
|
||||
<normaloff>../resources/images/stop.svg</normaloff>../resources/images/stop.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="recentlyLoadedLabel">
|
||||
|
@ -166,8 +166,8 @@ border-radius: 6px;</string>
|
|||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources/resources.qrc">
|
||||
<normaloff>:/images/close.svg</normaloff>:/images/close.svg</iconset>
|
||||
<iconset>
|
||||
<normaloff>../resources/images/close.svg</normaloff>../resources/images/close.svg</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
|
@ -241,8 +241,6 @@ border-radius: 6px;</string>
|
|||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../resources/resources.qrc"/>
|
||||
</resources>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
Loading…
Reference in a new issue