kio Library API Documentation

knotifywidgetbase.cpp

00001 #include <klocale.h>
00002 /****************************************************************************
00003 ** Form implementation generated from reading ui file './knotifywidgetbase.ui'
00004 **
00005 ** Created: Don Sep 5 12:33:38 2002
00006 **      by:  The User Interface Compiler (uic)
00007 **
00008 ** WARNING! All changes made in this file will be lost!
00009 ****************************************************************************/
00010 #include "knotifywidgetbase.h"
00011 
00012 #include <qvariant.h>
00013 #include <kcombobox.h>
00014 #include <klistview.h>
00015 #include <kurlrequester.h>
00016 #include <qcheckbox.h>
00017 #include <qgroupbox.h>
00018 #include <qheader.h>
00019 #include <qpushbutton.h>
00020 #include <qlayout.h>
00021 #include <qtooltip.h>
00022 #include <qwhatsthis.h>
00023 
00024 /* 
00025  *  Constructs a KNotifyWidgetBase which is a child of 'parent', with the 
00026  *  name 'name' and widget flags set to 'f'.
00027  */
00028 KNotifyWidgetBase::KNotifyWidgetBase( QWidget* parent,  const char* name, WFlags fl )
00029     : QWidget( parent, name, fl )
00030 {
00031     if ( !name )
00032     setName( "KNotifyWidgetBase" );
00033     resize( 618, 516 ); 
00034     setCaption( tr2i18n( "Form2" ) );
00035     KNotifyWidgetBaseLayout = new QVBoxLayout( this, 11, 6, "KNotifyWidgetBaseLayout"); 
00036 
00037     m_listview = new KListView( this, "m_listview" );
00038     m_listview->addColumn( QString::null );
00039     m_listview->header()->setResizeEnabled( FALSE, m_listview->header()->count() - 1 );
00040     m_listview->addColumn( QString::null );
00041     m_listview->header()->setResizeEnabled( FALSE, m_listview->header()->count() - 1 );
00042     m_listview->addColumn( QString::null );
00043     m_listview->header()->setResizeEnabled( FALSE, m_listview->header()->count() - 1 );
00044     m_listview->addColumn( QString::null );
00045     m_listview->header()->setResizeEnabled( FALSE, m_listview->header()->count() - 1 );
00046     m_listview->addColumn( QString::null );
00047     m_listview->header()->setResizeEnabled( FALSE, m_listview->header()->count() - 1 );
00048     m_listview->addColumn( tr2i18n( "Events" ) );
00049     m_listview->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 10, 0, m_listview->sizePolicy().hasHeightForWidth() ) );
00050     KNotifyWidgetBaseLayout->addWidget( m_listview );
00051 
00052     m_actionsBox = new QGroupBox( this, "m_actionsBox" );
00053     m_actionsBox->setTitle( tr2i18n( "Actions" ) );
00054     m_actionsBox->setColumnLayout(0, Qt::Vertical );
00055     m_actionsBox->layout()->setSpacing( 6 );
00056     m_actionsBox->layout()->setMargin( 11 );
00057     m_actionsBoxLayout = new QVBoxLayout( m_actionsBox->layout() );
00058     m_actionsBoxLayout->setAlignment( Qt::AlignTop );
00059 
00060     Layout26 = new QGridLayout( 0, 1, 1, 0, 6, "Layout26"); 
00061 
00062     m_logfilePath = new KURLRequester( m_actionsBox, "m_logfilePath" );
00063     m_logfilePath->setEnabled( FALSE );
00064     m_logfilePath->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 1, 0, m_logfilePath->sizePolicy().hasHeightForWidth() ) );
00065 
00066     Layout26->addWidget( m_logfilePath, 1, 1 );
00067 
00068     m_soundPath = new KURLRequester( m_actionsBox, "m_soundPath" );
00069     m_soundPath->setEnabled( FALSE );
00070     m_soundPath->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 1, 0, m_soundPath->sizePolicy().hasHeightForWidth() ) );
00071 
00072     Layout26->addWidget( m_soundPath, 0, 1 );
00073 
00074     m_logToFile = new QCheckBox( m_actionsBox, "m_logToFile" );
00075     m_logToFile->setText( tr2i18n( "&Log to a file:" ) );
00076 
00077     Layout26->addWidget( m_logToFile, 1, 0 );
00078 
00079     m_executePath = new KURLRequester( m_actionsBox, "m_executePath" );
00080     m_executePath->setEnabled( FALSE );
00081     m_executePath->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 1, 0, m_executePath->sizePolicy().hasHeightForWidth() ) );
00082 
00083     Layout26->addWidget( m_executePath, 2, 1 );
00084 
00085     Layout25 = new QHBoxLayout( 0, 0, 6, "Layout25"); 
00086 
00087     m_playSound = new QCheckBox( m_actionsBox, "m_playSound" );
00088     m_playSound->setText( tr2i18n( "Play a &sound:" ) );
00089     Layout25->addWidget( m_playSound );
00090 
00091     m_playButton = new QPushButton( m_actionsBox, "m_playButton" );
00092     m_playButton->setText( QString::null );
00093     QToolTip::add( m_playButton, tr2i18n( "Test the Sound" ) );
00094     Layout25->addWidget( m_playButton );
00095 
00096     Layout26->addLayout( Layout25, 0, 0 );
00097 
00098     m_execute = new QCheckBox( m_actionsBox, "m_execute" );
00099     m_execute->setText( tr2i18n( "E&xecute a program:" ) );
00100 
00101     Layout26->addWidget( m_execute, 2, 0 );
00102     m_actionsBoxLayout->addLayout( Layout26 );
00103 
00104     Layout27 = new QHBoxLayout( 0, 0, 6, "Layout27"); 
00105 
00106     m_messageBox = new QCheckBox( m_actionsBox, "m_messageBox" );
00107     m_messageBox->setText( tr2i18n( "Show a &message in a pop-up window" ) );
00108     Layout27->addWidget( m_messageBox );
00109     QSpacerItem* spacer = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
00110     Layout27->addItem( spacer );
00111     m_actionsBoxLayout->addLayout( Layout27 );
00112 
00113     Layout28 = new QHBoxLayout( 0, 0, 6, "Layout28"); 
00114     QSpacerItem* spacer_2 = new QSpacerItem( 30, 20, QSizePolicy::Fixed, QSizePolicy::Minimum );
00115     Layout28->addItem( spacer_2 );
00116 
00117     m_passivePopup = new QCheckBox( m_actionsBox, "m_passivePopup" );
00118     m_passivePopup->setEnabled( FALSE );
00119     m_passivePopup->setText( tr2i18n( "&Use a passive window that does not interrupt other work" ) );
00120     Layout28->addWidget( m_passivePopup );
00121     QSpacerItem* spacer_3 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
00122     Layout28->addItem( spacer_3 );
00123     m_actionsBoxLayout->addLayout( Layout28 );
00124 
00125     Layout29 = new QHBoxLayout( 0, 0, 6, "Layout29"); 
00126 
00127     m_stderr = new QCheckBox( m_actionsBox, "m_stderr" );
00128     m_stderr->setText( tr2i18n( "Print a message to standard &error output" ) );
00129     Layout29->addWidget( m_stderr );
00130     QSpacerItem* spacer_4 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
00131     Layout29->addItem( spacer_4 );
00132     m_actionsBoxLayout->addLayout( Layout29 );
00133     KNotifyWidgetBaseLayout->addWidget( m_actionsBox );
00134 
00135     m_controlsBox = new QGroupBox( this, "m_controlsBox" );
00136     m_controlsBox->setTitle( tr2i18n( "Quick Controls" ) );
00137     m_controlsBox->setColumnLayout(0, Qt::Vertical );
00138     m_controlsBox->layout()->setSpacing( 6 );
00139     m_controlsBox->layout()->setMargin( 11 );
00140     m_controlsBoxLayout = new QVBoxLayout( m_controlsBox->layout() );
00141     m_controlsBoxLayout->setAlignment( Qt::AlignTop );
00142 
00143     m_affectAllApps = new QCheckBox( m_controlsBox, "m_affectAllApps" );
00144     m_affectAllApps->setText( tr2i18n( "Apply to all app&lications" ) );
00145     m_controlsBoxLayout->addWidget( m_affectAllApps );
00146 
00147     Layout12 = new QHBoxLayout( 0, 0, 6, "Layout12"); 
00148     QSpacerItem* spacer_5 = new QSpacerItem( 30, 20, QSizePolicy::Fixed, QSizePolicy::Minimum );
00149     Layout12->addItem( spacer_5 );
00150 
00151     Layout4 = new QGridLayout( 0, 1, 1, 0, 6, "Layout4"); 
00152 
00153     m_buttonDisable = new QPushButton( m_controlsBox, "m_buttonDisable" );
00154     m_buttonDisable->setText( tr2i18n( "Turn O&ff All" ) );
00155     QToolTip::add( m_buttonDisable, tr2i18n( "Allows you to change the behavior for all events at once" ) );
00156 
00157     Layout4->addWidget( m_buttonDisable, 1, 0 );
00158 
00159     m_buttonEnable = new QPushButton( m_controlsBox, "m_buttonEnable" );
00160     m_buttonEnable->setText( tr2i18n( "Turn O&n All" ) );
00161     QToolTip::add( m_buttonEnable, tr2i18n( "Allows you to change the behavior for all events at once" ) );
00162 
00163     Layout4->addWidget( m_buttonEnable, 0, 0 );
00164 
00165     m_comboEnable = new KComboBox( FALSE, m_controlsBox, "m_comboEnable" );
00166 
00167     Layout4->addWidget( m_comboEnable, 0, 1 );
00168 
00169     m_comboDisable = new KComboBox( FALSE, m_controlsBox, "m_comboDisable" );
00170 
00171     Layout4->addWidget( m_comboDisable, 1, 1 );
00172     Layout12->addLayout( Layout4 );
00173     QSpacerItem* spacer_6 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
00174     Layout12->addItem( spacer_6 );
00175     m_controlsBoxLayout->addLayout( Layout12 );
00176     KNotifyWidgetBaseLayout->addWidget( m_controlsBox );
00177 
00178     Layout8 = new QHBoxLayout( 0, 0, 6, "Layout8"); 
00179 
00180     m_extension = new QPushButton( this, "m_extension" );
00181     m_extension->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)0, 0, 0, m_extension->sizePolicy().hasHeightForWidth() ) );
00182     m_extension->setText( tr2i18n( "Less Options" ) );
00183     m_extension->setToggleButton( FALSE );
00184     Layout8->addWidget( m_extension );
00185     QSpacerItem* spacer_7 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
00186     Layout8->addItem( spacer_7 );
00187 
00188     m_playerButton = new QPushButton( this, "m_playerButton" );
00189     m_playerButton->setText( tr2i18n( "Player Settings..." ) );
00190     Layout8->addWidget( m_playerButton );
00191     KNotifyWidgetBaseLayout->addLayout( Layout8 );
00192 
00193     // signals and slots connections
00194     connect( m_messageBox, SIGNAL( toggled(bool) ), m_passivePopup, SLOT( setEnabled(bool) ) );
00195     connect( m_playSound, SIGNAL( toggled(bool) ), m_soundPath, SLOT( setEnabled(bool) ) );
00196     connect( m_logToFile, SIGNAL( toggled(bool) ), m_logfilePath, SLOT( setEnabled(bool) ) );
00197     connect( m_execute, SIGNAL( toggled(bool) ), m_executePath, SLOT( setEnabled(bool) ) );
00198 }
00199 
00200 /*  
00201  *  Destroys the object and frees any allocated resources
00202  */
00203 KNotifyWidgetBase::~KNotifyWidgetBase()
00204 {
00205     // no need to delete child widgets, Qt does it all for us
00206 }
00207 
00208 #include "knotifywidgetbase.moc"
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:21:30 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001