Coverage for src / ezqt_widgets / __init__.py: 90.00%
18 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-01 22:46 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-01 22:46 +0000
1# ///////////////////////////////////////////////////////////////
2# EZQT_WIDGETS - Main Module
3# Project: ezqt_widgets
4# ///////////////////////////////////////////////////////////////
6"""
7ezqt_widgets - Custom Qt widgets collection for PySide6.
9ezqt_widgets is a collection of custom and reusable Qt widgets for PySide6.
10It provides advanced, reusable, and styled graphical components to facilitate
11the development of modern and ergonomic interfaces.
13**Main Features:**
14 - Enhanced button widgets (date picker, icon buttons, loading buttons)
15 - Advanced input widgets (auto-complete, search, tab replacement)
16 - Enhanced label widgets (clickable tags, framed labels, hover labels, indicators)
17 - Utility widgets (circular timers, draggable lists, option selectors, toggles)
18 - Modern and ergonomic UI components
19 - Fully typed API with type hints
20 - PySide6 compatible
22**Quick Start:**
23 >>> from ezqt_widgets import DateButton, IconButton, AutoCompleteInput
24 >>> from PySide6.QtWidgets import QApplication
25 >>>
26 >>> app = QApplication([])
27 >>>
28 >>> # Create a date button
29 >>> date_btn = DateButton()
30 >>> date_btn.show()
31 >>>
32 >>> # Create an icon button
33 >>> icon_btn = IconButton(icon="path/to/icon.png", text="Click me")
34 >>> icon_btn.show()
35 >>>
36 >>> # Create an auto-complete input
37 >>> input_widget = AutoCompleteInput(completions=["option1", "option2"])
38 >>> input_widget.show()
39 >>>
40 >>> app.exec()
41"""
43from __future__ import annotations
45# ///////////////////////////////////////////////////////////////
46# IMPORTS
47# ///////////////////////////////////////////////////////////////
48# Standard library imports
49import sys
51# Local imports
52from ._version import __version__
53from .types import (
54 AnimationDuration,
55 ColorType,
56 EventCallback,
57 IconSource,
58 IconSourceExtended,
59 SizeType,
60 ValueCallback,
61 WidgetParent,
62)
63from .widgets.button import (
64 DateButton,
65 DatePickerDialog,
66 IconButton,
67 LoaderButton,
68)
69from .widgets.input import (
70 AutoCompleteInput,
71 FilePickerInput,
72 PasswordInput,
73 SearchInput,
74 SpinBoxInput,
75 TabReplaceTextEdit,
76)
77from .widgets.label import (
78 ClickableTagLabel,
79 FramedLabel,
80 HoverLabel,
81 IndicatorLabel,
82)
83from .widgets.misc import (
84 CircularTimer,
85 CollapsibleSection,
86 DraggableItem,
87 DraggableList,
88 NotificationBanner,
89 NotificationLevel,
90 OptionSelector,
91 ThemeIcon,
92 ToggleIcon,
93 ToggleSwitch,
94)
96# ///////////////////////////////////////////////////////////////
97# META INFORMATIONS
98# ///////////////////////////////////////////////////////////////
100__author__ = "Neuraaak"
101__maintainer__ = "Neuraaak"
102__description__ = (
103 "A collection of custom and reusable Qt widgets for PySide6. "
104 "Provides advanced, reusable, and styled graphical components "
105 "to facilitate the development of modern and ergonomic interfaces."
106)
107__python_requires__ = ">=3.11"
108__keywords__ = [
109 "qt",
110 "pyside6",
111 "widgets",
112 "gui",
113 "interface",
114 "components",
115 "ui",
116 "desktop",
117]
118__url__ = "https://github.com/neuraaak/ezqt-widgets"
119__repository__ = "https://github.com/neuraaak/ezqt-widgets"
121# ///////////////////////////////////////////////////////////////
122# PYTHON VERSION CHECK
123# ///////////////////////////////////////////////////////////////
125if sys.version_info < (3, 11): # noqa: UP036 125 ↛ 126line 125 didn't jump to line 126 because the condition on line 125 was never true
126 raise RuntimeError(
127 f"ezqt_widgets {__version__} requires Python 3.11 or higher. "
128 f"Current version: {sys.version}"
129 )
131# ///////////////////////////////////////////////////////////////
132# PUBLIC API
133# ///////////////////////////////////////////////////////////////
135__all__ = [
136 # Widgets
137 "AutoCompleteInput",
138 "CircularTimer",
139 "ClickableTagLabel",
140 "CollapsibleSection",
141 "DateButton",
142 "DatePickerDialog",
143 "DraggableItem",
144 "DraggableList",
145 "FilePickerInput",
146 "FramedLabel",
147 "HoverLabel",
148 "IconButton",
149 "IndicatorLabel",
150 "LoaderButton",
151 "NotificationBanner",
152 "NotificationLevel",
153 "OptionSelector",
154 "PasswordInput",
155 "SearchInput",
156 "SpinBoxInput",
157 "TabReplaceTextEdit",
158 "ThemeIcon",
159 "ToggleIcon",
160 "ToggleSwitch",
161 # Type aliases
162 "AnimationDuration",
163 "ColorType",
164 "EventCallback",
165 "IconSource",
166 "IconSourceExtended",
167 "SizeType",
168 "ValueCallback",
169 "WidgetParent",
170 # Metadata
171 "__author__",
172 "__description__",
173 "__keywords__",
174 "__maintainer__",
175 "__python_requires__",
176 "__repository__",
177 "__url__",
178 "__version__",
179]