Vidalia 0.3.1
Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
VidaliaTab Class Reference

#include <VidaliaTab.h>

Inheritance diagram for VidaliaTab:
BandwidthGraph MessageLog NetViewer StatusTab

Signals

void helpRequested (const QString &topic)
 
void closeTab ()
 

Public Member Functions

 VidaliaTab (const QString &title, const QString &name="", QWidget *parent=0)
 
 ~VidaliaTab ()
 
QString getTitle () const
 
void setTitle (const QString &title)
 
void setShortcut (const QString &shortcut, const char *slot)
 
QVariant getSetting (QString name, QVariant defaultValue)
 
void saveSetting (QString name, QVariant value)
 
void setOnTop (bool top)
 

Protected Member Functions

virtual void changeEvent (QEvent *e)
 
virtual void retranslateUi ()
 
virtual void closeEvent (QCloseEvent *event)
 

Protected Attributes

bool _onTop
 

Private Attributes

QString _title
 
VSettings_settings
 

Detailed Description

Definition at line 23 of file VidaliaTab.h.

Constructor & Destructor Documentation

◆ VidaliaTab()

VidaliaTab::VidaliaTab ( const QString &  title,
const QString &  name = "",
QWidget *  parent = 0 
)

Default constructor.

Definition at line 4 of file VidaliaTab.cpp.

References _settings.

◆ ~VidaliaTab()

VidaliaTab::~VidaliaTab ( )

Destructor.

Definition at line 12 of file VidaliaTab.cpp.

References _settings.

Member Function Documentation

◆ changeEvent()

void VidaliaTab::changeEvent ( QEvent *  e)
protectedvirtual

Reimplement the windows' changeEvent() method to check if the event is a QEvent::LanguageChange event. If so, call retranslateUi(), which subclasses of VidaliaWindow can reimplement to update their UI.

Definition at line 44 of file VidaliaTab.cpp.

References retranslateUi().

◆ closeEvent()

void VidaliaTab::closeEvent ( QCloseEvent *  event)
protectedvirtual

Definition at line 69 of file VidaliaTab.cpp.

References closeTab().

◆ closeTab

void VidaliaTab::closeTab ( )
signal

Referenced by closeEvent().

◆ getSetting()

QVariant VidaliaTab::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 21 of file VidaliaTab.cpp.

References _settings, and VSettings::value().

Referenced by VidaliaTabPrototype::getSetting(), BandwidthGraph::loadSettings(), MessageLog::loadSettings(), MessageLog::registerLogEvents(), and StatusTab::StatusTab().

◆ getTitle()

QString VidaliaTab::getTitle ( ) const
inline

Returns the tab's title

Definition at line 34 of file VidaliaTab.h.

References _title.

Referenced by MainWindow::addTab(), MainWindow::attachTab(), MainWindow::detachTab(), and MainWindow::handleAttachedClose().

◆ helpRequested

void VidaliaTab::helpRequested ( const QString &  topic)
signal

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

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

◆ retranslateUi()

void VidaliaTab::retranslateUi ( )
protectedvirtual

Called when the user wants to change the currently visible language.

Called when the user wants to change the currently visible language. Subclasses can reimplement this to update their UI.

Reimplemented in BandwidthGraph, MessageLog, NetViewer, and StatusTab.

Definition at line 57 of file VidaliaTab.cpp.

Referenced by changeEvent().

◆ saveSetting()

void VidaliaTab::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 28 of file VidaliaTab.cpp.

References _settings, and VSettings::setValue().

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

◆ setOnTop()

void VidaliaTab::setOnTop ( bool  top)

Sets the onTop property of the tab to top

Definition at line 63 of file VidaliaTab.cpp.

References _onTop.

◆ setShortcut()

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

Associates a shortcut key sequence with a slot.

Definition at line 35 of file VidaliaTab.cpp.

References vApp.

◆ setTitle()

void VidaliaTab::setTitle ( const QString &  title)
inline

Sets the tab's title to title

Definition at line 36 of file VidaliaTab.h.

References _title.

Referenced by BandwidthGraph::retranslateUi(), MessageLog::retranslateUi(), NetViewer::retranslateUi(), and StatusTab::retranslateUi().

Member Data Documentation

◆ _onTop

bool VidaliaTab::_onTop
protected

True if the current tab is the one being displayed

Definition at line 66 of file VidaliaTab.h.

Referenced by MessageLog::log(), BandwidthGraph::reset(), and setOnTop().

◆ _settings

VSettings* VidaliaTab::_settings
private

Object used to store window properties

Definition at line 70 of file VidaliaTab.h.

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

◆ _title

QString VidaliaTab::_title
private

Title displayed in the tab

Definition at line 69 of file VidaliaTab.h.

Referenced by getTitle(), and setTitle().


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