Commit Graph

50 Commits

Author SHA1 Message Date
wmayer
141b2ecf0a Qt6: fix possible build failure with Qt 6.5
Forum thread: https://forum.freecad.org/viewtopic.php?p=692199#p692199
2023-07-20 08:58:56 -05:00
wmayer
ef63a35e0f Gui: fix -Wclazy-connect-by-name 2023-04-05 16:23:15 +02:00
wmayer
d4f53c2412 Qt: replace deprecated methods of QMessageBox 2022-11-03 09:54:00 +01:00
berniev
75acacd1b7 Gui: Use auto and range-based for (#7481)
* On lines where the variable type is obvious from inspection, avoid repeating the type using auto. 
* When possible use a ranged for loop instead of begin() and end() iterators
2022-09-14 13:25:13 -05:00
0penBrain
b687e2ce0c [Bugfix]Gui: ensure message boxes appear and stay on top of main window 2022-09-05 11:09:41 +02:00
berniev
0c70d45c83 Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
berniev
656ef8961f Gui: redundant void 2 2022-08-08 10:21:44 +02:00
wmayer
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
5a95b71829 [Gui] DlgMacro etc.: remove unused includes 2022-03-16 23:41:14 +01:00
luz paz
0042f58e4c Make source code comments use gender neutral pronouns
The changes also include some grammatical fixes as well.
2021-12-02 16:18:04 -05:00
wmayer
3465ac3add Gui: [skip ci] do not trigger on_fileChooser_fileNameChanged when opening macro dialog 2021-11-24 21:28:32 +01:00
wmayer
09da245af9 App: harmonize API of App::Application
* make getHomePath() static and return a std::string
* make getExecutableName() static and return a std::string
2021-11-04 10:50:09 +01:00
mwganson
bb48dad417 [Macros Dialog]rename DuplicateReplaceSpaces parameter to ReplaceSpaces, make it default = true, apply also to new file creation and renaming in the dialog 2021-09-17 14:04:01 -05:00
mwganson
fe616e8954 [Macros Dialog] Add 2 new parameters: DuplicateIgnoreExtraNote and DuplicateReplaceSpaces 2021-09-17 12:47:57 -05:00
mwganson
a3357cfda8 [Macros Dialog] begin searching for unique name for duplicate function with current numbers rather than from 001 2021-09-17 00:22:39 -05:00
Chris Hennes
ea3ecf4054 Silence Qt/Windows setGeometry Warning
Add the optional Qt::MSWindowsFixedSizeDialogHint parameter to all uses of the QInputDialog::getX static functions to silence a Qt/Windows debug mode warning about QWindowsWindow::setGeometry: Unable to set geometry. Increase the size of the unit calculator to eliminate the same warning. Finally, call adjustSize() on the "Unsaved Changes" dialog to silence the warning.
2020-12-11 09:58:09 +01:00
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
mwganson
4a0d127dae [Macro Menu] add Recent macros to Macro menu + list size preference. Executes selected macro or if Shift+click opens macro in editor. 2020-09-03 11:29:37 +02:00
wmayer
c814eb1a50 Qt5: 'QString::null' is deprecated: use QString() [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
625d252cb1 Gui: implementation classes don't inherit from UI classes any more 2020-01-09 14:30:45 +01:00
wmayer
5e36da5c5a Fix some regressions in Python editor:
* show again asterisk when modifying the content
* show still only filename in tab when modifying from outside
2019-11-29 20:02:34 +01:00
mwganson
f1a7ef6a77 show only filename in macro editor tab rather than full path, fixes issue #4063 2019-07-21 19:14:23 +02:00
wmayer
5e7fa0d37b Fix some regressions of PR 2330
fix file chooser in macro dialog
do not remove GUI text from translation
remove friend class declaration, use Qt's introspection mechanism
create dialogs on the stack because they are modal
some minor optimizations
2019-07-21 15:53:14 +02:00
mwganson
ffeb83870e [macros toolbar walkthrough] Use command manager to check for existing macro action rather than looking through user parameters 2019-07-21 13:57:30 +02:00
mwganson
eac812dd18 [macro toolbar walkthrough] change dialog parent to this instead of main window, for avoiding warning message when closing macro execute dialog 2019-07-21 13:57:20 +02:00
mwganson
1aab80785c [macros toolbar walkthrough]
* allow user to disable seeing first messagebox again in the future
* check if macro action already exists, if so skip first dialog
* pre-select macro for user in macro command list in toolbars tab
* expand all custom macro toolbars in the toolbar tree list
2019-07-21 13:57:11 +02:00
mwganson
302b9e4da0 [toolbar walkthrough] add more error checking to prevent potential crash if customize dialogs change. Remove final messagebox about switching workbenches to apply changes and add that information to the first messagebox. 2019-07-21 13:56:59 +02:00
mwganson
1c6af88fbd Walkthrough for adding macros to custom global toolbar 2019-07-21 13:45:38 +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
Mark Ganson TheMarkster
43d16fc87a Add Duplicate button to Execute Macro dialog
With the Duplicate button a macro is duplicated with a new name, e.g. duplicate a macro named "MyMacro.FCMacro" and you get a new duplicate file named "MyMacro@001.FCMacro", but the user has opportunity to override the new name with a name of his own or to cancel the operation.

Functionality is similar to already existing ability to create copies of the .FCStd file, only for macros, and this must be done manually for each new file.  Will be useful to coders mostly.  Expected use case could be to save a history of the macro periodically as changes are made or perhaps to duplicate the macro first, and then make changes to the duplicate, eventually replacing the original once satisfied with the changes.

New code is based largely on existing code from rename operation, but with QFile.copy() instead of QFile.rename() used, along with other changes needed, such as generating the new suggested filenames.

link to forum discussion and demonstration video:
https://forum.freecadweb.org/viewtopic.php?f=8&p=254014&sid=98243801791920b69086a3fcd4699e34#p254014

Not sure how to make the Duplicate button label text translate when changing languages.
2018-09-03 11:08:16 -03:00
Mark Ganson TheMarkster
591c1d32cd Add link button to Addon Manager to Macros dialog
Adds a button labeled Addons... to the macros dialog below the create, edit, delete, and rename buttons.  Clicking the Addons... button will open the same dialog available from Tools -> Addon Manager menu.
Convenience for experienced users, but new users who might not know about the addon manager will be able to see it here, too.
2018-09-01 22:21:33 +02:00
luz.paz
505488c4f9 Misc. typos
Found via `codespell`
2018-04-25 09:41:33 -03:00
wmayer
0e18c6e061 Improvements for PR973 to rename a macro:
+ remove check for write-protected macro because this still can be renamed
+ do nothing if the user didn't define a different file name
+ keep the item in the list view selected
2017-09-07 10:33:16 +02:00
apelly
21e1a5fde5 Add a rename option to the macro dialog
Forum thread: https://forum.freecadweb.org/viewtopic.php?f=8&t=24005
Fixes #3173
2017-09-07 10:31:35 +02:00
Yorik van Havre
dea9127ac2 Create the macro path if inexistant when saving a macro 2016-02-05 16:40:53 -02:00
wmayer
e0ee8bb8ca + allow to open system macros in read-only mode 2016-01-12 01:26:34 +01:00
wmayer
db539008be + fix whitespaces 2016-01-11 23:48:59 +01:00
Abdullah Tahiri
3d551450a2 Gui Bug fix: Tabbed support for system-wide macros
===============================================

What?
Implementation of triplus' idea of making user-specific and system-specific macros
having a different list in different tabs.

Fixing of a bug related to the previous "separator".

Suggested terminology.
2016-01-11 19:25:36 +01:00
Abdullah Tahiri
7fc7bdc302 Gui Enhancement: Support for macros in AppUserHome/Macro
=====================================================

What?
It was suggested that the macros should be moved to AppUserHome/Macro
http://forum.freecadweb.org/viewtopic.php?f=10&t=13433

Solution:
The solution is backwards compatible in the sense that if you have a running
configuration, updating should not change anything.

For new installations the macro directory will default to AppUserHome/Macro. However
this would break all the installation scripts (probably also ME's plugin manager).

Conflicts:
	src/Mod/Path/Gui/AppPathGuiPy.cpp
2016-01-11 19:24:22 +01:00
Abdullah Tahiri
f78a239167 Gui Enhancement: Support for system-wide macros
===============================================

What?
Support for executing system-wide macros in /usr/lib/freecad/Macro
http://forum.freecadweb.org/viewtopic.php?f=10&t=13433

Why?
To allow to package macros and install them system-wide so that they are available to all users.
2016-01-11 19:22:50 +01:00
Mateusz Skowroński
7d0e892d36 Qt4's qglobal.h defined TRUE and FALSE. Qt5 does not do it anymore. Replace it with true and false.
158f39ec78

This change is Qt4/Qt5 neutral.
2016-01-05 16:43:33 +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
wmayer
07ba938ff6 + issue: #0002350, handle Python's SystemExit exceptions and do not exit application when running from macro dialog or Python editor 2015-12-27 23:00:59 +01:00
Mateusz Skowroński
43a4a5938c Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
f7644fc9f3 + issue #0002053: Support of themes 2015-07-12 22:54:56 +02:00
wmayer
1f478269af + use dialog button box where possible, replace old Python icon 2014-03-08 15:17:56 +01:00
wmayer
8f2604a694 + fixes #0001448: Newly created python macros don't have an asterisk in their window title. 2014-02-28 11:30:04 +01:00
wmayer
7e0d525443 + 0000484: Try to change the macro location causes crash.
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5128 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-11-13 22:34:19 +00:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00