File indexing completed on 2025-01-19 03:53:52

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2010-01-14
0007  * Description : a dialog to display image file save options.
0008  *
0009  * SPDX-FileCopyrightText: 2009      by David Eriksson <meldavid at acc umu se>
0010  * SPDX-FileCopyrightText: 2010-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #include "filesaveoptionsdlg.h"
0017 
0018 // Qt includes
0019 
0020 #include <QDialogButtonBox>
0021 #include <QVBoxLayout>
0022 #include <QPushButton>
0023 
0024 // KDE includes
0025 
0026 #include <klocalizedstring.h>
0027 
0028 namespace Digikam
0029 {
0030 
0031 FileSaveOptionsDlg::FileSaveOptionsDlg(QWidget* const parent, FileSaveOptionsBox* const options)
0032     : QDialog(parent)
0033 {
0034     setWindowTitle(i18nc("@title:window", "Settings for Saving Image File"));
0035 
0036     QDialogButtonBox* const buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
0037     buttons->button(QDialogButtonBox::Ok)->setDefault(true);
0038 
0039     QVBoxLayout* const vbx          = new QVBoxLayout(this);
0040     vbx->addWidget(options);
0041     vbx->addWidget(buttons);
0042     setLayout(vbx);
0043 
0044     connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
0045             this, SLOT(accept()));
0046 
0047     connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()),
0048             this, SLOT(reject()));
0049 }
0050 
0051 FileSaveOptionsDlg::~FileSaveOptionsDlg()
0052 {
0053 }
0054 
0055 } // namespace Digikam
0056 
0057 #include "moc_filesaveoptionsdlg.cpp"