kshowmail: kshowmail/FilterDlg.cpp Source File

- Main Page
- Namespaces
- Classes
- Files
- Directories

# FilterDlg.cpp

    00001 #include <kdialog.h>
    00002 #include <klocale.h>
    00003 /****************************************************************************
    00004 ** Form implementation generated from reading ui file './FilterDlg.ui'
    00005 **
    00006 ** Created: Fr Jun 29 22:08:56 2007
    00007 **      by: The User Interface Compiler ($Id: FilterDlg_8cpp-source.html,v 1.10 2007/07/05 17:37:49 kuddel-fl Exp $)
    00008 **
    00009 ** WARNING! All changes made in this file will be lost!
    00010 ****************************************************************************/
    00011
    00012 #include "FilterDlg.h"
    00013
    00014 #include <qvariant.h>
    00015 #include <qpushbutton.h>
    00016 #include <qbuttongroup.h>
    00017 #include <qradiobutton.h>
    00018 #include <qgroupbox.h>
    00019 #include <qcombobox.h>
    00020 #include <qlayout.h>
    00021 #include <qtooltip.h>
    00022 #include <qwhatsthis.h>
    00023
    00024 /*
    00025  *  Constructs a FilterDlg as a child of 'parent', with the
    00026  *  name 'name' and widget flags set to 'f'.
    00027  *
    00028  *  The dialog will by default be modeless, unless you set 'modal' to
    00029  *  TRUE to construct a modal dialog.
    00030  */
    00031 FilterDlg::FilterDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
    00032     : QDialog( parent, name, modal, fl )
    00033 {
    00034     if ( !name )
    00035        setName( "FilterDlg" );
    00036     setSizeGripEnabled( FALSE );
    00037     FilterDlgLayout = new QGridLayout( this, 1, 1, 11, 6, "FilterDlgLayout");
    00038
    00039     Layout6 = new QHBoxLayout( 0, 0, 6, "Layout6");
    00040     Spacer11 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    00041     Layout6->addItem( Spacer11 );
    00042
    00043     _buttonOk = new QPushButton( this, "_buttonOk" );
    00044     Layout6->addWidget( _buttonOk );
    00045
    00046     _buttonCancel = new QPushButton( this, "_buttonCancel" );
    00047     Layout6->addWidget( _buttonCancel );
    00048
    00049     FilterDlgLayout->addLayout( Layout6, 2, 0 );
    00050
    00051     buttonGroup1 = new QButtonGroup( this, "buttonGroup1" );
    00052     buttonGroup1->setColumnLayout(0, Qt::Vertical );
    00053     buttonGroup1->layout()->setSpacing( 6 );
    00054     buttonGroup1->layout()->setMargin( 11 );
    00055     buttonGroup1Layout = new QGridLayout( buttonGroup1->layout() );
    00056     buttonGroup1Layout->setAlignment( Qt::AlignTop );
    00057
    00058     _radioOff = new QRadioButton( buttonGroup1, "_radioOff" );
    00059
    00060     buttonGroup1Layout->addWidget( _radioOff, 0, 0 );
    00061
    00062     _radioOn = new QRadioButton( buttonGroup1, "_radioOn" );
    00063
    00064     buttonGroup1Layout->addWidget( _radioOn, 1, 0 );
    00065
    00066     _radioAuto = new QRadioButton( buttonGroup1, "_radioAuto" );
    00067
    00068     buttonGroup1Layout->addWidget( _radioAuto, 2, 0 );
    00069
    00070     FilterDlgLayout->addWidget( buttonGroup1, 0, 0 );
    00071
    00072     QGroupBox_1 = new QGroupBox( this, "QGroupBox_1" );
    00073     QGroupBox_1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, QGroupBox_1->sizePolicy().hasHeightForWidth() ) );
    00074     QGroupBox_1->setColumnLayout(0, Qt::Vertical );
    00075     QGroupBox_1->layout()->setSpacing( 6 );
    00076     QGroupBox_1->layout()->setMargin( 11 );
    00077     QGroupBox_1Layout = new QGridLayout( QGroupBox_1->layout() );
    00078     QGroupBox_1Layout->setAlignment( Qt::AlignTop );
    00079
    00080     _comboFilter = new QComboBox( FALSE, QGroupBox_1, "_comboFilter" );
    00081     _comboFilter->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, _comboFilter->sizePolicy().hasHeightForWidth() ) );
    00082     _comboFilter->setInsertionPolicy( QComboBox::AtTop );
    00083
    00084     QGroupBox_1Layout->addMultiCellWidget( _comboFilter, 0, 0, 0, 3 );
    00085
    00086     _buttonAdd = new QPushButton( QGroupBox_1, "_buttonAdd" );
    00087     _buttonAdd->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, _buttonAdd->sizePolicy().hasHeightForWidth() ) );
    00088
    00089     QGroupBox_1Layout->addWidget( _buttonAdd, 1, 0 );
    00090
    00091     _buttonEdit = new QPushButton( QGroupBox_1, "_buttonEdit" );
    00092     _buttonEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, _buttonEdit->sizePolicy().hasHeightForWidth() ) );
    00093
    00094     QGroupBox_1Layout->addWidget( _buttonEdit, 1, 1 );
    00095
    00096     _buttonCopy = new QPushButton( QGroupBox_1, "_buttonCopy" );
    00097     _buttonCopy->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, _buttonCopy->sizePolicy().hasHeightForWidth() ) );
    00098
    00099     QGroupBox_1Layout->addWidget( _buttonCopy, 1, 2 );
    00100
    00101     _buttonDelete = new QPushButton( QGroupBox_1, "_buttonDelete" );
    00102     _buttonDelete->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, _buttonDelete->sizePolicy().hasHeightForWidth() ) );
    00103
    00104     QGroupBox_1Layout->addWidget( _buttonDelete, 1, 3 );
    00105
    00106     FilterDlgLayout->addWidget( QGroupBox_1, 1, 0 );
    00107     languageChange();
    00108     resize( QSize(407, 255).expandedTo(minimumSizeHint()) );
    00109     clearWState( WState_Polished );
    00110
    00111     // signals and slots connections
    00112     connect( _buttonAdd, SIGNAL( clicked() ), this, SLOT( slotAdd() ) );
    00113     connect( _buttonEdit, SIGNAL( clicked() ), this, SLOT( slotEdit() ) );
    00114     connect( _buttonCopy, SIGNAL( clicked() ), this, SLOT( slotCopy() ) );
    00115     connect( _buttonDelete, SIGNAL( clicked() ), this, SLOT( slotDelete() ) );
    00116     connect( _buttonOk, SIGNAL( clicked() ), this, SLOT( slotOk() ) );
    00117     connect( _buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
    00118     connect( _comboFilter, SIGNAL( activated(int) ), this, SLOT( slotFilterActivated(int) ) );
    00119     connect( _radioAuto, SIGNAL( clicked() ), this, SLOT( slotAutomaticActivated() ) );
    00120
    00121     // tab order
    00122     setTabOrder( _comboFilter, _buttonAdd );
    00123     setTabOrder( _buttonAdd, _buttonEdit );
    00124     setTabOrder( _buttonEdit, _buttonCopy );
    00125     setTabOrder( _buttonCopy, _buttonDelete );
    00126     setTabOrder( _buttonDelete, _buttonOk );
    00127     setTabOrder( _buttonOk, _buttonCancel );
    00128 }
    00129
    00130 /*
    00131  *  Destroys the object and frees any allocated resources
    00132  */
    00133 FilterDlg::~FilterDlg()
    00134 {
    00135     // no need to delete child widgets, Qt does it all for us
    00136 }
    00137
    00138 /*
    00139  *  Sets the strings of the subwidgets using the current
    00140  *  language.
    00141  */
    00142 void FilterDlg::languageChange()
    00143 {
    00144     setCaption( tr2i18n( "Filters" ) );
    00145     _buttonOk->setText( tr2i18n( "OK" ) );
    00146     _buttonCancel->setText( tr2i18n( "Cancel" ) );
    00147     buttonGroup1->setTitle( tr2i18n( "Filter Status" ) );
    00148     _radioOff->setText( tr2i18n( "Off" ) );
    00149     QToolTip::add( _radioOff, tr2i18n( "Filters are switched off" ) );
    00150     _radioOn->setText( tr2i18n( "On" ) );
    00151     QToolTip::add( _radioOn, tr2i18n( "Filters are switched on" ) );
    00152     _radioAuto->setText( tr2i18n( "Automatic Delete" ) );
    00153     QToolTip::add( _radioAuto, tr2i18n( "Filters are switched on and are applied automatically" ) );
    00154     QGroupBox_1->setTitle( tr2i18n( "Filters" ) );
    00155     QToolTip::add( _comboFilter, tr2i18n( "<qt>Filters are counted for each automatic deletion;<br>Filters with high counters are listed first</qt>" ) );
    00156     _buttonAdd->setText( tr2i18n( "Add" ) );
    00157     QToolTip::add( _buttonAdd, tr2i18n( "Add filter" ) );
    00158     _buttonEdit->setText( tr2i18n( "Edit" ) );
    00159     QToolTip::add( _buttonEdit, tr2i18n( "Edit filter" ) );
    00160     _buttonCopy->setText( tr2i18n( "Copy" ) );
    00161     QToolTip::add( _buttonCopy, tr2i18n( "Copy filter" ) );
    00162     _buttonDelete->setText( tr2i18n( "Delete" ) );
    00163     QToolTip::add( _buttonDelete, tr2i18n( "Delete filter" ) );
    00164 }
    00165
    00166 void FilterDlg::slotAdd()
    00167 {
    00168     qWarning( "FilterDlg::slotAdd(): Not implemented yet" );
    00169 }
    00170
    00171 void FilterDlg::slotCopy()
    00172 {
    00173     qWarning( "FilterDlg::slotCopy(): Not implemented yet" );
    00174 }
    00175
    00176 void FilterDlg::slotDelete()
    00177 {
    00178     qWarning( "FilterDlg::slotDelete(): Not implemented yet" );
    00179 }
    00180
    00181 void FilterDlg::slotEdit()
    00182 {
    00183     qWarning( "FilterDlg::slotEdit(): Not implemented yet" );
    00184 }
    00185
    00186 void FilterDlg::slotOk()
    00187 {
    00188     qWarning( "FilterDlg::slotOk(): Not implemented yet" );
    00189 }
    00190
    00191 void FilterDlg::slotFilterActivated(int)
    00192 {
    00193     qWarning( "FilterDlg::slotFilterActivated(int): Not implemented yet" );
    00194 }
    00195
    00196 void FilterDlg::slotAutomaticActivated()
    00197 {
    00198     qWarning( "FilterDlg::slotAutomaticActivated(): Not implemented yet" );
    00199 }
    00200
    00201 #include "FilterDlg.moc"