Pencil2D Animation
Download
Community
News
Docs
Contribute
API Documentation
5eeebd3c7472c3c2e6618ff9a94eca7af8af593e
Main Page
Related Pages
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Enumerations
Properties
Pages
app
src
importpositiondialog.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 IMPORTPOSITIONDIALOG_H
18
#define IMPORTPOSITIONDIALOG_H
19
20
#include <QDialog>
21
22
namespace
Ui {
23
class
ImportPositionDialog
;
24
}
25
26
class
Editor
;
27
28
class
ImportPositionDialog
:
public
QDialog
29
{
30
Q_OBJECT
31
32
struct
ImportPosition
{
33
34
enum
Type {
35
CenterOfView,
36
CenterOfCanvas,
37
CenterOfCamera,
38
CenterOfCameraFollowed,
39
None
40
};
41
42
static
Type getTypeFromIndex(
int
index) {
43
switch
(index) {
44
case
0:
45
return
CenterOfView;
46
case
1:
47
return
CenterOfCanvas;
48
case
2:
49
return
CenterOfCamera;
50
case
3:
51
return
CenterOfCameraFollowed;
52
default
:
53
return
None;
54
}
55
}
56
};
57
58
public
:
59
explicit
ImportPositionDialog
(
QWidget
*
parent
=
nullptr
);
60
~
ImportPositionDialog
();
61
62
void
setCore(
Editor
* editor) { mEditor = editor; }
63
64
private
slots:
65
void
didChangeComboBoxIndex(
const
int
index);
66
void
changeImportView();
67
68
private
:
69
Ui::ImportPositionDialog *ui;
70
71
ImportPosition::Type mImportOption = ImportPosition::None;
72
Editor
* mEditor =
nullptr
;
73
};
74
75
#endif // IMPORTPOSITIONDIALOG_H
QWidget
ImportPositionDialog::ImportPosition
Definition:
importpositiondialog.h:32
ImportPositionDialog
Definition:
importpositiondialog.h:28
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QDialog
Editor
Definition:
editor.h:51
QObject::parent
QObject * parent() const const
Generated on Sun Dec 20 2020 16:19:57 for Pencil2D by
1.8.6