summaryrefslogtreecommitdiffstats
path: root/ksirc/puke/pobjfinder.pm
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbcb704366cb5e333a626c18c308c7e0448a8e69f (patch)
treef0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /ksirc/puke/pobjfinder.pm
downloadtdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz
tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip
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
Diffstat (limited to 'ksirc/puke/pobjfinder.pm')
-rw-r--r--ksirc/puke/pobjfinder.pm89
1 files changed, 89 insertions, 0 deletions
diff --git a/ksirc/puke/pobjfinder.pm b/ksirc/puke/pobjfinder.pm
new file mode 100644
index 00000000..6cf6c5bb
--- /dev/null
+++ b/ksirc/puke/pobjfinder.pm
@@ -0,0 +1,89 @@
+
+&::PukeSendMessage($PUKE_WIDGET_LOAD,
+ $::PUKE_CONTROLLER,
+ $PWIDGET_OBJFINDER,
+ "pobjfinder.so",
+ sub { my %ARG = %{shift()};
+ if($ARG{'iArg'} == 1){
+ print "*E* PLabel Load failed!\n";
+ }
+ }
+ );
+
+package PObjFinder;
+@ISA = qw(PBase);
+use strict;
+
+sub new {
+ my $class = shift;
+ my $self = $class->SUPER::new($class, @_);
+
+ $self->{widgetType} = $::PWIDGET_OBJFINDER;
+
+ if($class eq 'PObjFinder'){
+ $self->create();
+ }
+
+ $self->installHandler($::PUKE_OBJFINDER_NEWOBJECT, sub {$self->newObject(shift())});
+
+ return $self;
+
+}
+
+sub newObject {
+}
+
+sub interAllObjects {
+ my $self = shift;
+ my %REPLY = $self->sendMessage('iCommand' => $::PUKE_OBJFINDER_ALLOBJECTS,
+ 'WaitFor' => 1);
+
+ return $REPLY{'cArg'};
+
+}
+
+sub allObjects {
+ my $self = shift;
+ my $line = $self->interAllObjects();
+
+ $line =~ s/\S+::unnamed//gm;
+
+ return $line;
+
+}
+
+
+sub allObjectsHash {
+ my $self = shift;
+
+ my $line = $self->allObjects();
+
+ my $widget;
+ my %hash;
+
+ foreach $widget (split(/\n/, $line)){
+ $hash{$widget} = 1;
+ }
+
+ return \%hash;
+
+}
+
+sub allObjectsArray {
+ my $self = shift;
+
+ my $line = $self->allObjects();
+
+ my $widget;
+ my @arr;
+
+ foreach $widget (split(/\n/, $line)){
+ next if $widget eq '';
+ $arr[$#arr+1] = $widget;
+ }
+
+ return @arr;
+}
+
+package main;
+