App-financeta
view release on metacpan or search on metacpan
lib/App/financeta/gui/editor.pm view on Meta::CPAN
175176177178179180181182183184185186187188189190191192193194195
}
else
{
push
@arr
,
$regexes
->{
$k
};
}
push
@arr
,
$color_scheme
{
$k
} //
$color_scheme
{plain},
}
my
$hlres
=
$ed
->hiliteREs;
$ed
->hiliteREs([
@arr
,
@$hlres
]);
return
$mw
;
}
sub
update_editor {
my
(
$self
,
$rules
,
$tabname
,
$vars
,
$hidden
) =
@_
;
$self
->tab_name(
$tabname
)
if
defined
$tabname
;
$self
->compiler->preset_vars(
$vars
)
if
defined
$vars
;
$self
->main->editor_edit->text(
$rules
);
unless
(
$hidden
) {
$self
->main->show;
$self
->main->bring_to_front;
}
1;
}
lib/App/financeta/gui/progress_bar.pm view on Meta::CPAN
515253545556575859606162636465666768697071
);
$bar
->{-progress} = 0;
$bar
->repaint;
if
(
defined
$bar
->owner) {
$bar
->owner->pointerType(cr::Wait);
$bar
->owner->repaint;
}
return
$bar
;
}
sub
update {
my
(
$self
,
$val
) =
@_
;
## is percentage
if
(
defined
$val
and (
$val
> 0 and
$val
< 1)) {
$self
->bar->{-progress} = (
$val
*
$self
->bar_width);
}
elsif
(
defined
$val
) {
#is absolute
$self
->bar->{-progress} =
$val
;
}
else
{
$self
->bar->{-progress} += 5;
}
$self
->bar->repaint;
lib/App/financeta/gui/tradereport.pm view on Meta::CPAN
144145146147148149150151152153154155156157158159160161162163164
$p
->{items} = [
sort
{
$$b
[
$col
] <=>
$$a
[
$col
]}
@{
$self
->{items}}
];
}
$p
->clear_event;
},
);
}
sub
update {
my
(
$self
,
$tabname
,
$buysells
) =
@_
;
$self
->tab_name(
$tabname
)
if
defined
$tabname
;
return
unless
defined
$buysells
;
my
$longs
=
$buysells
->{longs};
my
$shorts
=
$buysells
->{shorts};
my
$qty
=
$buysells
->{quantity};
my
@items
= ();
my
$tz
=
$self
->parent->timezone;
my
$grosspnl
=
$buysells
->{longs_pnl} +
$buysells
->{shorts_pnl};
if
(
defined
$longs
and not
$longs
->isnull and not
$longs
->isempty) {
( run in 0.378 second using v1.01-cache-2.11-cpan-00829025b61 )