2016-02-17 10:11:00 +03:00
|
|
|
/***************************************************************************
|
|
|
|
* This file is part of the Lime Report project *
|
2021-08-18 20:21:36 +03:00
|
|
|
* Copyright (C) 2021 by Alexander Arin *
|
2016-02-17 10:11:00 +03:00
|
|
|
* arin_a@bk.ru *
|
|
|
|
* *
|
|
|
|
** GNU General Public License Usage **
|
|
|
|
* *
|
|
|
|
* This library is free software: you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
|
|
|
* *
|
|
|
|
** GNU Lesser General Public License **
|
|
|
|
* *
|
|
|
|
* This library is free software: you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU Lesser General Public License as *
|
|
|
|
* published by the Free Software Foundation, either version 3 of the *
|
|
|
|
* License, or (at your option) any later version. *
|
|
|
|
* You should have received a copy of the GNU Lesser General Public *
|
|
|
|
* License along with this library. *
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>. *
|
|
|
|
* *
|
|
|
|
* This library is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
#include "lrreportengine.h"
|
|
|
|
|
2016-02-17 10:11:00 +03:00
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QProgressDialog>
|
|
|
|
#include <QtSql/QSqlDatabase>
|
|
|
|
#include <QtSql/QSqlQueryModel>
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class MainWindow;
|
|
|
|
}
|
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
class MainWindow: public QMainWindow {
|
2016-02-17 10:11:00 +03:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2024-09-04 17:31:16 +03:00
|
|
|
explicit MainWindow(QWidget* parent = 0);
|
2016-02-17 10:11:00 +03:00
|
|
|
~MainWindow();
|
|
|
|
private slots:
|
|
|
|
void on_pushButton_clicked();
|
|
|
|
void on_pushButton_2_clicked();
|
|
|
|
void renderStarted();
|
|
|
|
void renderPageFinished(int renderedPageCount);
|
|
|
|
void renderFinished();
|
|
|
|
void slotGetCallbackData(LimeReport::CallbackInfo info, QVariant& data);
|
|
|
|
void slotChangePos(const LimeReport::CallbackInfo::ChangePosType& type, bool& result);
|
|
|
|
void slotGetCallbackChildData(LimeReport::CallbackInfo info, QVariant& data);
|
|
|
|
void slotChangeChildPos(const LimeReport::CallbackInfo::ChangePosType& type, bool& result);
|
2016-12-06 00:17:39 +03:00
|
|
|
void slotOneSlotDS(LimeReport::CallbackInfo info, QVariant& data);
|
2024-09-04 17:31:16 +03:00
|
|
|
|
2016-02-17 10:11:00 +03:00
|
|
|
private:
|
2024-09-04 17:31:16 +03:00
|
|
|
void prepareData(QSqlQuery* ds, LimeReport::CallbackInfo info, QVariant& data);
|
|
|
|
|
2016-02-17 10:11:00 +03:00
|
|
|
private:
|
2024-09-04 17:31:16 +03:00
|
|
|
Ui::MainWindow* ui;
|
|
|
|
LimeReport::ReportEngine* report;
|
2016-02-17 10:11:00 +03:00
|
|
|
QProgressDialog* m_progressDialog;
|
|
|
|
int m_currentPage;
|
|
|
|
QSqlDatabase m_db;
|
|
|
|
int m_currentMasterRecord;
|
|
|
|
QVector<QString> m_childData;
|
|
|
|
|
|
|
|
int m_currentCustomerRecord;
|
|
|
|
int m_currentOrderRecord;
|
|
|
|
QSqlQuery* m_customers;
|
|
|
|
QSqlQuery* m_orders;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MAINWINDOW_H
|