File indexing completed on 2024-06-23 05:18:31

0001 /*
0002    SPDX-FileCopyrightText: 2012-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 #include "messagecomposer_export.h"
0009 #include <QWidget>
0010 
0011 class QComboBox;
0012 class QAbstractButton;
0013 namespace Ui
0014 {
0015 class ImageScalingWidget;
0016 }
0017 
0018 namespace MessageComposer
0019 {
0020 class ImageScalingWidgetPrivate;
0021 /**
0022  * @brief The ImageScalingWidget class
0023  * @author Laurent Montel <montel@kde.org>
0024  */
0025 class MESSAGECOMPOSER_EXPORT ImageScalingWidget : public QWidget
0026 {
0027     Q_OBJECT
0028 public:
0029     explicit ImageScalingWidget(QWidget *parent = nullptr);
0030     ~ImageScalingWidget() override;
0031 
0032     void loadConfig();
0033     void writeConfig();
0034     void resetToDefault();
0035 
0036 Q_SIGNALS:
0037     void changed();
0038 
0039 private Q_SLOTS:
0040     MESSAGECOMPOSER_NO_EXPORT void slotComboboxChanged(int index);
0041     MESSAGECOMPOSER_NO_EXPORT void slotSourceFilterClicked(int);
0042     MESSAGECOMPOSER_NO_EXPORT void slotRecipientFilterClicked(int);
0043     MESSAGECOMPOSER_NO_EXPORT void slotHelpLinkClicked(const QString &);
0044 
0045 private:
0046     MESSAGECOMPOSER_NO_EXPORT void slotRecipientFilterAbstractClicked(QAbstractButton *button);
0047     MESSAGECOMPOSER_NO_EXPORT void slotSourceFilterAbstractButtonClicked(QAbstractButton *button);
0048     MESSAGECOMPOSER_NO_EXPORT void updateFilterSourceTypeSettings();
0049     MESSAGECOMPOSER_NO_EXPORT void initComboBox(QComboBox *combo);
0050     MESSAGECOMPOSER_NO_EXPORT void initWriteImageFormat();
0051     MESSAGECOMPOSER_NO_EXPORT void updateEmailsFilterTypeSettings();
0052     MESSAGECOMPOSER_NO_EXPORT void updateSettings();
0053     std::unique_ptr<ImageScalingWidgetPrivate> const d;
0054 };
0055 }