- Main Page
- Namespaces
- Classes
- Files
- Directories

# FilterEntryDlg.cpp

    00001 #include <kdialog.h>
    00002 #include <tdelocale.h>
    00003 /****************************************************************************
    00004 ** Form implementation generated from reading ui file './FilterEntryDlg.ui'
    00005 **
    00006 ** Created: Fr Jun 29 22:08:54 2007
    00007 **      by: The User Interface Compiler ($Id: FilterEntryDlg_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 "FilterEntryDlg.h"
    00013
    00014 #include <ntqvariant.h>
    00015 #include <ntqpushbutton.h>
    00016 #include <ntqlineedit.h>
    00017 #include <ntqgroupbox.h>
    00018 #include <ntqcombobox.h>
    00019 #include <ntqcheckbox.h>
    00020 #include <ntqspinbox.h>
    00021 #include <ntqlayout.h>
    00022 #include <ntqtooltip.h>
    00023 #include <ntqwhatsthis.h>
    00024
    00025 /*
    00026  *  Constructs a FilterEntryDlg as a child of 'parent', with the
    00027  *  name 'name' and widget flags set to 'f'.
    00028  *
    00029  *  The dialog will by default be modeless, unless you set 'modal' to
    00030  *  TRUE to construct a modal dialog.
    00031  */
    00032 FilterEntryDlg::FilterEntryDlg( TQWidget* parent, const char* name, bool modal, WFlags fl )
    00033     : TQDialog( parent, name, modal, fl )
    00034 {
    00035     if ( !name )
    00036        setName( "FilterEntryDlg" );
    00037     setSizeGripEnabled( FALSE );
    00038     FilterEntryDlgLayout = new TQGridLayout( this, 1, 1, 11, 6, "FilterEntryDlgLayout");
    00039
    00040     _editName = new TQLineEdit( this, "_editName" );
    00041     _editName->setEnabled( TRUE );
    00042     _editName->setReadOnly( TRUE );
    00043
    00044     FilterEntryDlgLayout->addWidget( _editName, 0, 0 );
    00045
    00046     TQGroupBox_1 = new TQGroupBox( this, "TQGroupBox_1" );
    00047     TQGroupBox_1->setFrameShape( TQGroupBox::Box );
    00048     TQGroupBox_1->setFrameShadow( TQGroupBox::Sunken );
    00049     TQGroupBox_1->setColumnLayout(0, TQt::Vertical );
    00050     TQGroupBox_1->layout()->setSpacing( 6 );
    00051     TQGroupBox_1->layout()->setMargin( 11 );
    00052     TQGroupBox_1Layout = new TQGridLayout( TQGroupBox_1->layout() );
    00053     TQGroupBox_1Layout->setAlignment( TQt::AlignTop );
    00054
    00055     _comboItem1 = new TQComboBox( FALSE, TQGroupBox_1, "_comboItem1" );
    00056
    00057     TQGroupBox_1Layout->addMultiCellWidget( _comboItem1, 0, 0, 0, 1 );
    00058
    00059     _comboExpression1 = new TQComboBox( FALSE, TQGroupBox_1, "_comboExpression1" );
    00060
    00061     TQGroupBox_1Layout->addMultiCellWidget( _comboExpression1, 0, 0, 2, 3 );
    00062
    00063     _editMatch1 = new TQLineEdit( TQGroupBox_1, "_editMatch1" );
    00064
    00065     TQGroupBox_1Layout->addMultiCellWidget( _editMatch1, 1, 1, 0, 3 );
    00066
    00067     _comboSecondCondition = new TQComboBox( FALSE, TQGroupBox_1, "_comboSecondCondition" );
    00068
    00069     TQGroupBox_1Layout->addMultiCellWidget( _comboSecondCondition, 3, 3, 0, 3 );
    00070
    00071     _checkCaseSensitive1 = new TQCheckBox( TQGroupBox_1, "_checkCaseSensitive1" );
    00072
    00073     TQGroupBox_1Layout->addWidget( _checkCaseSensitive1, 2, 0 );
    00074     spacer2 = new TQSpacerItem( 50, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    00075     TQGroupBox_1Layout->addItem( spacer2, 2, 1 );
    00076
    00077     _buttonEditRegExp1 = new TQPushButton( TQGroupBox_1, "_buttonEditRegExp1" );
    00078
    00079     TQGroupBox_1Layout->addWidget( _buttonEditRegExp1, 2, 3 );
    00080
    00081     _checkRegExp1 = new TQCheckBox( TQGroupBox_1, "_checkRegExp1" );
    00082
    00083     TQGroupBox_1Layout->addWidget( _checkRegExp1, 2, 2 );
    00084
    00085     FilterEntryDlgLayout->addWidget( TQGroupBox_1, 1, 0 );
    00086
    00087     _groupBox2 = new TQGroupBox( this, "_groupBox2" );
    00088     _groupBox2->setEnabled( FALSE );
    00089     _groupBox2->setColumnLayout(0, TQt::Vertical );
    00090     _groupBox2->layout()->setSpacing( 6 );
    00091     _groupBox2->layout()->setMargin( 11 );
    00092     _groupBox2Layout = new TQGridLayout( _groupBox2->layout() );
    00093     _groupBox2Layout->setAlignment( TQt::AlignTop );
    00094
    00095     _comboItem2 = new TQComboBox( FALSE, _groupBox2, "_comboItem2" );
    00096
    00097     _groupBox2Layout->addMultiCellWidget( _comboItem2, 0, 0, 0, 1 );
    00098
    00099     _comboExpression2 = new TQComboBox( FALSE, _groupBox2, "_comboExpression2" );
    00100
    00101     _groupBox2Layout->addMultiCellWidget( _comboExpression2, 0, 0, 2, 3 );
    00102
    00103     _editMatch2 = new TQLineEdit( _groupBox2, "_editMatch2" );
    00104
    00105     _groupBox2Layout->addMultiCellWidget( _editMatch2, 1, 1, 0, 3 );
    00106
    00107     _checkCaseSensitive2 = new TQCheckBox( _groupBox2, "_checkCaseSensitive2" );
    00108
    00109     _groupBox2Layout->addWidget( _checkCaseSensitive2, 2, 0 );
    00110     spacer3 = new TQSpacerItem( 140, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    00111     _groupBox2Layout->addItem( spacer3, 2, 1 );
    00112
    00113     _checkRegExp2 = new TQCheckBox( _groupBox2, "_checkRegExp2" );
    00114
    00115     _groupBox2Layout->addWidget( _checkRegExp2, 2, 2 );
    00116
    00117     _buttonEditRegExp2 = new TQPushButton( _groupBox2, "_buttonEditRegExp2" );
    00118
    00119     _groupBox2Layout->addWidget( _buttonEditRegExp2, 2, 3 );
    00120
    00121     FilterEntryDlgLayout->addWidget( _groupBox2, 2, 0 );
    00122
    00123     Layout11 = new TQHBoxLayout( 0, 0, 6, "Layout11");
    00124     Spacer17 = new TQSpacerItem( 20, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    00125     Layout11->addItem( Spacer17 );
    00126
    00127     m_ButtonOk = new TQPushButton( this, "m_ButtonOk" );
    00128     Layout11->addWidget( m_ButtonOk );
    00129
    00130     m_ButtonCancel = new TQPushButton( this, "m_ButtonCancel" );
    00131     Layout11->addWidget( m_ButtonCancel );
    00132
    00133     FilterEntryDlgLayout->addLayout( Layout11, 4, 0 );
    00134
    00135     groupBox3 = new TQGroupBox( this, "groupBox3" );
    00136     groupBox3->setColumnLayout(0, TQt::Vertical );
    00137     groupBox3->layout()->setSpacing( 6 );
    00138     groupBox3->layout()->setMargin( 11 );
    00139     groupBox3Layout = new TQHBoxLayout( groupBox3->layout() );
    00140     groupBox3Layout->setAlignment( TQt::AlignTop );
    00141
    00142     _spinCounter = new TQSpinBox( groupBox3, "_spinCounter" );
    00143     _spinCounter->setMaxValue( 99999 );
    00144     groupBox3Layout->addWidget( _spinCounter );
    00145
    00146     _buttonResetCounter = new TQPushButton( groupBox3, "_buttonResetCounter" );
    00147     groupBox3Layout->addWidget( _buttonResetCounter );
    00148
    00149     FilterEntryDlgLayout->addWidget( groupBox3, 3, 0 );
    00150     languageChange();
    00151     resize( TQSize(540, 484).expandedTo(minimumSizeHint()) );
    00152     clearWState( WState_Polished );
    00153
    00154     // signals and slots connections
    00155     connect( m_ButtonOk, SIGNAL( clicked() ), this, SLOT( slotOk() ) );
    00156     connect( m_ButtonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
    00157     connect( _editMatch1, SIGNAL( textChanged(const TQString&) ), this, SLOT( slotMatch1Changed(const TQString&) ) );
    00158     connect( _comboItem1, SIGNAL( activated(int) ), this, SLOT( slotItem1Selected(int) ) );
    00159     connect( _comboExpression1, SIGNAL( activated(int) ), this, SLOT( slotCondition1Selected(int) ) );
    00160     connect( _comboItem2, SIGNAL( activated(int) ), this, SLOT( slotItem2Selected(int) ) );
    00161     connect( _comboExpression2, SIGNAL( activated(int) ), this, SLOT( slotCondition2Selected(int) ) );
    00162     connect( _comboSecondCondition, SIGNAL( activated(int) ), this, SLOT( slotSecondCondition(int) ) );
    00163     connect( _editMatch2, SIGNAL( textChanged(const TQString&) ), this, SLOT( slotMatch2Changed(const TQString&) ) );
    00164     connect( _buttonResetCounter, SIGNAL( clicked() ), this, SLOT( slotResetCounter() ) );
    00165     connect( _spinCounter, SIGNAL( valueChanged(int) ), this, SLOT( slotCounterChanged(int) ) );
    00166     connect( _buttonEditRegExp1, SIGNAL( clicked() ), this, SLOT( slotEditRegExp1() ) );
    00167     connect( _buttonEditRegExp2, SIGNAL( clicked() ), this, SLOT( slotEditRegExp2() ) );
    00168     connect( _checkRegExp1, SIGNAL( toggled(bool) ), this, SLOT( slotToggleRegExp1(bool) ) );
    00169     connect( _checkRegExp2, SIGNAL( toggled(bool) ), this, SLOT( slotToggleRegExp2(bool) ) );
    00170
    00171     // tab order
    00172     setTabOrder( m_ButtonOk, m_ButtonCancel );
    00173 }
    00174
    00175 /*
    00176  *  Destroys the object and frees any allocated resources
    00177  */
    00178 FilterEntryDlg::~FilterEntryDlg()
    00179 {
    00180     // no need to delete child widgets, TQt does it all for us
    00181 }
    00182
    00183 /*
    00184  *  Sets the strings of the subwidgets using the current
    00185  *  language.
    00186  */
    00187 void FilterEntryDlg::languageChange()
    00188 {
    00189     setCaption( tr2i18n( "Filter" ) );
    00190     TQGroupBox_1->setTitle( tr2i18n( "Condition" ) );
    00191     _comboItem1->clear();
    00192     _comboItem1->insertItem( tr2i18n( "From" ) );
    00193     _comboItem1->insertItem( tr2i18n( "Subject" ) );
    00194     _comboItem1->insertItem( tr2i18n( "Header" ) );
    00195     _comboItem1->insertItem( tr2i18n( "Size" ) );
    00196     _comboItem1->insertItem( tr2i18n( "To" ) );
    00197     _comboExpression1->clear();
    00198     _comboExpression1->insertItem( tr2i18n( "Contains" ) );
    00199     _comboExpression1->insertItem( tr2i18n( "Doesn't contain" ) );
    00200     _comboExpression1->insertItem( tr2i18n( "Equals" ) );
    00201     _comboExpression1->insertItem( tr2i18n( "Doesn't equal" ) );
    00202     _comboExpression1->insertItem( tr2i18n( "Greater" ) );
    00203     _comboExpression1->insertItem( tr2i18n( "Less" ) );
    00204     _comboSecondCondition->clear();
    00205     _comboSecondCondition->insertItem( tr2i18n( "No more Conditions" ) );
    00206     _comboSecondCondition->insertItem( tr2i18n( "And" ) );
    00207     _comboSecondCondition->insertItem( tr2i18n( "Or" ) );
    00208     _checkCaseSensitive1->setText( tr2i18n( "Case sensitive" ) );
    00209     _buttonEditRegExp1->setText( tr2i18n( "Edit" ) );
    00210     TQToolTip::add( _buttonEditRegExp1, tr2i18n( "Edit regular expression" ) );
    00211     _checkRegExp1->setText( tr2i18n( "Regular Expression" ) );
    00212     TQToolTip::add( _checkRegExp1, tr2i18n( "For help about regular expressions lookup the TQt documentation" ) );
    00213     _groupBox2->setTitle( tr2i18n( "second Condition" ) );
    00214     _comboItem2->clear();
    00215     _comboItem2->insertItem( tr2i18n( "From" ) );
    00216     _comboItem2->insertItem( tr2i18n( "Subject" ) );
    00217     _comboItem2->insertItem( tr2i18n( "Header" ) );
    00218     _comboItem2->insertItem( tr2i18n( "Size" ) );
    00219     _comboItem2->insertItem( tr2i18n( "To" ) );
    00220     _comboExpression2->clear();
    00221     _comboExpression2->insertItem( tr2i18n( "Contains" ) );
    00222     _comboExpression2->insertItem( tr2i18n( "Doesn't contain" ) );
    00223     _comboExpression2->insertItem( tr2i18n( "Equals" ) );
    00224     _comboExpression2->insertItem( tr2i18n( "Doesn't equal" ) );
    00225     _comboExpression2->insertItem( tr2i18n( "Greater" ) );
    00226     _comboExpression2->insertItem( tr2i18n( "Less" ) );
    00227     _checkCaseSensitive2->setText( tr2i18n( "Case sensitive" ) );
    00228     _checkRegExp2->setText( tr2i18n( "Regular Expression" ) );
    00229     TQToolTip::add( _checkRegExp2, tr2i18n( "For help about regular expressions lookup the TQt documentation" ) );
    00230     _buttonEditRegExp2->setText( tr2i18n( "Edit" ) );
    00231     TQToolTip::add( _buttonEditRegExp2, tr2i18n( "Edit regular expression" ) );
    00232     m_ButtonOk->setText( tr2i18n( "OK" ) );
    00233     m_ButtonCancel->setText( tr2i18n( "Cancel" ) );
    00234     groupBox3->setTitle( tr2i18n( "Counter" ) );
    00235     TQToolTip::add( _spinCounter, tr2i18n( "<qt>Filters are counted for each automatic deletion;<br>Filters with high counters are listed first</qt>" ) );
    00236     _buttonResetCounter->setText( tr2i18n( "Reset Counter" ) );
    00237     TQToolTip::add( _buttonResetCounter, tr2i18n( "<qt>Filters are counted for each automatic deletion;<br>Filters with high counters are listed first</qt>" ) );
    00238 }
    00239
    00240 void FilterEntryDlg::slotOk()
    00241 {
    00242     tqWarning( "FilterEntryDlg::slotOk(): Not implemented yet" );
    00243 }
    00244
    00245 void FilterEntryDlg::slotItem1Selected(int)
    00246 {
    00247     tqWarning( "FilterEntryDlg::slotItem1Selected(int): Not implemented yet" );
    00248 }
    00249
    00250 void FilterEntryDlg::slotItem2Selected(int)
    00251 {
    00252     tqWarning( "FilterEntryDlg::slotItem2Selected(int): Not implemented yet" );
    00253 }
    00254
    00255 void FilterEntryDlg::slotSecondCondition(int)
    00256 {
    00257     tqWarning( "FilterEntryDlg::slotSecondCondition(int): Not implemented yet" );
    00258 }
    00259
    00260 void FilterEntryDlg::slotCondition1Selected(int)
    00261 {
    00262     tqWarning( "FilterEntryDlg::slotCondition1Selected(int): Not implemented yet" );
    00263 }
    00264
    00265 void FilterEntryDlg::slotCondition2Selected(int)
    00266 {
    00267     tqWarning( "FilterEntryDlg::slotCondition2Selected(int): Not implemented yet" );
    00268 }
    00269
    00270 void FilterEntryDlg::slotMatch1Changed(const TQString&)
    00271 {
    00272     tqWarning( "FilterEntryDlg::slotMatch1Changed(const TQString&): Not implemented yet" );
    00273 }
    00274
    00275 void FilterEntryDlg::slotMatch2Changed(const TQString&)
    00276 {
    00277     tqWarning( "FilterEntryDlg::slotMatch2Changed(const TQString&): Not implemented yet" );
    00278 }
    00279
    00280 void FilterEntryDlg::slotResetCounter()
    00281 {
    00282     tqWarning( "FilterEntryDlg::slotResetCounter(): Not implemented yet" );
    00283 }
    00284
    00285 void FilterEntryDlg::slotCounterChanged(int)
    00286 {
    00287     tqWarning( "FilterEntryDlg::slotCounterChanged(int): Not implemented yet" );
    00288 }
    00289
    00290 void FilterEntryDlg::slotEditRegExp1()
    00291 {
    00292     tqWarning( "FilterEntryDlg::slotEditRegExp1(): Not implemented yet" );
    00293 }
    00294
    00295 void FilterEntryDlg::slotEditRegExp2()
    00296 {
    00297     tqWarning( "FilterEntryDlg::slotEditRegExp2(): Not implemented yet" );
    00298 }
    00299
    00300 void FilterEntryDlg::slotToggleRegExp1(bool)
    00301 {
    00302     tqWarning( "FilterEntryDlg::slotToggleRegExp1(bool): Not implemented yet" );
    00303 }
    00304
    00305 void FilterEntryDlg::slotToggleRegExp2(bool)
    00306 {
    00307     tqWarning( "FilterEntryDlg::slotToggleRegExp2(bool): Not implemented yet" );
    00308 }
    00309
    00310 #include "FilterEntryDlg.moc"