KockpitMainWindow Class Reference

Main Application. More...

#include <kockpitmainwindow.h>

Collaboration diagram for KockpitMainWindow:
Collaboration graph
[legend]

Signals

void kockpitUserValidated ()
 This signal is emitted if validateion succeeded.
void kockpitGroupValidated ()
 This signal is emitted if validateion succeeded.
void newKockpitUserCreated ()
 This signal is emitted if a new user is successfully created.
void newKockpitGroupCreated ()
 This signal is emitted if a new group is successfully created.
void kockpitUserAuthenticated ()
 This signal is emitted if a user is successfully authenticated.
void kockpitUserUnauthenticated ()
 This signal is emitted if a user is successfully unauthenticated.

Public Member Functions

 KockpitMainWindow (QMainWindow *parent=0)
 Standard Constructor.
 ~KockpitMainWindow ()
 Destructor.

Private Slots

void authenticate ()
 Authenticate.
void unauthenticate ()
 Unauthenticate.
void showUserAttributes ()
 Show attributes.
void showGroupAttributes ()
 Show attributes.
void assignUserAttributes (KockpitUser *kuser)
 Assign attributes.
void assignGroupAttributes (KockpitGroup *kgrp)
 Assign attributes.
void addKockpitUserItem ()
 Add item.
void addKockpitGroupItem ()
 Add item.
void createKockpitUser (QWidget *widget)
 Add unit.
void validateKockpitUser ()
 Validate unit.
void writeKockpitUser ()
 Commit unit.
void deleteKockpitUser ()
 Delete unit.
void createKockpitGroup (QWidget *widget)
 Add unit.
void validateKockpitGroup ()
 Validate unit.
void writeKockpitGroup ()
 Commit unit.
void deleteKockpitGroup ()
 Delete unit.
bool refreshUserList ()
 Refresh view.
bool refreshGroupList ()
 Refresh view.
bool refreshAll ()
 Refresh all.
void about ()
 About.
void showHelp ()
 Show Help.

Private Member Functions

KockpitUsergetKockpitUserFromSelection ()
 Return Item.
KockpitGroupgetKockpitGroupFromSelection ()
 Return Item.
void writeUserPluginChanges (wraddmod mod)
 Call plugin functions (all plugins).
void writeUserPluginChange (KockpitIface &iface, wraddmod mod)
 Call plugin function (one plugin).
void writeGroupPluginChanges (wraddmod mod)
 Call plugin function (all plugins).
void writeGroupPluginChange (KockpitIface &iface, wraddmod mod)
 Call plugin function (one plugin).
void loadPlugins ()
 Load plugins.
void populatePlugins ()
 Populate plugins.
void highlightItem (QListWidgetItem *item)
 Highlight QListWidgetItem.
void unhighlightItem (QListWidgetItem *item)
 Unhighlight QListWidgetItem.
void createStatusBar ()
 Create status bar.
void createActions ()
 Create actions.
void createMenus ()
 Create menus.

Private Attributes

QList< KockpitUnitMap * > kumap
 List of KockpitUnitMap object which contains KockpitUsers.
QList< KockpitUnitMap * > kgmap
 List of KockpitUnitMap object which contains KockpitGroups.
QList< KockpitIface * > plugIns
 List of loaded plugins.
KockpitValidator val
 Validator who checks if user input is valid.
QStateMachine machine
 State machine which is needed to realize different application states.
LDAPModule ldap
 Them main datasource of the application.
KockpitScriptAction kscript
 Script engine. ECMA is used for validation and auto building user attributes.
KockpitAuthObj auth
 Container for authentication information (using for simple bind).
KockpitBaseObj group
 Container for filtering and locating the backend entries suitable to the KockpitGroup object.
KockpitBaseObj user
 Container for filtering and locating the backend entries suitable to the KockpitUser object.
QLabel * stateLabel
 Label which shows the current application state in the status bar.
QListWidgetItem * currentAuthUserItem
 Pointer to the currently selected user item.
QListWidgetItem * userLastCommited
 Pointer to the last commited KockpitUser.
QListWidgetItem * groupLastCommited
 Pointer to the last commited KockpitGroup.
QString scriptPath
 Path to the ECMA scripts used for validation.
QString plugInPath
 Path to the directory where the plugin libraries are located.
QMenu * mainMenu
 Main menu shown in the menu bar of this application.
QMenu * helpMenu
 Help menu shown in the menu bar of this application.
QAction * helpAction
 Show user help.
QAction * aboutKockpitAction
 Show about kockpit message box.
QAction * aboutQtAction
 Show about qt message box.
QAction * exitAction
 Exit the application.

Detailed Description

Main Application.

This class represents the main application.


Constructor & Destructor Documentation

KockpitMainWindow::KockpitMainWindow ( QMainWindow *  parent = 0  ) 

Standard Constructor.

This Constructor establish all signals and slots, QtStateMachine States etc. It reads the the configuartion file establish datasource connections and initialize plugins.

Parameters:
parent Parent object.
KockpitMainWindow::~KockpitMainWindow (  ) 

Destructor.

Free all dynamically allocated space.


Member Function Documentation

void KockpitMainWindow::about (  )  [private, slot]

About.

Only shows the about dialog.

void KockpitMainWindow::addKockpitGroupItem (  )  [private, slot]

Add item.

This function add a new item in the group list.

void KockpitMainWindow::addKockpitUserItem (  )  [private, slot]

Add item.

This function add a new item in the user list.

void KockpitMainWindow::assignGroupAttributes ( KockpitGroup kgrp  )  [private, slot]

Assign attributes.

This function calls the suitable function of the plugins.

See also:
KockpitIface::assignAttributes(KockpitGroup *kgrp)
Parameters:
kgrp Currently selected KockpitGroup
void KockpitMainWindow::assignUserAttributes ( KockpitUser kuser  )  [private, slot]

Assign attributes.

This function calls the suitable function of the plugins.

See also:
KockpitIface::assignAttributes(KockpitUser *kuser).
Parameters:
kuser Currently selected KockpitUser.
void KockpitMainWindow::authenticate (  )  [private, slot]

Authenticate.

This function is called to authenticate the user against the main backend. In this case the main backend is LDAP.

void KockpitMainWindow::createActions (  )  [private]

Create actions.

This function creates actions.

void KockpitMainWindow::createKockpitGroup ( QWidget *  widget  )  [private, slot]

Add unit.

This function created a new KockiptGroup object and uses the current selected QListWidgetItem (group list) as carrier.

Parameters:
widget Unused.
void KockpitMainWindow::createKockpitUser ( QWidget *  widget  )  [private, slot]

Add unit.

This function created a new KockiptUser object and uses the current selected QListWidgetItem (user list) as carrier.

Parameters:
widget Unused.
void KockpitMainWindow::createMenus (  )  [private]

Create menus.

This function creates menus.

void KockpitMainWindow::createStatusBar (  )  [private]

Create status bar.

This function creates the initial status bar.

void KockpitMainWindow::deleteKockpitGroup (  )  [private, slot]

Delete unit.

This function deletes an entry (matches to the current selected KockpitGroup) which already exists from backend.

void KockpitMainWindow::deleteKockpitUser (  )  [private, slot]

Delete unit.

This function deletes an entry (matches to the current selected KockpitUser) which already exists from backend.

KockpitGroup * KockpitMainWindow::getKockpitGroupFromSelection (  )  [private]

Return Item.

This function returns the current selected KockpitGroup object from a QListWidgetItem object.

Returns:
KockpitGroup* A pointer to the current selected QListWidgetItem which carries a KockpitGroup item in USER_ROLE
KockpitUser * KockpitMainWindow::getKockpitUserFromSelection (  )  [private]

Return Item.

This function returns the current selected KockpitUser object from a QListWidgetItem object.

Returns:
KockpitUser* A pointer to the current selected QListWidgetItem which carries a KockpitUser item in USER_ROLE
void KockpitMainWindow::highlightItem ( QListWidgetItem *  item  )  [private]

Highlight QListWidgetItem.

This function hihglights the given item. It is used to mark the user who is logged in (with a little icon).

Parameters:
item A pointer to the item which should be highlighted.
void KockpitMainWindow::kockpitGroupValidated (  )  [signal]

This signal is emitted if validateion succeeded.

void KockpitMainWindow::kockpitUserAuthenticated (  )  [signal]

This signal is emitted if a user is successfully authenticated.

void KockpitMainWindow::kockpitUserUnauthenticated (  )  [signal]

This signal is emitted if a user is successfully unauthenticated.

void KockpitMainWindow::kockpitUserValidated (  )  [signal]

This signal is emitted if validateion succeeded.

void KockpitMainWindow::loadPlugins (  )  [private]

Load plugins.

This function loads all available plugins in the /plugins directory.

void KockpitMainWindow::newKockpitGroupCreated (  )  [signal]

This signal is emitted if a new group is successfully created.

void KockpitMainWindow::newKockpitUserCreated (  )  [signal]

This signal is emitted if a new user is successfully created.

void KockpitMainWindow::populatePlugins (  )  [private]

Populate plugins.

This function makes the loaded plugins available to the main application.

bool KockpitMainWindow::refreshAll (  )  [private, slot]

Refresh all.

This function refreshes the group and user list.

Returns:
true Operation successfull.
false Something went wrong.
bool KockpitMainWindow::refreshGroupList (  )  [private, slot]

Refresh view.

This function refreshes the group list.

Returns:
true Operation successfull.
false Something went wrong.
bool KockpitMainWindow::refreshUserList (  )  [private, slot]

Refresh view.

This function refreshes the user list.

Returns:
true Operation successfull.
false Something went wrong.
void KockpitMainWindow::showGroupAttributes (  )  [private, slot]

Show attributes.

This function calls the suitable function of the plugins.

See also:
KockpitIface::showAttributes(KockpitGroup *kgrp).
void KockpitMainWindow::showHelp (  )  [private, slot]

Show Help.

This function shows a help dialog.

void KockpitMainWindow::showUserAttributes (  )  [private, slot]

Show attributes.

This function calls the suitable function of the plugins.

See also:
KockpitIface::showAttributes(KockpitUser *kuser).
void KockpitMainWindow::unauthenticate (  )  [private, slot]

Unauthenticate.

Terminate current LDAP session.

void KockpitMainWindow::unhighlightItem ( QListWidgetItem *  item  )  [private]

Unhighlight QListWidgetItem.

This function unhihglights the given item. It is used to unmark the user who has currently logged out (with a little icon).

Parameters:
item A pointer to the item which should be unhighlighted.
void KockpitMainWindow::validateKockpitGroup (  )  [private, slot]

Validate unit.

This function checks (against the rules setted in the ECMA Scripts) whether the input is correct or not. It reacts by sending a signal kockpitGroupValidated() if the validation was successfull.

void KockpitMainWindow::validateKockpitUser (  )  [private, slot]

Validate unit.

This function checks (against the rules setted in the ECMA Scripts) whether the input is correct or not. It reacts by sending a signal kockpitUserValidated() if the validation was successfull.

void KockpitMainWindow::writeGroupPluginChange ( KockpitIface iface,
wraddmod  mod 
) [private]

Call plugin function (one plugin).

This function calls the corresponding plugin function writeAdditional(kgrpl) for one plugin. It delivers a actual list of KockpitUsers.

See also:
KockpitIfaces
Parameters:
iface Reference to KockpitIface Object.
mod Calling mode - this is used to separate delte from write actions.
void KockpitMainWindow::writeGroupPluginChanges ( wraddmod  mod  )  [private]

Call plugin function (all plugins).

This function calls the corresponding plugin function writeAdditional(kuserl). It delivers a actual list of KockpitGroups.

See also:
KockpitIfaces
Parameters:
mod Calling mode - this is used to separate delte from write actions.
void KockpitMainWindow::writeKockpitGroup (  )  [private, slot]

Commit unit.

This function writes a KockpitGroup item (physically) back into the backend.

void KockpitMainWindow::writeKockpitUser (  )  [private, slot]

Commit unit.

This function writes a KockpitUser item (physically) back into the backend.

void KockpitMainWindow::writeUserPluginChange ( KockpitIface iface,
wraddmod  mod 
) [private]

Call plugin function (one plugin).

This function calls the corresponding plugin function writeAdditional(kgrpl) for one plugin. It delivers a actual list of KockpitUsers.

See also:
KockpitIfaces
Parameters:
iface Reference to KockpitIface Object.
mod Calling mode - this is used to separate delte from write actions.
void KockpitMainWindow::writeUserPluginChanges ( wraddmod  mod  )  [private]

Call plugin functions (all plugins).

This function calls the corresponding plugin function writeAdditional(kgrpl). It delivers a actual list of KockpitUsers.

See also:
KockpitIfaces
Parameters:
mod Calling mode - this is used to separate delte from write actions.

Field Documentation

Show about kockpit message box.

Show about qt message box.

Container for authentication information (using for simple bind).

QListWidgetItem* KockpitMainWindow::currentAuthUserItem [private]

Pointer to the currently selected user item.

QAction* KockpitMainWindow::exitAction [private]

Exit the application.

Container for filtering and locating the backend entries suitable to the KockpitGroup object.

QListWidgetItem* KockpitMainWindow::groupLastCommited [private]

Pointer to the last commited KockpitGroup.

QAction* KockpitMainWindow::helpAction [private]

Show user help.

QMenu* KockpitMainWindow::helpMenu [private]

Help menu shown in the menu bar of this application.

List of KockpitUnitMap object which contains KockpitGroups.

Script engine. ECMA is used for validation and auto building user attributes.

List of KockpitUnitMap object which contains KockpitUsers.

Them main datasource of the application.

QStateMachine KockpitMainWindow::machine [private]

State machine which is needed to realize different application states.

It separates different situation like user validated/ user written and so on. In dependency of the different states the behaviour of the main application changes.

QMenu* KockpitMainWindow::mainMenu [private]

Main menu shown in the menu bar of this application.

QString KockpitMainWindow::plugInPath [private]

Path to the directory where the plugin libraries are located.

List of loaded plugins.

QString KockpitMainWindow::scriptPath [private]

Path to the ECMA scripts used for validation.

QLabel* KockpitMainWindow::stateLabel [private]

Label which shows the current application state in the status bar.

Container for filtering and locating the backend entries suitable to the KockpitUser object.

QListWidgetItem* KockpitMainWindow::userLastCommited [private]

Pointer to the last commited KockpitUser.

Validator who checks if user input is valid.


The documentation for this class was generated from the following files:
Generated on Wed Mar 24 09:58:14 2010 for kockpit by  doxygen 1.6.3