Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_dlg_missing_color_profile.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2022 L. E. Segovia <amy@amyspark.me>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#include <QPushButton>
9
10
12 : KoDialog(parent)
13 , wdg()
14 , colorProfiles()
15{
16 setObjectName("KisDlgMissingColorProfile");
17
18 setWindowTitle(i18nc("@title:window", "Missing Color Profile"));
19
22 button(KoDialog::Ok)->setEnabled(false);
23 auto *page = new QWidget(this);
24 wdg.setupUi(page);
25 setMainWidget(page);
26
29 connect(&colorProfiles, &QButtonGroup::idClicked, this, &KisDlgMissingColorProfile::onInputChanged);
30}
31
36
38{
39 return wdg.dontPrompt->isChecked();
40}
41
43{
44 bool isValid = colorProfiles.checkedId() >= 0;
45 button(KoDialog::Ok)->setEnabled(isValid);
46}
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
KisClipboard::PasteBehaviour source() const
A dialog base class with standard buttons and predefined layouts.
Definition KoDialog.h:116
QPushButton * button(ButtonCode id) const
Definition KoDialog.cpp:591
void setMainWidget(QWidget *widget)
Definition KoDialog.cpp:354
void setButtons(ButtonCodes buttonMask)
Definition KoDialog.cpp:195
void setDefaultButton(ButtonCode id)
Definition KoDialog.cpp:302
@ Ok
Show Ok button. (this button accept()s the dialog; result set to QDialog::Accepted)
Definition KoDialog.h:127
@ Cancel
Show Cancel-button. (this button reject()s the dialog; result set to QDialog::Rejected)
Definition KoDialog.h:130