|
AlbumShaper
1.0a3
|
Alerts Settings. More...
#include <alertsWidget.h>


Public Member Functions | |
| AlertsWidget (Configuration *config, QWidget *parent=0, const char *name=0) | |
| void | loadSettings () |
| void | saveSettings () |
Static Public Member Functions | |
| static void | setDefaults (Configuration *config) |
Private Attributes | |
| Configuration * | config |
| Backend config object pointer. | |
| QGridLayout * | grid |
| QLabel * | categoryLabel |
| QFrame * | horizontalLine |
| QVGroupBox * | behavior |
| QCheckBox * | showDestructiveAlerts |
| QCheckBox * | showSoftwareUpdateAlerts |
Alerts Settings.
Definition at line 30 of file alertsWidget.h.
| AlertsWidget::AlertsWidget | ( | Configuration * | config, |
| QWidget * | parent = 0, |
||
| const char * | name = 0 |
||
| ) |
Definition at line 28 of file alertsWidget.cpp.
References behavior, categoryLabel, config, grid, horizontalLine, showDestructiveAlerts, showSoftwareUpdateAlerts, and WIDGET_SPACING.
: QWidget( parent, name) { this->config = config; categoryLabel = new QLabel( tr("Alerts:"), this); QFont labelFont = categoryLabel->font(); labelFont.setWeight(QFont::Bold); categoryLabel->setFont( labelFont ); horizontalLine = new QFrame(this); horizontalLine->setLineWidth(2); horizontalLine->setMidLineWidth(1); horizontalLine->setFrameStyle( QFrame::HLine | QFrame::Raised ); behavior = new QVGroupBox( tr("Behavior"), this); showDestructiveAlerts = new QCheckBox( tr("Alert me to destructive actions"), behavior); showSoftwareUpdateAlerts = new QCheckBox( tr("Alert me to software updates"), behavior); grid = new QGridLayout( this, 4, 1, 0); grid->setSpacing( WIDGET_SPACING ); grid->addWidget( categoryLabel, 0, 0, Qt::AlignLeft ); grid->addWidget( horizontalLine, 1, 0 ); grid->addWidget( behavior, 2, 0 ); grid->setRowStretch( 3, 1 ); }
| void AlertsWidget::loadSettings | ( | ) |
Definition at line 63 of file alertsWidget.cpp.
References config, Configuration::getBool(), showDestructiveAlerts, and showSoftwareUpdateAlerts.
Referenced by ConfigurationWidget::ConfigurationWidget().
{
showDestructiveAlerts->setChecked( config->getBool( "alerts", "showDestructiveAlerts" ));
showSoftwareUpdateAlerts->setChecked( config->getBool( "alerts", "showSoftwareUpdateAlerts" ));
}
| void AlertsWidget::saveSettings | ( | ) |
Definition at line 69 of file alertsWidget.cpp.
References config, Configuration::setBool(), showDestructiveAlerts, and showSoftwareUpdateAlerts.
Referenced by ConfigurationWidget::saveSettings().
{
config->setBool( "alerts", "showDestructiveAlerts", showDestructiveAlerts->isChecked() );
config->setBool( "alerts", "showSoftwareUpdateAlerts", showSoftwareUpdateAlerts->isChecked() );
//either check for and show or remove updates availble icon
if(showSoftwareUpdateAlerts->isChecked())
((Window*)qApp->mainWidget())->getStatus()->checkForUpdates();
else
((Window*)qApp->mainWidget())->getStatus()->removeUpdatesIcon();
}
| void AlertsWidget::setDefaults | ( | Configuration * | config | ) | [static] |
Definition at line 56 of file alertsWidget.cpp.
References ALBUMSHAPER_VERSION, Configuration::setBool(), and Configuration::setString().
Referenced by Window::Window().
{
config->setBool( "alerts", "showDestructiveAlerts", true );
config->setBool( "alerts", "showSoftwareUpdateAlerts", true );
config->setString( "alerts", "loadSaveDir", QString(ALBUMSHAPER_VERSION) );
}
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 AlertsWidget(), 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().
1.7.5.1