Coverage for src / ezqt_widgets / __init__.py: 90.48%
19 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-31 10:03 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-31 10:03 +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__license__ = "MIT"
109__keywords__ = [
110 "qt",
111 "pyside6",
112 "widgets",
113 "gui",
114 "interface",
115 "components",
116 "ui",
117 "desktop",
118]
119__url__ = "https://github.com/neuraaak/ezqt-widgets"
120__repository__ = "https://github.com/neuraaak/ezqt-widgets"
122# ///////////////////////////////////////////////////////////////
123# PYTHON VERSION CHECK
124# ///////////////////////////////////////////////////////////////
126if sys.version_info < (3, 11): # noqa: UP036 126 ↛ 127line 126 didn't jump to line 127 because the condition on line 126 was never true
127 raise RuntimeError(
128 f"ezqt_widgets {__version__} requires Python 3.11 or higher. "
129 f"Current version: {sys.version}"
130 )
132# ///////////////////////////////////////////////////////////////
133# PUBLIC API
134# ///////////////////////////////////////////////////////////////
136__all__ = [
137 # Widgets
138 "AutoCompleteInput",
139 "CircularTimer",
140 "ClickableTagLabel",
141 "CollapsibleSection",
142 "DateButton",
143 "DatePickerDialog",
144 "DraggableItem",
145 "DraggableList",
146 "FilePickerInput",
147 "FramedLabel",
148 "HoverLabel",
149 "IconButton",
150 "IndicatorLabel",
151 "LoaderButton",
152 "NotificationBanner",
153 "NotificationLevel",
154 "OptionSelector",
155 "PasswordInput",
156 "SearchInput",
157 "SpinBoxInput",
158 "TabReplaceTextEdit",
159 "ThemeIcon",
160 "ToggleIcon",
161 "ToggleSwitch",
162 # Type aliases
163 "AnimationDuration",
164 "ColorType",
165 "EventCallback",
166 "IconSource",
167 "IconSourceExtended",
168 "SizeType",
169 "ValueCallback",
170 "WidgetParent",
171 # Metadata
172 "__author__",
173 "__description__",
174 "__keywords__",
175 "__license__",
176 "__maintainer__",
177 "__python_requires__",
178 "__repository__",
179 "__url__",
180 "__version__",
181]