1 /****************************************************************************
2 ** Form implementation generated from reading ui file 'searchdlg.ui'
4 ** Created: Mon Mar 26 21:50:02 2001
5 ** by: The User Interface Compiler (uic)
7 ** WARNING! All changes made in this file will be lost!
8 ****************************************************************************/
12 #include <qcheckbox.h>
13 #include <qcombobox.h>
15 #include <qpushbutton.h>
19 #include <qwhatsthis.h>
22 * Constructs a SearchDlg which is a child of 'parent', with the
23 * name 'name' and widget flags set to 'f'
25 * The dialog will by default be modeless, unless you set 'modal' to
26 * TRUE to construct a modal dialog.
28 SearchDlg::SearchDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
29 : QDialog( parent, name, modal, fl )
32 setName( "SearchDlg" );
34 setCaption( tr( "Form1" ) );
35 setSizeGripEnabled( TRUE );
36 SearchDlgLayout = new QGridLayout( this );
37 SearchDlgLayout->setSpacing( 6 );
38 SearchDlgLayout->setMargin( 11 );
40 findStrLabel = new QLabel( this, "findStrLabel" );
41 findStrLabel->setText( tr( "Find:" ) );
43 SearchDlgLayout->addWidget( findStrLabel, 0, 0 );
45 find = new QComboBox( FALSE, this, "find" );
46 find->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, find->sizePolicy().hasHeightForWidth() ) );
47 find->setFocusPolicy( QComboBox::StrongFocus );
48 find->setEditable( TRUE );
49 find->setDuplicatesEnabled( TRUE );
51 SearchDlgLayout->addMultiCellWidget( find, 0, 0, 1, 2 );
53 replaceLabel = new QLabel( this, "replaceLabel" );
54 replaceLabel->setText( tr( "Replace with:" ) );
56 SearchDlgLayout->addWidget( replaceLabel, 1, 0 );
58 replace = new QComboBox( FALSE, this, "replace" );
59 replace->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, replace->sizePolicy().hasHeightForWidth() ) );
60 replace->setEditable( TRUE );
62 SearchDlgLayout->addMultiCellWidget( replace, 1, 1, 1, 2 );
64 caseSensitive = new QCheckBox( this, "caseSensitive" );
65 caseSensitive->setText( tr( "&Case sensitive" ) );
67 SearchDlgLayout->addMultiCellWidget( caseSensitive, 2, 2, 0, 1 );
69 matchWord = new QCheckBox( this, "matchWord" );
70 matchWord->setText( tr( "Match whole words onl&y" ) );
72 SearchDlgLayout->addMultiCellWidget( matchWord, 3, 4, 0, 1 );
73 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
74 SearchDlgLayout->addItem( spacer, 2, 2 );
75 QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
76 SearchDlgLayout->addMultiCell( spacer_2, 6, 6, 0, 1 );
77 QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
78 SearchDlgLayout->addItem( spacer_3, 6, 3 );
80 findPB = new QPushButton( this, "findPB" );
81 findPB->setText( tr( "Find &Next" ) );
83 SearchDlgLayout->addWidget( findPB, 0, 3 );
85 replacePB = new QPushButton( this, "replacePB" );
86 replacePB->setText( tr( "&Replace" ) );
88 SearchDlgLayout->addWidget( replacePB, 1, 3 );
90 replaceAllPB = new QPushButton( this, "replaceAllPB" );
91 replaceAllPB->setText( tr( "Replace &All " ) );
93 SearchDlgLayout->addMultiCellWidget( replaceAllPB, 2, 3, 3, 3 );
95 searchBack = new QCheckBox( this, "searchBack" );
96 searchBack->setText( tr( "Search &backwards" ) );
98 SearchDlgLayout->addMultiCellWidget( searchBack, 5, 5, 0, 1 );
100 cancelPB = new QPushButton( this, "cancelPB" );
101 cancelPB->setText( tr( "&Cancel" ) );
103 SearchDlgLayout->addMultiCellWidget( cancelPB, 4, 5, 3, 3 );
105 // signals and slots connections
106 connect( findPB, SIGNAL( clicked() ), this, SLOT( Find() ) );
107 connect( replacePB, SIGNAL( clicked() ), this, SLOT( Replace() ) );
108 connect( replaceAllPB, SIGNAL( clicked() ), this, SLOT( ReplaceAll() ) );
109 connect( cancelPB, SIGNAL( clicked() ), this, SLOT( cancel_adaptor() ) );
112 setTabOrder( find, replace );
113 setTabOrder( replace, caseSensitive );
114 setTabOrder( caseSensitive, matchWord );
115 setTabOrder( matchWord, searchBack );
116 setTabOrder( searchBack, findPB );
117 setTabOrder( findPB, replacePB );
118 setTabOrder( replacePB, replaceAllPB );
119 setTabOrder( replaceAllPB, cancelPB );
123 * Destroys the object and frees any allocated resources
125 SearchDlg::~SearchDlg()
127 // no need to delete child widgets, Qt does it all for us
130 void SearchDlg::Find()
132 qWarning( "SearchDlg::Find(): Not implemented yet!" );
135 void SearchDlg::Replace()
137 qWarning( "SearchDlg::Replace(): Not implemented yet!" );
140 void SearchDlg::ReplaceAll()
142 qWarning( "SearchDlg::ReplaceAll(): Not implemented yet!" );
145 void SearchDlg::cancel_adaptor()
147 qWarning( "SearchDlg::cancel_adaptor(): Not implemented yet!" );