KDevelop API Documentation

filterdlg.cpp

Go to the documentation of this file.
00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './filterdlg.ui'
00005 **
00006 ** Created: Tue Feb 22 08:56:09 2005
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)
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 <klineedit.h>
00019 #include <qcheckbox.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( TRUE );
00037     FilterDlgLayout = new QGridLayout( this, 1, 1, 11, 6, "FilterDlgLayout"); 
00038 
00039     Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1"); 
00040     Horizontal_Spacing2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00041     Layout1->addItem( Horizontal_Spacing2 );
00042 
00043     buttonOk = new QPushButton( this, "buttonOk" );
00044     buttonOk->setAutoDefault( TRUE );
00045     buttonOk->setDefault( TRUE );
00046     Layout1->addWidget( buttonOk );
00047 
00048     buttonCancel = new QPushButton( this, "buttonCancel" );
00049     buttonCancel->setAutoDefault( TRUE );
00050     Layout1->addWidget( buttonCancel );
00051 
00052     FilterDlgLayout->addLayout( Layout1, 1, 0 );
00053 
00054     filtergroup = new QButtonGroup( this, "filtergroup" );
00055     filtergroup->setCheckable( FALSE );
00056     filtergroup->setProperty( "selectedId", 0 );
00057     filtergroup->setColumnLayout(0, Qt::Vertical );
00058     filtergroup->layout()->setSpacing( 6 );
00059     filtergroup->layout()->setMargin( 11 );
00060     filtergroupLayout = new QGridLayout( filtergroup->layout() );
00061     filtergroupLayout->setAlignment( Qt::AlignTop );
00062 
00063     rNoFilter = new QRadioButton( filtergroup, "rNoFilter" );
00064     rNoFilter->setChecked( TRUE );
00065 
00066     filtergroupLayout->addWidget( rNoFilter, 0, 0 );
00067 
00068     rFilterStr = new QRadioButton( filtergroup, "rFilterStr" );
00069 
00070     filtergroupLayout->addWidget( rFilterStr, 0, 1 );
00071 
00072     leFilterStr = new KLineEdit( filtergroup, "leFilterStr" );
00073     leFilterStr->setEnabled( FALSE );
00074 
00075     filtergroupLayout->addMultiCellWidget( leFilterStr, 1, 1, 1, 3 );
00076 
00077     rFilterRegExp = new QRadioButton( filtergroup, "rFilterRegExp" );
00078 
00079     filtergroupLayout->addWidget( rFilterRegExp, 0, 2 );
00080     spacer2 = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00081     filtergroupLayout->addItem( spacer2, 0, 3 );
00082 
00083     cbCase = new QCheckBox( filtergroup, "cbCase" );
00084 
00085     filtergroupLayout->addMultiCellWidget( cbCase, 2, 2, 1, 3 );
00086 
00087     FilterDlgLayout->addWidget( filtergroup, 0, 0 );
00088     languageChange();
00089     resize( QSize(459, 173).expandedTo(minimumSizeHint()) );
00090     clearWState( WState_Polished );
00091 
00092     // signals and slots connections
00093     connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
00094     connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
00095     connect( rNoFilter, SIGNAL( toggled(bool) ), leFilterStr, SLOT( setDisabled(bool) ) );
00096 }
00097 
00098 /*
00099  *  Destroys the object and frees any allocated resources
00100  */
00101 FilterDlg::~FilterDlg()
00102 {
00103     // no need to delete child widgets, Qt does it all for us
00104 }
00105 
00106 /*
00107  *  Sets the strings of the subwidgets using the current
00108  *  language.
00109  */
00110 void FilterDlg::languageChange()
00111 {
00112     setCaption( tr2i18n( "Output Filter Settings" ) );
00113     buttonOk->setText( tr2i18n( "&OK" ) );
00114     buttonOk->setAccel( QKeySequence( QString::null ) );
00115     buttonCancel->setText( tr2i18n( "&Cancel" ) );
00116     buttonCancel->setAccel( QKeySequence( QString::null ) );
00117     filtergroup->setTitle( tr2i18n( "Filter Options" ) );
00118     rNoFilter->setText( tr2i18n( "No filter" ) );
00119     rFilterStr->setText( tr2i18n( "Filter for string" ) );
00120     rFilterRegExp->setText( tr2i18n( "Filter with regular expression" ) );
00121     cbCase->setText( tr2i18n( "Match case-sensitve" ) );
00122 }
00123 
00124 #include "filterdlg.moc"
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Feb 22 09:22:41 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003