campo-sirio/ha/ha3700.cpp

91 lines
1.6 KiB
C++
Raw Normal View History

#include <applicat.h>
#include <automask.h>
#include <report.h>
#include "../ba/ba8500.h"
#include "ha3700a.h"
///////////////////////////////////////////////////////////
// Report
///////////////////////////////////////////////////////////
class TPrint_storico_report : public TReport
{
protected:
virtual bool use_mask() { return false; }
public:
TPrint_storico_report();
};
TPrint_storico_report::TPrint_storico_report()
{
load("ha3700a");
}
///////////////////////////////////////////////////////////
// Maschera
///////////////////////////////////////////////////////////
class TPrint_storico_mask : public TAutomask
{
protected:
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
public:
void elabora();
TPrint_storico_mask();
virtual ~TPrint_storico_mask() {}
};
void TPrint_storico_mask::elabora()
{
TPrint_storico_report rep;
rep.mask2report(*this);
rep.print_or_preview();
}
bool TPrint_storico_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
{
return true;
}
TPrint_storico_mask::TPrint_storico_mask() : TAutomask("ha3700a")
{
}
///////////////////////////////////////////////////////////
// Applicazione
///////////////////////////////////////////////////////////
class TPrint_storico : public TKlarkKent_app
{
protected:
public:
virtual void main_loop();
};
void TPrint_storico::main_loop()
{
TPrint_storico_mask mask;
while (mask.run() == K_ENTER)
{
mask.elabora();
}
}
int ha3700(int argc, char* argv[])
{
TPrint_storico app;
app.run(argc, argv, TR("Stampa storico attrezzature"));
return 0;
}