-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2886 from MRtrix3/fix_drag_drop_mrview_windows
Fix drag & drop on Windows for mrview
- Loading branch information
Showing
7 changed files
with
71 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* Copyright (c) 2008-2024 the MRtrix3 contributors. | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
* | ||
* Covered Software is provided under this License on an "as is" | ||
* basis, without warranty of any kind, either expressed, implied, or | ||
* statutory, including, without limitation, warranties that the | ||
* Covered Software is free of defects, merchantable, fit for a | ||
* particular purpose or non-infringing. | ||
* See the Mozilla Public License v. 2.0 for more details. | ||
* | ||
* For more details, see http://www.mrtrix.org/. | ||
*/ | ||
|
||
#include "gui/mrview/qthelpers.h" | ||
|
||
#include <QString> | ||
#include <QUrl> | ||
|
||
#include <string> | ||
|
||
namespace MR::GUI::MRView::QtHelpers { | ||
|
||
std::string url_to_std_string(const QUrl &url) { | ||
const bool isLocal = url.isLocalFile(); | ||
const std::string str = isLocal ? url.toLocalFile().toStdString() : url.toString().toStdString(); | ||
|
||
return str; | ||
} | ||
|
||
} // namespace MR::GUI::MRView::QtHelpers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* Copyright (c) 2008-2024 the MRtrix3 contributors. | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
* | ||
* Covered Software is provided under this License on an "as is" | ||
* basis, without warranty of any kind, either expressed, implied, or | ||
* statutory, including, without limitation, warranties that the | ||
* Covered Software is free of defects, merchantable, fit for a | ||
* particular purpose or non-infringing. | ||
* See the Mozilla Public License v. 2.0 for more details. | ||
* | ||
* For more details, see http://www.mrtrix.org/. | ||
*/ | ||
|
||
#pragma once | ||
#include <string> | ||
|
||
class QUrl; | ||
|
||
namespace MR::GUI::MRView::QtHelpers { | ||
|
||
std::string url_to_std_string(const QUrl &url); | ||
|
||
} // namespace MR::GUI::MRView::QtHelpers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters