Commit Graph

569 Commits

Author SHA1 Message Date
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
bofdahof
353acbb27b Base: simplify UnitsSchemas management
Fixes: Maintaining schemas is difficult and error-prone

- Facilitate easy schemas add, remove, change, etc.
- Remove 14 files containing approx 2,190 lines of if/else code and data
- Place data in one file (UnitsSchemasData.h) using a normalized structure (including special functions)
- Isolate and simplify data operations (code)
- Remove schemas enum to keep data independent of code
- Separate responsibilities: Specifications, data, schemas, schema
- Add schema data 'isDefault'
- Add schema data name
- Prefer algorithms to raw loops
- Add schemas unit tests
- Tweak quantity unit tests
2025-04-27 00:45:54 +02:00
Chris Hennes
b2e3659efe Start: Apply reviewer suggestion
Co-authored-by: Pieter Hijma <pieterhijma@users.noreply.github.com>
2025-04-21 21:21:52 +02:00
Chris Hennes
71932ac724 Start: Refactor f3d to use worker threads 2025-04-21 21:21:52 +02:00
Adrian Insaurralde Avalos
5635c41ed5 Start: refactor f3d previews, use caching and configurable f3d path 2025-04-21 21:21:52 +02:00
MaxiV
5f3c1aa5e8 Start: Switch to using QProcess, not std::system 2025-04-21 21:21:52 +02:00
MaxiV
55dd1f875d Start: add f3d previews 2025-04-21 21:21:52 +02:00
Furgo
6864ac4e0d Start: set specific zoom level for new BIM projects (#20271)
* Gui: allow viewDefaultOrientation function to accept the None value, as per the docstring

* Start, BIM: set specific zoom level for new BIM projects
2025-03-25 09:36:43 +01:00
Kacper Donat
3454a5938e Merge pull request #20216 from alfrix/start_fixes_5
Start: fix newbuttons vertical sizing
2025-03-23 17:10:19 +01:00
Alfredo Monclus
8fb23b9117 start: fix file cards not respecting styling 2025-03-22 18:59:11 +00:00
Alfredo Monclus
87b3052572 start: fix newfilebuttons sizehint and split it into it's own widget 2025-03-22 15:52:55 -03:00
Alfredo Monclus
b4afa87042 start: modify the flowlayout to have homogeneous rows 2025-03-22 15:39:46 -03:00
tritao
cdab9c7837 CMake: Cleanup targets with transitive dependencies 2025-03-17 12:12:06 +00:00
Alfredo Monclus
76f24d57ab start: fix listview height alwasys being too small 2025-03-07 00:07:11 -03:00
Chris Hennes
4eeca37bf3 Merge pull request #19901 from alfrix/start_fixes_1
Start: fix text visbility
2025-03-06 17:32:31 +00:00
Furgo
40fe023c26 Start: enable multiple custom folder paths
* Update tooltip to indicate support for multiple custom folder paths
* Remove migration step that worked around lack of multiple folder support
* Remove obsolete migration method
* Address linter warnings: build/include_what_you_use
* Add QStringList as requested on https://github.com/FreeCAD/FreeCAD/pull/19948/files#r1982267583
2025-03-06 10:13:40 +01:00
Alfredo Monclus
48adc41817 start: simplify cardspacing 2025-03-05 13:24:07 -03:00
Alfredo Monclus
eae8aec93d start: fix filecard text visibility on classic theme also fixes hover and pressed states 2025-03-05 13:23:39 -03:00
Alfredo Monclus
e4a14871f5 start: fix new file button layout size
fixes #15758
2025-03-05 13:23:28 -03:00
Alfredo Monclus
be08a2fd45 start: fix visibility by removing hardcoded styling from newfile buttons
this allows the new file buttons to change from light to dark dynamically
2025-03-05 13:23:00 -03:00
Chris Hennes
e4e957f273 Merge pull request #19932 from alfrix/start_fixes_2
Start: fix fileview use scrollbars as needed
2025-03-05 00:01:57 +00:00
Chris Hennes
7fd0eff512 Merge pull request #19928 from furgo16/startpage-option-showonlyfcstd
Start: add option to show only FreeCAD native files in custom folder
2025-03-04 23:59:50 +00:00
Chris Hennes
1a2070c36f Merge pull request #19636 from kadet1090/color-in-base
Base: Move App::Color to Base
2025-03-02 16:36:40 -06:00
Alfredo Monclus
d9e101cdb4 start: fileview use scrollbars as needed
if for whatever reason the viewport failed to resize let qt add the scrollbars
2025-03-02 05:49:08 -03:00
Furgo
6663e9aa67 Start: add option to show only FCStd files to the preferences dialog 2025-03-02 07:41:28 +01:00
Furgo
3f1204d212 Start: add option to show only FreeCAD native files in custom folder 2025-03-02 06:44:54 +01:00
Chris Hennes
b85dc0c2e7 Merge pull request #19918 from furgo16/startpage-prefs
Start: add initial preferences page
2025-03-02 01:04:49 +00:00
Furgo
6442ad581e Move CustomFolder parameter migration to more appropriate location 2025-03-02 01:04:19 +00:00
Furgo
a4bf8b5194 Remove dead code 2025-03-01 20:11:59 +01:00
Furgo
05e1f49370 Use the correct file chooser mode for folders, update tooltip 2025-03-01 01:31:07 +01:00
Furgo
463d2025ec Add icon for Start page preferences tab 2025-03-01 01:10:36 +01:00
Furgo
3942ec7794 Add initial preferences page for Start 2025-02-28 19:10:46 +01:00
Benjamin Bræstrup Sayoc
ee1c73cd04 Build: suppress warnings from 3rd party libraries
Warnings from 3rd parties are not relevant and are only polluting the warning output. Marking these libraries as SYSTEM suppresses warning.

https://gcc.gnu.org/onlinedocs/cpp/Invocation.html#index-I
https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html
2025-02-25 14:39:05 +00:00
Joao Matos
15076cb504 Core: Move PyCXX library to src/3rdParty. 2025-02-24 16:36:06 +00:00
Benjamin Bræstrup Sayoc
6f619b5f1c Base: remove unneeded includes 2025-02-18 11:07:57 -06:00
Kacper Donat
13fbab9e42 Base: Move App::Color to Base
Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
2025-02-17 21:10:26 +01:00
Furgo
226f67a1e8 Start: add optional custom folder view (#19473)
* Start: add optional additional folder view

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Added logic to migrate ShowCustomFolder parameter

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Rename Additional to Custom folder

* Change Start page text to sentence case for consistency

* Fix breakage created by pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Rearrange migration logic to make it more explicit

* Revert "Change Start page text to sentence case for consistency"

This reverts commit 8a31a1238c0380ddbe13e6e5838a3be6b13400a5.

* Make parameterGroup local

* Apply suggestions and linter improvements

* Adapted suggestion to simplify migration logic

* Start: Warning -> Message for rename of ShowCustomFolder

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-02-17 10:18:35 -06:00
Joao Matos
aace8f7bee CMake: Modernize build files using outdated Python variables. 2025-02-16 10:21:26 -06:00
tritao
80b299bb88 Base: Move zipios library to 3rdParty folder. 2025-02-14 13:08:28 -06:00
Benjamin Bræstrup Sayoc
e2baa03d24 Start: Use QStringLiteral 2025-02-10 18:32:45 +01:00
tritao
02ab2deac7 Gui: Reorganize the navigation files into a top Navigation folder. 2025-02-05 20:21:00 -06:00
Mark Ganson TheMarkster
3b7b7d6e5c [Start page] Implement ShowExamples parameter (#19376)
* [Start page] Implement ShowExamples parameter
2025-02-05 20:01:54 -06:00
Yorik van Havre
0213b4fc6c Translations (#18923)
* Updated ts files

* Merged crowdin translations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-13 21:30:30 -06:00
wmayer
d32bda7a0d Fix German translation
until the next download from crowdin
2025-01-06 17:25:44 +01:00
Snow Faerie
8ac3800666 Fix and add menu accelerators (#15532)
* Fix and add menu accelerators: menus common to all workbenches

I use menu accelerators fairly often, so I find it very frustrating when
they are missing, or worse, they don't work due to the same letter being
assigned to several commands.

This patch adds accelerators to lots of menu entries missing them and
fixes broken accelerators.

Wherever possible, standard accelerator keys are used:
https://doc.qt.io/qt-5/accelerators.html

This commit covers accelerator fixes that are common to all workbenches.
Accelerator fixes for specific workbenches will be done in separate
commits.

* Add missing accelerators: Spreadsheet workbench
2024-12-13 10:39:30 -06:00
wmayer
8501d431fd Start: Fix opening file for writing 2024-12-04 09:49:53 -05:00
wmayer
6f80773166 Start: Fix extracting thumbnails on Windows 2024-11-28 18:56:37 +01:00
wmayer
09772749f2 Start: Implement Thumbnail Managing Standard
as specified here: https://specifications.freedesktop.org/thumbnail-spec/0.8.0/

The changes are:
* use MD5 as hashing algorithm
* write thumbnails to ~/.cache/thumbnails/normal
2024-11-26 11:14:52 -05:00
wmayer
f9ffff25ad Start: Show thumbnail if filename contains a dot
Fixes #18109
2024-11-26 09:42:05 -05:00
wmayer
8a80ce2ca4 Start: fixes #17857: Icon-files of the startup screen are not removed from /tmp
It's basically a port of #10951 to the new start page implementation.

Note: Icon files are not removed but re-used instead.

The commit adds some new functions:

* getThumbnailsImage()
  Returns the name of the PNG inside a project file

* getThumbnailsName()
  Returns the directory name containing the image files

* getThumnailsParentDir()
  Returns the parent directory of the directory containing the image files

* getThumbnailsDir()
  Returns the path to the thumbnail directory. There is no need to always create a unique directory
  after each restart because it doesn't harm if the thumbnail directoy contains deprecated files.

* createThumbnailsDir()
  Creates the thumbnail directoy if it doesn't exist yet.

* getSha1Hash
  Helper function to compute a SHA-1 hash of a given path. If the same path is passed
  then the hash value will be the same.
  This way it can be avoided to create a different image file from a project file
  after each restart.

* getUniquePNG
  Computes the path of a PNG image file for a given project file. It's also possible
  to pass an arbitrary string as argument.

* useCachedPNG
  If the PNG image exists and if it's newer than the project file True is returned
  and False otherwise.

For a given project file it is checked if the thumbnail directory already contains
a cached image. If it's newer than the project file it will used, otherwise it will
be re-created.

Fix freecadCanOpen() abd DisplayedFilesModel::addFile() to also check for lower-case
file extensions.
2024-11-20 09:44:35 -05:00