git-svn-id: svn://10.65.10.50/branches/R_10_00@22705 c028cbd2-c16b-5b4b-a496-9718f37d4682
		
			
				
	
	
		
			91 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			91 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
| #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;
 | |
| } |