void MeasureProperties::gotoPreviousMeasure() { if (getPrevMeasure(m)) setMeasure(getPrevMeasure(m)); nextButton->setEnabled(getNextMeasure(m)); previousButton->setEnabled(getPrevMeasure(m)); m->score()->end(); }
void MeasureProperties::gotoPreviousMeasure() { if (m->prevMeasure()) setMeasure(m->prevMeasure()); nextButton->setEnabled(m->nextMeasure() != 0); previousButton->setEnabled(m->prevMeasure() != 0); m->score()->end(); }
MeasureProperties::MeasureProperties(Measure* _m, QWidget* parent) : QDialog(parent) { setupUi(this); setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint); setMeasure(_m); staves->verticalHeader()->hide(); connect(buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(bboxClicked(QAbstractButton*))); connect(nextButton, SIGNAL(clicked()), SLOT(gotoNextMeasure())); connect(previousButton, SIGNAL(clicked()), SLOT(gotoPreviousMeasure())); }
MeasureProperties::MeasureProperties(Measure* _m, QWidget* parent) : QDialog(parent) { setupUi(this); setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint); setMeasure(_m); staves->verticalHeader()->hide(); connect(buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(bboxClicked(QAbstractButton*))); connect(nextButton, SIGNAL(clicked()), SLOT(gotoNextMeasure())); connect(previousButton, SIGNAL(clicked()), SLOT(gotoPreviousMeasure())); nextButton->setEnabled(_m->nextMeasure() != 0); previousButton->setEnabled(_m->prevMeasure() != 0); if (qApp->layoutDirection() == Qt::LayoutDirection::RightToLeft) { horizontalLayout_2->removeWidget(nextButton); horizontalLayout_2->insertWidget(0, nextButton); } }
void PurchaseEditor::checkIfCodeExists() { Azahar *myDb = new Azahar; myDb->setDatabase(db); gelem = ""; QString codeStr = ui->editCode->text(); if (codeStr.isEmpty()) codeStr = "0"; ProductInfo pInfo = myDb->getProductInfo(codeStr); if (pInfo.code ==0 && pInfo.desc=="Ninguno") productExists = false; if (pInfo.code > 0) { status = estatusMod; productExists = true; qtyOnDb = pInfo.stockqty; //Prepopulate dialog... ui->editDesc->setText(pInfo.desc); setCategory(pInfo.category); setMeasure(pInfo.units); ui->editCost->setText(QString::number(pInfo.cost)); ui->editTax->setText(QString::number(pInfo.tax)); //FIXME: add tax models //ui->editExtraTaxes->setText(QString::number(pInfo.extratax)); ui->editFinalPrice->setText(QString::number(pInfo.price)); ui->editPoints->setText(QString::number(pInfo.points)); ui->chIsAGroup->setChecked(pInfo.isAGroup); gelem = pInfo.groupElementsStr; if (!(pInfo.photo).isEmpty()) { QPixmap photo; photo.loadFromData(pInfo.photo); setPhoto(photo); } } else { qDebug()<< "no product found with code "<<codeStr; qulonglong codeSaved = getCode(); resetEdits(); setCode(codeSaved); } }
void PurchaseEditor::setMeasure(int i) { QString text = getMeasureStr(i); setMeasure(text); }
void MeasureProperties::gotoPreviousMeasure() { if (m->prevMeasure()) setMeasure(m->prevMeasure()); }
void MeasureProperties::gotoNextMeasure() { if (m->nextMeasure()) setMeasure(m->nextMeasure()); }