可爱风 Qt5 UI 库 - 马卡龙色系 + 100+ 预绘制图标
Project description
# Qumo - Cute UI Library
A Macaron color scheme UI library built on Qt5, featuring 100+ pre-drawn icons, rich animation effects, and a complete account verification system.
**Version**: 1.2.0
**Author**: Qumo Team
---
## Features
- 🎨 **Macaron Color Scheme** - 50+ predefined sweet colors
- 🎭 **100+ Pre-drawn Icons** - Animals, food, emojis, objects, etc.
- ✨ **Rich Animation Effects** - Bounce, breathe, shake, float, elastic deformation
- 🍬 **Cute Widget Set** - Cotton candy buttons, jelly progress bars, star ratings, rainbow sliders
- ☁️ **Cloud Dialog** - Speech bubbles drawn with Bezier curves
- 🌸 **Frosted Sidebar** - Supports blur effect and expand/collapse animation
- 🔐 **Account Verification System** - Email registration + activation code verification, 7-day local cache
- 💬 **Toast Notifications** - Lightweight prompt component
- 😊 **Emoji Picker** - Built-in 40 common emojis
---
## Installation
### Requirements
```bash
pip install PyQt5 requests
Installation Method
Download the qumo.py file directly and place it in your project directory to use.
Quick Start
from qumo import Qumo, QumoApp, CuteButton
from qumo import QumoAuthError
# 1. Login verification (required)
try:
Qumo.login("your_username", "your_password")
except QumoAuthError as e:
print(f"Login failed: {e}")
exit()
# 2. Create application
app = QumoApp()
# 3. Create button
btn = CuteButton("Click me~")
btn.set_color('strawberry')
btn.on_click(lambda: print("Clicked!"))
btn.show()
# 4. Run
app.run()
Account Verification
Qumo uses server-side mandatory verification. You must register/login first before using any UI features.
Registration Method
- Open the Qumo client and click "Register"
- Fill in nickname, password, age, email, etc.
- Click "Send Activation Code". The code will be sent to your email.
- Enter the received activation code to complete registration.
- The system automatically generates a username (format:
Nickname_RandomNumber)
Login Method
from qumo import Qumo, QumoAuthError
try:
success = Qumo.login("username", "password")
print("Login successful!")
except QumoAuthError as e:
print(f"Login failed: {e}")
Obtaining an Account
- Regular users: Register yourself via email
- Admin account: Held by the system, not publicly available
- AI Assistant: System-built intelligent conversation feature
Server Address
Verification Server: http://8.137.181.230:5678
Cache Mechanism
- Upon successful login, credentials are cached for 7 days
- No need to log in again during the cache period
- Cache file location:
~/.qumo_cache.json
Get User Information
info = Qumo.get_user_info()
print(f"Username: {info['username']}")
print(f"Nickname: {info['nickname']}")
print(f"Call count: {info['call_count']}")
Widget Usage
1. Cotton Candy Button (CuteButton)
from qumo import CuteButton
btn = CuteButton("Click Me")
btn.set_color('strawberry') # Set color (Macaron color name or HEX)
btn.set_rounded_radius(22) # Set corner radius
btn.set_bounce_enabled(True) # Enable bounce effect
btn.on_click(lambda: print("clicked!"))
Predefined Colors:
'strawberry', 'mint', 'lavender', 'peach', 'butter_yellow', 'coral', 'grape', 'sky_blue', etc.
2. Jelly Progress Bar (JellyProgress)
from qumo import JellyProgress
progress = JellyProgress()
progress.set_value(65) # Set progress 0-100
progress.set_rainbow_mode(True) # Rainbow mode
3. Star Rating (StarRating)
from qumo import StarRating
rating = StarRating(max_stars=5)
rating.set_value(3.5) # Supports half stars
rating.on_change(lambda val: print(f"Rating: {val}"))
4. Rainbow Slider (RainbowSlider)
from qumo import RainbowSlider
slider = RainbowSlider()
slider.setValue(50)
slider.set_slider_type('sun') # 'sun', 'cloud', 'star', 'heart'
5. Cloud Dialog (CloudDialog)
from qumo import CloudDialog
dialog = CloudDialog("Hello! Are you happy today?")
dialog.set_tail_position("bottom-left") # Bubble tail position
dialog.set_colors('#FFFFFF', '#F8C8D4') # Fill color, border color
dialog.exec_()
6. Animal Avatar (AnimalAvatar)
from qumo import AnimalAvatar
avatar = AnimalAvatar(animal_type='cat', size=80)
Supported Animals: cat, dog, rabbit, panda, fox, bear, hamster, bird, pig, frog, owl, penguin, koala, unicorn
7. Frosted Sidebar (FrostedSidebar)
from qumo import FrostedSidebar
sidebar = FrostedSidebar(width=200)
sidebar.add_item("Home", "🏠", lambda: print("Home"))
sidebar.add_item("Settings", "⚙️", lambda: print("Settings"))
sidebar.add_separator()
sidebar.add_item("Exit", "🚪", lambda: print("Exit"))
sidebar.set_frost_intensity(0.7) # Set frosted glass intensity
8. Toast Notifications (Toast)
from qumo import toast_success, toast_error, toast_info, toast_warning
toast_success("Success!")
toast_error("Error occurred!")
toast_info("Please try again later")
toast_warning("Check carefully")
# Full usage
from qumo import Toast
Toast.show("Custom message", duration=3.0, position="top-center", type="info")
9. Emoji Picker (EmojiPicker)
from qumo import EmojiPicker
picker = EmojiPicker()
picker.on_select(lambda emoji: print(f"Selected: {emoji}"))
picker.exec_()
# Custom emoji list
picker.set_emojis(["😊", "❤️", "⭐", "🎉"])
Icon Library (CuteIcon)
Predefined Icons List
Animals: cat, dog, rabbit, panda, fox, bear, hamster, bird, pig, frog, owl, penguin, koala, unicorn
Food: cake, icecream, candy, cupcake, donut, cookie, pizza, burger, popcorn, sushi, milk, honey, apple
Nature: flower, leaf, tree, cactus, bamboo, sunflower, star, heart, cloud, moon, rainbow, sun
Objects: ribbon, balloon, gift, crown, sparkle, confetti, phone, book, camera, envelope, pencil, scissors, key, bell
Emojis: smile, cry, wink, love_eyes, angry, surprised
Usage
from qumo import CuteIcon
# Create icon widget
icon = CuteIcon.cat(size=64, color='#FFB7A7')
icon.show()
# Get QIcon object
qicon = CuteIcon.get_qicon('crown', size=32)
# Get all icon names
all_icons = CuteIcon.get_all_icon_names()
Animation System (QumoAnimator)
from qumo import QumoAnimator
# Bounce enlarge
QumoAnimator.bounce(widget, target_size=(100, 100), duration=300)
# Press shrink
QumoAnimator.bounce_press(widget, duration=150)
# Breathe effect
QumoAnimator.breathe(widget, period=2000)
# Shake effect
QumoAnimator.shake(widget, intensity=5, duration=300)
# Pulse effect
QumoAnimator.pulse(widget, duration=500)
# Slide in effect
QumoAnimator.slide_in(widget, start_offset=100, duration=300, direction='left')
# Fade in effect
QumoAnimator.fade_in(widget, duration=300)
# Floating animation
QumoAnimator.float_animation(widget, amplitude=10, duration=2000)
# Combined animation
QumoAnimator.combo_bounce_scale_opacity(widget, scale=True, fade=True, duration=500)
Drawing Utilities (QumoPainter)
from qumo import QumoPainter, MACARON
# Draw rounded rectangle
QumoPainter.draw_rounded_rect(painter, rect, MACARON['cream_pink'], radius=15)
# Draw rounded rectangle with border
QumoPainter.draw_rounded_rect_with_border(painter, rect, fill_color, border_color)
# Draw gradient rectangle
QumoPainter.draw_gradient_rect(painter, rect, start_color, end_color, 'vertical')
# Draw radial gradient
QumoPainter.draw_radial_gradient(painter, center, radius, inner_color, outer_color)
# Draw drop shadow
QumoPainter.draw_drop_shadow(painter, rect, '#D0D0D0', blur_radius=10, offset=QPoint(2,2))
# Draw cute face
QumoPainter.draw_cute_face(painter, center_x, center_y, size)
# Draw star
QumoPainter.draw_star_path(painter, QRectF(rect), fill_ratio=1.0, color='#FFE66D')
Color Utilities
from qumo import MACARON, lighten_color, darken_color, blend_colors
# Predefined colors
print(MACARON['strawberry']) # '#FF6B8A'
print(MACARON['mint']) # '#C8E6D9'
print(MACARON['lavender']) # '#E0D4F5'
# Color operations
light = lighten_color('#FF6B8A', 20) # Lighten by 20%
dark = darken_color('#FF6B8A', 20) # Darken by 20%
mixed = blend_colors('#FF6B8A', '#C8E6D9', 0.5) # Blend
Complete Example
import sys
from PyQt5.QtWidgets import QVBoxLayout, QWidget
from qumo import (
Qumo, QumoApp, QumoAuthError,
CuteButton, JellyProgress, StarRating,
AnimalAvatar, toast_success, MACARON
)
# Login
try:
Qumo.login("your_username", "your_password")
except QumoAuthError as e:
print(f"Login failed: {e}")
sys.exit(1)
# Create application
app = QumoApp()
# Main window
window = QWidget()
window.setWindowTitle("Qumo Example")
window.setFixedSize(400, 500)
window.setStyleSheet(f"background-color: {MACARON['milk_white']};")
layout = QVBoxLayout(window)
layout.setSpacing(20)
# Avatar
avatar = AnimalAvatar("cat", 80)
layout.addWidget(avatar, 0, alignment=2) # Qt.AlignCenter
# Button
btn = CuteButton("Click Me~")
btn.set_color('strawberry')
btn.on_click(lambda: toast_success("Hello! ❤️"))
layout.addWidget(btn, 0, alignment=2)
# Progress bar
progress = JellyProgress()
progress.set_value(50)
progress.set_rainbow_mode(True)
layout.addWidget(progress)
# Rating
rating = StarRating()
rating.set_value(4)
layout.addWidget(rating, 0, alignment=2)
window.show()
app.run()
Client Features (Full Version)
The Qumo client provides complete social features:
Forum System
- Post threads, support file uploads
- Reply to posts, support @mentions
- AI Assistant automatically replies to @mentions
- Like feature
Circle System
- Create/join interest circles
- Post within circles
Group Chat System
- Create group chats
- Chat within groups, support @AI Assistant
Friend System
- Search and add friends
- Private chat with friends
- AI Assistant can be added as a friend
Admin Panel (Admin only)
- User management
- Post management
- Circle/Group chat management
- System statistics
Usage Statistics
- Call count statistics
- Visual chart display
License
MIT License
Contact
- Email: 3302088247@qq.com
- Server Address: http://8.137.181.230:5678
Changelog
v1.2.0
- ✨ Added 100+ pre-drawn icons (CuteIcon)
- 🍬 Complete elastic deformation effect for Jelly Progress Bar
- 🔐 Email registration + activation code verification system
- ☁️ Bezier curve cloud dialog
- 🌸 Frosted sidebar
- 👑 Admin backend panel
- 🤖 AI Assistant integration
- 👥 Friend/Group/Circle social system
v1.1.0
- Added Star Rating widget
- Added Rainbow Slider
- Added Emoji Picker
- Added Toast notification system
v1.0.0
- Initial release
- Macaron color scheme
- Cotton Candy Button
- Animation system
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 qumo-1.2.1.tar.gz.
File metadata
- Download URL: qumo-1.2.1.tar.gz
- Upload date:
- Size: 34.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a34c0b5b7a515c0d2ef9d65e01c21413901c527592e7eddf809055afd63ba103
|
|
| MD5 |
d01cf39341e834952f4029630e3ebf2c
|
|
| BLAKE2b-256 |
f868ba8f8d480b2280524c915a242b868e6df1e45756cd6b78b30778636ef046
|
File details
Details for the file qumo-1.2.1-py3-none-any.whl.
File metadata
- Download URL: qumo-1.2.1-py3-none-any.whl
- Upload date:
- Size: 30.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e89751a9b7f822e7ea438550e3a76b80844ac853b0fb899ba8dd58b86404077
|
|
| MD5 |
1ab26066628689b9252c127f9fb0ccda
|
|
| BLAKE2b-256 |
5e5901edc87cb7f3afa915c2225af37d8a50d9869776988136206123cde913aa
|