Ksetiwatch API Documentation


Ksetiwatch Class Reference

The main window of Ksetiwatch. More...

#include <ksetiwatch.h>

Inherits KMainWindow.

Inheritance diagram for Ksetiwatch:

Inheritance graph
[legend]
Collaboration diagram for Ksetiwatch:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ListId

Public Slots

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

Signals

void listModified (SetiLoc *, int)

Public Methods

 Ksetiwatch (const char *name=0)
 ~Ksetiwatch ()
bool startMinimized ()

Static Public Methods

SetiLocgetLocation (const QString &name)
QList< SetiLoc > & locationList ()
KswOptionsglobalOptions ()

Protected Methods

bool event (QEvent *e)
bool queryClose ()
bool queryExit ()
void startClients ()
void stopClients ()

Private Slots

void saveConfig ()
void readConfig ()
void handleTabSelection (int)
void toggleIcon ()

Detailed Description

The main window of Ksetiwatch.

This widget is the main window of Ksetiwatch. It basically consists of a tab widget with several tab pages showing details about the configured SETI@home locations. Furthermore, it acts as the central instance for maintaining the list of configured S@h locations, the main configuration file, and the `global' options.

Definition at line 130 of file ksetiwatch.h.


Member Enumeration Documentation

enum Ksetiwatch::ListId
 

These identifiers specify how the list of S@h locations can be accessed.

  • ListAdd: Add a S@h location to the list.
  • ListEdit: Update an existing S@h location in the list.
  • ListDelete: Delete a S@h location from the list.
  • ListRemove: Temporarily remove a S@h location from the list without deleting it.

Definition at line 190 of file ksetiwatch.h.


Constructor & Destructor Documentation

Ksetiwatch::Ksetiwatch const char *    name = 0
 

The constructor.

Parameters:
name  A text that can be used to identify this widget.

Definition at line 66 of file ksetiwatch.cpp.

References KTabCtl::addTab(), QObject::connect(), DockWidget::dock(), getLocation(), globalopts, handleTabSelection(), SetiLoc::id(), SetiContainer::initWUScore(), KStatusBar::insertItem(), listModified(), locationList(), readConfig(), saveConfig(), QMainWindow::setCentralWidget(), QWidget::setIcon(), KStatusBar::setItemAlignment(), QWidget::setMinimumSize(), KMainWindow::setPlainCaption(), Analysis::setSelectedLocation(), slotUpdateList(), startClients(), KMainWindow::statusBar(), and toggleIcon().

Ksetiwatch::~Ksetiwatch  
 

The destructor.

Definition at line 150 of file ksetiwatch.cpp.


Member Function Documentation

bool Ksetiwatch::startMinimized   [inline]
 

Returns the start-up mode.

Returns:
If TRUE, Ksetiwatch shall be started minimized.

Definition at line 159 of file ksetiwatch.h.

References globalopts.

Referenced by main().

SetiLoc * Ksetiwatch::getLocation const QString   name [static]
 

Returns a pointer to a configured S@h location.

Searches the list of S@h locations for the one specified by name and returns a pointer to it.

Parameters:
name  The name of the S@h location (as given by the user).
Returns:
A pointer to the SetiLoc instance, or NULL if it couldn't be found.

Definition at line 537 of file ksetiwatch.cpp.

References SetiLoc::description(), QList::first(), locationList(), and QList::next().

Referenced by Analysis::getLocation(), CompletedWUList::handleSigListDoubleClick(), CompletedWUList::handleSigListPopupCommand(), CompletedWUList::handleTreeListPopupCommand(), CompletedWUList::handleWUListPopupCommand(), AnalysisListViewItem::key(), Ksetiwatch(), LoggedSigs::LoggedSigs(), and SkyMap::showTelescopePath().

QList<SetiLoc>& Ksetiwatch::locationList   [inline, static]
 

Returns the S@h location list.

Returns:
A reference to the the list containing all configured S@h locations.

Definition at line 176 of file ksetiwatch.h.

Referenced by CompletedWUList::addAllLoggedWU(), CompletedWUList::checkForRedirect(), CompletedWUList::fillSigSumList(), CompletedWUList::fillTotalList(), CompletedWUList::fillTreeList(), getLocation(), Ksetiwatch(), Analysis::modifyStatusFilter(), queryExit(), readConfig(), UserInfo::refreshList(), DataInfo::refreshList(), Analysis::refreshList(), saveConfig(), DataInfo::showMap(), Analysis::slotAdjustAllStatusIcons(), Analysis::slotAskForLocation(), CompletedWUList::slotSelect(), Options::slotSetRefreshInterval(), Analysis::slotStartAll(), Analysis::slotStopAll(), slotUpdateList(), startClients(), and stopClients().

KswOptions* Ksetiwatch::globalOptions   [inline, static]
 

Returns a pointer to the global options.

Returns:
A pointer to a (static) KswOptions structure.

Definition at line 181 of file ksetiwatch.h.

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

Updates the list of S@h locations.

Adds or deletes the S@h location loc to/from the main list.

Parameters:
loc  The S@h location to be added/deleted.
type  Specifies what to do with loc. Either Ksetiwatch::ListAdd, or Ksetiwatch::ListDelete.

Definition at line 468 of file ksetiwatch.cpp.

References QList< SetiLoc >::append(), listModified(), locationList(), and QList< SetiLoc >::remove().

Referenced by Ksetiwatch().

void Ksetiwatch::close   [slot]
 

Reimplemented to catch the close event from the dock widget.

Reimplemented from QWidget.

Definition at line 187 of file ksetiwatch.cpp.

References QWidget::close().

bool Ksetiwatch::event QEvent   e [protected]
 

Reimplemented for internal reasons (minimizing to systray, if necessary).

Reimplemented from QWidget.

Definition at line 194 of file ksetiwatch.cpp.

References KsetiwatchApp::closedBySessionManager(), DockWidget::dock(), QWidget::event(), globalopts, QWidget::hide(), saveConfig(), Analysis::selectedLocation(), and QEvent::type().

bool Ksetiwatch::queryClose   [protected, virtual]
 

Saves the configuration on exit.

This method is called whenever the session manager closes the application. It ensures that Ksetiwatch is started in the state it had right before shutting down the KDE session.

Reimplemented from KMainWindow.

Definition at line 155 of file ksetiwatch.cpp.

References QWidget::hide(), and stopClients().

bool Ksetiwatch::queryExit   [protected, virtual]
 

Clears the list of locations on exit.

Must be done to prevent a segmentation fault when shutting down Ksetiwatch.

Reimplemented from KMainWindow.

Definition at line 170 of file ksetiwatch.cpp.

References QList< SetiLoc >::clear(), locationList(), and saveConfig().

void Ksetiwatch::startClients   [protected]
 

Starts the SETI@home clients on start of Ksetiwatch.

Clients are only started if the respective location has enabled this option.

Definition at line 511 of file ksetiwatch.cpp.

References QList< SetiLoc >::first(), locationList(), QList< SetiLoc >::next(), SetiLoc::optionStartSeti(), and SetiLoc::startClient().

Referenced by Ksetiwatch().

void Ksetiwatch::stopClients   [protected]
 

Stops the SETI@home clients on stop of Ksetiwatch.

Clients are only stopped if the respective location has enabled this option.

Definition at line 524 of file ksetiwatch.cpp.

References QList< SetiLoc >::first(), SetiContainer::isClientRunning(), locationList(), QList< SetiLoc >::next(), SetiLoc::optionStopSeti(), and SetiLoc::stopClient().

Referenced by queryClose().

void Ksetiwatch::saveConfig   [private, slot]
 

Saves the Ksetiwatch configuration.

Definition at line 231 of file ksetiwatch.cpp.

References LocSettings::arguments, LocSettings::color, QList< SetiLoc >::count(), LocSettings::customStartExe, LocSettings::customStopExe, LocSettings::description, SetiLoc::description(), LocSettings::directory, LocSettings::email, QList< SetiLoc >::first(), globalopts, LocSettings::graphics, QWidget::height(), LocSettings::keepClientAlive, locationList(), LocSettings::log, LocSettings::logDirectory, QList< SetiLoc >::next(), SetiLoc::options(), QWidget::pos(), LocSettings::priority, LocSettings::proxyPort, LocSettings::proxyServer, LocSettings::redirectLog, Analysis::selectedLocation(), QWidget::size(), QString::sprintf(), LocSettings::startSeti, LocSettings::stopAfterProcess, LocSettings::stopAfterSend, LocSettings::stopSeti, SetiLoc::timestamp(), LocSettings::useCustomStartExe, LocSettings::useCustomStopExe, LocSettings::useProxy, QWidget::width(), QWidget::x(), and QWidget::y().

Referenced by event(), Ksetiwatch(), and queryExit().

void Ksetiwatch::readConfig   [private, slot]
 

Reads the Ksetiwatch configuration from the config file.

Definition at line 350 of file ksetiwatch.cpp.

References QList< SetiLoc >::append(), LocSettings::arguments, LocSettings::color, LocSettings::customStartExe, LocSettings::customStopExe, LocSettings::description, LocSettings::directory, LocSettings::email, globalopts, LocSettings::graphics, LocSettings::keepClientAlive, locationList(), LocSettings::log, LocSettings::logDirectory, LocSettings::priority, LocSettings::proxyPort, LocSettings::proxyServer, LocSettings::redirectLog, QWidget::setGeometry(), SetiLoc::setOptions(), SetiContainer::setRefreshInterval(), SetiLoc::setTimestamp(), QString::sprintf(), LocSettings::startSeti, LocSettings::stopAfterProcess, LocSettings::stopAfterSend, LocSettings::stopSeti, LocSettings::useCustomStartExe, LocSettings::useCustomStopExe, and LocSettings::useProxy.

Referenced by Ksetiwatch().

void Ksetiwatch::handleTabSelection int    [private, slot]
 

Modifies the help text in the status bar.

Definition at line 488 of file ksetiwatch.cpp.

References KStatusBar::changeItem(), and KMainWindow::statusBar().

Referenced by Ksetiwatch().

void Ksetiwatch::toggleIcon   [private, slot]
 

Toggles dock icon on or off when the user makes changes in the options.

Definition at line 551 of file ksetiwatch.cpp.

References DockWidget::dock(), globalopts, Analysis::selectedLocation(), and DockWidget::undock().

Referenced by Ksetiwatch().

void Ksetiwatch::listModified SetiLoc  ,
int   
[signal]
 

This signal is emitted whenever the main list of S@h location has been modified.

Arguments are a pointer to the SetiLoc object involved and the particular type of action (see Ksetiwatch::ListId).

Referenced by Ksetiwatch(), and slotUpdateList().


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