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 / String.pm < prev    next >
Encoding:
Perl POD Document  |  2006-07-24  |  735 b   |  38 lines

  1. #!/usr/bin/perl -w
  2. # This file was preprocessed, do not edit!
  3.  
  4.  
  5. package Debconf::Element::Kde::String;
  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.     $this->startsect;
  17.     $this->widget(Qt::LineEdit($this->cur->top));
  18.     $this->widget->show;
  19.     my $default='';
  20.     $default=$this->question->value if defined $this->question->value;
  21.     $this->widget->setText(to_Unicode($default));
  22.     $this->widget->setSizePolicy(Qt::SizePolicy(1, 0, 0, 0));
  23.     $this->addhelp;
  24.     my $b = $this->addhbox;
  25.     $b->addWidget ($this->description);
  26.     $b->addWidget ($this->widget);
  27.     $this->endsect;
  28. }
  29.  
  30.  
  31. sub value {
  32.     my $this=shift;
  33.     return $this->widget->text();
  34. }
  35.  
  36.  
  37. 1
  38.