Patch level : 2.2
Files correlati : ve0, ba8 Ricompilazione Demo : [ ] Commento : Aggiunta possibilita' di filtraggio anche sui campi zoom Eseguiti i post-scripts delle sezioni nascoste git-svn-id: svn://10.65.10.50/trunk@13423 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
19b5789a5b
commit
d07f26d517
@ -101,11 +101,11 @@ public:
|
|||||||
|
|
||||||
virtual void destroy();
|
virtual void destroy();
|
||||||
|
|
||||||
virtual bool read_only() const;
|
|
||||||
virtual void set_read_only(bool on = TRUE);
|
|
||||||
|
|
||||||
virtual void set_rjust(bool on = TRUE);
|
virtual void set_rjust(bool on = TRUE);
|
||||||
void set_ljust() { set_rjust(FALSE); }
|
void set_ljust() { set_rjust(FALSE); }
|
||||||
|
|
||||||
|
virtual bool read_only() const;
|
||||||
|
virtual void set_read_only(bool on = TRUE);
|
||||||
|
|
||||||
void autoselect(bool on);
|
void autoselect(bool on);
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ class TPage_field : public TRadio_field
|
|||||||
protected:
|
protected:
|
||||||
virtual void current(int) { } // Evita il reset
|
virtual void current(int) { } // Evita il reset
|
||||||
virtual int current() const { return _def; }
|
virtual int current() const { return _def; }
|
||||||
|
virtual bool is_loadable() const { return false; }
|
||||||
virtual bool is_editable() const { return false; }
|
virtual bool is_editable() const { return false; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -209,7 +210,7 @@ void TMask::read_mask(
|
|||||||
for (int j = 0; j < items; j++) if (read_only[j])
|
for (int j = 0; j < items; j++) if (read_only[j])
|
||||||
{
|
{
|
||||||
TMask_field& f = fld(j);
|
TMask_field& f = fld(j);
|
||||||
if (f.is_editable() || f.is_sheet())
|
if (f.is_loadable())
|
||||||
f.set_read_only(true);
|
f.set_read_only(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2283,7 +2284,7 @@ TTimed_box::TTimed_box(const char * header,const char * message,int seconds,shor
|
|||||||
set(FIRST_FIELD, message);
|
set(FIRST_FIELD, message);
|
||||||
|
|
||||||
// setta il timer per l'evento
|
// setta il timer per l'evento
|
||||||
_timer_delay=seconds *1000+1;
|
_timer_delay=seconds * 1000 + 1;
|
||||||
_timer_id=XVT_TIMER_ERROR;
|
_timer_id=XVT_TIMER_ERROR;
|
||||||
_button_id=button_id;
|
_button_id=button_id;
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,9 @@ class TSpreadsheet : public TControl
|
|||||||
protected:
|
protected:
|
||||||
//@cmember Gestisce gli eventi delle celle (chiamata dal <mf TSpreadsheet::xiev_handler>)
|
//@cmember Gestisce gli eventi delle celle (chiamata dal <mf TSpreadsheet::xiev_handler>)
|
||||||
virtual bool event_handler(XI_OBJ* itf, XI_EVENT* xiev);
|
virtual bool event_handler(XI_OBJ* itf, XI_EVENT* xiev);
|
||||||
virtual void set_read_only(bool ro);
|
|
||||||
|
virtual void set_read_only(bool ro) { activate(!ro); }
|
||||||
|
virtual bool read_only() const { return !_active; }
|
||||||
|
|
||||||
KEY barcode_newline() const;
|
KEY barcode_newline() const;
|
||||||
|
|
||||||
@ -2431,11 +2433,6 @@ KEY TSpreadsheet::edit(int n)
|
|||||||
return k;
|
return k;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TSpreadsheet::set_read_only(bool on)
|
|
||||||
{
|
|
||||||
activate(!on);
|
|
||||||
}
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TSheet_field
|
// TSheet_field
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
@ -67,7 +67,7 @@ int TTable_names::logic_num(const TString& n)
|
|||||||
if (isdigit(name[0]))
|
if (isdigit(name[0]))
|
||||||
{
|
{
|
||||||
int num = atoi(name);
|
int num = atoi(name);
|
||||||
if (name[name.len()-1] == '@')
|
if (name.ends_with("@"))
|
||||||
num = -num;
|
num = -num;
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
@ -1158,7 +1158,7 @@ const TString& TReport_field::prescript() const
|
|||||||
|
|
||||||
void TReport_field::set_prescript(const char* src)
|
void TReport_field::set_prescript(const char* src)
|
||||||
{
|
{
|
||||||
TString desc; desc << section().type() << section().level() << '.' << id() << " PRESCRIPT";
|
TString80 desc; desc.format("%c%d.%d PRESCRIPT", section().type(), section().level(), id());
|
||||||
_prescript.set_description(desc);
|
_prescript.set_description(desc);
|
||||||
_prescript.set(src);
|
_prescript.set(src);
|
||||||
}
|
}
|
||||||
@ -1168,7 +1168,7 @@ const TString& TReport_field::postscript() const
|
|||||||
|
|
||||||
void TReport_field::set_postscript(const char* src)
|
void TReport_field::set_postscript(const char* src)
|
||||||
{
|
{
|
||||||
TString desc; desc << section().type() << section().level() << '.' << id() << " POSTSCRIPT";
|
TString80 desc; desc.format("%c%d.%d POSTSCRIPT", section().type(), section().level(), id());
|
||||||
_postscript.set_description(desc);
|
_postscript.set_description(desc);
|
||||||
_postscript.set(src);
|
_postscript.set(src);
|
||||||
}
|
}
|
||||||
@ -1255,25 +1255,7 @@ bool TReport_field::load_field()
|
|||||||
const TFieldtypes ft = var_type();
|
const TFieldtypes ft = var_type();
|
||||||
if (ft != _nullfld)
|
if (ft != _nullfld)
|
||||||
{
|
{
|
||||||
if (_field.starts_with("SELECT "))
|
section().report().evaluate(_field, _var, ft);
|
||||||
{
|
|
||||||
TSQL_recordset qry(_field);
|
|
||||||
TString str;
|
|
||||||
for (int i = 0; i < qry.items(); i++)
|
|
||||||
{
|
|
||||||
if (i > 0) str << '\n';
|
|
||||||
for (unsigned int j = 0; j < qry.columns(); j++)
|
|
||||||
{
|
|
||||||
if (j > 0) str << ' ';
|
|
||||||
str << qry.get(j).as_string();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_var.set(str);
|
|
||||||
_var.convert_to(ft);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
section().report().evaluate(_field, _var, ft);
|
|
||||||
|
|
||||||
if (_var.is_empty() && _alt_field.not_empty())
|
if (_var.is_empty() && _alt_field.not_empty())
|
||||||
section().report().evaluate(_alt_field, _var, ft);
|
section().report().evaluate(_alt_field, _var, ft);
|
||||||
}
|
}
|
||||||
|
@ -1788,7 +1788,11 @@ long TReport_book::print_section(TReport_section& rs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rs.hidden())
|
if (rs.hidden())
|
||||||
|
{
|
||||||
|
if (!rs.execute_postscript()) // Faccio ugualmente i post-script
|
||||||
|
_print_aborted = true;
|
||||||
return -3;
|
return -3;
|
||||||
|
}
|
||||||
|
|
||||||
const long height = rs.compute_size().y; // Compute size after the initilization script!
|
const long height = rs.compute_size().y; // Compute size after the initilization script!
|
||||||
|
|
||||||
|
@ -1724,7 +1724,11 @@ TBrowse_sheet::TBrowse_sheet(TCursor* cursor, const char* fields,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CLASS_ZOOM_FIELD:
|
case CLASS_ZOOM_FIELD:
|
||||||
e = &add_string(c.dlg(), 0, p, 1, y++, 32000, flags, 50);
|
{
|
||||||
|
e = &add_string(c.dlg(), 0, p, 1, y++, 32000, flags, 50);
|
||||||
|
// Aggiunge campo con le icone di filtraggio
|
||||||
|
add_checkbutton(c.dlg()+1000, 0, "", 68, y-1, 2, 1, "", 10112, 10113).set_handler(filter_handler);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case CLASS_REAL_FIELD:
|
case CLASS_REAL_FIELD:
|
||||||
e = &add_number(c.dlg(), 0, p, 1, y++, csize, flags);
|
e = &add_number(c.dlg(), 0, p, 1, y++, csize, flags);
|
||||||
|
@ -2060,7 +2060,7 @@ TToken_string& get_tmp_string(int len)
|
|||||||
TToken_string* str = (TToken_string*)ararar.objptr(next);
|
TToken_string* str = (TToken_string*)ararar.objptr(next);
|
||||||
if (str == NULL)
|
if (str == NULL)
|
||||||
{
|
{
|
||||||
str = new TToken_string(len);
|
str = new TToken_string(max(len,50));
|
||||||
ararar.add(str, next);
|
ararar.add(str, next);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user