Ejemplo n.º 1
0
void MenuItem::setPrice(float price) {
    if(m_price != price) {
        m_price = price;
        logMenuPropertyChanged(m_price, "price");
        priceChanged(m_price);
        fireCostChanged();
    }
}
Ejemplo n.º 2
0
PromoEditor::PromoEditor( QWidget *parent )
: KDialog( parent )
{
    ui = new PromoEditorUI( this );
    setMainWidget( ui );
    setCaption( i18n("Discounts Editor") );
    setButtons( KDialog::Ok|KDialog::Cancel );

    // BFB: New spinboxPrice: I've created new slots to control when discount, price or product are changed
    connect( ui->spinboxDiscount, SIGNAL(editingFinished()),this, SLOT(discountChanged()) );
    connect( ui->spinboxPrice, SIGNAL(editingFinished()),this, SLOT(priceChanged()) );
    connect(ui->offersDatepickerStart, SIGNAL(dateChanged(const QDate & )), this, SLOT(checkValid()));
    connect(ui->offersDatepickerEnd, SIGNAL(dateChanged(const QDate & )), this, SLOT(checkValid()));
    connect(ui->productsList, SIGNAL(clicked(const QModelIndex &)), this, SLOT(productChanged()));
    connect(ui->productsList, SIGNAL(activated(const QModelIndex &)), this, SLOT(productChanged()));
    connect(ui->productsList, SIGNAL(entered(const QModelIndex &)), this, SLOT(productChanged()));

    QTimer::singleShot(750, this, SLOT(checkValid()));
}
Ejemplo n.º 3
0
void Tire::setPrice(double price)
{
    _price = price;
    emit priceChanged();
}