VidaliaWindow Class Reference

#include <vidaliawindow.h>

Inheritance diagram for VidaliaWindow:

AboutDialog BandwidthGraph ConfigDialog HelpBrowser MainWindow MessageLog NetViewer

List of all members.

Public Slots

virtual void setVisible (bool visible)
virtual void showWindow ()

Signals

void helpRequested (const QString &topic)

Public Member Functions

 VidaliaWindow (QString name, QWidget *parent=0, Qt::WFlags flags=0)
 ~VidaliaWindow ()
void setShortcut (QString shortcut, const char *slot)
void saveWindowState ()
void restoreWindowState ()
QVariant getSetting (QString name, QVariant defaultValue)
void saveSetting (QString name, QVariant value)

Private Attributes

QString _name
VSettings_settings


Detailed Description

Definition at line 27 of file vidaliawindow.h.


Constructor & Destructor Documentation

VidaliaWindow::VidaliaWindow ( QString  name,
QWidget *  parent = 0,
Qt::WFlags  flags = 0 
)

Default constructor.

Definition at line 28 of file vidaliawindow.cpp.

References _name, and _settings.

VidaliaWindow::~VidaliaWindow (  ) 

Destructor.

Definition at line 36 of file vidaliawindow.cpp.

References _settings, and saveWindowState().


Member Function Documentation

void VidaliaWindow::setShortcut ( QString  shortcut,
const char *  slot 
)

Associates a shortcut key sequence with a slot.

Definition at line 44 of file vidaliawindow.cpp.

References vApp.

Referenced by AboutDialog::AboutDialog(), and BandwidthGraph::BandwidthGraph().

void VidaliaWindow::saveWindowState (  ) 

Saves the size and location of the window.

Definition at line 51 of file vidaliawindow.cpp.

References saveSetting().

Referenced by setVisible(), and ~VidaliaWindow().

void VidaliaWindow::restoreWindowState (  ) 

Restores the last size and location of the window.

Definition at line 63 of file vidaliawindow.cpp.

References getSetting().

Referenced by setVisible().

QVariant VidaliaWindow::getSetting ( QString  setting,
QVariant  defaultValue 
)

Gets the saved value of a property associated with this window object. If no value was saved, the default value is returned.

Definition at line 92 of file vidaliawindow.cpp.

References _settings, and VSettings::value().

Referenced by MessageLog::loadSettings(), BandwidthGraph::loadSettings(), MessageLog::registerLogEvents(), and restoreWindowState().

void VidaliaWindow::saveSetting ( QString  prop,
QVariant  value 
)

Saves a value associated with a setting name for this window object.

Saves a value associated with a property name for this window object.

Definition at line 99 of file vidaliawindow.cpp.

References _settings, and VSettings::setValue().

Referenced by BandwidthGraph::saveChanges(), MessageLog::saveSettings(), and saveWindowState().

void VidaliaWindow::setVisible ( bool  visible  )  [virtual, slot]

Shows or hides this window.

Overloaded QWidget::setVisible(). If this window is already visible and visible is true, this window will be brought to the top and given focus. If visible is false, then the window state will be saved and this window will be hidden.

Definition at line 109 of file vidaliawindow.cpp.

References restoreWindowState(), and saveWindowState().

virtual void VidaliaWindow::showWindow (  )  [inline, virtual, slot]

Show this window. This method really just exists for subclasses to override, since QMainWindow::show() is non-virtual.

Reimplemented in AboutDialog, BandwidthGraph, and NetViewer.

Definition at line 55 of file vidaliawindow.h.

Referenced by ConfigDialog::applyChanges(), MainWindow::createActions(), NetViewer::showWindow(), HelpBrowser::showWindow(), ConfigDialog::showWindow(), BandwidthGraph::showWindow(), AboutDialog::showWindow(), and MainWindow::stopped().

void VidaliaWindow::helpRequested ( const QString &  topic  )  [signal]

Emitted when a VidaliaWindow requests help information on the specified topic.

Referenced by ConfigDialog::ConfigDialog(), NetViewer::help(), MessageLog::help(), ConfigDialog::help(), and MainWindow::MainWindow().


Member Data Documentation

QString VidaliaWindow::_name [private]

Name associated with this window.

Definition at line 63 of file vidaliawindow.h.

Referenced by VidaliaWindow().

Object used to store window properties

Reimplemented in BandwidthGraph, and MessageLog.

Definition at line 64 of file vidaliawindow.h.

Referenced by getSetting(), saveSetting(), VidaliaWindow(), and ~VidaliaWindow().


The documentation for this class was generated from the following files:

Generated on Sat Aug 16 17:38:37 2008 for Vidalia by  doxygen 1.5.6