Pencil2D Animation
Download Community News Docs Contribute
  • Overview
  • Articles
  • Code
  •  
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • File List
Loading...
Searching...
No Matches
  • app
  • src
importpositiondialog.h
1/*
2
3Pencil2D - Traditional Animation Software
4Copyright (C) 2005-2007 Patrick Corrieri & Pascal Naidon
5Copyright (C) 2012-2020 Matthew Chiawen Chang
6
7This program is free software; you can redistribute it and/or
8modify it under the terms of the GNU General Public License
9as published by the Free Software Foundation; version 2 of the License.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16*/
17#ifndef IMPORTPOSITIONDIALOG_H
18#define IMPORTPOSITIONDIALOG_H
19
20#include <QDialog>
21
22#include "importimageconfig.h"
23
24namespace Ui {
25class ImportPositionDialog;
26}
27
28class Editor;
29
30class ImportPositionDialog : public QDialog
31{
32 Q_OBJECT
33
34public:
35 explicit ImportPositionDialog(Editor* editor, QWidget *parent = nullptr);
36 ~ImportPositionDialog();
37
38 ImportImageConfig importConfig() const { return mImportConfig; }
39
40private slots:
41 void didChangeComboBoxIndex(const int index);
42 void changeImportView();
43
44private:
45 static ImportImageConfig::PositionType getTypeFromIndex(int index) {
46 switch (index) {
47 case 0:
48 return ImportImageConfig::CenterOfView;
49 case 1:
50 return ImportImageConfig::CenterOfCanvas;
51 case 2:
52 return ImportImageConfig::CenterOfCamera;
53 case 3:
54 return ImportImageConfig::CenterOfCameraFollowed;
55 default:
56 return ImportImageConfig::None;
57 }
58 }
59
60 Ui::ImportPositionDialog *ui;
61
62 ImportImageConfig mImportConfig;
63 Editor* mEditor = nullptr;
64};
65
66#endif // IMPORTPOSITIONDIALOG_H
Editor
Definition: editor.h:71
ImportPositionDialog
Definition: importpositiondialog.h:31
QDialog
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QObject::parent
QObject * parent() const const
QWidget
ImportImageConfig
Definition: importimageconfig.h:22
Generated on Thu May 8 2025 04:47:53 for Pencil2D by doxygen 1.9.6 based on revision 4513250b1d5b1a3676ec0e67b06b7a885ceaae39