• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kextprocess

KExtProcess::Profile

KExtProcess::Profile Class Reference

#include <profile.h>

Inheritance diagram for KExtProcess::Profile:

Inheritance graph
[legend]

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

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

Signals

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

Public Member Functions

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

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.

KExtProcess::Profile::~Profile (  ) 

Definition at line 41 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 317 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 312 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 149 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 105 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 87 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 133 of file profile.cpp.

void KExtProcess::Profile::removeStep ( int  index  ) 

Remove a step identified by its index.

Definition at line 77 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 264 of file profile.cpp.

void KExtProcess::Profile::setSteps ( const ProfileStepList &  steps  ) 

Set the list of steps.

FIXME: This may require a stepsChanged() signal in order to work out, as it allows changing the profile behind the back of the GUI.

Definition at line 67 of file profile.cpp.

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

Return a single step.

Definition at line 72 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:
  • profile.h
  • profile.cpp

kextprocess

Skip menu "kextprocess"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • kextprocess
  • shaman
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal