From bcb704366cb5e333a626c18c308c7e0448a8e69f Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ksirc/puke/plabel.pm | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 ksirc/puke/plabel.pm (limited to 'ksirc/puke/plabel.pm') diff --git a/ksirc/puke/plabel.pm b/ksirc/puke/plabel.pm new file mode 100644 index 00000000..bc557b5e --- /dev/null +++ b/ksirc/puke/plabel.pm @@ -0,0 +1,105 @@ + +&::PukeSendMessage($PUKE_WIDGET_LOAD, + $::PUKE_CONTROLLER, + $PWIDGET_LABEL, + "plabel.so", + sub { my %ARG = %{shift()}; + if($ARG{'iArg'} == 1){ + print "*E* PLabel Load failed!\n"; + } + } + ); + +package PLabel; +@ISA = qw(PFrame); +use strict; + +sub new { + my $class = shift; + my $self = $class->SUPER::new($class, @_); + + $self->{widgetType} = $::PWIDGET_LABEL; + + if($class eq 'PLabel'){ + $self->create(); + } + + return $self; + +} + +sub setText { + my $self = shift; + + my $text = shift; + + $self->{text} = $text; + + # Don't need the ouput since GET_TEXT_ACK will be called and + # we'll set it there + $self->sendMessage('iCommand' => $::PUKE_LABEL_SETTEXT, + 'iArg' => 0, + 'cArg' => $text, + 'CallBack' => sub {}); + +} + +sub setPixmap { + my $self = shift; + + my $text = shift; + + $self->{text} = "***PIXMAP***" . $text; + + # Don't need the ouput since GET_TEXT_ACK will be called and + # we'll set it there + $self->sendMessage('iCommand' => $::PUKE_LABEL_SETPIXMAP, + 'cArg' => $text, + 'CallBack' => sub {}); + +} + +sub setMovie { + my $self = shift; + + my $text = shift; + + $self->{text} = "***MOVIE***" . $text; + + # Don't need the ouput since GET_TEXT_ACK will be called and + # we'll set it there + $self->sendMessage('iCommand' => $::PUKE_LABEL_SETMOVIE, + 'cArg' => $text, + 'CallBack' => sub {}); + +} + + +sub text { + my $self = shift; + + return $self->{text}; +} + + + +sub setAlignment { + my $self = shift; + + my $align = shift; + + + $self->{align} = $align; + + # Don't need the ouput since GET_TEXT_ACK will be called and + # we'll set it there + $self->sendMessage('iCommand' => $::PUKE_LABEL_SETALIGNMENT, + 'iArg' => $align, + 'CallBack' => sub {}); + +} + + + +package main; + -- cgit v1.2.1