home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / perl5 / Debconf / Element / Kde / Boolean.pm next >
Encoding:
Perl POD Document  |  2006-07-24  |  727 b   |  41 lines

  1. #!/usr/bin/perl -w
  2. # This file was preprocessed, do not edit!
  3.  
  4.  
  5. package Debconf::Element::Kde::Boolean;
  6. use strict;
  7. use Qt;
  8. use base qw(Debconf::Element::Kde);
  9. use Debconf::Encoding qw(to_Unicode);
  10.  
  11.  
  12. sub create {
  13.     my $this=shift;
  14.     
  15.     $this->SUPER::create(@_);
  16.     
  17.     $this->startsect;
  18.     $this->widget(Qt::CheckBox($this->cur->top, to_Unicode($this->question->description)));
  19.     $this->widget->show;
  20.     $this->widget->setChecked(($this->question->value eq 'true') ? 1 : 0);
  21.     $this->widget->setText(to_Unicode($this->question->description));
  22.     $this->addhelp;
  23.     $this->addwidget($this->widget);
  24.     $this->endsect;
  25. }
  26.  
  27.  
  28. sub value {
  29.     my $this = shift;
  30.     
  31.     if ($this -> widget -> isChecked) {
  32.         return "true";
  33.     }
  34.     else {
  35.         return "false";
  36.     }
  37. }
  38.  
  39.  
  40. 1
  41.