A modern Jalali (Persian) calendar widget for PySide6
Project description
📅 QJalaliCalendarWidget
A modern, customizable Jalali (Persian) calendar widget for PySide6
ویجت تقویم جلالی حرفهای و قابل شخصیسازی برای PySide6
🌟 Features | ویژگیها
🇬🇧 English
- ✅ Jalali (Persian) calendar support\
- ✅ Built with PySide6
- ✅ Right-to-left (RTL) layout support
- ✅ Customizable theme colors
- ✅ Persian / English digit modes
- ✅ Keyboard navigation
- ✅ Date range restriction (min/max)
- ✅ Custom month & weekday names
- ✅ Qt-style signals (
selectionChanged,activated, etc.) - ✅ Modern UI design
🇮🇷 فارسی
- ✅ پشتیبانی کامل از تقویم جلالی (شمسی)
- ✅ توسعه داده شده با PySide6
- ✅ پشتیبانی کامل از راستبهچپ (RTL)
- ✅ قابلیت شخصیسازی رنگها (تم)
- ✅ نمایش اعداد فارسی یا انگلیسی
- ✅ ناوبری با کیبورد
- ✅ محدودسازی بازه تاریخ (حداقل/حداکثر)
- ✅ امکان تغییر نام ماهها و روزهای هفته
- ✅ سیگنالهای مشابه QCalendarWidget
- ✅ طراحی مدرن و تمیز
📷 Screenshot | تصویر ویجت
Add your screenshot inside: docs/screenshot.png
📦 Installation | نصب
pip install qjalalicalendarwidget
🚀 Basic Usage | مثال استفاده
import sys
from PySide6.QtWidgets import QApplication
from qjalalicalendarwidget import QJalaliCalendarWidget
app = QApplication(sys.argv)
def on_date_confirmed(selected_date):
print(selected_date.strftime("%Y/%m/%d"))
app.quit()
def move_to_center(calendar):
from PySide6.QtGui import QGuiApplication
calendar.adjustSize()
# --- Center of Screen ---
screen = QGuiApplication.primaryScreen()
screen_geometry = screen.availableGeometry()
calendar.resize(calendar.sizeHint())
x = (screen_geometry.width() - calendar.width()) // 2
y = (screen_geometry.height() - calendar.height()) // 2
calendar.move(x, y)
calendar = QJalaliCalendarWidget()
calendar.confirmed.connect(on_date_confirmed)
move_to_center(calendar)
calendar.show()
sys.exit(app.exec())
🎨 Customization | شخصیسازی
Change Digit Mode | تغییر حالت اعداد
calendar.setDigitMode("fa") # Persian digits
calendar.setDigitMode("en") # English digits
Set Date Range | تعیین بازه تاریخ
import jdatetime
calendar.setMinimumDate(jdatetime.date(1403, 1, 1))
calendar.setMaximumDate(jdatetime.date(1404, 12, 29))
Customize Theme Colors | تغییر رنگها
calendar.setThemeColors(
selected_bg="#2e7d32",
selected_fg="#ffffff",
today_bg="#e8f5e9",
friday_fg="#d32f2f"
)
⌨ Keyboard Navigation | ناوبری با کیبورد
Key Action
← → Previous / Next day ↑ ↓ Previous / Next week PageUp / PageDown Previous / Next month Shift + PageUp/PageDown Previous / Next year Home / End First / Last day of month Enter Confirm selection
🔔 Signals | سیگنالها
calendar.selectionChanged.connect(...)
calendar.activated.connect(...)
calendar.currentPageChanged.connect(...)
calendar.dateSelected.connect(...)
📋 Requirements | پیشنیازها
- Python 3.9+
- PySide6
- jdatetime
📄 License | مجوز
MIT License
🤝 Contributing | مشارکت
Pull requests are welcome.
For major changes, please open an issue first.
از پیشنهادها و مشارکت شما استقبال میشود.
⭐ Support
If you find this project useful, consider giving it a ⭐ on GitHub.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qjalalicalendarwidget-0.2.1.tar.gz.
File metadata
- Download URL: qjalalicalendarwidget-0.2.1.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b6e9b7d5d06f472d3ba8ece38ee447384dc4a25493ffb5dde11451718e5f273
|
|
| MD5 |
f7ed8d4b5b865c694de064c5b689dcc1
|
|
| BLAKE2b-256 |
e029fce80b10c2f95b9c898467f4deea82635453228f7cbfc051ae773291c5b1
|
File details
Details for the file qjalalicalendarwidget-0.2.1-py3-none-any.whl.
File metadata
- Download URL: qjalalicalendarwidget-0.2.1-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5970abdf3c99901cd9166cc5050c012ec93ad48b4adb07af015a5614ee80987a
|
|
| MD5 |
800b91f23fac899e36835e271ef06c04
|
|
| BLAKE2b-256 |
65bc7f70451efb9fd79b3f2e03d731fc3ec7700cdc1d6e72b46343e0933086c3
|