kcmpureftpd

  Main Page   Compound List   File List   Compound Members
Main Page   Compound List   File List   Compound Members  

KPureftpdScript Class Reference

Generate startup scripts for pure-ftpd. More...

#include <kcmpureftpdscript.h>

List of all members.

Public Methods

 KPureftpdScript (QWidget *parent=0L, const char *name=0L)
virtual ~KPureftpdScript ()
void load ()
void save ()
void defaults ()
int buttons ()
QString quickHelp () const
virtual const KAboutData * aboutData () const

Protected Slots

void configChanged ()
void slotAuth (int index)
void slotAuthMethodChanged (int index)
void slotAuthListChanged (QListViewItem *item)
void slotAuthAdd ()
void slotAuthModify ()
void slotAuthDelete ()
void slotAuthMoveUp ()
void slotAuthMoveDown ()
void slotStandalone ()
void slotItemChanged (QListViewItem *it)
void slotScriptPathChanged (const QString &text)
void slotSaveOutput ()
void slotTabChanged (QWidget *widget)

Private Methods

void setAuthEditButtons ()
void setAuthMoveButtons ()
void setSaveButton (int scriptIndex)
QString parseOptions (ScriptItem scriptItem)

Private Attributes

KPureftpdScriptUI * ui
QString saveOutput
QString parsedScript
Script * script
QMap< KListViewItem *, int > scriptMap
KConfig * config


Detailed Description

Generate startup scripts for pure-ftpd.

It generate startup control scripts for pure-ftpd based on XML templates and user choosed options. For this are used script templates which contain the startup script filled with parsable options like @PUREFTPD@, @OPTIONS@ etc. There are other attributes needed: line terminator, option seperator, sugested name for output script etc. The first and second enumerated attributes are used to organize generated pure-ftpd command line in a more pleasant and readable form. Script template are organized in a tree-like view where roots are script template type: standalone or superserver.

Author:
Claudiu Costin <claudiuc@kde.org>
Version:
Id:
kcmpureftpdscript.h,v 1.7 2003/07/20 15:50:55 claudiuc Exp

Definition at line 53 of file kcmpureftpdscript.h.


Constructor & Destructor Documentation

KPureftpdScript::KPureftpdScript QWidget *    parent = 0L,
const char *    name = 0L
 

Construct KcmPureftpdScript GUI, connect slots and load configuration from configuration file.

Parameters:
parent  is the widget parent
name  of this widget (optional)

Definition at line 46 of file kcmpureftpdscript.cpp.

References config, configChanged(), load(), slotAuth(), slotAuthAdd(), slotAuthDelete(), slotAuthListChanged(), slotAuthMethodChanged(), slotAuthModify(), and ui.

KPureftpdScript::~KPureftpdScript   [virtual]
 

Destroy KcmPureftpdScript instance

Definition at line 112 of file kcmpureftpdscript.cpp.


Member Function Documentation

const KAboutData * KPureftpdScript::aboutData   const [virtual]
 

Return information about KcmPureftpdScript developers, contributors and license terms

Definition at line 758 of file kcmpureftpdscript.cpp.

int KPureftpdScript::buttons  
 

Return the button mask such that KControl or kcmshell will know what system buttons to show when the module will be embeded.

Definition at line 744 of file kcmpureftpdscript.cpp.

void KPureftpdScript::configChanged   [protected, slot]
 

It's a wrapper for the signal changed()

Definition at line 188 of file kcmpureftpdscript.cpp.

Referenced by KPureftpdScript().

void KPureftpdScript::defaults  
 

Present user the defaults widgets states and values for the widgets. Basically it execute load()

Definition at line 739 of file kcmpureftpdscript.cpp.

References load().

void KPureftpdScript::load  
 

Load configuration data and set the widgets states and values

Definition at line 480 of file kcmpureftpdscript.cpp.

References config, slotAuth(), and ui.

Referenced by defaults(), and KPureftpdScript().

QString KPureftpdScript::quickHelp   const
 

Return rich text help shown in KControl "Help" tab

Definition at line 748 of file kcmpureftpdscript.cpp.

void KPureftpdScript::save  
 

Save configuration according to the widgets states and values

Definition at line 625 of file kcmpureftpdscript.cpp.

References config, and ui.

void KPureftpdScript::slotAuth int    index [protected, slot]
 

Set the authentication editor to the enabled or disabled state according to the radiobuttons state in "Authentication" button group. This way the user can see whether he's using default authentication provided by system or the custom selection made by him.

Parameters:
index  is number of selected radio button.

Definition at line 194 of file kcmpureftpdscript.cpp.

References slotAuthMethodChanged(), and ui.

Referenced by KPureftpdScript(), and load().

void KPureftpdScript::slotAuthAdd   [protected, slot]
 

Add new authentication in the authentication list bellow the current element in the list. If the method is "unix" or "pam", the "authFile" content is ignored. It also set the editor buttons (Add, Modify, Delete) and Up and Down buttons such that only relevant buttons will be enabled.

Definition at line 216 of file kcmpureftpdscript.cpp.

References ui.

Referenced by KPureftpdScript().

void KPureftpdScript::slotAuthDelete   [protected, slot]
 

Delete the current selected authentication in the "authList". It also set the editor buttons (Add, Modify, Delete) and Up and Down buttons such that only relevant buttons will be enabled.

Definition at line 241 of file kcmpureftpdscript.cpp.

References ui.

Referenced by KPureftpdScript().

void KPureftpdScript::slotAuthListChanged QListViewItem *    item [protected, slot]
 

Set the "authMethod" and "authFile" when current item in "authList" is changed: user click on item or move highlight with cursor keys. It also set the editor buttons (Add, Modify, Delete) and Up and Down buttons such that only relevant buttons will be enabled.

Parameters:
item  is the selected element in the "authList" list view

Definition at line 269 of file kcmpureftpdscript.cpp.

References slotAuthMethodChanged(), and ui.

Referenced by KPureftpdScript().

void KPureftpdScript::slotAuthMethodChanged int    index [protected, slot]
 

Set the "authFile" as disabled when the user choose "unix" or "pam" in methods combobox. It also set the editor buttons (Add, Modify, Delete) such that only relevant buttons will be enabled.

Parameters:
index  is the position of selected item in "authMethod" combobox

Definition at line 264 of file kcmpureftpdscript.cpp.

References ui.

Referenced by KPureftpdScript(), slotAuth(), and slotAuthListChanged().

void KPureftpdScript::slotAuthModify   [protected, slot]
 

Modify the current selected authentication in the "authList" with the new values from the "authMethod" and "authFile". If the method is "unix" or "pam", the "authFile" content is ignored.

Definition at line 231 of file kcmpureftpdscript.cpp.

References ui.

Referenced by KPureftpdScript().


Member Data Documentation

KConfig* KPureftpdScript::config [private]
 

Our object to access KDE style configuration.

Definition at line 178 of file kcmpureftpdscript.h.

Referenced by KPureftpdScript(), load(), and save().

KPureftpdScriptUI* KPureftpdScript::ui [private]
 

This is hold the pointer to instantiated KcmPureftpdScript user interface. Local UI interaction is defined here.

Definition at line 171 of file kcmpureftpdscript.h.

Referenced by KPureftpdScript(), load(), save(), slotAuth(), slotAuthAdd(), slotAuthDelete(), slotAuthListChanged(), slotAuthMethodChanged(), and slotAuthModify().


The documentation for this class was generated from the following files:
Generated on Thu Jul 24 01:57:14 2003 by doxygen 1.2.15.