#include "orderauditdlg_p.h"
#include "formula.h"
+#include "main.h"
#include <QBoxLayout>
-#include <QDebug>
-#include <QStandardItemModel>
-#include <QTreeView>
#include <QComboBox>
+#include <QDebug>
#include <QDomDocument>
#include <QDomElement>
#include <QFile>
-#include <main.h>
+#include <QPushButton>
+#include <QStandardItemModel>
+#include <QTreeView>
class MOAAuditList:public QList<MOAParcel>
setWindowTitle(tr("Order Audit [%1]").arg(orders.value(0).orderid()));
setSizeGripEnabled(true);
d->formula.setParent(this);
+ resize(800,600);
//init list
d->maudit.addOrders(orders);
d->maudit.addTickets(audit.gettickets());
vl->addWidget(d->mdata=new QTreeView,1);
d->mdata->setModel(d->mmodel=new QStandardItemModel);
d->mdata->setEditTriggers(QAbstractItemView::NoEditTriggers);
+ connect(d->mprofile,SIGNAL(currentIndexChanged(int)),this,SLOT(drawdata()));
drawdata();
+ //button bar
+ QPushButton*p;
+ QHBoxLayout*hl;
+ vl->addLayout(hl=new QHBoxLayout,0);
+ hl->addWidget(p=new QPushButton("Expand"),0);
+ connect(p,SIGNAL(clicked()),d->mdata,SLOT(expandAll()));
+ hl->addWidget(p=new QPushButton("Collapse"),0);
+ connect(p,SIGNAL(clicked()),d->mdata,SLOT(collapseAll()));
+ hl->addStretch(1);
+ hl->addWidget(p=new QPushButton("Close"),0);
+ connect(p,SIGNAL(clicked()),this,SLOT(reject()));
}
MOrderAuditDialog::~MOrderAuditDialog()
}
d->formula.setContext(0);
}
+ d->mdata->expandAll();
for(int i=0;i<d->mmodel->columnCount();i++)
d->mdata->resizeColumnToContents(i);
}