Commit Graph

37 Commits

Author SHA1 Message Date
Benjamin Bræstrup Sayoc
f647d4a1eb Gui: Use QStringLiteral 2025-02-10 18:34:57 +01:00
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
2e5cb03261 Gui: move to new style connect() 2023-02-01 13:49:35 +01:00
wmayer
81d2361d9f Gui: Qt6 port
* QString::indexOf() is now marked as [[nodiscard]]
* Replace deprecated methods of QMessageBox
* QMouseEvent::globalPos() is deprecated, use globalPosition().toPoint()
* QWidget::enterEvent() requires a QEnterEvent as argument
* QLibraryInfo::location() is deprecated, use path()
* QVariant::Type is deprecated, use QMetaType::Type
* QVariant::canConvert(int) is deprecated, use QVariant::canConvert(QMetaType) or QVariant::canConvert<T>()
* QMessageBox::standardIcon is deprecated, use QStyle::standardIcon()
* Replace deprecated method QMessageBox::question(), ...
* QApplication::fontMetrics() is deprecated
* QDropEvent::mouseButtons() is deprecated, use buttons()
* QDropEvent::keyboardModifiers() is deprecated, use modifiers()
* Constructor of QFontDatabase is deprecated, use static methods instead
* Qt::AA_DisableHighDpiScaling is deprecated
* Qt::AA_EnableHighDpiScaling is deprecated
* Qt::AA_UseHighDpiPixmaps is deprecated
2022-12-31 21:54:45 +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
Uwe
316a869b26 [Gui] remove superfluous nullptr checks 2022-07-18 03:17:42 +02:00
wmayer
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
658e03822d [Gui] Progress: remove unused includes 2022-03-05 03:07:50 +01:00
Uwe
1e314b0165 [Gui] improvements for PCH builds 2022-02-19 06:38:45 +01:00
wmayer
6138770ef2 Gui: [skip ci] fix crash in SequencerBar::setProgress or SequencerDialog::setProgress when used in worker threads 2021-04-28 12:02:52 +02:00
Chris Hennes
50c7ee36bf [GUI] Remove code for Qt < 5.9 2021-04-02 10:10:37 +02:00
wmayer
2c113442a7 Qt5: 'void QTime::start()' / 'int QTime::elapsed() const' / 'int QTime::restart()' are deprecated: Use QElapsedTimer instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
Zheng, Lei
6ace3e96e3 Gui: fix qt5 ProgressBar modal checking 2020-06-03 14:42:52 +02:00
wmayer
bd86e1cb67 Gui: [skip ci] fix locking keyboard when showing progress bar on Linux systems 2020-04-29 19:50:13 +02:00
Zheng, Lei
88d1dbb645 Gui: block more events when ProgressBar is shown 2020-02-15 17:29:02 +01:00
wmayer
26aed44d4f Gui: activate ProgressDialog 2020-01-25 16:31:30 +01:00
wmayer
4b85928b6c Gui: [skip-ci] fix several problems with ProgressBar when using in a thread because the slots of its base class are invoked instead 2020-01-25 16:20:21 +01:00
wmayer
5c17f71a21 Gui: [skip-ci] rename Sequencer to SequencerBar 2020-01-25 16:06:29 +01:00
Zheng, Lei
bd2f5191c9 Gui: Application/Document/MainWindow changes following App namespace
Application:

* signalNewDocument, check the extra argument, isMainDoc, the decide
  whether to create view of the new document. This is so that external
  linked document can be opened in background without crowding the tab
  list.

* slotDeleteDocument, calls Document::beforeDelete()

* slotActiveDocument, creates view if none, because external document
  is now opened without view.

* onLastWindowClosed(), switch to next active document, and creates view
  if none.

* send(Has)MsgToFocusView(), new API to send message to the active view
  in focus. This is to solve the ambiguity of things like pressing
  delete key, copy, paste handling when the active new is not in focus.
  For example, when spread sheet view is active, delete/copy/paste
  handling should be different when the focus on the spread sheet view
  or focus on tree view.

* tryClose(), delegate to MainWindow for close confirmation

* reopen(), new API to reload a partial document in full

Document/DocumentP:

* _CoinMap, new internal map for quick access view provider from its
  root node.

* slotNewObject, modified to support view provider override from
  App::FeaturePython, through new API
  DocumentObject::getViewProviderNameOverride().

* slotDeletedObject/slotTransactionRemove, improve handling of geo group
  children rebuild

* slotSkipRecompute, add special handling of document with skip
  recompute. Some command cannot work when skip recompute is active.
  For example, sketcher command will check if recompute is successful
  on many commands, and will undo if not. New 'PartialCompute' flag is
  added to allow recompute only the editing object and all its
  dependencies if 'SkipRecompute' is active.

* slotTouchedObject, new signal handling of manually touched object.

* setModified(), do nothing if already modified. This is a critical
  performance improvement, because marking tab window as modified turns
  out to be a relatively expensive operation, and will cause massive
  slow down if calling it on every property change.

* getViewProviderByPathFromHead/getViewProvidersByPath(), new APIs to
  obtain view provider(s) from coin SoPath.

* save/saveAll/saveCopy, modified to support external document saving.

* Save/RestoreDocFile(), save and restore tree item recursive expansion
  status.

* slotFinishRestoreObject(), handle new signal
  signalFinishRestoreObject(), unifies postprocessing in restore and
  import operation.

* createView/setActiveView(), add support of delayed view creations

* canClose(), delegate to MainWindows to ask for confirmation

* undo/redo(), support grouped transaction undo/redo. Transactions may
  be grouped by the same transaction ID if they are triggered by a
  single operation but involves objects from multiple documents.

* toggleInSceneGraph(), new API to add or remove root node from or to
  scenegraph without deleting the view object.

MainWindow:

* Update command status using a single shot timer instead of periodical
  one.

* Improve message display is status bar. Give error and warning message
  higher priority (using QStatusBar::showMessage()) than normal status
  message (using actionLabel), reversed from original implementation.

* confirmSave(), new API to check for modification, and ask user to save
  the document before closing. The confirmation dialog allows user to
  apply the answer to all document for convenience.

* saveAll(), new API to save all document with correct ordering in case
  of external linking.

* createMimeDataFromSelection/insertFromMimeData(), support copy paste
  object with external linking. A new dialog DlgObjectSelection is used
  to let user select exactly which object to export.

CommandDoc/CommandWindow:

* Related changes to object delete, document import, export, and save.
2019-08-17 15:08:33 +02:00
wmayer
6f53d0e9d0 hide taskbar progress when required 2019-05-12 17:26:21 +02:00
wmayer
e484a52e9d hide taskbar progress when required 2019-05-10 21:05:31 +02:00
MA-DEVELOP\apeltauer
a26e05bd4d use ifdef QT_WINEXTRAS_LIB to make sure the code is only used in windows build with qt5 version 5.2 and higher 2019-05-10 18:22:20 +02:00
MA-DEVELOP\apeltauer
8644b61e32 make sure QWinTaskbarProgress and QWinTaskbarButton is only used in windows compiles 2019-05-10 18:22:07 +02:00
MA-DEVELOP\apeltauer
3f367f8292 add QWinTasbarProgress to windows build 2019-05-10 18:21:55 +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
Stian Skjelstad
06ef43c77f Fix #3697
We need to initialize progressTime for given number of step-operations too,
else the filter that checks for X ms between each refresh update will always
fail, due to time-difference being way out of range.

Also, 10 updates per second is not a lot, since we also filter out the
QT event loop for long operations performed in the main thread.
2019-01-01 21:47:11 +01:00
luz.paz
2de755186b Misc. typo fixes
Found via `codespell -q 3 --skip="*.po,*.ts,./.git,./src/3rdParty,./src/CXX,./src/zipios++,./src/Mod/Assembly/App/opendcm" -I ../fc-word-whitelist.txt`
2018-10-02 21:05:22 +02:00
wmayer
56e6d58291 add comment about regression in ProgressBar 2018-08-14 23:47:43 +02:00
luz.paz
505488c4f9 Misc. typos
Found via `codespell`
2018-04-25 09:41:33 -03:00
Kunda
784edd3f82 Typo fixes for doxygen and source comments
issue #0002914
2017-03-31 11:25:57 -03:00
Jean-Marie Verdun
2209c7d5d7 Fix ProgressBar rendering following STEP reader enhancement 2017-02-18 10:08:48 +01:00
wmayer
2623ca4fd4 fix whitespaces 2017-02-01 12:35:50 +01:00
Jean-Marie Verdun
7b5707b1c6 Add an update timer to the progress bar set to 500ms instead of
nothing. STEP Reader is updating the progress bar every time a new
Shape is decoded/transferred and loaded, which is a huge amount
of "interrupt" and slow down drastically the global performance
2017-01-31 23:02:40 +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
58da2ebbcc 0000665: Follow up 0000640: This file crashes FreeCAD UI latest Git 2012-10-01 13:58:40 +02:00
wmayer
110c879e58 + do not filter events from modal message box if WaitCursor is instantiated
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5098 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-11-08 11:59:44 +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