Exemplo n.º 1
0
int FindDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QDialog::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: findNext((*reinterpret_cast< const QString(*)>(_a[1])),(*reinterpret_cast< Qt::CaseSensitivity(*)>(_a[2]))); break;
        case 1: findPrevious((*reinterpret_cast< const QString(*)>(_a[1])),(*reinterpret_cast< Qt::CaseSensitivity(*)>(_a[2]))); break;
        case 2: findClicked(); break;
        case 3: enableFindButton((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        }
        _id -= 4;
    }
    return _id;
}
Exemplo n.º 2
0
GKFindDialog::GKFindDialog(QWidget *parent) : QDialog(parent), _ui(new Ui::GKFindDialog)
{
    _ui->setupUi(this);

    adjustSize();
    setFixedSize(size());

    _ui->labelSearch->setBuddy(_ui->leSearch);
    _ui->labelReplace->setBuddy(_ui->leReplace);
    _ui->btnSearch->setDefault(true);
    _ui->btnSearch->setEnabled(false);

    connect(_ui->leSearch, SIGNAL(textChanged(QString)), this, SLOT(enableFindButton(QString)));
    connect(_ui->btnSearch, SIGNAL(clicked()), this, SLOT(search()));
    connect(_ui->btnCancel, SIGNAL(clicked()), this, SLOT(close()));
    connect(_ui->btnReplace, SIGNAL(clicked()), this, SLOT(replaceSelected()));
    connect(_ui->btnReplaceAll, SIGNAL(clicked()), this, SLOT(replaceAllSelected()));
}
Exemplo n.º 3
0
int TISSASearch::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QDialog::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: on_pushButton_clicked(); break;
        case 1: on_pushButton_2_clicked(); break;
        case 2: on_pushButton_3_clicked(); break;
        case 3: enableFindButton((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        case 4: enableSearchButton((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 5;
    }
    return _id;
}
Exemplo n.º 4
0
DlgFind::DlgFind(QWidget *parent, Qt::WindowFlags f): QDialog(parent, f)
{
	label = new QLabel(trUtf8("&Что искать:"), this);
	lineEdit = new QLineEdit(this);
	label->setBuddy(lineEdit);
	
	caseCheckBox = new QCheckBox(trUtf8("&Учитывать регистр"), this);
	backwardCheckBox = new QCheckBox(trUtf8("&Обратный поиск"), this);
	
	findButton = new QPushButton(trUtf8("&Найти"), this);
	findButton->setDefault(true);
	findButton->setEnabled(false);
	
	closeButton = new QPushButton(trUtf8("&Закрыть"), this);
	
	connect(lineEdit, SIGNAL(textChanged(QString)), SLOT(enableFindButton(QString)));
	connect(findButton, SIGNAL(clicked(bool)), SLOT(findClicked()));
	connect(closeButton, SIGNAL(clicked(bool)), SLOT(close()));
	
	QHBoxLayout *topLeftLayout = new QHBoxLayout;
	topLeftLayout->addWidget(label);
	topLeftLayout->addWidget(lineEdit);
	
	QVBoxLayout *leftLayout = new QVBoxLayout;
	leftLayout->addLayout(topLeftLayout);
	leftLayout->addWidget(caseCheckBox);
	leftLayout->addWidget(backwardCheckBox);
	
	QVBoxLayout *rightLayout = new QVBoxLayout;
	rightLayout->addWidget(findButton);
	rightLayout->addWidget(closeButton);
	rightLayout->addStretch();
	
	QHBoxLayout *mainLayout = new QHBoxLayout(this);
	mainLayout->addLayout(leftLayout);
	mainLayout->addLayout(rightLayout);
	setLayout(mainLayout);
	
	setWindowTitle(trUtf8("Поиск"));
	setFixedHeight(sizeHint().height());
}