Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
OrderWindow Class Reference

The order form: quantity, coupon, total and a "Place order" button. More...

Inheritance diagram for OrderWindow:

Public Member Functions

 OrderWindow ()
 Builds the form.

Private Member Functions

void updateTotal ()
 Recomputes the total from the quantity and discount.
void applyCoupon ()
 Applies the coupon code (only SAVE10 is valid) and shows a confirmation.
void placeOrder ()
 Places the order (logs it and updates the status bar).

Private Attributes

QSpinBox * m_quantity = nullptr
 Quantity, 1-99.
QLineEdit * m_coupon = nullptr
 Coupon code entry.
QLabel * m_total = nullptr
 Order total.
QPushButton * m_placeOrder = nullptr
 The "Place order" button.
QLabel * m_toast = nullptr
 Transient confirmation message.
double m_discount = 0.0
 Fraction taken off the total.

Detailed Description

The order form: quantity, coupon, total and a "Place order" button.


The documentation for this class was generated from the following file: