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
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
(
Editor
* editor,
QWidget
*
parent
=
nullptr
);
60
~ImportPositionDialog
();
61
62
private
slots:
63
void
didChangeComboBoxIndex(
const
int
index);
64
void
changeImportView();
65
66
private
:
67
Ui::ImportPositionDialog *ui;
68
69
ImportPosition::Type mImportOption = ImportPosition::None;
70
Editor
* mEditor =
nullptr
;
71
};
72
73
#endif
// IMPORTPOSITIONDIALOG_H
Editor
Definition:
editor.h:70
ImportPositionDialog
Definition:
importpositiondialog.h:29
QDialog
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QObject::parent
QObject * parent() const const
QWidget
ImportPositionDialog::ImportPosition
Definition:
importpositiondialog.h:32