114 lines
4.0 KiB
C++
114 lines
4.0 KiB
C++
/****************************************************************************
|
|
** Form implementation generated from reading ui file 'alertswidget.ui'
|
|
**
|
|
** Created: Tue May 13 19:10:14 2003
|
|
** by: The User Interface Compiler ($Id: alertswidget.cpp,v 1.4 2003/05/14 01:46:19 mkb137 Exp $)
|
|
**
|
|
** WARNING! All changes made in this file will be lost!
|
|
****************************************************************************/
|
|
|
|
#include "alertswidget.h"
|
|
|
|
#include <qvariant.h>
|
|
#include <qpushbutton.h>
|
|
#include <qlabel.h>
|
|
#include <qspinbox.h>
|
|
#include <qcheckbox.h>
|
|
#include <qlayout.h>
|
|
#include <qtooltip.h>
|
|
#include <qwhatsthis.h>
|
|
#include <klocale.h>
|
|
|
|
/*
|
|
* Constructs a AlertsWidget as a child of 'parent', with the
|
|
* name 'name' and widget flags set to 'f'.
|
|
*/
|
|
AlertsWidget::AlertsWidget( QWidget* parent, const char* name, WFlags fl )
|
|
: QWidget( parent, name, fl )
|
|
{
|
|
if ( !name )
|
|
setName( "AlertsWidget" );
|
|
|
|
layout17 = new QGridLayout( this, 1, 1, 0, 6, "layout17");
|
|
QSpacerItem* spacer = new QSpacerItem( 0, 101, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
|
layout17->addItem( spacer, 7, 0 );
|
|
|
|
layout15 = new QHBoxLayout( 0, 0, 6, "layout15");
|
|
|
|
textLabel5 = new QLabel( this, "textLabel5" );
|
|
textLabel5->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
|
|
layout15->addWidget( textLabel5 );
|
|
|
|
notificationDurationSpinBox_ = new QSpinBox( this, "notificationDurationSpinBox_" );
|
|
layout15->addWidget( notificationDurationSpinBox_ );
|
|
|
|
textLabel6 = new QLabel( this, "textLabel6" );
|
|
layout15->addWidget( textLabel6 );
|
|
|
|
layout17->addLayout( layout15, 4, 0 );
|
|
QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Preferred );
|
|
layout17->addItem( spacer_2, 2, 0 );
|
|
|
|
layout14 = new QHBoxLayout( 0, 0, 6, "layout14");
|
|
|
|
textLabel3 = new QLabel( this, "textLabel3" );
|
|
textLabel3->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
|
|
layout14->addWidget( textLabel3 );
|
|
|
|
idleTimeSpinBox_ = new QSpinBox( this, "idleTimeSpinBox_" );
|
|
layout14->addWidget( idleTimeSpinBox_ );
|
|
|
|
textLabel4 = new QLabel( this, "textLabel4" );
|
|
layout14->addWidget( textLabel4 );
|
|
|
|
layout17->addLayout( layout14, 1, 0 );
|
|
|
|
useIdleTimerCheckBox_ = new QCheckBox( this, "useIdleTimerCheckBox_" );
|
|
|
|
layout17->addWidget( useIdleTimerCheckBox_, 0, 0 );
|
|
|
|
useNotifierCheckBox_ = new QCheckBox( this, "useNotifierCheckBox_" );
|
|
|
|
layout17->addWidget( useNotifierCheckBox_, 3, 0 );
|
|
QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Preferred );
|
|
layout17->addItem( spacer_3, 5, 0 );
|
|
|
|
showOfflineNotificationsCheckBox_ = new QCheckBox( this, "showOfflineNotificationsCheckBox_" );
|
|
|
|
layout17->addWidget( showOfflineNotificationsCheckBox_, 6, 0 );
|
|
languageChange();
|
|
resize( QSize(600, 480).expandedTo(minimumSizeHint()) );
|
|
clearWState( WState_Polished );
|
|
|
|
// tab order
|
|
setTabOrder( useIdleTimerCheckBox_, idleTimeSpinBox_ );
|
|
setTabOrder( idleTimeSpinBox_, useNotifierCheckBox_ );
|
|
setTabOrder( useNotifierCheckBox_, notificationDurationSpinBox_ );
|
|
setTabOrder( notificationDurationSpinBox_, showOfflineNotificationsCheckBox_ );
|
|
}
|
|
|
|
/*
|
|
* Destroys the object and frees any allocated resources
|
|
*/
|
|
AlertsWidget::~AlertsWidget()
|
|
{
|
|
// no need to delete child widgets, Qt does it all for us
|
|
}
|
|
|
|
/*
|
|
* Sets the strings of the subwidgets using the current
|
|
* language.
|
|
*/
|
|
void AlertsWidget::languageChange()
|
|
{
|
|
setCaption( "Alerts" );
|
|
textLabel5->setText( i18n( "Hide popups after" ) );
|
|
textLabel6->setText( i18n( "seconds" ) );
|
|
textLabel3->setText( i18n( "Become idle after" ) );
|
|
textLabel4->setText( i18n( "minutes" ) );
|
|
useIdleTimerCheckBox_->setText( i18n( "Change status to \"Away-Idle\" when inactive" ) );
|
|
useNotifierCheckBox_->setText( i18n( "Show popup notifications for program events" ) );
|
|
showOfflineNotificationsCheckBox_->setText( i18n( "Show notifications when contacts go offline" ) );
|
|
}
|
|
|