78 lines
2.9 KiB
C++
78 lines
2.9 KiB
C++
#ifndef __REPAPP_H
|
|
#define __REPAPP_H
|
|
|
|
#ifndef __APPLICAT_H
|
|
#include <applicat.h>
|
|
#endif
|
|
|
|
#ifndef __CONFIG_H
|
|
#include <config.h>
|
|
#endif
|
|
|
|
#ifndef __REPRINT_H
|
|
#include <reprint.h>
|
|
#endif
|
|
|
|
#ifndef __AUTOMASK_H
|
|
#include <automask.h>
|
|
#endif
|
|
|
|
// @doc EXTERNAL
|
|
|
|
// @class TReport_application | Classe per la gestione di una applicazione di stampa con report
|
|
//
|
|
// @base public | TApplication
|
|
class TReport_application : public TSkeleton_application
|
|
|
|
// @access:(INTERNAL) Private Member
|
|
{
|
|
private:
|
|
virtual bool create();
|
|
virtual bool destroy();
|
|
|
|
// @access Protected Member
|
|
protected: // TApplication
|
|
virtual bool firm_change_enabled() const { return true; }
|
|
// @cmember Aggiorna i limiti di ricerca sul cambio ditta
|
|
virtual void on_firm_change() { return TApplication::on_firm_change(); }
|
|
// @cmember Alloca e ritorna il report una volta usato va distrutto;
|
|
virtual TTrec * get_dbase_recdesc(TReport & rep, const TAutomask & mask);
|
|
// @cmember Ciclo principale
|
|
virtual void main_loop();
|
|
// @cmember Inizializzazione dei dati dell'utente
|
|
virtual bool user_create() { return true; }
|
|
// @cmember Distruzione dei dati dell'utente
|
|
virtual bool user_destroy() { return true; }
|
|
// @cmember ritorna la maschera
|
|
virtual TAutomask & get_mask() pure;
|
|
|
|
// @cmember Ritorna il report
|
|
virtual TReport & get_report(const TAutomask & m) pure;
|
|
|
|
void ini2mask(TConfig& ini, TMask& m, bool query);
|
|
void mask2ini(const TMask& m, TConfig& ini);
|
|
virtual void execute_print(TReport_book & book, TAutomask & mask, TReport & rep, export_type type = _export_printer);
|
|
|
|
public:
|
|
virtual short output_id() const { return DLG_OUTPUT; }
|
|
virtual short report_id() const { return DLG_REPORT; }
|
|
const char * report_name(const TAutomask & mask) const { return mask.get(report_id()); }
|
|
virtual void print(TReport_book & book, TAutomask & mask, TReport & rep) { book.print_or_preview(); }
|
|
virtual void esporta(TReport_book & book, TAutomask & mask, TReport & rep) { book.esporta();}
|
|
virtual void export_excel(TFilename & name, TReport_book & book, TAutomask & mask, TReport & rep) { book.export_excel(name, false, true); }
|
|
virtual void export_pdf(TFilename & name, TReport_book & book, TAutomask & mask, TReport & rep) { book.export_pdf(name, false, true); }
|
|
virtual void export_text(TFilename & name, TReport_book & book, TAutomask & mask, TReport & rep) { book.export_text(name, 0, false, true); }
|
|
virtual void export_dbase(TFilename & name, TReport_book & book, TAutomask & mask, TReport & rep) { book.export_dbase(name, get_dbase_recdesc(rep, mask), false, true); }
|
|
virtual void preview(TReport_book & book, TAutomask & mask, TReport & rep) { book.preview(); }
|
|
virtual const char * output_name(const TAutomask & mask, const TReport & rep) const { return report_name(mask); }
|
|
const char * get_output_filename(const TAutomask & mask, const TReport & rep);
|
|
// @cmember Costruttore
|
|
TReport_application() { }
|
|
// @cmember Distruttore
|
|
virtual ~TReport_application() { }
|
|
};
|
|
|
|
#endif
|
|
|
|
|