Patch level : 10.0 272
Files correlati : ca3.exe ca3700.msk Ricompilazione Demo : [ ] Commento : Aggiunto supporto per anteprima di stampa git-svn-id: svn://10.65.10.50/trunk@18610 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
c5797bd448
commit
07ec330067
@ -1,4 +1,5 @@
|
|||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
|
#include <defmask.h>
|
||||||
#include <execp.h>
|
#include <execp.h>
|
||||||
#include <progind.h>
|
#include <progind.h>
|
||||||
#include <reprint.h>
|
#include <reprint.h>
|
||||||
@ -23,12 +24,16 @@
|
|||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
class TPrint_rendiconto_ca_mask : public TAnal_report_mask
|
class TPrint_rendiconto_ca_mask : public TAnal_report_mask
|
||||||
{
|
{
|
||||||
|
char _print_mode;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||||
const TString& get_report_class() const;
|
const TString& get_report_class() const;
|
||||||
bool test_compatible_report();
|
bool test_compatible_report();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
char print_mode() const { return _print_mode; }
|
||||||
|
|
||||||
TPrint_rendiconto_ca_mask();
|
TPrint_rendiconto_ca_mask();
|
||||||
virtual ~TPrint_rendiconto_ca_mask() {}
|
virtual ~TPrint_rendiconto_ca_mask() {}
|
||||||
};
|
};
|
||||||
@ -115,6 +120,8 @@ bool TPrint_rendiconto_ca_mask::on_field_event(TOperable_field& o, TField_event
|
|||||||
if (!test_compatible_report())
|
if (!test_compatible_report())
|
||||||
return error_box(TR("Impossibile trovare un report compatibile"));
|
return error_box(TR("Impossibile trovare un report compatibile"));
|
||||||
}
|
}
|
||||||
|
if (e == fe_init)
|
||||||
|
_print_mode = 'S';
|
||||||
break;
|
break;
|
||||||
case F_PRE1:
|
case F_PRE1:
|
||||||
case F_PRE2:
|
case F_PRE2:
|
||||||
@ -131,6 +138,14 @@ bool TPrint_rendiconto_ca_mask::on_field_event(TOperable_field& o, TField_event
|
|||||||
disable(F_PANDES1_FIN + k);
|
disable(F_PANDES1_FIN + k);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case DLG_PREVIEW:
|
||||||
|
if (e == fe_button)
|
||||||
|
{
|
||||||
|
_print_mode = 'A';
|
||||||
|
stop_run(K_ENTER);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1549,11 +1564,24 @@ void TPrint_rendiconto_ca_rep::set_filter(const TPrint_rendiconto_ca_mask& msk,
|
|||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
class TPrint_rendiconto_ca : public TSkeleton_application
|
class TPrint_rendiconto_ca : public TSkeleton_application
|
||||||
{
|
{
|
||||||
|
TPrint_rendiconto_ca_mask* _msk;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void print_or_preview(bool pr);
|
||||||
|
virtual void print() { print_or_preview(true); }
|
||||||
|
virtual void preview() { print_or_preview(false); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const TMultilevel_code_info& get_first_level() const;
|
const TMultilevel_code_info& get_first_level() const;
|
||||||
virtual void main_loop();
|
virtual void main_loop();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void TPrint_rendiconto_ca::print_or_preview(bool pr)
|
||||||
|
{
|
||||||
|
if (_msk != NULL)
|
||||||
|
_msk->send_key(K_SPACE, pr ? DLG_PRINT : DLG_PREVIEW);
|
||||||
|
}
|
||||||
|
|
||||||
//metodo per accattarsi o' primo livello della configurazione CA
|
//metodo per accattarsi o' primo livello della configurazione CA
|
||||||
const TMultilevel_code_info& TPrint_rendiconto_ca::get_first_level() const
|
const TMultilevel_code_info& TPrint_rendiconto_ca::get_first_level() const
|
||||||
{
|
{
|
||||||
@ -1563,10 +1591,11 @@ const TMultilevel_code_info& TPrint_rendiconto_ca::get_first_level() const
|
|||||||
return ca_multilevel_code_info(logic);
|
return ca_multilevel_code_info(logic);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TPrint_rendiconto_ca::main_loop()
|
void TPrint_rendiconto_ca::main_loop()
|
||||||
{
|
{
|
||||||
TPrint_rendiconto_ca_mask mask;
|
_msk = new TPrint_rendiconto_ca_mask;
|
||||||
|
TPrint_rendiconto_ca_mask& mask = *_msk;
|
||||||
|
|
||||||
while (mask.run() == K_ENTER)
|
while (mask.run() == K_ENTER)
|
||||||
{
|
{
|
||||||
//report e book dei report
|
//report e book dei report
|
||||||
@ -1616,8 +1645,14 @@ void TPrint_rendiconto_ca::main_loop()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
book.print_or_preview(); //stampa il book dei report
|
if (mask.print_mode() == 'A')
|
||||||
|
book.preview();
|
||||||
|
else
|
||||||
|
book.print(); //stampa il book dei report
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete _msk;
|
||||||
|
_msk = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ca3700(int argc, char* argv[])
|
int ca3700(int argc, char* argv[])
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include "camask.h"
|
#include "camask.h"
|
||||||
|
|
||||||
TOOLBAR "topbar" 0 0 0 2
|
TOOLBAR "topbar" 0 0 0 2
|
||||||
#include <printbar.h>
|
#include <aprintbar.h>
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
TOOLBAR "bottombar" 0 -2 0 1
|
TOOLBAR "bottombar" 0 -2 0 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user