InvoiceWizard::InvoiceWizard(QWidget *parent) : QWidget(parent) { setupUi(this); newMemberDate->setDate(QDate::currentDate()); memberUntil->setDate(QDate(QDate::currentDate().year() + 1, 12, 31)); connect(memberUid, SIGNAL(returnPressed()), this, SLOT(insertMemberUid())); connect(btnAddMember, SIGNAL(pressed()), this, SLOT(insertMemberUid())); connect(btnUidInvoice, SIGNAL(pressed()), this, SLOT(invoiceMembers())); connect(radioNew, SIGNAL(toggled(bool)), this, SLOT(updatePreviewTable())); connect(radioAll, SIGNAL(toggled(bool)), this, SLOT(updatePreviewTable())); connect(radioPaidDue, SIGNAL(toggled(bool)), this, SLOT(updatePreviewTable())); connect(radioReminder, SIGNAL(toggled(bool)), this, SLOT(updatePreviewTable())); connect(newMemberDate, SIGNAL(dateChanged(QDate)), this, SLOT(startSearchTimer())); connect(memberUntil, SIGNAL(dateChanged(QDate)), this, SLOT(startSearchTimer())); connect(reminderChooser, SIGNAL(valueChanged(int)), this, SLOT(startSearchTimer())); connect(sectionList, SIGNAL(currentRowChanged(int)), this, SLOT(updatePreviewTable())); connect(btnInvoice, SIGNAL(pressed()), this, SLOT(createInvoices())); previewTable->setModel(&_previewModel); previewTable->setItemDelegateForColumn(4, new DateDelegate("yyyy-MM-dd")); previewTable->setItemDelegateForColumn(5, new DateDelegate("yyyy-MM-dd")); previewTable->setItemDelegateForColumn(6, new DateDelegate("yyyy-MM-dd")); fillSectionList(); }
void menuSales::sCreateInvoices() { createInvoices(parent, "", TRUE).exec(); }