Пример #1
0
QSqlTableModel* CashAccountTableModel::createModel(int year)
{
    QSqlTableModel* model = new QSqlTableModel();
    model->setTable("CashAccount");
    selectYear(model, year);
    return model;
}
Пример #2
0
Donations::Donations(QWidget *parent) : QWidget(parent) {
	setupUi(this);
	
	connect(dateFrom, SIGNAL(dateChanged(QDate)), this, SLOT(searchData()));
	connect(dateUntil, SIGNAL(dateChanged(QDate)), this, SLOT(searchData()));
	connect(btnExport, SIGNAL(clicked()), this, SLOT(exportData()));
	connect(btnEmail, SIGNAL(clicked()), this, SLOT(sendEmail()));
	
	connect(sectionList, SIGNAL(currentIndexChanged(int)), this, SLOT(selectSection()));
	connect(yearList, SIGNAL(itemSelectionChanged()), this, SLOT(selectYear()));
	
	tableModel = new QSqlQueryModel(tableView);
	donationsModel = new QSqlQueryModel(donationsTable);
	
	fileImport = false;
	
	loadData();
	loadSectionDonations();
}
Пример #3
0
void CashImportHandler::refresh()
{
    selectYear(m_year);
    qDebug() << QString("Refresh: Selected row count: %1").arg(m_cashProxyModel->rowCount());
}