Code Search for Developers
 
 
  

Boolean.pm from GreenSocs at Krugle


Show Boolean.pm syntax highlighted

#!/usr/bin/perl -w

=head1 NAME

Debconf::Element::Kde::Boolean - check box widget

=cut

package Debconf::Element::Kde::Boolean;
use strict;
use Qt;
use base qw(Debconf::Element::Kde);
use Debconf::Encoding qw(to_Unicode);

=head1 DESCRIPTION

This is a check box widget.

=head1 METHODS

=over 4

=item create

Creates and sets up the widget.

=cut

sub create {
	my $this=shift;
	
	$this->SUPER::create(@_);
	
	$this->startsect;
	$this->widget(Qt::CheckBox($this->cur->top, to_Unicode($this->question->description)));
	$this->widget->show;
	$this->widget->setChecked(($this->question->value eq 'true') ? 1 : 0);
	$this->widget->setText(to_Unicode($this->question->description));
	$this->addhelp;
	$this->addwidget($this->widget);
	$this->endsect;
}

=item value

The value is true if the checkbox is checked, false otherwise.

=cut

sub value {
	my $this = shift;
	
	if ($this -> widget -> isChecked) {
		return "true";
	}
	else {
		return "false";
	}
}

=back

=head1 AUTHOR

Peter Rockai <mornfall@logisys.dyndns.org>

=cut

1




See more files for this project here

GreenSocs

To develop SystemC infrustructure, basic IP, patches and add on library code for eventual standerdization.\r\nThe GreenSocs project is made up of a number of contributions (sub projects). Please visit www.greensocs.com for more information.

Project homepage: http://sourceforge.net/projects/greensocs
Programming language(s): C,C++,Java,Perl,XML
License: other

  Boolean.pm
  Multiselect.pm
  Note.pm
  Password.pm
  Select.pm
  String.pm
  Text.pm