wmayer
733cbce2c6
Gui: fix memory leak
2021-04-12 00:06:18 +02:00
Chris Hennes
50c7ee36bf
[GUI] Remove code for Qt < 5.9
2021-04-02 10:10:37 +02:00
Chris Hennes
dc09810e98
Check for filename before selecting
...
Correct an error caught by @davidosterberg -- the non-native QFileDialog did
not behave as expected when not provided with a default filename, so that case
is now caught and the `selectFile()` call is bypassed.
2021-02-04 15:17:43 +01:00
Chris Hennes
48fca8c2bc
Add default filename for exports
...
When exporting a single file, the filename defaults to the current FCStd
name plus a dash and the name of the object. If multiple objects are
selected, the default is the basename of the FCStd file. No extension is
added. This behavior is controllable via two hidden preferences,
BaseApp/Preferences/General/ExportDefaultFilenameSingle
BaseApp/Preferences/General/ExportDefaultFilenameMultiple
_Allow regeneration of default on new exports_
If an export has been done and it used the default filename, on the next
export regenerate the filename (potentially updating the selected object
name in that filename) instead of just defaulting to the last name.
_Search for extension in chosen filter first_
Originally the file dialog simply searched for the first available extension
in the overall filter list. This commit modifies it to first check the
selected extension, and only if that is empty to search the full filter
list. This section of code only runs if a default filename is set but
does not have an extension ("suffix" in Qt's terms).
2021-02-04 15:17:43 +01:00
luz paz
298c677873
Gui: Fix header uniformity, whitespace, and doxygen fixes
2020-11-26 10:14:56 +01:00
wmayer
ceccc212b8
Gui: [skip ci] move dontUseNativeDialog() to unnamed namespace
2020-10-06 10:12:41 +02:00
wmayer
0ca65a5095
Qt5: QDialog extension/orientation is deprecated [-Wdeprecated-declarations]
2020-06-12 17:51:33 +02:00
wmayer
81f815d3f4
Qt5: 'void QFileDialog::setNameFilterDetailsVisible(bool)' is deprecated: Use setOption(HideNameFilterDetails, not enabled) instead [-Wdeprecated-declarations]
2020-06-12 17:51:33 +02:00
wmayer
ec5547aaec
Qt5: 'void QFileDialog::setConfirmOverwrite(bool)' is deprecated: Use setOption(DontConfirmOverwrite, not enabled) instead [-Wdeprecated-declarations]
2020-06-12 17:51:33 +02:00
wmayer
1ee3d79d7c
Qt5: 'int QFontMetrics::width' is deprecated since Qt 5.11: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
2020-06-12 17:51:33 +02:00
wmayer
c814eb1a50
Qt5: 'QString::null' is deprecated: use QString() [-Wdeprecated-declarations]
2020-06-12 17:51:33 +02:00
wmayer
0175008ceb
[skip ci] Implement AcceptMode for FileChooser to also allow to define an output file
2019-12-13 22:43:47 +01:00
wmayer
e239994b90
pre-select name filter in import/export file dialog
2019-07-21 12:33:42 +02:00
Mateusz Skowroński
317bcd59c9
Use QString's multi-arg overload to save memory allocations. [-Wclazy-qstring-arg] Thanks Clazy!
2019-02-11 15:39:14 +01:00
wmayer
6cc2c1147e
do not make default suffix lower case
2018-12-29 13:52:28 +01:00
wmayer
426bc01188
add runtime option to choose between native and Qt file dialogs
2018-11-30 12:37:26 +01:00
wmayer
4d6bcdcb0d
If option USE_QT_FILEDIALOG is used then for Qt5 we still have to set QFileDialog::DontUseNativeDialog
2018-11-28 15:50:21 +01:00
wandererfan
6bda4a53e0
Gui::FileChooser respect Qt Dialog Flag
...
- Gui::FileChooser was not respecting the USE_QT_FILEDIALOG
compile flag.
2018-09-23 19:37:19 +02:00
luz.paz
505488c4f9
Misc. typos
...
Found via `codespell`
2018-04-25 09:41:33 -03:00
Mateusz Skowroński
15d5e27a5e
Fix issue with working directory.
2017-11-12 14:29:56 -02:00
wmayer
56ac228543
add cmake option to use Qt or native file dialogs
2017-10-12 16:01:24 +02:00
Przemo Firszt
c39a1941e9
Enable native file dialog by default on linux
...
Signed-off-by: Przemo Firszt <przemo@firszt.eu >
2017-10-08 19:17:04 +02:00
wmayer
9055324ee8
add define to better control if native or Qt file dialogs should be used
2017-10-01 17:28:21 +02:00
Peter Lama
556d68680e
Fix macOS button layout in property editor
...
The size of the "..." button calculated by QMacStyle was not correct,
causing other widgets in the layout to be clipped.
Also, set the size of all "..." buttons the same way.
2017-09-26 10:56:55 -03:00
Mateusz Skowroński
bed8ff747d
Fix crash in Gui::FileOptionsDialog while using Qt5.
2016-12-25 02:35:38 +01:00
wmayer
87f2866884
Linux specific Qt5 port
2016-12-13 19:47:32 +01:00
wmayer
1329857359
issue #0001588 : File browser dialogs initial starting directory ignores current working directory
2016-10-16 18:03:45 +02:00
wmayer
b322668d4e
issue #0001588 : File browser dialogs initial starting directory ignores current working directory
2016-10-16 17:35:08 +02:00
wmayer
2c5c0c2347
set directory of file dialog when opening file by double-click, recent files list or drag and drop
2016-10-16 14:47:13 +02:00
wmayer
f19d424d8b
fix -Wextra in FreeCADGui
2016-09-21 20:54:52 +02:00
wmayer
167b78ed8e
+ fix Debian bug #811200
2016-02-15 23:01:40 +01:00
Mateusz Skowroński
3b463f2138
Qt::WFlags is obsolete in Qt5. Replace it with Qt::WindowFlags.
...
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:58 +01:00
Mateusz Skowroński
cd2db00f22
QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
...
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:25 +01:00
Mateusz Skowroński
d5c074f80d
QString::toAscii() is obsolete in Qt5. Replace it with toLatin1().
...
This change is Qt4/Qt5 neutral.
2016-01-05 16:06:48 +01:00
Mateusz Skowroński
62ccb845bc
QFileDialog::selectFilter() is obsolete in Qt4. Replace it with selectNameFilter().
...
This change is Qt4/Qt5 neutral.
2015-12-24 12:49:08 +01:00
Mateusz Skowroński
5be2986146
QFileDialog::filters() is obsolete in Qt4. Replace it with nameFilters().
...
This change is Qt4/Qt5 neutral.
2015-12-24 12:48:49 +01:00
Mateusz Skowroński
e6379ea636
QFileDialg::selectedFilter() is obsolete in Qt4. Replace it with selectedNameFilter().
...
This change is Qt4/Qt5 neutral.
2015-12-22 14:18:46 +01:00
Mateusz Skowroński
d3d01db9e2
QFileDialg::setFilters() is obsolete in Qt4. Replace it with setNameFilters().
...
This change is Qt4/Qt5 neutral.
2015-12-22 14:18:45 +01:00
wmayer
a3cd03ac03
+ fix comment, convert native separators to UNIX separators
2015-10-25 14:16:38 +01:00
Przemo Firszt
89b74a5231
GUI: improve App::PropertyPath directory selector
...
Editing direcotry in lineEdit was open to escaped character problems
i.e. \t or \n which can be pert of notmal directory path were converted
to tab or new line. Also leaving the lineEdit without hitting Enter was
discarding changes.
Signed-off-by: Przemo Firszt <przemo@firszt.eu >
2015-10-25 12:46:19 +01:00
Przemo Firszt
0b310174ee
GUI: Add completer to directory selector
...
Directory selector now suggest directory names
Probably similar fixes should be applied to FileChooser in File mode
Signed-off-by: Przemo Firszt <przemo@firszt.eu >
2015-10-19 21:27:51 +02:00
wmayer
b9865ed4f1
+ fixes #0002209 : Files that have a dot in name do not get the extension
2015-09-13 21:25:18 +02:00
wmayer
2c7d8a2358
+ fixes #0001928 : The export CAD dialog in PartGui always adds an extension to the filename
2015-01-20 21:38:38 +01:00
Michael Georg Hansen
be919bb6b3
Use the FreeCAD's working directory as initial directory for FileChooser.
2015-01-05 23:01:52 +01:00
wmayer
7aa91ecee3
+ fixes #0001760 : FC fails to load a *.FCStd file if the filename lacks the *.FCStd file extension
2014-12-30 00:31:39 +01:00
wmayer
51c017ae24
+ fixes #0001877 : associate a grayed out icon with Freecad's backup files (fcstd1)
2014-12-28 23:54:08 +01:00
wmayer
97696aadfa
+ fix gradient background issue when creating snapshot, remove superfluous signal from FileOptionsDialog
2014-11-08 14:50:27 +01:00
wmayer
02566f721b
+ fixes #0001400 : Revert back to using native file dialog on Mac OS X
2014-02-12 10:50:02 +01:00
wmayer
098f39e7c5
+ Use new icons in Mesh workbench
2013-12-20 16:28:14 +01:00
wmayer
449e71a6b4
Replace native file dialog with Qt's file dialog on Linux
2013-06-29 15:11:48 +02:00