Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qfilternamedialog.cpp
Go to the documentation of this file.
1
// Copyright (C) 2020 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
include
"qfilternamedialog_p.h"
6
7
#
include
<
QtWidgets
/
qpushbutton
.
h
>
8
9
QT_BEGIN_NAMESPACE
10
11
QFilterNameDialog::QFilterNameDialog(
QWidget
*
parent
)
12
:
QDialog
(
parent
)
13
{
14
m_ui.setupUi(
this
);
15
connect(m_ui.buttonBox->button(QDialogButtonBox::Ok), &QAbstractButton::clicked,
16
this
, &QDialog::accept);
17
connect(m_ui.buttonBox->button(QDialogButtonBox::Cancel), &QAbstractButton::clicked,
18
this
, &QDialog::reject);
19
connect(m_ui.lineEdit, &QLineEdit::textChanged,
this
, &QFilterNameDialog::updateOkButton);
20
m_ui.buttonBox->button(QDialogButtonBox::Ok)->setDisabled(
true
);
21
}
22
23
void
QFilterNameDialog::setFilterName(
const
QString &filter)
24
{
25
m_ui.lineEdit->setText(filter);
26
m_ui.lineEdit->selectAll();
27
}
28
29
void
QFilterNameDialog::updateOkButton()
30
{
31
m_ui.buttonBox->button(QDialogButtonBox::Ok)->setDisabled(m_ui.lineEdit->text().isEmpty());
32
}
33
34
QT_END_NAMESPACE
QObjectData::parent
QObject * parent
Definition
qobject.h:74
QWidget
The QWidget class is the base class of all user interface objects.
Definition
qwidget.h:99
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qttools
src
assistant
help
qfilternamedialog.cpp
Generated on
for Qt by
1.18.0