File indexing completed on 2025-03-09 04:06:49

0001 /* This file is part of the KDE project
0002  * SPDX-FileCopyrightText: 2013 Boudewijn Rempt <boud@valdyas.org>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 #ifndef KIS_DLG_FILE_LAYER_H
0007 #define KIS_DLG_FILE_LAYER_H
0008 
0009 #include <KoDialog.h>
0010 #include <QString>
0011 
0012 
0013 #include <kis_file_layer.h>
0014 
0015 #include "ui_wdgdlgfilelayer.h"
0016 
0017 /**
0018  * Create a new file layer
0019  */
0020 class KisDlgFileLayer : public KoDialog
0021 {
0022 public:
0023 
0024     Q_OBJECT
0025 
0026 public:
0027 
0028     /**
0029      * Create a new file layer
0030      * @param basePath the base path of the layer
0031      * @param name the proposed name for this layer
0032      * @param parent the widget parent of this dialog
0033      */
0034     KisDlgFileLayer(const QString &basePath, const QString &name, QWidget *parent = 0);
0035     QString fileName() const;
0036     QString layerName() const;
0037     KisFileLayer::ScalingMethod scaleToImageResolution() const;
0038     QString scalingFilter() const;
0039 
0040     void setFileName(QString fileName);
0041     void setScalingMethod(KisFileLayer::ScalingMethod method);
0042     void setScalingFilter(QString filter);
0043 
0044 protected Q_SLOTS:
0045     void slotNameChanged(const QString &);
0046     void slotMethodChanged(const bool &);
0047 
0048 private:
0049 
0050     Ui_WdgDlgFileLayer dlgWidget;
0051     QString m_basePath;
0052 };
0053 
0054 #endif