//constrain to absolute maximum
if(absmax.width()<vsz.width())vsz.setWidth(absmax.width());
if(absmax.height()<vsz.height())vsz.setHeight(absmax.height());
- qDebug()<<"ret min"<<vsz;
+// qDebug()<<"ret min"<<vsz;
return vsz;
}
private:
vl->addSpacing(10);
vl->update();
- QSize sz=size();qDebug()<<"size"<<sz;
+ QSize sz=size();//qDebug()<<"size"<<sz;
vl->addWidget(m_table=new MOWTableView,10);
m_table->setModel(m_model=new QStandardItemModel(this));
QMessageBox::warning(this,tr("Warning"),tr("Unable to get template file (bill). Giving up."));
return;
}
+ qDebug()<<"printing bill using template"<<tf.cacheFileName();
//mark order as shipped?
if(m_order.status()==MOOrder::Placed)
if(QMessageBox::question(this,tr("Mark as shipped?"),tr("Mark this order as shipped now?"),QMessageBox::Yes|QMessageBox::No,QMessageBox::Yes)==QMessageBox::Yes){
QMessageBox::warning(this,tr("Warning"),tr("Unable to get template file (bill). Giving up."));
return;
}
+ qDebug()<<"saving bill using template"<<tf.cacheFileName();
//get target file name
QFileDialog fd(this);
fd.setAcceptMode(QFileDialog::AcceptSave);
getLoopVariable(sl[0],it,sl[1],value);
}
}
+// qDebug()<<"got variable"<<vn<<"value"<<value;
}
void MOrderWindow::getLoopIterations(QString loopname,int&iterations)
if(loopname=="ACCTICKETS")iterations=printBuffer.tickinfo.size();
if(loopname=="VOUCHERS")iterations=printBuffer.vouchers.size();
if(loopname=="ADDRESSLINES")iterations=m_order.fullInvoiceAddress().split("\n").size();
+// qDebug()<<"loop"<<loopname<<"has"<<iterations<<"iterations";
}
void MOrderWindow::setLoopIteration(QString loopname, int iteration)
{
+// qDebug()<<"setting loop iter"<<loopname<<iteration;
int max=-1;
if(iteration<0)return;
getLoopIterations(loopname,max);