Files
flameshot/src/widgets/imguruploaddialog.cpp
borgmanJeremy f675123e0a working on monochrome icon (#2071)
* working on monochrome icon

* Update pipeline

* adjusted icns to be monochrome

* Added 1045 monochrome
2021-11-17 14:28:16 -06:00

44 lines
1.4 KiB
C++

// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2017-2019 Alejandro Sirgo Rica & Contributors
#include "imguruploaddialog.h"
#include "src/utils/confighandler.h"
#include "src/utils/globalvalues.h"
#include <QCheckBox>
#include <QDialogButtonBox>
#include <QLabel>
#include <QVBoxLayout>
ImgurUploadDialog::ImgurUploadDialog(QDialog* parent)
: QDialog(parent)
{
setAttribute(Qt::WA_DeleteOnClose);
setMinimumSize(400, 120);
setWindowIcon(QIcon(GlobalValues::iconPath()));
setWindowTitle(tr("Upload Confirmation"));
layout = new QVBoxLayout(this);
m_uploadLabel =
new QLabel(tr("Do you want to upload this capture to Imgur?"), this);
layout->addWidget(m_uploadLabel);
buttonBox =
new QDialogButtonBox(QDialogButtonBox::Yes | QDialogButtonBox::No);
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
layout->addWidget(buttonBox);
m_uploadWithoutConfirmation =
new QCheckBox(tr("Upload to Imgur without confirmation"), this);
m_uploadWithoutConfirmation->setToolTip(
tr("Upload to Imgur without confirmation"));
connect(m_uploadWithoutConfirmation, &QCheckBox::clicked, [](bool checked) {
ConfigHandler().setUploadWithoutConfirmation(checked);
});
layout->addWidget(m_uploadWithoutConfirmation);
}