Ksetiwatch API Documentation


CompletedWUList Class Reference

The widget for the Completed Work Units tab page. More...

#include <completedwulist.h>

Inherits QWidget.

Inheritance diagram for CompletedWUList:

Inheritance graph
[legend]
Collaboration diagram for CompletedWUList:

Collaboration graph
[legend]
List of all members.

Public Slots

void slotUpdateList (SetiLoc *loc, int type)

Signals

void listUpdated ()

Public Methods

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

Protected Types

enum  ListId
enum  WulColumnIds
enum  WusColumnIds
enum  SilColumnIds
enum  SisColumnIds
enum  popupIds

Protected Slots

void slotSelect (QListViewItem *item)
void prepareTreeListPopupMenu ()
void handleTreeListPopupCommand (int id)
void handleWUListPopupCommand (int id)
void handleSigListPopupCommand (int id)
void toggleSorting (int column)
void handleSigListDoubleClick (QListViewItem *sit)
void slotRefreshList (SetiLoc *loc)

Protected Methods

void resizeEvent (QResizeEvent *e)
void paintEvent (QPaintEvent *e)
void createList (popListView *list, Ksetiwatch::TableColumn tc[])
void fillTreeList ()
void fillWUList (SetiLoc *loc)
void fillTotalList ()
void fillSigList (SetiLoc *loc)
void fillSigSumList ()
void addLoggedWU (SetiLoc *loc)
void addAllLoggedWU ()
void refreshList (SetiLoc *loc)
SetiLoccheckForRedirect (SetiLoc *loc)
void updateList (SetiLoc *loc, int type)
void fillSigSumColumns (QListViewItem *it, const int wus, const int spikes, const int gaussians, const int pulses, const int triplets, const WUScore &top)
void fillTotalColumns (QListViewItem *it, const int wus, const int nzwus, const double totime, const WUScore &top)

Protected Attributes

QSplittersplitview
popListViewtreelist
popListViewcwuList [4]
int currentView

Detailed Description

The widget for the Completed Work Units tab page.

Definition at line 77 of file completedwulist.h.


Member Enumeration Documentation

enum CompletedWUList::ListId [protected]
 

Identifiers for the four different list views.

Definition at line 277 of file completedwulist.h.

enum CompletedWUList::WulColumnIds [protected]
 

Identifiers for the columns in the WU list view.

Definition at line 279 of file completedwulist.h.

enum CompletedWUList::WusColumnIds [protected]
 

Identifiers for the columns in the WU summary list view.

Definition at line 283 of file completedwulist.h.

enum CompletedWUList::SilColumnIds [protected]
 

Identifiers for the columns in the signal list view.

Definition at line 287 of file completedwulist.h.

enum CompletedWUList::SisColumnIds [protected]
 

Identifiers for the columns in the signal summary list view.

Definition at line 291 of file completedwulist.h.

enum CompletedWUList::popupIds [protected]
 

Identifiers for the right-click popup menu items.

Definition at line 295 of file completedwulist.h.


Constructor & Destructor Documentation

CompletedWUList::CompletedWUList 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 123 of file completedwulist.cpp.

References QListView::addColumn(), QObject::connect(), createList(), currentView, cwuList, fillTreeList(), handleSigListDoubleClick(), handleSigListPopupCommand(), handleTreeListPopupCommand(), handleWUListPopupCommand(), QListView::header(), QWidget::hide(), popListView::insertPopupItem(), popListView::popupMenu(), prepareTreeListPopupMenu(), popListView::setPopupStyle(), QSplitter::setResizeMode(), QListView::setRootIsDecorated(), QWidget::show(), splitview, toggleSorting(), and treelist.

CompletedWUList::~CompletedWUList  
 

The destructor.

Definition at line 266 of file completedwulist.cpp.


Member Function Documentation

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

Updates the tree list.

Updates the tree list (at the left of the tab page) with S@h location loc. type specifies in detail what to do with loc (valid IDs are Ksetiwatch::ListAdd, Ksetiwatch::ListEdit, and Ksetiwatch::ListDelete).

Parameters:
loc  A pointer to the SetiLoc object.
type  The type of action to be performed with loc. See Ksetiwatch::ListId for details.

Definition at line 1139 of file completedwulist.cpp.

References refreshList(), and updateList().

void CompletedWUList::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 271 of file completedwulist.cpp.

References QWidget::height(), and splitview.

void CompletedWUList::paintEvent QPaintEvent   e [protected]
 

Reimplemented to tell the list views whether they shall draw grid lines.

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

Reimplemented from QWidget.

Definition at line 277 of file completedwulist.cpp.

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

void CompletedWUList::createList popListView   list,
Ksetiwatch::TableColumn    tc[]
[protected]
 

Creates a list view.

This method adds the columns defined in tc to the list view list.

Parameters:
list  A pointer to a popListView.
tc  An array of TableColumn structures defining the columns in the list view.

Definition at line 310 of file completedwulist.cpp.

References QListView::addColumn(), QListView::setColumnAlignment(), QListView::setColumnWidth(), Ksetiwatch::TableColumn::text, QWidget::width(), and Ksetiwatch::TableColumn::width.

Referenced by CompletedWUList().

void CompletedWUList::fillTreeList   [protected]
 

Fills the tree list view with items representing the different S@h locations.

Definition at line 285 of file completedwulist.cpp.

References QObject::connect(), QList::first(), popListView::insertRootItem(), Ksetiwatch::locationList(), QList::next(), QListViewItem::setOpen(), QListView::setSelected(), QListView::setSorting(), slotSelect(), QListViewItem::sortChildItems(), treelist, and updateList().

Referenced by CompletedWUList().

void CompletedWUList::fillWUList SetiLoc   loc [protected]
 

Fills a list view with data about the logged WUs of S@h location loc.

The list of logged work units is read from the file SETILog.csv in the log directory of location loc (by default, this is the working directory of the client).

Parameters:
loc  A pointer to a SetiLoc object for which the logged WUs are to be shown.

Definition at line 373 of file completedwulist.cpp.

References QFile::atEnd(), QFile::close(), SetiContainer::convertDecToString(), SetiContainer::convertRAToString(), SetiContainer::convertTime(), cwuList, QString::find(), globalopts, QString::isEmpty(), SetiLoc::logDirectory(), QString::mid(), QString::number(), QFile::open(), CSVDataBase::readItem(), QApplication::restoreOverrideCursor(), QString::setNum(), QApplication::setOverrideCursor(), QListViewItem::setText(), SetiContainer::teraFlops(), QString::toDouble(), QWidget::x(), and QWidget::y().

Referenced by fillSigList(), handleTreeListPopupCommand(), refreshList(), and slotSelect().

void CompletedWUList::fillTotalList   [protected]
 

Fills a list view with a summary of logged WUs for all S@h locations.

The list of logged work units is read from the file SETILog.csv in the log directory of the respective S@h locations (by default, this is the working directory of the client).

Definition at line 483 of file completedwulist.cpp.

References QFile::atEnd(), checkForRedirect(), TripletScore::chirprate, PulseScore::chirprate, GaussianScore::chirprate, SpikeScore::chirprate, GaussianScore::chisq, QFile::close(), cwuList, SetiLoc::description(), fillTotalColumns(), QList::first(), WUScore::gaussian, globalopts, SetiContainer::initWUScore(), QString::isEmpty(), QListViewItem::itemBelow(), Ksetiwatch::locationList(), SetiLoc::logDirectory(), QList::next(), QFile::open(), TripletScore::period, PulseScore::period, PulseScore::power, GaussianScore::power, SpikeScore::power, WUScore::pulse, CSVDataBase::readItem(), QApplication::restoreOverrideCursor(), TripletScore::score, PulseScore::score, GaussianScore::score, QApplication::setOverrideCursor(), QListViewItem::setText(), WUScore::spike, QString::toDouble(), WUScore::triplet, TripletScore::wu_name, PulseScore::wu_name, GaussianScore::wu_name, and SpikeScore::wu_name.

Referenced by handleTreeListPopupCommand(), refreshList(), and slotSelect().

void CompletedWUList::fillSigList SetiLoc   loc [protected]
 

Fills a list view with data about the returned signals of S@h location loc.

The list of returned signals is read from the file SETIResult.log in the log directory of location loc (by default, this is the working directory of the client).

Parameters:
loc  A pointer to a SetiLoc object for which the list of returned signals is to be shown.

Definition at line 647 of file completedwulist.cpp.

References QTextStream::atEnd(), QFile::close(), cwuList, SpikeScore::fft_len, fillWUList(), QString::find(), QString::length(), SetiLoc::logDirectory(), SetiLoc::loggedGaussianSignal(), SetiLoc::loggedPulseSignal(), SetiLoc::loggedSpikeSignal(), SetiLoc::loggedTripletSignal(), QString::mid(), QListViewItem::nextSibling(), QString::number(), QFile::open(), QWidget::pos(), SpikeScore::power, QTextStream::readLine(), QApplication::restoreOverrideCursor(), QString::right(), TripletScore::score, PulseScore::score, GaussianScore::score, QApplication::setOverrideCursor(), QListViewItem::setText(), QString::startsWith(), and QListViewItem::text().

Referenced by handleTreeListPopupCommand(), refreshList(), and slotSelect().

void CompletedWUList::fillSigSumList   [protected]
 

Fills a list view with a summary of returned signals for all S@h locations.

The list of returned signals is read from the file SETILog.csv in the log directory of the respective S@h locations (by default, this is the working directory of the client).

Definition at line 755 of file completedwulist.cpp.

References QTextStream::atEnd(), checkForRedirect(), QFile::close(), cwuList, SetiLoc::description(), SpikeScore::fft_len, fillSigSumColumns(), QString::find(), QList< SetiLoc >::first(), WUScore::gaussian, SetiContainer::initWUScore(), QListViewItem::itemBelow(), QString::length(), Ksetiwatch::locationList(), SetiLoc::logDirectory(), SetiLoc::loggedGaussianSignal(), SetiLoc::loggedPulseSignal(), SetiLoc::loggedSpikeSignal(), SetiLoc::loggedTripletSignal(), QList< SetiLoc >::next(), QFile::open(), QWidget::pos(), SpikeScore::power, WUScore::pulse, QTextStream::readLine(), QApplication::restoreOverrideCursor(), QString::right(), TripletScore::score, PulseScore::score, GaussianScore::score, SpikeScore::score, QApplication::setOverrideCursor(), QListViewItem::setText(), WUScore::spike, QString::startsWith(), and WUScore::triplet.

Referenced by handleTreeListPopupCommand(), refreshList(), and slotSelect().

void CompletedWUList::addLoggedWU SetiLoc   loc [protected]
 

Adds the logged WUs of S@h location loc to the skymap window.

Parameters:
loc  A pointer to a SetiLoc object.

Definition at line 1146 of file completedwulist.cpp.

References SkyMap::addLocation(), QFile::atEnd(), QFile::close(), SetiLoc::color(), SetiLoc::description(), QString::find(), SkyMap::instance(), QString::isEmpty(), SetiLoc::logDirectory(), QString::mid(), QFile::open(), CSVDataBase::readItem(), QApplication::restoreOverrideCursor(), QApplication::setOverrideCursor(), and QString::toDouble().

Referenced by addAllLoggedWU(), and handleTreeListPopupCommand().

void CompletedWUList::addAllLoggedWU   [protected]
 

Adds the logged WUs of all S@h locations to the skymap window.

Definition at line 1180 of file completedwulist.cpp.

References addLoggedWU(), QList< SetiLoc >::first(), Ksetiwatch::locationList(), and QList< SetiLoc >::next().

Referenced by handleTreeListPopupCommand().

void CompletedWUList::refreshList SetiLoc   loc [protected]
 

Refreshes the currently visible list view.

Parameters:
loc  A pointer to the SetiLoc object used to refresh the data.

Definition at line 1059 of file completedwulist.cpp.

References QListView::currentItem(), SetiLoc::description(), fillSigList(), fillSigSumList(), fillTotalList(), fillWUList(), QListViewItem::parent(), QListViewItem::text(), and treelist.

Referenced by slotRefreshList(), and slotUpdateList().

SetiLoc * CompletedWUList::checkForRedirect SetiLoc   loc [protected]
 

Checks whether the log directory of S@h location loc is redirected to another S@h location.

Parameters:
loc  A pointer to a SetiLoc object that is to be checked.
Returns:
A pointer to a SetiLoc object to which the log directory of loc is redirected, or 0 if it is not redirected.

Definition at line 898 of file completedwulist.cpp.

References QString::append(), SetiContainer::directory(), QList::first(), QString::length(), Ksetiwatch::locationList(), SetiLoc::logDirectory(), QList::next(), SetiLoc::options(), LocSettings::redirectLog, and QString::stripWhiteSpace().

Referenced by fillSigSumList(), and fillTotalList().

void CompletedWUList::updateList SetiLoc   loc,
int    type
[protected]
 

Updates the tree list.

Updates the tree list (at the left of the tab page) with S@h location loc. type specifies in detail what to do with loc (valid IDs are Ksetiwatch::ListAdd, Ksetiwatch::ListEdit, and Ksetiwatch::ListDelete).

Parameters:
loc  A pointer to the SetiLoc object.
type  The type of action to be performed with loc. See Ksetiwatch::ListId for details.

Definition at line 1094 of file completedwulist.cpp.

References QObject::connect(), SetiLoc::description(), QObject::disconnect(), QListViewItem::firstChild(), QListView::firstChild(), SetiLoc::id(), popListView::insertChildItem(), QListViewItem::nextSibling(), QListViewItem::setText(), slotRefreshList(), QListViewItem::sortChildItems(), QListViewItem::text(), and treelist.

Referenced by fillTreeList(), and slotUpdateList().

void CompletedWUList::fillSigSumColumns QListViewItem   it,
const int    wus,
const int    spikes,
const int    gaussians,
const int    pulses,
const int    triplets,
const WUScore   top
[protected]
 

Sets the columns of list view item it to the given arguments.

Parameters:
it  A pointer to the list view item.
wus  The number of work units.
spikes  The number of spikes returned.
gaussians  The number of gaussians returned.
pulses  The number of pulses returned.
triplets  The number of triplets returned.
top  A WUScore structure containing the data of the top signals.

Definition at line 964 of file completedwulist.cpp.

References WUScore::gaussian, QString::number(), WUScore::pulse, TripletScore::score, PulseScore::score, GaussianScore::score, SpikeScore::score, QListViewItem::setText(), WUScore::spike, and WUScore::triplet.

Referenced by fillSigSumList().

void CompletedWUList::fillTotalColumns QListViewItem   it,
const int    wus,
const int    nzwus,
const double    totime,
const WUScore   top
[protected]
 

Sets the columns of list view item it to the given arguments.

Parameters:
it  A pointer to the list view item.
wus  The number of work units.
nzwus  The number of work units with non-zero processing time.
totime  The total CPU processing time.
top  A WUScore structure containing the data of the top signals.

Definition at line 926 of file completedwulist.cpp.

References GaussianScore::chisq, SetiContainer::convertTime(), WUScore::gaussian, globalopts, QString::number(), TripletScore::period, PulseScore::period, PulseScore::power, GaussianScore::power, SpikeScore::power, WUScore::pulse, TripletScore::score, PulseScore::score, GaussianScore::score, QListViewItem::setText(), WUScore::spike, WUScore::triplet, and QWidget::x().

Referenced by fillTotalList().

void CompletedWUList::slotSelect QListViewItem   item [protected, slot]
 

Processes mouse-button click event on the tree list.

Parameters:
item  The list view item clicked, or 0 if the click event didn't happen on an item.

Definition at line 322 of file completedwulist.cpp.

References currentView, cwuList, fillSigList(), fillSigSumList(), fillTotalList(), fillWUList(), QList< SetiLoc >::first(), SetiLoc::id(), Ksetiwatch::locationList(), QList< SetiLoc >::next(), QListViewItem::parent(), and QListViewItem::text().

Referenced by fillTreeList().

void CompletedWUList::prepareTreeListPopupMenu   [protected, slot]
 

Disables menu items depending on which tree list item is chosen.

Definition at line 992 of file completedwulist.cpp.

References QListView::currentItem(), QListViewItem::parent(), popListView::popupMenu(), QListViewItem::text(), and treelist.

Referenced by CompletedWUList().

void CompletedWUList::handleTreeListPopupCommand int    id [protected, slot]
 

Processes a command from the right-click popup menu of the tree list.

Parameters:
id  The identifier of the menu item selected.

Definition at line 1007 of file completedwulist.cpp.

References addAllLoggedWU(), addLoggedWU(), SkyMap::clearMap(), QListView::currentItem(), fillSigList(), fillSigSumList(), fillTotalList(), fillWUList(), Ksetiwatch::getLocation(), QListViewItem::parent(), SkyMap::showMap(), QListViewItem::text(), treelist, and QWidget::update().

Referenced by CompletedWUList().

void CompletedWUList::handleWUListPopupCommand int    id [protected, slot]
 

Processes a command from the right-click popup menu of the WU list.

Parameters:
id  The identifier of the menu item selected.

Definition at line 1191 of file completedwulist.cpp.

References SkyMap::addLocation(), SetiLoc::color(), QListView::currentItem(), cwuList, SetiLoc::description(), Ksetiwatch::getLocation(), QWidget::pos(), QWidget::repaint(), QDialog::show(), SkyMap::showMap(), QStringList::split(), QListViewItem::text(), and treelist.

Referenced by CompletedWUList().

void CompletedWUList::handleSigListPopupCommand int    id [protected, slot]
 

Processes a command from the right-click popup menu of the signal list.

Parameters:
id  The identifier of the menu item selected.

Definition at line 1228 of file completedwulist.cpp.

References QListView::currentItem(), cwuList, SetiLoc::description(), Ksetiwatch::getLocation(), QDialog::show(), QListViewItem::text(), and treelist.

Referenced by CompletedWUList().

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

Toggles the sorting order of column column.

Definition at line 1264 of file completedwulist.cpp.

References currentView, and cwuList.

Referenced by CompletedWUList().

void CompletedWUList::handleSigListDoubleClick QListViewItem   sit [protected, slot]
 

Shows the Logged Signals dialog after double-clicking an item in the signal list.

Parameters:
sit  A pointer to the list view item that was double-clicked.

Definition at line 1249 of file completedwulist.cpp.

References QListView::currentItem(), SetiLoc::description(), Ksetiwatch::getLocation(), QDialog::show(), QListViewItem::text(), and treelist.

Referenced by CompletedWUList().

void CompletedWUList::slotRefreshList SetiLoc   loc [protected, slot]
 

Refreshes the currently visible list view.

Parameters:
loc  A pointer to the SetiLoc object used to refresh the data.

Definition at line 1087 of file completedwulist.cpp.

References listUpdated(), and refreshList().

Referenced by updateList().

void CompletedWUList::listUpdated   [signal]
 

This signal is emitted whenever a list has been updated.

Needed to save potential new record signals.

Todo:
Check for a better implementation.

Referenced by slotRefreshList().


Member Data Documentation

QSplitter* CompletedWUList::splitview [protected]
 

The main widget of this tab.

All list views below are children of this widget.

Definition at line 270 of file completedwulist.h.

Referenced by CompletedWUList(), and resizeEvent().

popListView* CompletedWUList::treelist [protected]
 

The tree list at the left.

Always visible.

Definition at line 272 of file completedwulist.h.

Referenced by CompletedWUList(), fillTreeList(), handleSigListDoubleClick(), handleSigListPopupCommand(), handleTreeListPopupCommand(), handleWUListPopupCommand(), prepareTreeListPopupMenu(), refreshList(), and updateList().

popListView* CompletedWUList::cwuList[4] [protected]
 

Four different list views (WU summary list, WU list, signal summary list, signal list).

Definition at line 275 of file completedwulist.h.

Referenced by CompletedWUList(), fillSigList(), fillSigSumList(), fillTotalList(), fillWUList(), handleSigListPopupCommand(), handleWUListPopupCommand(), paintEvent(), slotSelect(), and toggleSorting().

int CompletedWUList::currentView [protected]
 

Determines which list is currently shown.

Definition at line 297 of file completedwulist.h.

Referenced by CompletedWUList(), slotSelect(), and toggleSorting().


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:28:41 2003 by doxygen 1.2.18, written by Dimitri van Heesch, © 1997-2002