All Classes Namespaces Functions Variables Enumerations Properties Pages
importlayersdialog.h
1 /*
2 
3 Pencil2D - Traditional Animation Software
4 Copyright (C) 2005-2007 Patrick Corrieri & Pascal Naidon
5 Copyright (C) 2012-2020 Matthew Chiawen Chang
6 
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; version 2 of the License.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 */
17 #ifndef IMPORTLAYERSDIALOG_H
18 #define IMPORTLAYERSDIALOG_H
19 
20 #include <QDialog>
21 #include "object.h"
22 #include "editor.h"
23 
24 namespace Ui {
25 class ImportLayersDialog;
26 }
27 
29 {
30  Q_OBJECT
31 
32 public:
35 
36  void setCore(Editor *editor);
37 
38 public slots:
39  void getFileName();
40  void listWidgetChanged();
41  void importLayers();
42  void cancel();
43 
44 private:
45  Ui::ImportLayersDialog *ui;
46 
47  void getLayers();
48 
49  std::unique_ptr<Object> mImportObject;
50  Layer* mImportLayer = nullptr;
51  Editor* mEditor = nullptr;
52  QString mFileName;
53  QList<int> mItemsSelected;
54  void loadKeyFrames(Layer* importedLayer);
55 };
56 
57 #endif // IMPORTLAYERSDIALOG_H
Q_OBJECTQ_OBJECT
Definition: layer.h:38
Definition: editor.h:55
QObject * parent() const const