819,6 → 819,7 |
|
} |
model_for_ListModelsTable->submitAll(); |
ui->pushButton_7->setEnabled(true); |
// getDatabaseData(); |
|
} |
937,7 → 938,58 |
ui->pushButton_12->setEnabled(false); |
} |
|
void MainWindow::on_pushButton_13_clicked()// íàæàòèå êíîïêè "Ñôîðìèðîâàòü êðàòêèé îò÷åò" (íà âêëàäêå îò÷åòîâ) |
{ |
buildReport(false); |
|
} |
|
void MainWindow::on_pushButton_14_clicked()// íàæàòèå êíîïêè "Ñôîðìèðîâàòü ïîëíûé îò÷åò" (íà âêëàäêå îò÷åòîâ) |
{ |
buildReport(true); |
|
} |
|
void MainWindow::on_pushButton_15_clicked()// íàæàòèå êíîïêè "Ïå÷àòü" (íà âêëàäêå îò÷åòîâ) |
{ |
QPrinter printer; |
QPrintDialog *dlg = new QPrintDialog(&printer, this); |
if (dlg->exec() !=QDialog::Accepted) return; |
doc->print(&printer); |
|
} |
|
|
void MainWindow::on_pushButton_16_clicked()// íàæàòèå êíîïêè "Ïå÷àòü â PDF" (íà âêëàäêå îò÷åòîâ) |
{ |
QString fileName = QFileDialog::getSaveFileName(this, "Export PDF", "", "PDF Files (*.pdf)"); |
if(!fileName.isEmpty()){ |
if (QFileInfo(fileName).suffix().isEmpty()) |
fileName.append(".pdf"); |
QPrinter printer(QPrinter::HighResolution); |
printer.setOutputFormat(QPrinter::PdfFormat); |
printer.setOutputFileName(fileName); |
doc->print(&printer); |
} |
|
} |
|
void MainWindow::on_pushButton_17_clicked()// íàæàòèå êíîïêè "Ýêñïîðò â OpenOffice" (íà âêëàäêå îò÷åòîâ) |
|
{ |
QString fileName = QFileDialog::getSaveFileName(this, "Export ODT", "", "OpenOffice document (*.odt)"); |
|
if(!fileName.isEmpty()){ |
if (QFileInfo(fileName).suffix().isEmpty()) |
fileName.append(".odt"); |
(bool)QTextDocumentWriter(fileName).write(doc); |
|
} |
|
|
} |
|
|
void MainWindow::on_sql_mogel_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ){ // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò |
int i; |
i++; |