Esempio n. 1
0
void Window::initializeDialogs()
{
	// Create our dialog objects.

	preferencesDialog = new PreferencesDialog(this);

	findDialog = new FindDialog(this);

	replaceDialog = new ReplaceDialog(this);

	goToDialog = new GoToDialog(this);

	aboutDialog = new AboutDialog(this);

	// Connect our dialog actions.

	QObject::connect(findDialog, SIGNAL(accepted()), this,
	                 SLOT(doFindNext()));
	QObject::connect(replaceDialog, SIGNAL(replaceClicked()), this,
	                 SLOT(doReplace()));
	QObject::connect(replaceDialog, SIGNAL(findClicked()), this,
	                 SLOT(doReplaceFind()));
	QObject::connect(replaceDialog, SIGNAL(replaceSelectionClicked()), this,
	                 SLOT(doReplaceSelection()));
	QObject::connect(replaceDialog, SIGNAL(replaceAllClicked()), this,
	                 SLOT(doReplaceAll()));
	QObject::connect(goToDialog, SIGNAL(accepted()), this,
	                 SLOT(doGoToAccepted()));
}
Esempio n. 2
0
ReplaceDialog::ReplaceDialog(QWidget* parent,  const char* name, Qt::WFlags fl )
    : QDialog( parent, fl )
{
setWindowTitle(name);
setModal(true);
ui.setupUi(this);
connect( ui.findButton, SIGNAL( clicked() ), this, SLOT( doReplace() ) );
connect( ui.replaceallButton, SIGNAL( clicked() ), this, SLOT( doReplaceAll() ) );
connect( ui.closeButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
ui.findButton->setShortcut(Qt::Key_Return);
}
Esempio n. 3
0
ReplaceWidget::ReplaceWidget(QWidget* parent)
    : QWidget( parent)
{
ui.setupUi(this);
connect( ui.findButton, SIGNAL( clicked() ), this, SLOT( doReplace() ) );
connect( ui.replaceallButton, SIGNAL( clicked() ), this, SLOT( doReplaceAll() ) );
connect( ui.closeButton, SIGNAL( clicked() ), this, SLOT( doHide() ) );
//ui.findButton->setShortcut(Qt::Key_Return);
ui.findButton->setToolTip("Return");
ui.closeButton->setShortcut(Qt::Key_Escape);
ui.closeButton->setToolTip("Escape");
ui.moreButton->setCheckable(true);
ui.moreButton->setAutoDefault(false);
connect(ui.moreButton, SIGNAL(toggled(bool)), this, SLOT(expand(bool)));
ui.checkRegExp->setChecked( false );
ui.checkSelection->setChecked( false );
connect(ui.checkSelection, SIGNAL(toggled(bool)), this, SLOT(updateSelection(bool)));
connect(ui.checkRegExp, SIGNAL(toggled(bool)), this, SLOT(updateReg(bool)));
ui.extension->hide();
updateGeometry();
}