function __construct($Parent, $operacao = 'i', $CodTrans, $CodId = null) { parent::__construct($operacao == 'i' ? latin1('Novo endereço') : latin1('Alterar endereço'), null, null, 'enderecos.png'); $this->Parent = $Parent; $this->operacao = $operacao; $this->CodTrans = $CodTrans; $this->CodId = $CodId; // Id e Tipo $this->pack_start($hbox = new GtkHBox()); if ($operacao == 'a') { $hbox->pack_start($id = new GtkLabel(), false); $id->set_markup(' Id.: <b>' . $this->CodId . '</b>'); } $hbox->pack_start($this->tipo = new TTipoEndereco($this)); // endereco $this->pack_start($frame = new GtkFrame()); $frame->add($vbox = new GtkVBox()); $vbox->set_border_width(5); $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start(new GtkLabel('Endereco: '), false); $hbox->pack_start($this->endereco = new AEntry(true)); // cep $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start(new GtkLabel('CEP: '), false); $hbox->pack_start($this->cep = new AEntry(true)); // bairro $hbox->pack_start(new GtkLabel('Bairro: '), false); $hbox->pack_start($this->bairro = new AEntry(true)); // cidade $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start(new GtkLabel('Cidade: '), false); $hbox->pack_start($this->cidade = new AEntry(true)); // estado $hbox->pack_start($this->estado = new TEstados($this)); // contato $this->pack_start($frame = new GtkFrame()); $frame->add($vbox = new GtkVBox()); $vbox->set_border_width(5); $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start(new GtkLabel('Contato: '), false); $hbox->pack_start($this->contato = new AEntry()); // fone $hbox->pack_start(new GtkLabel('Fone: '), false); $hbox->pack_start($this->fone = new AEntry()); // referencia $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start(new GtkLabel(latin1('Referência: ')), false); $hbox->pack_start($this->referencia = new AEntry()); // ok e cancelar $this->pack_start($hbbox = new GtkHButtonBox(), false); $hbbox->set_layout(Gtk::BUTTONBOX_END); $hbbox->pack_start($this->ok = GtkButton::new_from_stock('gtk-ok'), false); $this->ok->connect('clicked', array($this, 'ok_clicked')); $hbbox->pack_start($this->cancelar = GtkButton::new_from_stock('gtk-cancel'), false); $this->cancelar->connect('clicked', array($this, 'cancelar_clicked')); $this->cancelar->add_accelerator('clicked', $this->accel_group, Gdk::KEY_Escape, 0, 0); $this->referencia->set_next_focus($this->ok); $this->children_show_all(); $this->endereco->set_focus(); }
function __construct($Parent, $CodId) { parent::__construct('Estornar Conta a Receber', 400, -1, 'contas_receber.png'); $this->Parent = $Parent; $this->CodId = $CodId; // Id. $this->pack_start($hbox = new GtkHBox()); $hbox->pack_start(GtkImage::new_from_stock(Gtk::STOCK_CANCEL, Gtk::ICON_SIZE_DIALOG), false); $hbox->pack_start($label = new GtkLabel(), false); $label->set_markup(' Cod. Id.: <b>' . $CodId . '</b>'); // anotacoes $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(latin1(' Anotações: ')), false); $hbox->pack_start($this->anotacoes = new AEntry(true)); // ok $this->pack_start($hbbox = new GtkHButtonBox(), false); $hbbox->set_layout(Gtk::BUTTONBOX_END); $hbbox->pack_start($this->ok = GtkButton::new_from_stock('gtk-ok'), false); $this->anotacoes->focus_widget = $this->ok; $this->ok->connect('clicked', array($this, 'ok_clicked')); // cancelar $hbbox->pack_start($this->cancelar = GtkButton::new_from_stock('gtk-cancel'), false); $this->cancelar->connect('clicked', array($this, 'cancelar_clicked')); $this->cancelar->add_accelerator('clicked', $this->accel_group, Gdk::KEY_Escape, 0, 0); $this->children_show_all(); $this->anotacoes->grab_focus(); }
function __construct($Parent, $operacao = 'i', $CodUnidade = null) { parent::__construct($operacao == 'i' ? 'Unidade de Estoque - Incluir' : 'Unidade de Estoque - Alterar', null, null, 'unid_estoques.png'); $this->Parent = $Parent; $this->operacao = $operacao; $this->CodUnidade = $CodUnidade; $GLOBALS['XMONEY_FIELD'] = 'Cod_S_Unidade'; $GLOBALS['XMONEY_FIELD_ID'] = $CodUnidade ? $CodUnidade : -1; // Id $this->pack_start($hbox = new GtkHBox()); if ($operacao == 'a') { $hbox->pack_start($id = new GtkLabel(), false); $id->set_markup(' Id.: <b>' . $CodUnidade . '</b>'); } // nome $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(' Nome: '), false); $hbox->pack_start($this->nome = new AEntry(true, true, 'Tb_Unid_Estoques', 'Nome')); // ok $this->pack_start($hbbox = new GtkHButtonBox(), false); $hbbox->set_layout(Gtk::BUTTONBOX_END); $hbbox->pack_start($this->ok = GtkButton::new_from_stock('gtk-ok'), false); $this->ok->connect('clicked', array($this, 'ok_clicked')); // cancelar $hbbox->pack_start($this->cancelar = GtkButton::new_from_stock('gtk-cancel'), false); $this->cancelar->connect('clicked', array($this, 'cancelar_clicked')); $this->cancelar->add_accelerator('clicked', $this->accel_group, Gdk::KEY_Escape, 0, 0); // extra $this->children_show_all(); $this->nome->set_next_focus($this->ok); $this->nome->set_focus(); }
function __construct($Parent, $operacao = 'i', $CodForma = null) { parent::__construct($operacao == 'i' ? 'Formas de Pagamento - Incluir' : 'Formas de Pagamento - Alterar', null, null, 'formas_pgto.png'); $this->Parent = $Parent; $this->operacao = $operacao; $this->CodForma = $CodForma; $GLOBALS['XMONEY_FIELD'] = 'Cod_S_Forma'; $GLOBALS['XMONEY_FIELD_ID'] = $CodForma ? $CodForma : -1; // Id $this->pack_start($hbox = new GtkHBox()); if ($operacao == 'a') { $hbox->pack_start($id = new GtkLabel(), false); $id->set_markup(' Id.: <b>' . $CodForma . '</b>'); } // tipo doc. $hbox->pack_start($this->tipo = new TTipoDoc($this)); // nome $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(' Nome: '), false); $hbox->pack_start($this->nome = new AEntry(true, true, 'Tb_Formas_Pgto', 'Nome')); // ok $this->pack_start($hbbox = new GtkHButtonBox(), false); $hbbox->set_layout(Gtk::BUTTONBOX_END); $hbbox->pack_start($this->ok = GtkButton::new_from_stock('gtk-ok'), false); $this->ok->connect('clicked', array($this, 'ok_clicked')); // cancelar $hbbox->pack_start($this->cancelar = GtkButton::new_from_stock('gtk-cancel'), false); $this->cancelar->connect('clicked', array($this, 'cancelar_clicked')); $this->cancelar->add_accelerator('clicked', $this->accel_group, Gdk::KEY_Escape, 0, 0); $this->children_show_all(); $this->nome->set_next_focus($this->ok); $this->nome->set_focus(); }
function __construct($Parent, $operacao = 'i', $CodPerfil = null) { parent::__construct($operacao == 'i' ? 'Perfis - Incluir' : 'Perfis - Alterar', 800, 600, 'perfis.png'); $this->Parent = $Parent; $this->operacao = $operacao; $this->CodPerfil = $CodPerfil; $GLOBALS['XMONEY_FIELD'] = 'Cod_S_Perfil'; $GLOBALS['XMONEY_FIELD_ID'] = $CodPerfil ? $CodPerfil : -1; // Id $this->pack_start($hbox = new GtkHBox(), false); if ($operacao == 'a') { $hbox->pack_start($id = new GtkLabel(), false); $id->set_markup(' Id.: <b>' . $CodPerfil . '</b>'); } // nome $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(' Nome: '), false); $hbox->pack_start($this->nome = new AEntry(true, true, 'Tb_Perfis', 'Nome')); // descricao $hbox->pack_start(new GtkLabel(latin1(' Descrição: ')), false); $hbox->pack_start($this->descricao = new AEntry(true, true, 'Tb_Perfis', 'Descricao')); // Expandir e Sel. Todos $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start($this->expandir = new GtkCheckButton('Expandir'), false); $this->expandir->connect('toggled', array($this, 'expandir_toggled')); $hbox->pack_start($check = new GtkCheckButton('Sel. Todos'), false); $check->connect('toggled', array($this, 'sel_todos_toggled')); // progresso $hbox->pack_start($this->progresso = new GtkProgressBar()); // Permissoes $this->pack_start($frame = new GtkFrame(latin1(' Permissões '))); $frame->set_border_width(5); $frame->add($scroll_wnd = new GtkScrolledWindow()); $scroll_wnd->set_border_width(5); $scroll_wnd->set_policy(GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); $scroll_wnd->add_with_viewport($this->lista = new GtkVBox()); // ok $this->pack_start($hbbox = new GtkHButtonBox(), false); $hbbox->set_layout(Gtk::BUTTONBOX_END); $hbbox->pack_start($this->ok = GtkButton::new_from_stock('gtk-ok'), false); $this->ok->connect('clicked', array($this, 'ok_clicked')); // cancelar $hbbox->pack_start($this->cancelar = GtkButton::new_from_stock('gtk-cancel'), false); $this->cancelar->connect('clicked', array($this, 'cancelar_clicked')); $this->cancelar->add_accelerator('clicked', $this->accel_group, Gdk::KEY_Escape, 0, 0); $this->children_show_all(); $this->nome->set_focus(); }
function __construct($Parent, $CodConta) { parent::__construct(latin1('Movimentação da Conta'), 600, 300, 'contas_receber.png'); $this->Parent = $Parent; $this->CodConta = $CodConta; // CodConta, TipoDoc e NumDoc $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start($this->cod_conta = new GtkLabel()); $hbox->pack_start($this->tipo_doc = new GtkLabel()); $hbox->pack_start($this->num_doc = new GtkLabel()); $this->pack_start($vbox = new GtkVBox()); $vbox->pack_start($this->grid = new TGridInfoMovContaReceber($this)); $vbox->pack_start($this->fechar = GtkButton::new_from_stock('gtk-close'), false); $this->fechar->add_accelerator('clicked', $this->accel_group, Gdk::KEY_Escape, 0, 0); $this->fechar->connect('clicked', array($this, 'fechar_clicked')); $this->children_show_all(); }
function __construct($Parent, $operacao = 'i', $CodConta = null) { parent::__construct($operacao == 'i' ? 'Contas a Pagar - Incluir' : 'Contas a Pagar - Alterar', null, null, 'contas_pagar.png'); $this->Parent = $Parent; $this->operacao = $operacao; $this->CodConta = $CodConta; // tipo doc. $this->pack_start($this->tipo_doc = new TTipoDoc($this)); // filial $this->pack_start($this->filial = new TFiliais($this)); // Fornecedor $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start($this->fornecedores = new TFornecedores($this)); // num doc $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start($this->num_doc = new AEntry(true)); $this->num_doc->label->set_text(' Num. Doc.: '); // parcela $hbox->pack_start($this->parcela = new IEntry(true)); $this->parcela->label->set_text(' Parcela: '); // vencimento $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start($this->vencimento = new TData(true)); $this->vencimento->label->set_text(' Vencimento: '); // valor $hbox->pack_start($this->valor = new TFloat(true)); $this->valor->label->set_text(' Valor: '); // anotacoes $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start($this->anotacoes = new AEntry()); $this->anotacoes->label->set_text(latin1(' Anotações ')); // ok $this->pack_start($hbbox = new GtkHButtonBox(), false); $hbbox->set_layout(Gtk::BUTTONBOX_END); $hbbox->pack_start($this->ok = GtkButton::new_from_stock('gtk-ok'), false); $this->anotacoes->focus_widget = $this->ok; $this->ok->connect('clicked', array($this, 'ok_clicked')); // cancelar $hbbox->pack_start($this->cancelar = GtkButton::new_from_stock('gtk-cancel'), false); $this->cancelar->connect('clicked', array($this, 'cancelar_clicked')); $this->cancelar->add_accelerator('clicked', $this->accel_group, Gdk::KEY_Escape, 0, 0); // extra $this->children_show_all(); $this->anotacoes->set_next_focus($this->ok); $this->fornecedores->entry->grab_focus(); }
function __construct($Parent, $operacao = 'i', $CodBanco = null) { parent::__construct($operacao == 'i' ? 'Bancos - Incluir' : 'Bancos - Alterar', null, null, 'bancos.png'); $this->Parent = $Parent; $this->operacao = $operacao; $this->CodBanco = $CodBanco; $GLOBALS['XMONEY_FIELD'] = 'Cod_S_Banco'; $GLOBALS['XMONEY_FIELD_ID'] = $CodBanco ? $CodBanco : -1; // Id $this->pack_start($hbox = new GtkHBox()); if ($operacao == 'a') { $hbox->pack_start($id = new GtkLabel(), false); $id->set_markup(' Id.: <b>' . $CodBanco . '</b>'); } // Filial $hbox->pack_start($this->filial = new TFiliais($this)); // nome $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(' Nome: '), false); $hbox->pack_start($this->nome = new AEntry(true, true, 'Tb_Bancos', 'Nome')); // agencia $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(' Agencia: '), false); $hbox->pack_start($this->agencia = new AEntry(true, true, 'Tb_Bancos', 'Agencia')); // conta $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(' Conta: '), false); $hbox->pack_start($this->conta = new AEntry(true, true, 'Tb_Bancos', 'Conta')); // ok $this->pack_start($hbbox = new GtkHButtonBox(), false); $hbbox->set_layout(Gtk::BUTTONBOX_END); $hbbox->pack_start($this->ok = GtkButton::new_from_stock('gtk-ok'), false); $this->conta->focus_widget = $this->ok; $this->ok->connect('clicked', array($this, 'ok_clicked')); // cancelar $hbbox->pack_start($this->cancelar = GtkButton::new_from_stock('gtk-cancel'), false); $this->cancelar->connect('clicked', array($this, 'cancelar_clicked')); $this->cancelar->add_accelerator('clicked', $this->accel_group, Gdk::KEY_Escape, 0, 0); $this->conta->set_next_focus($this->ok); $this->children_show_all(); $this->nome->set_focus(); }
function __construct() { parent::__construct(XMONEY_TITULO . ' - ' . XMONEY_DESCRICAO . ' - ' . XMONEY_DESC_VERSAO, 800, 600, 'logo.png'); $this->connect('delete_event', array($this, delete_event)); // Painel $this->pack_start($hpaned = new GtkHPaned()); $hpaned->pack1($this->painel = new TPainel($this), false, true); // Notebook $hpaned->pack2($this->notebook = new TNotebook($this), true, true); // status $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start($filial = new GtkLabel()); $filial->set_markup('<b> Filial: </b>' . $GLOBALS['Filial']); $hbox->pack_start($usuario = new GtkLabel()); $usuario->set_markup('<b>' . latin1(' Usuário: ') . '</b>' . $GLOBALS['Usuario']); $hbox->pack_start($nome = new GtkLabel()); $nome->set_markup('<b> Nome: </b>' . $GLOBALS['Nome']); $hbox->pack_start($this->data = new GtkLabel()); $this->children_show_all(); Gtk::timeout_add(1000, array($this, 'data_timeout')); define('XMONEY_JANELA_PRINCIPAL', $this); }
function __construct($Parent, $operacao = 'i', $CodSit = null) { parent::__construct($operacao == 'i' ? latin1('Situação de Produto - Incluir') : latin1('Situação de Produto - Alterar'), null, null, 'sit_produtos.png'); $this->Parent = $Parent; $this->operacao = $operacao; $this->CodSit = $CodSit; $GLOBALS['XMONEY_FIELD'] = 'Cod_S_Sit'; $GLOBALS['XMONEY_FIELD_ID'] = $CodSit ? $CodSit : -1; // Id $this->pack_start($hbox = new GtkHBox()); if ($operacao == 'a') { $hbox->pack_start($id = new GtkLabel(), false); $id->set_markup(' Id.: <b>' . $CodSit . '</b>'); } // nome $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(' Nome: '), false); $hbox->pack_start($this->nome = new AEntry(true, true, 'Tb_Sit_Produtos', 'Nome')); // abreviacao $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(latin1(' Abreviação: ')), false); $hbox->pack_start($this->abreviacao = new AEntry(true, true, 'Tb_Sit_Produtos', 'Abreviacao')); // ok $this->pack_start($hbbox = new GtkHButtonBox(), false); $hbbox->set_layout(Gtk::BUTTONBOX_END); $hbbox->pack_start($this->ok = GtkButton::new_from_stock('gtk-ok'), false); $this->ok->connect('clicked', array($this, 'ok_clicked')); // cancelar $hbbox->pack_start($this->cancelar = GtkButton::new_from_stock('gtk-cancel'), false); $this->cancelar->connect('clicked', array($this, 'cancelar_clicked')); $this->cancelar->add_accelerator('clicked', $this->accel_group, Gdk::KEY_Escape, 0, 0); // extra $this->children_show_all(); $this->abreviacao->set_next_focus($this->ok); $this->nome->set_focus(); }
function __construct($Parent, $operacao = 'i', $CodFor = null) { parent::__construct($operacao == 'i' ? 'Fornecedor - Incluir' : 'Fornecedor - Alterar', null, null, 'fornecedores.png'); $this->Parent = $Parent; $this->Owner = $Parent->Owner; $this->operacao = $operacao; $this->CodFor = $CodFor; $GLOBALS['XMONEY_FIELD'] = 'Cod_S_For'; $GLOBALS['XMONEY_FIELD_ID'] = $CodFor ? $CodFor : -1; // Id $this->pack_start($hbox = new GtkHBox()); if ($operacao == 'a') { $hbox->pack_start($id = new GtkLabel(), false); $id->set_markup(' Id.: <b>' . $CodFor . '</b>'); } // Pessoa Fisica/Juridica $hbox->pack_start($this->pessoa = new TTipoPessoa($this), false); $this->pessoa->combobox->connect('changed', array($this, 'tipo_pessoa_changed')); // nome / razao social $this->pack_start($frame = new GtkFrame()); $frame->add($vbox = new GtkVBox()); $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start($this->lbl_nome = new GtkLabel(' Nome: '), false); $hbox->pack_start($this->nome = new AEntry(true, true, 'Tb_Fornecedores', 'Nome')); // CPF / CNPJ $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start($this->lbl_cpf = new GtkLabel(' CPF: '), false); $hbox->pack_start($this->cpf = new AEntry(true, true, 'Tb_Fornecedores', 'CPF')); // Dados para Pessoa Juridica $vbox->pack_start($this->expander = new GtkExpander(' Juridico '), false); $this->expander->set_sensitive(false); $this->expander->add($vbox = new GtkVBox()); // fantasia $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start(new GtkLabel(' Fantasia: '), false); $hbox->pack_start($this->fantasia = new AEntry()); // I.E. $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start(new GtkLabel(' I.E.: '), false); $hbox->pack_start($this->ie = new AEntry()); // Suframa $hbox->pack_start(new GtkLabel(' Suframa: '), false); $hbox->pack_start($this->suframa = new IEntry()); /* Fones */ $this->pack_start($frame = new GtkFrame()); $frame->add($vbox = new GtkVBox()); $vbox->set_border_width(5); // fone 1 $vbox->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(' Fone: '), false); $hbox->pack_start($this->fone = new AEntry()); // fone 2 $hbox->pack_start(new GtkLabel(' Fone 2: '), false); $hbox->pack_start($this->fone2 = new AEntry()); // fax 1 $vbox->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(' Fax: '), false); $hbox->pack_start($this->fax = new AEntry()); // fax 2 $hbox->pack_start(new GtkLabel(' Fax 2: '), false); $hbox->pack_start($this->fax2 = new AEntry()); // email $vbox->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(' e-mail: '), false); $hbox->pack_start($this->email = new AEntry()); // site $hbox->pack_start(new GtkLabel(' Site: '), false); $hbox->pack_start($this->site = new AEntry()); // anotacoes $vbox->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(latin1(' Anotações: ')), false); $hbox->pack_start($this->anotacoes = new AEntry()); // limite compra $this->pack_start($frame = new GtkFrame()); $frame->add($vbox = new GtkVBox()); $vbox->pack_start($hbox = new GtkHBox()); $vbox->set_border_width(5); $hbox->pack_start($this->limite_compra = new TFloat(), false); $this->limite_compra->label->set_text(' Limite de Compra: '); // Ativo $hbox->pack_start($this->ativo = new GtkCheckButton(' Ativo ')); // ok + cancelar $this->pack_start($hbbox = new GtkHButtonBox(), false); $hbbox->set_layout(Gtk::BUTTONBOX_END); $hbbox->pack_start($this->ok = GtkButton::new_from_stock('gtk-apply'), false); $this->ok->connect('clicked', array($this, 'ok_clicked')); $hbbox->pack_start($this->cancelar = GtkButton::new_from_stock('gtk-cancel'), false); $this->cancelar->connect('clicked', array($this, 'cancelar_clicked')); $this->cancelar->add_accelerator('clicked', $this->accel_group, Gdk::KEY_Escape, 0, 0); // extra $this->limite_compra->set_next_focus($this->ok); $this->children_show_all(); $this->nome->set_focus(); }
function __construct($Parent, $operacao = 'i', $CodProduto = null) { parent::__construct($operacao == 'i' ? 'Produto - Incluir' : 'Produto - Alterar', null, null, 'produtos.png'); $this->Parent = $Parent; $this->operacao = $operacao; $this->CodProduto = $CodProduto; $GLOBALS['XMONEY_FIELD'] = 'Cod_S_Produto'; $GLOBALS['XMONEY_FIELD_ID'] = $CodProduto ? $CodProduto : -1; // Id $this->pack_start($hbox = new GtkHBox()); if ($operacao == 'a') { $hbox->pack_start($id = new GtkLabel(), false); $id->set_markup(' Id.: <b>' . $CodProduto . '</b>'); } // Sit. Produto $hbox->pack_start($this->situacao = new TSitProduto($this)); // Tipo Produto $hbox->pack_start($this->tipo = new TTipoProduto($this)); // Ativo $hbox->pack_start($this->ativo = new GtkCheckButton(' Ativo ')); $this->ativo->set_active(true); // Grupo $this->pack_start($frame = new GtkFrame(), false); $frame->add($vbox = new GtkVBox()); $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start($this->grupos = new TGrupos($this)); // Marca $hbox->pack_start($this->marcas = new TMarcas($this)); // Modelo $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start(new GtkLabel(' Modelo: '), false); $hbox->pack_start($this->modelo = new AEntry(true, true, 'Tb_Produtos', 'Modelo')); // Descricao $hbox->pack_start(new GtkLabel(latin1(' Descrição: ')), false); $hbox->pack_start($this->descricao = new AEntry(true, true, 'Tb_Produtos', 'Descricao')); // Preco custo $this->pack_start($frame = new GtkFrame(), false); $frame->add($vbox = new GtkVBox()); $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start($this->custo = new TFloat(true)); $this->custo->label->set_text(latin1(' Preço Custo: ')); // Margem $hbox->pack_start($this->margem = new TFloat(true)); $this->margem->label->set_text(' Margem: '); // Percentual $hbox->pack_start($this->percentual = new TFloat(true)); $this->percentual->label->set_text(' Percentual: '); // ICMS $vbox->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start($this->icms = new TInteger(true)); $this->icms->label->set_text(' ICMS: '); // IPI $hbox->pack_start($this->ipi = new TInteger(true)); $this->ipi->label->set_text(' IPI: '); // Clas. Fiscal $hbox->pack_start($this->clas_fiscal = new TInteger(true)); $this->clas_fiscal->label->set_text(' Clas. Fiscal: '); // Qtd Minima $this->pack_start($frame = new GtkFrame(), false); $frame->add($vbox = new GtkVBox()); $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start($this->qtde_minima = new TInteger(true), false); $this->qtde_minima->label->set_text(latin1(' Qtde Mínima: ')); // Cota de Compra $hbox->pack_start($this->cota_compra = new TInteger(true), false); $this->cota_compra->label->set_text(' Cota de Compra: '); // Cota de Venda $hbox->pack_start($this->cota_venda = new TInteger(true), false); $this->cota_venda->label->set_text(' Cota de Venda: '); // Unid. de Compra $vbox->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start($this->unid_compra = new TUnidCompra($this), false); // Unid. de Venda $hbox->pack_start($this->unid_venda = new TUnidVenda($this), false); // Unid. de Estoque $hbox->pack_start($this->unid_estoque = new TUnidEstoque($this), false); // ok $this->pack_start($hbbox = new GtkHButtonBox(), false); $hbbox->set_layout(Gtk::BUTTONBOX_END); $hbbox->pack_start($this->ok = GtkButton::new_from_stock('gtk-ok'), false); $this->conta->focus_widget = $this->ok; $this->ok->connect('clicked', array($this, 'ok_clicked')); // cancelar $hbbox->pack_start($this->cancelar = GtkButton::new_from_stock('gtk-cancel'), false); $this->cancelar->connect('clicked', array($this, 'cancelar_clicked')); $this->cancelar->add_accelerator('clicked', $this->accel_group, Gdk::KEY_Escape, 0, 0); $this->children_show_all(); $this->cota_venda->set_next_focus($this->ok); $this->grupos->entry->grab_focus(); }
function __construct($Parent, $operacao = 'i', $CodUsuario = null) { parent::__construct($operacao == 'i' ? latin1('Usuário - Incluir') : latin1('Usuário - Alterar'), null, null, 'usuarios.png'); $this->Parent = $Parent; $this->operacao = $operacao; $this->CodUsuario = $CodUsuario; $GLOBALS['XMONEY_FIELD'] = 'Cod_S_Usuario'; $GLOBALS['XMONEY_FIELD_ID'] = $CodUsuario ? $CodUsuario : -1; // Id $this->pack_start($hbox = new GtkHBox()); if ($operacao == 'a') { $hbox->pack_start($id = new GtkLabel(), false); $id->set_markup(' Id.: <b>' . $CodUsuario . '</b>'); } // Informacoes $this->pack_start($frame = new GtkFrame(latin1(' Informações '))); $frame->set_border_width(5); $frame->add($vbox = new GtkVBox()); $vbox->set_border_width(5); // filial $vbox->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start($this->filial = new TFiliais($this)); // perfil $hbox->pack_start($this->perfil = new TPerfis($this)); // usuario $vbox->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(latin1(' Usuário: ')), false); $hbox->pack_start($this->usuario = new AEntry(true, true, 'Tb_Usuarios', 'Usuario')); // ativo $hbox->pack_start($this->ativo = new GtkCheckButton(' Ativo '), false); $this->ativo->set_active(1); // senha $hbox->pack_start(new GtkLabel(' Senha: '), false); $hbox->pack_start($this->senha = new AEntry()); $this->senha->entry->set_visibility(false); // alterar senha $hbox->pack_start($this->alterar_senha = new GtkCheckButton(' Alterar '), false); // nome $vbox->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(' Nome: '), false); $hbox->pack_start($this->nome = new AEntry(true, true, 'Tb_Usuarios', 'Nome')); // endereço $hbox->pack_start(new GtkLabel(latin1(' Endereço: ')), false); $hbox->pack_start($this->endereco = new AEntry(true)); // bairro $vbox->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(' Bairro: '), false); $hbox->pack_start($this->bairro = new AEntry(true)); // cep $hbox->pack_start(new GtkLabel(' CEP: '), false); $hbox->pack_start($this->cep = new IEntry(true)); // cidade $vbox->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(' Cidade: '), false); $hbox->pack_start($this->cidade = new AEntry(true)); // estado $hbox->pack_start($this->estado = new TEstados($this)); // cpf $vbox->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(' CPF: '), false); $hbox->pack_start($this->cpf = new IEntry(true, true, 'Tb_Usuarios', 'CPF')); // rg $hbox->pack_start(new GtkLabel(' RG: '), false); $hbox->pack_start($this->rg = new IEntry(true, true, 'Tb_Usuarios', 'RG')); // nascimento $vbox->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start($this->data_nasc = new TData(true)); $this->data_nasc->label->set_text(' Nascimento: '); // sexo $hbox->pack_start($this->sexo = new TSexos($this)); // estado civil $hbox->pack_start($this->est_civil = new TEstCivil($this)); // dependentes $vbox->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(' Dependentes: '), false); $hbox->pack_start($this->dependentes = new IEntry()); // filhos $hbox->pack_start(new GtkLabel(' Filhos: '), false); $hbox->pack_start($this->filhos = new IEntry()); // cracha $hbox->pack_start(new GtkLabel(' Cracha: '), false); $hbox->pack_start($this->cracha = new IEntry()); // depto $vbox->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start($this->depto = new TDeptos($this)); // cargo $hbox->pack_start($this->cargo = new TCargos($this)); // Tel $vbox->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(new GtkLabel(' Tel.: '), false); $hbox->pack_start($this->tel = new IEntry(true)); // Cel $hbox->pack_start(new GtkLabel(' Cel.: '), false); $hbox->pack_start($this->cel = new IEntry()); // email $hbox->pack_start(new GtkLabel(' e-mail: '), false); $hbox->pack_start($this->email = new AEntry()); // data adm. $vbox->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start($this->data_adm = new TData()); $this->data_adm->label->set_text(latin1('Admissão')); // Data h**o. $hbox->pack_start($this->data_homo = new TData()); $this->data_homo->label->set_text(latin1('Homologação')); // Data resicao $hbox->pack_start($this->data_resc = new TData()); $this->data_resc->label->set_text(latin1('Rescisão')); // ok $this->pack_start($hbbox = new GtkHButtonBox(), false); $hbbox->set_layout(Gtk::BUTTONBOX_END); $hbbox->pack_start($this->ok = GtkButton::new_from_stock('gtk-ok'), false); $this->ok->connect('clicked', array($this, 'ok_clicked')); // cancelar $hbbox->pack_start($this->cancelar = GtkButton::new_from_stock('gtk-cancel'), false); $this->cancelar->connect('clicked', array($this, 'cancelar_clicked')); $this->cancelar->add_accelerator('clicked', $this->accel_group, Gdk::KEY_Escape, 0, 0); $this->children_show_all(); $this->data_resc->set_next_focus($this->ok); $this->usuario->set_focus(); }
function __construct($Parent, $InfoLinha) { parent::__construct('Contas a Receber - Baixar', 800, 480, 'contas_receber.png'); $this->Parent = $Parent; $this->InfoLinha = $InfoLinha; // info $this->pack_start($hbox = new GtkHBox(), false); $hbox->pack_start(GtkImage::new_from_stock(Gtk::STOCK_GO_DOWN, Gtk::ICON_SIZE_DIALOG), false); $hbox->pack_start($label = new GtkLabel(), false); $label->set_markup('<b> Todos os totais devem estar preenchidos! </b>'); $hbox->pack_start($frame = new GtkFrame(latin1(' Informações '))); $frame->add($vbox = new GtkVBox()); $vbox->set_border_width(5); // banco $vbox->pack_start($this->banco = new TBancos($this)); // tipo de despesa $vbox->pack_start($this->despesa = new TTipoDespesa($this)); // forma pgto $vbox->pack_start($this->forma_pgto = new TFormaPgto($this)); // Contas $this->pack_start($frame = new GtkFrame(' Contas a Receber ')); $frame->add($scroll = new GtkScrolledWindow()); $scroll->set_border_width(5); $scroll->set_policy(GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); $scroll->add_with_viewport($vbox = new GtkVBox()); $vbox->pack_start($this->lista = new GtkTable(count($InfoLinha) + 1, 8, false), false); $this->lista->attach($label = new GtkLabel(), 0, 1, 0, 1); $label->set_markup('<b>Id</b>'); $this->lista->attach($label = new GtkLabel(), 1, 2, 0, 1); $label->set_markup('<b>Fornecedor</b>'); $this->lista->attach($label = new GtkLabel(), 2, 3, 0, 1); $label->set_markup('<b>Num. do Doc.</b>'); $this->lista->attach($label = new GtkLabel(), 3, 4, 0, 1); $label->set_markup('<b>Valor em R$</b>'); $this->lista->attach($label = new GtkLabel(), 4, 5, 0, 1); $label->set_markup('<b>Juros em R$</b>'); $this->lista->attach($label = new GtkLabel(), 5, 6, 0, 1); $label->set_markup('<b>Desconto em R$</b>'); $this->lista->attach($label = new GtkLabel(), 6, 7, 0, 1); $label->set_markup('<b>Total em R$</b>'); $this->lista->attach($label = new GtkLabel(), 7, 8, 0, 1); $label->set_markup('<b>' . latin1('Anotações') . '</b>'); $vbox->pack_start(new GtkEventBox()); // Valores R$ $this->pack_start($frame = new GtkFrame(' Valores em R$ '), false); $frame->add($vbox = new GtkVBox()); // Valor das Contas $vbox->pack_start($this->lbl_valor_contas = new GtkLabel()); // Valor dos Juros $vbox->pack_start($this->lbl_valor_juros = new GtkLabel()); // Valor das Descontos $vbox->pack_start($this->lbl_valor_descontos = new GtkLabel()); // ok $this->pack_start($hbbox = new GtkHButtonBox(), false); $hbbox->set_layout(Gtk::BUTTONBOX_END); $hbbox->pack_start($this->ok = GtkButton::new_from_stock('gtk-ok'), false); $this->ok->connect('clicked', array($this, 'ok_clicked')); // cancelar $hbbox->pack_start($this->cancelar = GtkButton::new_from_stock('gtk-cancel'), false); $this->cancelar->connect('clicked', array($this, 'cancelar_clicked')); $this->cancelar->add_accelerator('clicked', $this->accel_group, Gdk::KEY_Escape, 0, 0); $this->children_show_all(); }
function __construct($Parent, $operacao = 'i', $CodFilial = null) { parent::__construct($operacao == 'i' ? 'Filial - Incluir' : 'Filial - Alterar', null, null, 'filiais.png'); $this->Parent = $Parent; $this->operacao = $operacao; $this->CodFilial = $CodFilial; $GLOBALS['XMONEY_FIELD'] = 'Cod_S_Filial'; $GLOBALS['XMONEY_FIELD_ID'] = $CodFilial ? $CodFilial : -1; // Id $this->pack_start($hbox = new GtkHBox()); if ($operacao == 'a') { $hbox->pack_start($id = new GtkLabel(), false); $id->set_markup(' Id.: <b>' . $CodFilial . '</b>'); } // nome $this->pack_start($frame = new GtkFrame(latin1(' Informações ')), false); $frame->add($vbox = new GtkVBox()); $vbox->set_border_width(5); $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start(new GtkLabel(' Nome: '), false); $hbox->pack_start($this->nome = new AEntry(true, true, 'Tb_Filiais', 'Nome')); // cnpj $hbox->pack_start(new GtkLabel(' CNPJ: '), false); $hbox->pack_start($this->cnpj = new IEntry(true, true, 'Tb_Filiais', 'CNPJ')); $this->cnpj->entry->set_max_length(14); // razao $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start(new GtkLabel(latin1(' Razão: ')), false); $hbox->pack_start($this->razao = new AEntry(true, true, 'Tb_Filiais', 'Razao')); // endereço $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start(new GtkLabel(latin1(' Endereço: ')), false); $hbox->pack_start($this->endereco = new AEntry(true)); // cep $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start(new GtkLabel(' CEP: '), false); $hbox->pack_start($this->cep = new IEntry(true)); // bairro $hbox->pack_start(new GtkLabel(' Bairro: '), false); $hbox->pack_start($this->bairro = new AEntry(true)); // cidade $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start(new GtkLabel(' Cidade: '), false); $hbox->pack_start($this->cidade = new AEntry(true)); // estado $hbox->pack_start($this->estado = new TEstados($this)); // telefone $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start(new GtkLabel(' Telefone: '), false); $hbox->pack_start($this->tel = new IEntry(true)); // fax $hbox->pack_start(new GtkLabel(' Fax: '), false); $hbox->pack_start($this->fax = new IEntry()); // Email $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start(new GtkLabel(' e-mail: '), false); $hbox->pack_start($this->email = new AEntry(true)); // url $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start(new GtkLabel(' Site: '), false); $hbox->pack_start($this->url = new AEntry()); // dominio $vbox->pack_start($hbox = new GtkHBox()); $hbox->pack_start(new GtkLabel(latin1(' Domíio: ')), false); $hbox->pack_start($this->dominio = new AEntry()); // ok $this->pack_start($hbbox = new GtkHButtonBox(), false); $hbbox->set_layout(Gtk::BUTTONBOX_END); $hbbox->pack_start($this->ok = GtkButton::new_from_stock('gtk-ok'), false); $this->dominio->focus_widget = $this->ok; $this->ok->connect('clicked', array($this, 'ok_clicked')); // cancelar $hbbox->pack_start($this->cancelar = GtkButton::new_from_stock('gtk-cancel'), false); $this->cancelar->connect('clicked', array($this, 'cancelar_clicked')); $this->cancelar->add_accelerator('clicked', $this->accel_group, Gdk::KEY_Escape, 0, 0); $this->children_show_all(); $this->dominio->set_next_focus($this->ok); $this->nome->grab_focus(); }