Ksetiwatch API Documentation


UserInfo Class Reference

The widget for the User Info tab page. More...

#include <userinfo.h>

Inherits QWidget.

Inheritance diagram for UserInfo:

Inheritance graph
[legend]
Collaboration diagram for UserInfo:

Collaboration graph
[legend]
List of all members.

Public Slots

void refreshList ()
void slotUpdateList (SetiLoc *loc, int type)

Public Methods

 UserInfo (QWidget *parent=0, const char *name=0)
 ~UserInfo ()

Protected Types

enum  ColumnIds

Protected Slots

void slotUpdateUserInfoData ()
void toggleSorting (int column)

Protected Methods

void resizeEvent (QResizeEvent *e)
void paintEvent (QPaintEvent *e)
void refreshListItem (SetiLoc *loc, UserInfoListViewItem *it=0)

Protected Attributes

popListViewQListView_1
QDict< UserInfoListViewItemlvDict

Detailed Description

The widget for the User Info tab page.

This widget contains a list view with information about the users running the S@h clients.

Definition at line 49 of file userinfo.h.


Member Enumeration Documentation

enum UserInfo::ColumnIds [protected]
 

Identifiers for the columns in the User Info list view.

Definition at line 121 of file userinfo.h.


Constructor & Destructor Documentation

UserInfo::UserInfo QWidget   parent = 0,
const char *    name = 0
 

The constructor.

Parameters:
parent  The parent widget. If 0, this widget becomes a top-level widget.
name  A text that can be used to identify this widget.

Definition at line 63 of file userinfo.cpp.

References QListView::addColumn(), QObject::connect(), QListView::header(), lvDict, QWidget::move(), QListView_1, refreshList(), QListView::setColumnAlignment(), QListView::setColumnWidth(), popListView::setPopupStyle(), QListView::setShowSortIndicator(), toggleSorting(), QWidget::width(), and Ksetiwatch::TableColumn::width.

UserInfo::~UserInfo  
 

The destructor.

Definition at line 98 of file userinfo.cpp.


Member Function Documentation

void UserInfo::refreshList   [slot]
 

Refreshes all items in the list view.

If corresponding list view item for a S@h location does not exist, it is created on-the-fly.

Definition at line 116 of file userinfo.cpp.

References QList< SetiLoc >::first(), SetiLoc::id(), Ksetiwatch::locationList(), lvDict, QList< SetiLoc >::next(), refreshListItem(), and slotUpdateList().

Referenced by UserInfo().

void UserInfo::slotUpdateList SetiLoc   loc,
int    type
[slot]
 

Updates the private dictionary of S@h locations.

Updates the private list of S@h locations with the location loc. The type parameter specifies what to do with loc.

Parameters:
loc  The S@h location to be updated.
type  The type of action to be performed with loc. See Ksetiwatch::ListId for details.

Definition at line 161 of file userinfo.cpp.

References QObject::connect(), QObject::disconnect(), SetiLoc::id(), QDict< UserInfoListViewItem >::insert(), lvDict, QListView_1, refreshListItem(), QDict< UserInfoListViewItem >::remove(), and slotUpdateUserInfoData().

Referenced by refreshList().

void UserInfo::resizeEvent QResizeEvent   e [protected]
 

Resizes and rearranges widgets in the tab page when the window size changes.

A relict from ancient times when there were no layout widgets.

Parameters:
e  An object containing details about the resize event.

Reimplemented from QWidget.

Definition at line 103 of file userinfo.cpp.

References QWidget::height(), QListView_1, and QWidget::resize().

void UserInfo::paintEvent QPaintEvent   e [protected]
 

Reimplemented to tell the list view whether it shall draw grid lines.

Parameters:
e  An object containing details about the paint event.

Reimplemented from QWidget.

Definition at line 109 of file userinfo.cpp.

References globalopts, QWidget::paintEvent(), QListView_1, and popListView::setGridEnabled().

void UserInfo::refreshListItem SetiLoc   loc,
UserInfoListViewItem   it = 0
[protected]
 

Refreshes all columns of the list view item of location loc.

Parameters:
loc  A pointer to the SetiLoc object.
it  A pointer to the list view item to be updated. If 0, the item will be looked up in the private dictionary.

Definition at line 132 of file userinfo.cpp.

References SetiContainer::averageCPUTime(), SetiContainer::convertTime(), SetiLoc::description(), SetiContainer::exists(), globalopts, SetiLoc::id(), SetiContainer::lastResultTimeString(), lvDict, QString::number(), SetiContainer::numberOfResults(), SetiContainer::registerTimeString(), QListViewItem::setText(), SetiContainer::totalCPUTime(), and SetiContainer::userName().

Referenced by refreshList(), slotUpdateList(), and slotUpdateUserInfoData().

void UserInfo::slotUpdateUserInfoData   [protected, slot]
 

Determines the sender of the signal and refreshes the corresponding item in the Data Info list.

Definition at line 202 of file userinfo.cpp.

References refreshListItem(), and QObject::sender().

Referenced by slotUpdateList().

void UserInfo::toggleSorting int    column [protected, slot]
 

Toggles the sorting order of column column.

Definition at line 195 of file userinfo.cpp.

References QListView_1, and QListView::setSorting().

Referenced by UserInfo().


Member Data Documentation

popListView* UserInfo::QListView_1 [protected]
 

The list view shown in the Data Info tab page.

Definition at line 114 of file userinfo.h.

Referenced by paintEvent(), resizeEvent(), slotUpdateList(), toggleSorting(), and UserInfo().

QDict<UserInfoListViewItem> UserInfo::lvDict [protected]
 

A dictionary that stores all the list view items currently shown in the Data Info tab page.

Items are identified by the unique ID of a S@h location.

Definition at line 118 of file userinfo.h.

Referenced by refreshList(), refreshListItem(), slotUpdateList(), and UserInfo().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Ksetiwatch API Version 2.6.1.
Documentation copyright © 2000-2003 Gordon Machel.
Generated on Fri Jun 6 00:29:06 2003 by doxygen 1.2.18, written by Dimitri van Heesch, © 1997-2002