KExtProcess::Profile Class Reference

#include <profile.h>

Inheritance diagram for KExtProcess::Profile:

QObject List of all members.

Detailed Description

Profile for KExtProcess.

A profile contains all ExtProcesses that should be linked together to reach the endpoint from where the actual process can be launched.

Without using a profile you have to manually use the ProcessFactory to create and link instances. This is generally only useful for inhouse tools that don't require variable logon procedures.

Author:
Martijn Klingens <klingens@kde.org>

Definition at line 42 of file profile.h.


Public Slots

void save (const QString &filename)
void load (const QString &filename)
static QStringList profileList ()
QString filename () const
QString caption () const

Signals

void stepMoved (const ProfileStep &oldStep, int oldIndex, int newIndex)
void stepRemoved (const ProfileStep &oldStep, int oldIndex)
void stepAdded (const ProfileStep &step, int index)
void profileChanged ()

Public Member Functions

 Profile (QObject *parent, const char *name=0)
void cloneFrom (Profile *originalProfile)
void addStep (const ProfileStep &step)
ProfileStepList steps () const
ProfileStep step (int index) const
void removeStep (int index)
void moveStepUp (int index)
void moveStepDown (int index)

Constructor & Destructor Documentation

KExtProcess::Profile::Profile QObject parent,
const char *  name = 0
 

Standard constructor, creates an empty profile.

Definition at line 35 of file profile.cpp.


Member Function Documentation

void KExtProcess::Profile::addStep const ProfileStep step  ) 
 

Add an extra login step at the end of the profile.

Definition at line 56 of file profile.cpp.

QString KExtProcess::Profile::caption  )  const [slot]
 

Returns:
The caption of the profile. Currently this is the filename without path and extension, but this will probably change later.

Definition at line 312 of file profile.cpp.

void KExtProcess::Profile::cloneFrom Profile originalProfile  ) 
 

Create a copy of an existing profile.

Definition at line 46 of file profile.cpp.

QString KExtProcess::Profile::filename  )  const [slot]
 

Returns:
The full path name of the file used on disk or QString::null if the profile is never saved to or loaded from disk.

Definition at line 307 of file profile.cpp.

void KExtProcess::Profile::load const QString filename  )  [slot]
 

Load a profile from disk.

See the documentation for details about the storage of profiles.

Parameters:
filename is the basename of the file, a directory portion is not allowed.

Definition at line 144 of file profile.cpp.

void KExtProcess::Profile::moveStepDown int  index  ) 
 

Move the step identified by.

Parameters:
index down one step.
The new index is 'index + 1'.

Does nothing for out-of-bound indexes; emits stepMoved() if the step could actually be moved.

Definition at line 100 of file profile.cpp.

void KExtProcess::Profile::moveStepUp int  index  ) 
 

Move the step identified by.

Parameters:
index up one step.
The new index is 'index - 1'.

Does nothing for out-of-bound indexes; emits stepMoved() if the step could actually be moved.

Definition at line 82 of file profile.cpp.

void KExtProcess::Profile::profileChanged  )  [signal]
 

Emitted after the complete profile has changed.

This happens when calling cloneFrom() or load().

QStringList KExtProcess::Profile::profileList  )  [static, slot]
 

Return a list of all available profiles.

Returns:
The list of profiles, containing only the filename portion, without path.

Definition at line 128 of file profile.cpp.

void KExtProcess::Profile::removeStep int  index  ) 
 

Remove a step identified by its index.

Definition at line 72 of file profile.cpp.

void KExtProcess::Profile::save const QString filename  )  [slot]
 

Save the profile to disk.

Profiles are located in the 'data' section of an application named 'kextprocess', which in practice means they can reside anywhere under $KDEDIRS/share/apps/kextprocess and $KDEHOME/share/apps/kextprocess. Profiles are deliberately stored under the explicit 'kextprocess' KInstance, to make sure they are shared across applications that use the library -- in general it makes no sense to have per-application profiles instead of per-user profiles.

The config is stored in KConfig-format using KSimpleConfig, but the file format is not meant to be manually read by applications. (It's possible, and for maintainability of the library the format has to be documented anyway, but you're not supposed to do it :)

Parameters:
filename is the basename of the file, a directory portion is not allowed.

Definition at line 259 of file profile.cpp.

ProfileStep KExtProcess::Profile::step int  index  )  const
 

Return a single step.

Definition at line 67 of file profile.cpp.

void KExtProcess::Profile::stepAdded const ProfileStep step,
int  index
[signal]
 

Emitted after a step is added.

Steps are added at the bottom. The index of the bottom item is passed.

void KExtProcess::Profile::stepMoved const ProfileStep oldStep,
int  oldIndex,
int  newIndex
[signal]
 

Emitted AFTER a profile step is moved.

You can use the passed step and the indexes or reread the list by calling steps() again.

This signal is emitted both when moving steps up and down.

void KExtProcess::Profile::stepRemoved const ProfileStep oldStep,
int  oldIndex
[signal]
 

Emitted AFTER a profile step is removed.

You can use the passed step and old index or reread the list by calling steps() again.

Any references you have to the step will remain valid due to ProfileStep's explicitly shared nature, but those steps will no longer be part of the profile.

ProfileStepList KExtProcess::Profile::steps  )  const
 

Return all steps in the profile.

Definition at line 62 of file profile.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys