Config::Model::TkUI - Tk GUI to edit config data through Config::Model


NAME

Config::Model::TkUI - Tk GUI to edit config data through Config::Model

Back to Top


SYNOPSIS

 use Config::Model::TkUI;
 # init trace
 Log::Log4perl->easy_init($WARN);
 # create configuration instance
 my $model = Config::Model -> new ;
 my $inst = $model->instance (root_class_name => 'a_config_class',
                              instance_name   => 'test');
 my $root = $inst -> config_root ;
 # Tk part
 my $mw = MainWindow-> new ;
 $mw->withdraw ;
 $mw->ConfigModelUI (-root => $root) ;
 MainLoop ;

Back to Top


DESCRIPTION

This class provides a GUI for the Config::Model manpage.

With this class, the Config::Model manpage and an actual configuration model (like the Config::Model::Xorg manpage), you get a tool to edit configuration files (e.g. /etc/X11/xorg.conf).

Be default, only items with beginner experience are shown. You can change the experience level in Options -> experience menu.

Back to Top


USAGE

Left side tree

Editor widget

The right side of the widget is either a viewer or an editor. When clicking on store in the editor, the new data is stored in the tree represented on the left side of TkUI. The new data will be stored in the configuration file only when File-save> menu is invoked.

Wizard

A wizard can be launched either with File -> Wizard menu entry or with Run Wizard button.

The wizard will scan the configuration tree and stop on all items flagged as important in the model. It will also stop on all erroneous items (mostly missing mandatory values).

Back to Top


TODO

- Document widget options. (-root_model and -store_sub, -quit) - add better navigation - add tabular view ? - improve look and feel - add search element or search value - expand the whole tree at once - add plug-in mechanism so that dedicated widget can be used for some config Class (Could be handy for Xorg::ServerLayout)

Back to Top


AUTHOR

Dominique Dumont, (ddumont at cpan dot org)

Back to Top


LICENSE

    Copyright (c) 2008-2010 Dominique Dumont.
    This file is part of Config-Model.
    Config-Model is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser Public License as
    published by the Free Software Foundation; either version 2.1 of
    the License, or (at your option) any later version.
    Config-Model is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser Public License for more details.
    You should have received a copy of the GNU Lesser Public License
    along with Config-Model; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
    02110-1301 USA

Back to Top


FEEDBACK and HELP wanted

This project needs feedback from its users. Please send your feedbacks, comments and ideas to :

  config-mode-users at lists.sourceforge.net

This projects also needs help to improve its user interfaces:

If you want to help, please send a mail to:

  config-mode-devel at lists.sourceforge.net

Back to Top


SEE ALSO

Back to Top

 Config::Model::TkUI - Tk GUI to edit config data through Config::Model