#include <vidaliawindow.h>
Inheritance diagram for VidaliaWindow:
Public Slots | |
bool | close () |
void | show () |
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 |
VidaliaSettings * | _settings |
bool | _previouslyShown |
Definition at line 38 of file vidaliawindow.h.
VidaliaWindow::VidaliaWindow | ( | QString | name, | |
QWidget * | parent = 0 , |
|||
Qt::WFlags | flags = 0 | |||
) |
Default constructor.
Definition at line 39 of file vidaliawindow.cpp.
References _name, _previouslyShown, and _settings.
VidaliaWindow::~VidaliaWindow | ( | ) |
Destructor.
Definition at line 48 of file vidaliawindow.cpp.
References _settings, and saveWindowState().
void VidaliaWindow::setShortcut | ( | QString | shortcut, | |
const char * | slot | |||
) |
Associates a shortcut key sequence with a slot.
Definition at line 56 of file vidaliawindow.cpp.
Referenced by AboutDialog::AboutDialog(), and BandwidthGraph::BandwidthGraph().
void VidaliaWindow::saveWindowState | ( | ) |
Saves the size and location of the window.
Definition at line 64 of file vidaliawindow.cpp.
References saveSetting().
Referenced by close(), and ~VidaliaWindow().
void VidaliaWindow::restoreWindowState | ( | ) |
Restores the last size and location of the window.
Definition at line 72 of file vidaliawindow.cpp.
References getSetting().
Referenced by show().
QVariant VidaliaWindow::getSetting | ( | QString | name, | |
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 90 of file vidaliawindow.cpp.
References _name, _settings, and VidaliaSettings::value().
Referenced by MessageLog::loadSettings(), BandwidthGraph::loadSettings(), MessageLog::registerLogEvents(), and restoreWindowState().
void VidaliaWindow::saveSetting | ( | QString | name, | |
QVariant | value | |||
) |
Saves a value associated with a setting name for this window object.
Definition at line 98 of file vidaliawindow.cpp.
References _name, _settings, and VidaliaSettings::setValue().
Referenced by BandwidthGraph::saveChanges(), MessageLog::saveSettings(), and saveWindowState().
bool VidaliaWindow::close | ( | ) | [slot] |
Overloaded QWidget::close() method. Saves the window state and closes the window. Returns true if the window was closed.
Definition at line 107 of file vidaliawindow.cpp.
References saveWindowState().
Referenced by AboutDialog::AboutDialog(), and BandwidthGraph::BandwidthGraph().
void VidaliaWindow::show | ( | ) | [slot] |
Overloaded QWidget::show().
Reimplemented in AboutDialog, BandwidthGraph, and ConfigDialog.
Definition at line 115 of file vidaliawindow.cpp.
References _previouslyShown, and restoreWindowState().
Referenced by HelpBrowser::show(), ConfigDialog::show(), BandwidthGraph::show(), AboutDialog::show(), MainWindow::showMessageLog(), and MainWindow::showNetwork().
QString VidaliaWindow::_name [private] |
Name associated with this window.
Definition at line 69 of file vidaliawindow.h.
Referenced by getSetting(), saveSetting(), and VidaliaWindow().
VidaliaSettings* VidaliaWindow::_settings [private] |
Object used to store window properties
Reimplemented in BandwidthGraph, and MessageLog.
Definition at line 70 of file vidaliawindow.h.
Referenced by getSetting(), saveSetting(), VidaliaWindow(), and ~VidaliaWindow().
bool VidaliaWindow::_previouslyShown [private] |
True if show() has been called for this window.
Definition at line 71 of file vidaliawindow.h.
Referenced by show(), and VidaliaWindow().