aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AdminPanel/Category.pm
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2014-01-28 12:32:08 +0100
committerAngelo Naselli <anaselli@linux.it>2014-01-28 12:32:08 +0100
commit1c08ae3363794192339be4ec9436eaee4bc143e9 (patch)
tree52d0f14a48a0ce72981bc326a8056f1e7a625ac4 /lib/AdminPanel/Category.pm
parent3249c6f581f90ade1bdbc23d233cc0fc452bfceb (diff)
downloadcolin-keep-1c08ae3363794192339be4ec9436eaee4bc143e9.tar
colin-keep-1c08ae3363794192339be4ec9436eaee4bc143e9.tar.gz
colin-keep-1c08ae3363794192339be4ec9436eaee4bc143e9.tar.bz2
colin-keep-1c08ae3363794192339be4ec9436eaee4bc143e9.tar.xz
colin-keep-1c08ae3363794192339be4ec9436eaee4bc143e9.zip
- fixed POD
- better management for events
Diffstat (limited to 'lib/AdminPanel/Category.pm')
-rw-r--r--lib/AdminPanel/Category.pm89
1 files changed, 71 insertions, 18 deletions
diff --git a/lib/AdminPanel/Category.pm b/lib/AdminPanel/Category.pm
index 7c89fbb..95abf91 100644
--- a/lib/AdminPanel/Category.pm
+++ b/lib/AdminPanel/Category.pm
@@ -27,6 +27,27 @@ use yui;
## Can only add the config file data at constructor
## The Gui elements are added in setupGui inside MainDisplay
+#=============================================================
+
+=head2 new
+
+=head3 INPUT
+
+ $newName: new category name
+ $newIcon: new category icon
+
+=head3 OUTPUT
+
+ $self: this object
+
+=head3 DESCRIPTION
+
+ Constructor: creates a new category named Name
+
+=cut
+
+#=============================================================
+
sub new {
my ($class, $newName, $newIcon) = @_;
my $self = {
@@ -122,7 +143,23 @@ sub moduleLoaded {
return $present;
}
-## Create and add buttons for each module
+#=============================================================
+
+=head2 addButtons
+
+=head3 INPUT
+
+ $self: this object
+ $pane: parent panel in which create buttons
+ $factory: yui factory
+
+=head3 DESCRIPTION
+
+ Creates and adds buttons for each module_name
+
+=cut
+
+#=============================================================
sub addButtons {
my($self, $pane, $factory) = @_;
my $count = 0;
@@ -148,7 +185,21 @@ sub addButtons {
$factory->createVStretch($pane);
}
-## Delete the module buttons
+#=============================================================
+
+=head2 removeButtons
+
+=head3 INPUT
+
+$self: this object
+
+=head3 DESCRIPTION
+
+Delete the module buttons
+
+=cut
+
+#=============================================================
sub removeButtons {
my($self) = @_;
@@ -157,6 +208,21 @@ sub removeButtons {
}
}
+#=============================================================
+
+=head2 setIcon
+
+=head3 INPUT
+
+ $self: this object
+
+=head3 DESCRIPTION
+
+ set the button icon
+
+=cut
+
+#=============================================================
sub setIcon {
my($self) = @_;
@@ -179,23 +245,10 @@ __END__
=head1 USAGE
- my $display = new MainDisplay();
-
- my $category = new Category('Network');
- $display->loadCategory($category);
-
- $display->start();
+ This class is used by MainDisplay internally and should not
+ be used outside, since MainDisplay::setupGui use it to
+ build GUI layout.
=head1 FUNCTIONS
-=head2 new (name)
-
- Constructor: creates a new category named Name
-
- $category = new Category('Name');
-
-=head3 name (String)
-
- The name of the category
-
=cut