1 /****************************************************************************
2 ** Form implementation generated from reading ui file 'searchdlg.ui'
4 ** Created: Sun Mar 4 21:52:22 2001
5 ** by: The User Interface Compiler (uic)
7 ** WARNING! All changes made in this file will be lost!
8 ****************************************************************************/
11 #include <qcheckbox.h>
12 #include <qcombobox.h>
14 #include <qpushbutton.h>
18 #include <qwhatsthis.h>
21 * Constructs a SearchDlg which is a child of 'parent', with the
22 * name 'name' and widget flags set to 'f'
24 * The dialog will by default be modeless, unless you set 'modal' to
25 * TRUE to construct a modal dialog.
27 SearchDlg::SearchDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
28 : QDialog( parent, name, modal, fl )
31 setName( "SearchDlg" );
33 setCaption( tr( "Form1" ) );
34 setSizeGripEnabled( TRUE );
35 SearchDlgLayout = new QGridLayout( this );
36 SearchDlgLayout->setSpacing( 6 );
37 SearchDlgLayout->setMargin( 11 );
39 findStrLabel = new QLabel( this, "findStrLabel" );
40 findStrLabel->setText( tr( "Find:" ) );
42 SearchDlgLayout->addWidget( findStrLabel, 0, 0 );
44 find = new QComboBox( FALSE, this, "find" );
45 find->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, find->sizePolicy().hasHeightForWidth() ) );
46 find->setEditable( TRUE );
47 find->setDuplicatesEnabled( TRUE );
48 find->setFocusPolicy( QComboBox::StrongFocus );
50 SearchDlgLayout->addMultiCellWidget( find, 0, 0, 1, 2 );
52 replaceLabel = new QLabel( this, "replaceLabel" );
53 replaceLabel->setText( tr( "Replace with:" ) );
55 SearchDlgLayout->addWidget( replaceLabel, 1, 0 );
57 replace = new QComboBox( FALSE, this, "replace" );
58 replace->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, replace->sizePolicy().hasHeightForWidth() ) );
59 replace->setEditable( TRUE );
61 SearchDlgLayout->addMultiCellWidget( replace, 1, 1, 1, 2 );
63 caseSensitive = new QCheckBox( this, "caseSensitive" );
64 caseSensitive->setText( tr( "&Case sensitive" ) );
66 SearchDlgLayout->addMultiCellWidget( caseSensitive, 2, 2, 0, 1 );
68 matchWord = new QCheckBox( this, "matchWord" );
69 matchWord->setText( tr( "Match whole words onl&y" ) );
71 SearchDlgLayout->addMultiCellWidget( matchWord, 3, 4, 0, 1 );
72 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
73 SearchDlgLayout->addItem( spacer, 2, 2 );
74 QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
75 SearchDlgLayout->addMultiCell( spacer_2, 6, 6, 0, 1 );
76 QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
77 SearchDlgLayout->addItem( spacer_3, 6, 3 );
79 findPB = new QPushButton( this, "findPB" );
80 findPB->setText( tr( "Find &Next" ) );
82 SearchDlgLayout->addWidget( findPB, 0, 3 );
84 replacePB = new QPushButton( this, "replacePB" );
85 replacePB->setText( tr( "&Replace" ) );
87 SearchDlgLayout->addWidget( replacePB, 1, 3 );
89 replaceAllPB = new QPushButton( this, "replaceAllPB" );
90 replaceAllPB->setText( tr( "Replace &All " ) );
92 SearchDlgLayout->addMultiCellWidget( replaceAllPB, 2, 3, 3, 3 );
94 searchBack = new QCheckBox( this, "searchBack" );
95 searchBack->setText( tr( "Search &backwards" ) );
97 SearchDlgLayout->addMultiCellWidget( searchBack, 5, 5, 0, 1 );
99 cancelPB = new QPushButton( this, "cancelPB" );
100 cancelPB->setText( tr( "&Cancel" ) );
102 SearchDlgLayout->addMultiCellWidget( cancelPB, 4, 5, 3, 3 );
104 // signals and slots connections
105 connect( findPB, SIGNAL( clicked() ), this, SLOT( Find() ) );
106 connect( replacePB, SIGNAL( clicked() ), this, SLOT( Replace() ) );
107 connect( replaceAllPB, SIGNAL( clicked() ), this, SLOT( ReplaceAll() ) );
108 connect( cancelPB, SIGNAL( clicked() ), this, SLOT( cancel_adaptor() ) );
111 setTabOrder( find, replace );
112 setTabOrder( replace, caseSensitive );
113 setTabOrder( caseSensitive, matchWord );
114 setTabOrder( matchWord, searchBack );
115 setTabOrder( searchBack, findPB );
116 setTabOrder( findPB, replacePB );
117 setTabOrder( replacePB, replaceAllPB );
118 setTabOrder( replaceAllPB, cancelPB );
122 * Destroys the object and frees any allocated resources
124 SearchDlg::~SearchDlg()
126 // no need to delete child widgets, Qt does it all for us
129 void SearchDlg::Find()
131 qWarning( "SearchDlg::Find(): Not implemented yet!" );
134 void SearchDlg::Replace()
136 qWarning( "SearchDlg::Replace(): Not implemented yet!" );
139 void SearchDlg::ReplaceAll()
141 qWarning( "SearchDlg::ReplaceAll(): Not implemented yet!" );
144 void SearchDlg::cancel_adaptor()
146 qWarning( "SearchDlg::cancel_adaptor(): Not implemented yet!" );