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
addtransparencytopaperdialog.h
1
/*
2
3
Pencil2D - Traditional Animation Software
4
Copyright (C) 2020 David Lamhauge
5
6
This program is free software; you can redistribute it and/or
7
modify it under the terms of the GNU General Public License
8
as published by the Free Software Foundation; version 2 of the License.
9
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
*/
16
17
#ifndef ADDTRANSPARENCYTOPAPERDIALOG_H
18
#define ADDTRANSPARENCYTOPAPERDIALOG_H
19
20
#include <QDialog>
21
#include <QGraphicsScene>
22
23
#include "bitmapimage.h"
24
25
class
Editor
;
26
class
QAbstractButton
;
27
class
QGraphicsPixmapItem
;
28
29
namespace
Ui {
30
class
AddTransparencyToPaperDialog
;
31
}
32
33
class
AddTransparencyToPaperDialog
:
public
QDialog
34
{
35
Q_OBJECT
36
37
public
:
38
explicit
AddTransparencyToPaperDialog
(
QWidget
*
parent
=
nullptr
);
39
~AddTransparencyToPaperDialog
()
override
;
40
41
void
setCore(
Editor
* editor);
42
43
void
initUI();
44
45
void
traceScannedDrawings();
46
47
protected
:
48
void
resizeEvent(
QResizeEvent
*)
override
;
49
50
private
slots:
51
void
thresholdSpinboxChanged(
int
value);
52
void
thresholdSliderChanged(
int
value);
53
void
updateDrawing();
54
void
layerChanged(
int
index);
55
void
checkerStateChanged(
bool
state);
56
void
zoomChanged(
int
zoomLevel);
57
void
buttonClicked(
QAbstractButton
* button);
58
59
private
:
60
void
updatePreview();
61
void
loadDrawing(
int
frame);
62
63
int
mZoomLevel = 1;
64
65
Ui::AddTransparencyToPaperDialog *ui =
nullptr
;
66
67
QGraphicsScene
scene;
68
QGraphicsPixmapItem
* mPreviewImageItem =
nullptr
;
69
70
int
mThreshold = 220;
71
BitmapImage
mBitmap;
72
QPixmap
mPixmapFromImage;
73
Editor
* mEditor =
nullptr
;
74
};
75
76
#endif
// ADDTRANSPARENCYTOPAPERDIALOG_H
AddTransparencyToPaperDialog
Definition:
addtransparencytopaperdialog.h:34
BitmapImage
Definition:
bitmapimage.h:28
Editor
Definition:
editor.h:70
QAbstractButton
QDialog
QGraphicsPixmapItem
QGraphicsScene
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QObject::parent
QObject * parent() const const
QPixmap
QResizeEvent
QWidget