mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 11:50:39 +02:00
"fixed" formatting issues and code cleanup
This commit is contained in:
parent
57004c61c7
commit
694272ffaa
4 changed files with 57 additions and 90 deletions
|
@ -94,17 +94,20 @@ void MainWindow::changeEvent(QEvent* event) {
|
|||
stateChangeEvent->oldState() == Qt::WindowMaximized) &&
|
||||
windowState() == Qt::WindowMinimized) {
|
||||
emit windowShown(false);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
emit windowShown(true);
|
||||
}
|
||||
|
||||
if (isFullScreen() != Menu::getInstance()->isOptionChecked(MenuOption::Fullscreen)) {
|
||||
Menu::getInstance()->setIsOptionChecked(MenuOption::Fullscreen, isFullScreen());
|
||||
}
|
||||
} else if (event->type() == QEvent::ActivationChange) {
|
||||
}
|
||||
else if (event->type() == QEvent::ActivationChange) {
|
||||
if (isActiveWindow()) {
|
||||
emit windowShown(true);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
emit windowShown(false);
|
||||
}
|
||||
}
|
||||
|
@ -119,11 +122,5 @@ void MainWindow::dragEnterEvent(QDragEnterEvent* event)
|
|||
|
||||
void MainWindow::dropEvent(QDropEvent* event)
|
||||
{
|
||||
/*QList<QUrl> urls = event->mimeData()->urls();
|
||||
foreach(QUrl url, urls)
|
||||
{
|
||||
qDebug() << "urlmessage" << url.toString();
|
||||
}*/
|
||||
|
||||
QCoreApplication::sendEvent(QCoreApplication::instance(), event);
|
||||
}
|
||||
|
|
|
@ -35,20 +35,7 @@ const QString FILENAME_PATH_FORMAT = "hifi-snap-by-%1-on-%2.jpg";
|
|||
const QString DATETIME_FORMAT = "yyyy-MM-dd_hh-mm-ss";
|
||||
const QString SNAPSHOTS_DIRECTORY = "Snapshots";
|
||||
|
||||
const QString LOCATION_X = "location-x";
|
||||
const QString LOCATION_Y = "location-y";
|
||||
const QString LOCATION_Z = "location-z";
|
||||
|
||||
const QString ORIENTATION_X = "orientation-x";
|
||||
const QString ORIENTATION_Y = "orientation-y";
|
||||
const QString ORIENTATION_Z = "orientation-z";
|
||||
const QString ORIENTATION_W = "orientation-w";
|
||||
|
||||
const QString PATH = "path";
|
||||
|
||||
const QString DOMAIN_KEY = "domain";
|
||||
|
||||
const QString URL = "url";
|
||||
const QString URL = "highfidelity_url";
|
||||
|
||||
Setting::Handle<QString> Snapshot::snapshotsLocation("snapshotsLocation",
|
||||
QStandardPaths::writableLocation(QStandardPaths::DesktopLocation));
|
||||
|
@ -95,25 +82,6 @@ QTemporaryFile* Snapshot::saveTempSnapshot(QImage image) {
|
|||
|
||||
QFile* Snapshot::savedFileForSnapshot(QImage & shot, bool isTemporary) {
|
||||
|
||||
//Avatar* avatar = DependencyManager::get<AvatarManager>()->getMyAvatar();
|
||||
//
|
||||
//glm::vec3 location = avatar->getPosition();
|
||||
//glm::quat orientation = avatar->getHead()->getOrientation();
|
||||
//
|
||||
//// add metadata
|
||||
//shot.setText(LOCATION_X, QString::number(location.x));
|
||||
//shot.setText(LOCATION_Y, QString::number(location.y));
|
||||
//shot.setText(LOCATION_Z, QString::number(location.z));
|
||||
//
|
||||
//shot.setText(ORIENTATION_X, QString::number(orientation.x));
|
||||
//shot.setText(ORIENTATION_Y, QString::number(orientation.y));
|
||||
//shot.setText(ORIENTATION_Z, QString::number(orientation.z));
|
||||
//shot.setText(ORIENTATION_W, QString::number(orientation.w));
|
||||
//
|
||||
//shot.setText(DOMAIN_KEY, DependencyManager::get<NodeList>()->getDomainHandler().getHostname());
|
||||
//
|
||||
//shot.setText(PATH, QString::number());
|
||||
|
||||
// adding URL to snapshot
|
||||
QUrl currentURL = DependencyManager::get<AddressManager>()->currentAddress();
|
||||
shot.setText(URL, currentURL.toString());
|
||||
|
@ -149,7 +117,9 @@ QFile* Snapshot::savedFileForSnapshot(QImage & shot, bool isTemporary) {
|
|||
imageFile->close();
|
||||
|
||||
return imageFile;
|
||||
} else {
|
||||
|
||||
}
|
||||
else {
|
||||
QTemporaryFile* imageTempFile = new QTemporaryFile(QDir::tempPath() + "/XXXXXX-" + filename);
|
||||
|
||||
if (!imageTempFile->open()) {
|
||||
|
|
Loading…
Reference in a new issue