File indexing completed on 2024-06-23 04:26:42
0001 /* 0002 * dlg_imagesplit.h -- part of KimageShop^WKrayon^WKrita 0003 * 0004 * SPDX-FileCopyrightText: 2009 Boudewijn Rempt <boud@valdyas.org> 0005 * SPDX-FileCopyrightText: 2011 Srikanth Tiyyagura <srikanth.tulasiram@gmail.com> 0006 * 0007 * SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 #ifndef DLG_IMAGESPLIT 0010 #define DLG_IMAGESPLIT 0011 0012 #include <KoDialog.h> 0013 0014 #include <kis_types.h> 0015 0016 #include "wdg_imagesplit.h" 0017 0018 class KisViewManager; 0019 /** 0020 * This dialog allows the user to create a selection mask based 0021 * on a (range of) colors. 0022 */ 0023 class DlgImagesplit: public KoDialog 0024 { 0025 0026 Q_OBJECT 0027 0028 public: 0029 0030 DlgImagesplit(KisViewManager* view 0031 , const QString &suffix 0032 , QStringList listMimeType 0033 , int defaultMimeIndex 0034 , QImage thumbnail 0035 , QList<qreal> hGuides 0036 , QList<qreal> vGuides 0037 , qreal thumbnailRatio); 0038 ~DlgImagesplit() override; 0039 bool autoSave(); 0040 bool sortHorizontal(); 0041 int horizontalLines(); 0042 int verticalLines(); 0043 bool useHorizontalGuides(); 0044 bool useVerticalGuides(); 0045 int cmbIndex; 0046 QString suffix(); 0047 private Q_SLOTS: 0048 0049 void applyClicked(); 0050 void lineEditEnable(); 0051 void setMimeType(int index); 0052 void updatePreview(); 0053 private: 0054 WdgImagesplit* m_page; 0055 QImage m_thumbnail; 0056 QList<qreal> m_horizontalGuides; 0057 QList<qreal> m_verticalGuides; 0058 qreal m_thumbnailRatio; 0059 }; 0060 0061 #endif // DLG_IMAGESPLIT