Commit Graph

36 Commits

Author SHA1 Message Date
wmayer
7197568821 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
8d42b6f93c Gui: move to new style connect() 2023-02-01 13:49:35 +01:00
wmayer
09ae3b2ab8 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
ae53c9b0a4 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
bb2b49fb1f [Gui] remove superfluous nullptr checks 2022-07-18 03:17:42 +02:00
wmayer
1178df06b4 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
f2a77b4e96 [Gui] Progress: remove unused includes 2022-03-05 03:07:50 +01:00
Uwe
bb4e6e477c [Gui] improvements for PCH builds 2022-02-19 06:38:45 +01:00
wmayer
545d055766 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
098d7b9aee [GUI] Remove code for Qt < 5.9 2021-04-02 10:10:37 +02:00
wmayer
c8dae9eb85 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
ace07249f4 Gui: fix qt5 ProgressBar modal checking 2020-06-03 14:42:52 +02:00
wmayer
1f298b1692 Gui: [skip ci] fix locking keyboard when showing progress bar on Linux systems 2020-04-29 19:50:13 +02:00
Zheng, Lei
3e7e44bca5 Gui: block more events when ProgressBar is shown 2020-02-15 17:29:02 +01:00
wmayer
6e127f0ad1 Gui: activate ProgressDialog 2020-01-25 16:31:30 +01:00
wmayer
ebaadc50b2 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
169e290b86 Gui: [skip-ci] rename Sequencer to SequencerBar 2020-01-25 16:06:29 +01:00
Zheng, Lei
0c6b1a5d69 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
0ac0fba1f6 hide taskbar progress when required 2019-05-12 17:26:21 +02:00
wmayer
c61dfd43e9 hide taskbar progress when required 2019-05-10 21:05:31 +02:00
MA-DEVELOP\apeltauer
724daa2bf9 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
ca4ca78bd2 make sure QWinTaskbarProgress and QWinTaskbarButton is only used in windows compiles 2019-05-10 18:22:07 +02:00
MA-DEVELOP\apeltauer
5483455d30 add QWinTasbarProgress to windows build 2019-05-10 18:21:55 +02:00
Mateusz Skowroński
ac508516da 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
116478b93f 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
b4ef5d2c11 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
319657fd72 add comment about regression in ProgressBar 2018-08-14 23:47:43 +02:00
luz.paz
9167064fc1 Misc. typos
Found via `codespell`
2018-04-25 09:41:33 -03:00
Kunda
5aefa825b1 Typo fixes for doxygen and source comments
issue #0002914
2017-03-31 11:25:57 -03:00
Jean-Marie Verdun
8fd823da1f Fix ProgressBar rendering following STEP reader enhancement 2017-02-18 10:08:48 +01:00
wmayer
9b13aaa230 fix whitespaces 2017-02-01 12:35:50 +01:00
Jean-Marie Verdun
8acf39365c 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
c275b35d48 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
bc4a3b0c76 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