# FilterDlg.cpp

    00001 #include <kdialog.h>
    00002 #include <tdelocale.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 <ntqvariant.h>
    00015 #include <ntqpushbutton.h>
    00016 #include <ntqbuttongroup.h>
    00017 #include <ntqradiobutton.h>
    00018 #include <ntqgroupbox.h>
    00019 #include <ntqcombobox.h>
    00020 #include <ntqlayout.h>
    00021 #include <ntqtooltip.h>
    00022 #include <ntqwhatsthis.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( TQWidget* parent, const char* name, bool modal, WFlags fl )
    00032     : TQDialog( parent, name, modal, fl )
    00033 {
    00034     if ( !name )
    00035        setName( "FilterDlg" );
    00036     setSizeGripEnabled( FALSE );
    00037     FilterDlgLayout = new TQGridLayout( this, 1, 1, 11, 6, "FilterDlgLayout");
    00038
    00039     Layout6 = new TQHBoxLayout( 0, 0, 6, "Layout6");
    00040     Spacer11 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    00041     Layout6->addItem( Spacer11 );
    00042
    00043     _buttonOk = new TQPushButton( this, "_buttonOk" );
    00044     Layout6->addWidget( _buttonOk );
    00045
    00046     _buttonCancel = new TQPushButton( this, "_buttonCancel" );
    00047     Layout6->addWidget( _buttonCancel );
    00048
    00049     FilterDlgLayout->addLayout( Layout6, 2, 0 );
    00050
    00051     buttonGroup1 = new TQButtonGroup( this, "buttonGroup1" );
    00052     buttonGroup1->setColumnLayout(0, TQt::Vertical );
    00053     buttonGroup1->layout()->setSpacing( 6 );
    00054     buttonGroup1->layout()->setMargin( 11 );
    00055     buttonGroup1Layout = new TQGridLayout( buttonGroup1->layout() );
    00056     buttonGroup1Layout->setAlignment( TQt::AlignTop );
    00057
    00058     _radioOff = new TQRadioButton( buttonGroup1, "_radioOff" );
    00059
    00060     buttonGroup1Layout->addWidget( _radioOff, 0, 0 );
    00061
    00062     _radioOn = new TQRadioButton( buttonGroup1, "_radioOn" );
    00063
    00064     buttonGroup1Layout->addWidget( _radioOn, 1, 0 );
    00065
    00066     _radioAuto = new TQRadioButton( buttonGroup1, "_radioAuto" );
    00067
    00068     buttonGroup1Layout->addWidget( _radioAuto, 2, 0 );
    00069
    00070     FilterDlgLayout->addWidget( buttonGroup1, 0, 0 );
    00071
    00072     TQGroupBox_1 = new TQGroupBox( this, "TQGroupBox_1" );
    00073     TQGroupBox_1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, TQGroupBox_1->sizePolicy().hasHeightForWidth() ) );
    00074     TQGroupBox_1->setColumnLayout(0, TQt::Vertical );
    00075     TQGroupBox_1->layout()->setSpacing( 6 );
    00076     TQGroupBox_1->layout()->setMargin( 11 );
    00077     TQGroupBox_1Layout = new TQGridLayout( TQGroupBox_1->layout() );
    00078     TQGroupBox_1Layout->setAlignment( TQt::AlignTop );
    00079
    00080     _comboFilter = new TQComboBox( FALSE, TQGroupBox_1, "_comboFilter" );
    00081     _comboFilter->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, _comboFilter->sizePolicy().hasHeightForWidth() ) );
    00082     _comboFilter->setInsertionPolicy( TQComboBox::AtTop );
    00083
    00084     TQGroupBox_1Layout->addMultiCellWidget( _comboFilter, 0, 0, 0, 3 );
    00085
    00086     _buttonAdd = new TQPushButton( TQGroupBox_1, "_buttonAdd" );
    00087     _buttonAdd->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, _buttonAdd->sizePolicy().hasHeightForWidth() ) );
    00088
    00089     TQGroupBox_1Layout->addWidget( _buttonAdd, 1, 0 );
    00090
    00091     _buttonEdit = new TQPushButton( TQGroupBox_1, "_buttonEdit" );
    00092     _buttonEdit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, _buttonEdit->sizePolicy().hasHeightForWidth() ) );
    00093
    00094     TQGroupBox_1Layout->addWidget( _buttonEdit, 1, 1 );
    00095
    00096     _buttonCopy = new TQPushButton( TQGroupBox_1, "_buttonCopy" );
    00097     _buttonCopy->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, _buttonCopy->sizePolicy().hasHeightForWidth() ) );
    00098
    00099     TQGroupBox_1Layout->addWidget( _buttonCopy, 1, 2 );
    00100
    00101     _buttonDelete = new TQPushButton( TQGroupBox_1, "_buttonDelete" );
    00102     _buttonDelete->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, _buttonDelete->sizePolicy().hasHeightForWidth() ) );
    00103
    00104     TQGroupBox_1Layout->addWidget( _buttonDelete, 1, 3 );
    00105
    00106     FilterDlgLayout->addWidget( TQGroupBox_1, 1, 0 );
    00107     languageChange();
    00108     resize( TQSize(407, 255).expandedTo(minimumSizeHint()) );
    00109     clearWState( WState_Polished );
    00110
    00111     // signals and slots connections
    00112     connect( _buttonAdd, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotAdd() ) );
    00113     connect( _buttonEdit, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotEdit() ) );
    00114     connect( _buttonCopy, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotCopy() ) );
    00115     connect( _buttonDelete, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotDelete() ) );
    00116     connect( _buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotOk() ) );
    00117     connect( _buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    00118     connect( _comboFilter, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( slotFilterActivated(int) ) );
    00119     connect( _radioAuto, TQ_SIGNAL( clicked() ), this, TQ_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, TQt 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     TQToolTip::add( _radioOff, tr2i18n( "Filters are switched off" ) );
    00150     _radioOn->setText( tr2i18n( "On" ) );
    00151     TQToolTip::add( _radioOn, tr2i18n( "Filters are switched on" ) );
    00152     _radioAuto->setText( tr2i18n( "Automatic Delete" ) );
    00153     TQToolTip::add( _radioAuto, tr2i18n( "Filters are switched on and are applied automatically" ) );
    00154     TQGroupBox_1->setTitle( tr2i18n( "Filters" ) );
    00155     TQToolTip::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     TQToolTip::add( _buttonAdd, tr2i18n( "Add filter" ) );
    00158     _buttonEdit->setText( tr2i18n( "Edit" ) );
    00159     TQToolTip::add( _buttonEdit, tr2i18n( "Edit filter" ) );
    00160     _buttonCopy->setText( tr2i18n( "Copy" ) );
    00161     TQToolTip::add( _buttonCopy, tr2i18n( "Copy filter" ) );
    00162     _buttonDelete->setText( tr2i18n( "Delete" ) );
    00163     TQToolTip::add( _buttonDelete, tr2i18n( "Delete filter" ) );
    00164 }
    00165
    00166 void FilterDlg::slotAdd()
    00167 {
    00168     tqWarning( "FilterDlg::slotAdd(): Not implemented yet" );
    00169 }
    00170
    00171 void FilterDlg::slotCopy()
    00172 {
    00173     tqWarning( "FilterDlg::slotCopy(): Not implemented yet" );
    00174 }
    00175
    00176 void FilterDlg::slotDelete()
    00177 {
    00178     tqWarning( "FilterDlg::slotDelete(): Not implemented yet" );
    00179 }
    00180
    00181 void FilterDlg::slotEdit()
    00182 {
    00183     tqWarning( "FilterDlg::slotEdit(): Not implemented yet" );
    00184 }
    00185
    00186 void FilterDlg::slotOk()
    00187 {
    00188     tqWarning( "FilterDlg::slotOk(): Not implemented yet" );
    00189 }
    00190
    00191 void FilterDlg::slotFilterActivated(int)
    00192 {
    00193     tqWarning( "FilterDlg::slotFilterActivated(int): Not implemented yet" );
    00194 }
    00195
    00196 void FilterDlg::slotAutomaticActivated()
    00197 {
    00198     tqWarning( "FilterDlg::slotAutomaticActivated(): Not implemented yet" );
    00199 }
    00200
    00201 #include "FilterDlg.moc"