File indexing completed on 2025-01-26 04:08:04

0001 /*
0002  *  SPDX-FileCopyrightText: 2016 Jouni Pentikäinen <joupent@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef KISDLGIMPORTIMAGESEQUENCE_H
0008 #define KISDLGIMPORTIMAGESEQUENCE_H
0009 
0010 #include <QObject>
0011 #include <QCollator>
0012 #include "KoDialog.h"
0013 #include "ui_wdgimportimagesequence.h"
0014 
0015 class KisDocument;
0016 class KisMainWindow;
0017 
0018 class KisDlgImportImageSequence : public KoDialog
0019 {
0020     Q_OBJECT
0021 
0022 public:
0023     KisDlgImportImageSequence(KisMainWindow *m_mainWindow, KisDocument *m_document);
0024 
0025     QStringList showOpenFileDialog();
0026     QStringList files();
0027     int firstFrame();
0028     int step();
0029     bool autoAddHoldframes();
0030     bool startFrom1();
0031     int isAscending();
0032     int sortOrder;
0033 
0034 protected Q_SLOTS:
0035     void slotAddFiles();
0036     void slotRemoveFiles();
0037     void slotSkipChanged(int);
0038     void slotOrderOptionsChanged(int);
0039 
0040 
0041 private:
0042     void sortFileList();
0043 
0044 private:
0045     Ui_WdgImportImageSequence m_ui;
0046     KisMainWindow *m_mainWindow;
0047     KisDocument *m_document;
0048 
0049     enum OrderingOptions {
0050         Ascending = 1,
0051         Descending = 2,
0052         Natural = 4,
0053         Numerical = 8
0054     };
0055 
0056     class ListItem;
0057     QCollator m_collator;
0058 };
0059 
0060 #endif // KISDLGIMPORTIMAGESEQUENCE_H