Metadata-Version: 2.4
Name: qumo
Version: 1.2.2
Summary: 可爱风 Qt5 UI 库 - 马卡龙色系 + 100+ 预绘制图标
Author: Qumo Team
Author-email: 3302088247@qq.com
License: MIT
Project-URL: Bug Reports, https://github.com/yourusername/qumo/issues
Project-URL: Source, https://github.com/yourusername/qumo
Project-URL: Documentation, https://github.com/yourusername/qumo#readme
Keywords: qt5 ui cute gui widget animation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: User Interfaces
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PyQt5>=5.15.0
Requires-Dist: requests>=2.25.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

```markdown
# 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

```python
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

1. Open the Qumo client and click "Register"
2. Fill in nickname, password, age, email, etc.
3. Click "Send Activation Code". The code will be sent to your email.
4. Enter the received activation code to complete registration.
5. The system automatically generates a username (format: `Nickname_RandomNumber`)

### Login Method

```python
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

```python
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)

```python
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)

```python
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)

```python
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)

```python
from qumo import RainbowSlider

slider = RainbowSlider()
slider.setValue(50)
slider.set_slider_type('sun')       # 'sun', 'cloud', 'star', 'heart'
```

### 5. Cloud Dialog (CloudDialog)

```python
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)

```python
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)

```python
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)

```python
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)

```python
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

```python
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)

```python
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)

```python
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

```python
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

```python
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
-**Client download link**: http://8.137.181.230:8080

---

## Changelog

### v1.2.2
- ⚡ **Major Performance Boost** - Central animation driver eliminates high-load crashes
- 🎚️ **Animation Level System** - 4 performance modes: `'none'`/`'light'`/`'normal'`/`'full'`
- 🔧 **Hover Animation Throttling** - 20ms delay + state lock prevents animation storms
- 📦 **Lazy-load Icons** - 100+ icons render on demand + QPixmap cache (60% memory reduction)
- 🎬 **Animated Icons** - `CuteIcon.animated()` supports frame animation
- 🔮 **Enhanced Frosted Sidebar** - `set_frost_intensity()` real-time blur adjustment
- 🛡️ **Graceful Degradation** - All components have exception protection
- 🧹 **Auto Cleanup** - Timers and animations released automatically on destroy

### 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
```
