Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

AlertsWidget Class Reference

#include <alertsWidget.h>

Inheritance diagram for AlertsWidget:

[legend]
Collaboration diagram for AlertsWidget:
[legend]
List of all members.

Detailed Description

Alerts Settings.

Definition at line 30 of file alertsWidget.h.

Public Member Functions

 AlertsWidget (Configuration *config, QWidget *parent=0, const char *name=0)
void loadSettings ()
void saveSettings ()

Static Public Member Functions

void setDefaults (Configuration *config)

Private Attributes

Configurationconfig
 Backend config object pointer.

QGridLayout * grid
QLabelcategoryLabel
QFramehorizontalLine
QVGroupBox * behavior
QCheckBox * showDestructiveAlerts
QCheckBox * showSoftwareUpdateAlerts


Constructor & Destructor Documentation

AlertsWidget::AlertsWidget Configuration config,
QWidget parent = 0,
const char *  name = 0
 

Definition at line 28 of file alertsWidget.cpp.

References AlertsWidget(), behavior, categoryLabel, grid, horizontalLine, showDestructiveAlerts, showSoftwareUpdateAlerts, and WIDGET_SPACING.

Referenced by AlertsWidget().

00029 : QWidget( parent, name) 00030 { 00031 this->config = config; 00032 00033 categoryLabel = new QLabel( tr("Alerts:"), this); 00034 QFont labelFont = categoryLabel->font(); 00035 labelFont.setWeight(QFont::Bold); 00036 categoryLabel->setFont( labelFont ); 00037 00038 horizontalLine = new QFrame(this); 00039 horizontalLine->setLineWidth(2); 00040 horizontalLine->setMidLineWidth(1); 00041 horizontalLine->setFrameStyle( QFrame::HLine | QFrame::Raised ); 00042 00043 behavior = new QVGroupBox( tr("Behavior"), this); 00044 showDestructiveAlerts = new QCheckBox( tr("Alert me to destructive actions"), behavior); 00045 showSoftwareUpdateAlerts = new QCheckBox( tr("Alert me to software updates"), behavior); 00046 00047 grid = new QGridLayout( this, 4, 1, 0); 00048 grid->setSpacing( WIDGET_SPACING ); 00049 00050 grid->addWidget( categoryLabel, 0, 0, Qt::AlignLeft ); 00051 grid->addWidget( horizontalLine, 1, 0 ); 00052 grid->addWidget( behavior, 2, 0 ); 00053 grid->setRowStretch( 3, 1 ); 00054 }


Member Function Documentation

void AlertsWidget::loadSettings  ) 
 

Definition at line 63 of file alertsWidget.cpp.

References config, Configuration::getBool(), showDestructiveAlerts, and showSoftwareUpdateAlerts.

Referenced by ConfigurationWidget::ConfigurationWidget().

00064 { 00065 showDestructiveAlerts->setChecked( config->getBool( "alerts", "showDestructiveAlerts" )); 00066 showSoftwareUpdateAlerts->setChecked( config->getBool( "alerts", "showSoftwareUpdateAlerts" )); 00067 }

void AlertsWidget::saveSettings  ) 
 

Definition at line 69 of file alertsWidget.cpp.

References config, Configuration::setBool(), showDestructiveAlerts, and showSoftwareUpdateAlerts.

Referenced by ConfigurationWidget::saveSettings().

00070 { 00071 config->setBool( "alerts", "showDestructiveAlerts", showDestructiveAlerts->isChecked() ); 00072 config->setBool( "alerts", "showSoftwareUpdateAlerts", showSoftwareUpdateAlerts->isChecked() ); 00073 00074 //either check for and show or remove updates availble icon 00075 if(showSoftwareUpdateAlerts->isChecked()) 00076 ((Window*)qApp->mainWidget())->getStatus()->checkForUpdates(); 00077 else 00078 ((Window*)qApp->mainWidget())->getStatus()->removeUpdatesIcon(); 00079 }

void AlertsWidget::setDefaults Configuration config  )  [static]
 

Definition at line 56 of file alertsWidget.cpp.

References ALBUMSHAPER_VERSION, Configuration::setBool(), setDefaults(), and Configuration::setString().

Referenced by setDefaults().

00057 { 00058 config->setBool( "alerts", "showDestructiveAlerts", true ); 00059 config->setBool( "alerts", "showSoftwareUpdateAlerts", true ); 00060 config->setString( "alerts", "loadSaveDir", QString(ALBUMSHAPER_VERSION) ); 00061 }


Member Data Documentation

QVGroupBox* AlertsWidget::behavior [private]
 

Definition at line 49 of file alertsWidget.h.

Referenced by AlertsWidget().

QLabel* AlertsWidget::categoryLabel [private]
 

Definition at line 46 of file alertsWidget.h.

Referenced by AlertsWidget().

Configuration* AlertsWidget::config [private]
 

Backend config object pointer.

Definition at line 42 of file alertsWidget.h.

Referenced by loadSettings(), and saveSettings().

QGridLayout* AlertsWidget::grid [private]
 

Definition at line 44 of file alertsWidget.h.

Referenced by AlertsWidget().

QFrame* AlertsWidget::horizontalLine [private]
 

Definition at line 47 of file alertsWidget.h.

Referenced by AlertsWidget().

QCheckBox* AlertsWidget::showDestructiveAlerts [private]
 

Definition at line 50 of file alertsWidget.h.

Referenced by AlertsWidget(), loadSettings(), and saveSettings().

QCheckBox* AlertsWidget::showSoftwareUpdateAlerts [private]
 

Definition at line 51 of file alertsWidget.h.

Referenced by AlertsWidget(), loadSettings(), and saveSettings().


The documentation for this class was generated from the following files:
Generated on Sun Mar 4 19:43:04 2007 for AlbumShaper by doxygen 1.3.7