Commit Graph

117 Commits

Author SHA1 Message Date
Fatih Uzunoglu 30c2634e72 qt: remove org.videolan.compat module 2024-03-24 20:32:07 +00:00
Fatih Uzunoglu ad5171ca54 qt: register qml type ListSelectionModel 2023-10-20 16:16:59 +00:00
Pierre Lamot 4a5f650aac qt: move sorting context to MainCtx 2023-10-10 15:26:56 +00:00
Pierre Lamot 1bfbdc2a29 qt: add Search context to MainCtx 2023-10-10 15:26:56 +00:00
Pierre Lamot 24d808fc4e qt: remove obsolete SortfilterProxyModel 2023-09-15 13:04:19 +00:00
Mohit Marathe 7382916980 qt: create DelayEstimator class
Signed-off-by: Mohit Marathe <mohitmarathe23@gmail.com>
2023-07-20 11:31:53 +00:00
Steve Lhomme de40a3a601 qml: remove unused qt_intf_t from SVGColorImageImageProvider
Fixes a warning.
2023-07-20 07:51:13 +00:00
Fatih Uzunoglu da74c09aa5 qt: register "MainPlaylistController" singleton type 2023-07-15 08:25:11 +00:00
Fatih Uzunoglu 354f520c08 qt: rename PlaylistControllerModel to PlaylistController 2023-07-15 08:25:11 +00:00
Fatih Uzunoglu 258261bdaf qt: migrate meta-type registration to qt.cpp 2023-06-12 13:51:14 +00:00
Fatih Uzunoglu fb45b6800c qt: remove unnecessary QmlInputItem and use SharedInputItem 2023-06-12 13:51:14 +00:00
Pierre Lamot 6fbf34d454 qt: remove Qt 5.11 compatibility layer 2023-05-11 15:28:42 +00:00
Fatih Uzunoglu e6ff7c6e59 qt: get rid of MouseEventFilter 2023-04-28 08:06:30 +00:00
Fatih Uzunoglu 7abb46903d qt: register qml type ListViewRev15 or ListViewRev11 as ListViewCompat 2023-04-20 07:52:07 +00:00
Steve Lhomme 9811a0d67a qt: remove vlctick.hpp include from medialibrary headers
This avoids include more VLC headers when not needed.
2023-04-19 16:18:10 +02:00
Fatih Uzunoglu d9e5c65d33 qt: classify qml errors for logging 2023-03-11 11:11:35 +00:00
Pierre Lamot b451e973e2 qml: introduce ColorContext
System themes are temporary disabled

Theses Contexts defines what palette they use (the standard one of the dark one
in the player), what color set they should use (is it a button, a slider,
etc..), and the state of the widget (hovered, focused, pressed, disabled). The
context defines some color properties that may be usable in the current widgets
(different colors for foregrounds, backgrounds, and decorations)


* For each color, we build a key representing the color, the key is build from
  the color set (button, window, view, tabbutton, etc..), the section
  (background/foreground), the name (primary/secondary/...) and the state
  (normal, hovered, focused, pressed, disabled).

* all colors are stored in a map associating the color key to its value

* When a color is required for a particular context, we look in the table for
  the key. There is a fallback mechanism, if the key doesn't exists for a given
  state, we try to rebuild the key for the `Normal` state. then if the key
  doesn't exist for this component we rebuild the key for the `View` component
  (first with the actual state then with the `Normal` State). if every thing
  fails we return a crappy color (magenta) to visually indicate that something
  needs to be fixed.

* On the QML Side, we instantiate a ColorContext object for each component we
  want to theme, and we extract colors from it. there are 3 main sets of colors:

  * `fg` for foreground colors, the sub colors are `primary` (the main color),
    `secondary` (for component that requires a second color), `hightlight` (for
    selection), `link` (for links), positive/neutral/

  * `bg` expose the same set of color but for background

  * decoration colors. theses are directly accessible in the `ColorContext`
    object. `border`, `separator`, `accent`, `shadow` and `visualFocus`

  ColorContext have a palette property that defines which palette should be use
  (dark palette for the player or default palette), a `colorset` to define what
  is the current color set (Button/View/Item/Slider/etc...) and some state
  (enabled, focused, hovered, pressed)

  When a color change due to either a state change or a palette change, the
  color property change is signaled and the color will be changed through
  property bindings
2023-02-28 15:38:29 +00:00
Yann Lochet e52b8e950a qml: compat for HoverHandler 2023-01-17 09:53:59 +01:00
Prince Gupta 99ee50c554 qt: implement CSDButtonModel 2022-12-23 14:59:14 +00:00
Yann Lochet a85933103d qml: compat for touchscreen handlers 2022-12-19 13:02:49 +00:00
Benjamin Arnaud 38196134cc qt/network: Create StandardPathModel 2022-11-24 13:10:38 +00:00
Pierre Lamot 528592d358 qt: provide QQuickItem class to integrate themed images in QML 2022-10-31 06:31:09 +00:00
Pierre Lamot 21020e2cff qml: refactor VLCColors definitions
default values are provided by the dark/light theme, colors are then overriden
by the system themes this will be less tedious than using qml states to switch
values. This will also allows system theme to specify colors beyond QPalette
2022-10-31 06:31:09 +00:00
Leon Vitanos 13d2ab5573 qt/qml: display error messages on the messages dialog 2022-10-22 07:25:35 +00:00
Johannes Kauffmann 80489c822c qt: use correct define for static Qt lib check
QT_STATICPLUGIN is meant for building a static Qt plugin [1], and not for
testing if the used Qt is a static or shared build: That should be done
with QT_STATIC. Since we are not building a static Qt plugin, use
QT_STATIC.

1. https://doc.qt.io/qt-5/plugins-howto.html#creating-static-plugins
2022-10-07 13:34:54 +00:00
Leon Vitanos ff548f1df9 qt/qml: register MLBookmarkModel as QML type 2022-09-24 16:39:03 +00:00
Pierre Lamot e99b3c4097 qml: add custom image provider to colorize SVG assets
this allows to template SVG assets with placeholder colors that will be replaced
with theme aware colors at runtime. the substitution is made while reading the
SVG using simple string substitution.

placeholder colors are pre-defined as

color 1 -> #FF00FF
color 2 -> #00FFFF
2022-09-17 18:47:07 +00:00
Pierre Lamot 83105630b9 qt: fix error popup not showing up with Qt 5.15
type was registered twice: as a singleton and as a type. For some reason, this
was still working with older Qt versions
2022-09-14 08:19:55 +00:00
Benjamin Arnaud b1da8f43fa qt: Create QmlProgramMenu 2022-08-22 20:07:29 +00:00
Fatih Uzunoglu 46bfa790ea qt: register ViewBlockingRectangle 2022-07-14 04:01:17 +00:00
Fatih Uzunoglu 14165ac2ee qt: register static effects image provider 2022-07-01 13:46:11 +00:00
Prince Gupta 8cfcf077d8 qt: provide custom cover generation via medialib 2022-06-11 15:44:58 +00:00
Prince Gupta 3d9a2e7d24 qt: purse c++ medialib view menus 2022-05-17 11:37:24 +00:00
Benjamin Arnaud 1191b4ba96 qt: Create QmlTrackMenu(s)
This patch contains the three QmlMenu(s) required for the Tracks panel:
QmlTrackMenu, QmlSubtitleMenu and QmlAudioMenu. The video tracks do not
require a dedicated menu for now.
2022-05-14 10:33:17 +00:00
Pierre Lamot c801d4f204 qt: handle error messages separately from dialog
this allows to store error messages before the UI is loaded and not to miss
dialogs messages if they are requested before the QML is ready.

fix: #26111
2022-04-29 17:19:30 +00:00
Benjamin Arnaud 97d60ade06 qt/qml_menu_wrapper: Create QmlRendererMenu 2022-04-07 13:21:56 +00:00
Benjamin Arnaud c58c340df5 qt/qml_menu_wrapper: Create QmlBookmarkMenu 2022-04-01 09:52:14 +00:00
Benjamin Arnaud 026b9db3a9 qt: Create control_list_filter 2022-03-11 09:41:32 +00:00
Lyndon Brown b86a9ce683 qt: purge more redundant includes
Note that in some cases they have been changed to forward declarations, and
in some they have been moved, for instance inclusion of `<QUrl>` was moved
from `qt.hpp` to where it was needed.
2022-02-27 10:33:04 +00:00
Benjamin Arnaud 02dca7ec1e qt/qml_menu_wrapper: Create VideoFoldersContextMenu 2022-02-20 14:18:57 +00:00
Benjamin Arnaud 724981add4 qt: Rename GroupListContextMenu to VideoGroupsContextMenu 2022-02-20 14:18:57 +00:00
Benjamin Arnaud 877355ec8b qt: Create MLVideoFoldersModel 2022-02-20 14:18:57 +00:00
Benjamin Arnaud c536126d16 qt: Rename MLGroupListModel to MLVideoGroupsModel 2022-02-20 14:18:57 +00:00
Prince Gupta c5075f222b qt/MainCtx: add screen property 2022-02-06 14:21:17 +00:00
Fatih Uzunoglu d36ddb09f0 qt: register qml compatibility module 2022-02-03 21:19:29 +00:00
Fatih Uzunoglu 5125e9a426 qt: protect registered qml modules 2022-02-03 21:19:29 +00:00
Pierre Lamot c2f0719ec8 qt: restore type registration of MLItemId and DialogId with qRegisterMetaType
Types are used in connections, they must be registered with both Q_DECLARE_METATYPE
and qRegisterMetaType as stated in the documentation.

> To use the type T in QVariant, using Q_DECLARE_METATYPE() is sufficient.
> To use the type T in queued signal and slot connections,
> qRegisterMetaType<T>() must be called before the first connection
> is established.
2022-01-27 13:45:15 +00:00
Pierre Lamot 44414977b8 qt: fix qml singleton access with 5.12
fix: #26462
2022-01-20 13:33:57 +00:00
Fatih Uzunoglu 4bba2cee5d qt, qml: fix incorrect downcasting 2022-01-13 08:18:20 +00:00
Benjamin Arnaud 8e46137725 qt/qml_menu_wrapper: Create SortMenuVideo 2022-01-10 13:21:47 +00:00