forked from leuat/TRSE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdialogimport.h
174 lines (113 loc) · 4.34 KB
/
dialogimport.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
/*
* Turbo Rascal Syntax error, “;” expected but “BEGIN” (TRSE, Turbo Rascal SE)
* 8 bit software development IDE for the Commodore 64
* Copyright (C) 2018 Nicolaas Ervik Groeneboom (nicolaas.groeneboom@gmail.com)
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program (LICENSE.txt).
* If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef DIALOGIMPORT_H
#define DIALOGIMPORT_H
#include "imageworker.h"
#include <QDialog>
#include <QFontDatabase>
#include "source/LeLib/limage/bitmapfont.h"
namespace Ui {
class DialogImport;
}
class DialogImport : public QDialog
{
Q_OBJECT
public:
explicit DialogImport(QWidget *parent = 0);
~DialogImport();
void Initialize(LImage::Type imageType, LColorList::Type colorType, LImage* img);
bool ignore = false;
bool ignoreText = false;
BitmapFont m_bf;
float m_contrast = 1;
float m_shift = 0;
float m_hsv = 0.5;
float m_saturation = 0.5;
float m_blur = 0;
int matrixSizeX = 2;
int matrixSizeY = 1;
QStringList m_customPalettes = QStringList() << "0,6,4,3,13,7,1"
<< "0,9,2,4,8,10,15,1"
<< "0,6,9,2,4,5,3,7"
<< "0,6,11,12,15,1"
<< "0,2,11,8,15,7,1"
<< "$00,$06,$09,$0b,$02,$04,$08,$0c,$0e,$0a,$05,$0f,$03,$07,$0d,$01";
QPointF m_scale = QPointF(1,1);
bool isPetscii = false;
LImageQImage m_input;
LImageQImage m_intermediate;
LImageQImage m_work;
LImageQImage m_output;
LImage* m_image = nullptr;
LImage::Type m_imageType = LImage::Type::QImageBitmap;
void Convert();
void Blur();
void UpdateSliders();
void UpdateText();
bool m_ok = false;
private slots:
void on_hsContrast_sliderMoved(int position);
void on_hsShift_sliderMoved(int position);
void on_hsHsv_sliderMoved(int position);
void on_hsSat_sliderMoved(int position);
void on_hsBlur_sliderMoved(int position);
void on_cmbForeground_activated(int index);
void on_cmbBackground_activated(int index);
void SetColors();
private slots:
void UpdateOutput();
void on_btnImport_clicked();
void slotOk();
void on_cmbMC1_activated(int index);
void on_cmbMC2_activated(int index);
// void on_chkDither_stateChanged(int arg1);
void on_btnFromFont_clicked();
void on_btnImport_2_clicked();
void on_hsDither_sliderMoved(int position);
void on_hsScaleX_sliderMoved(int position);
void on_hsScaleY_sliderMoved(int position);
void on_cmbDither_currentIndexChanged(int index);
void on_chkTreatCharset_stateChanged(int arg1);
void on_leCharWidth_textChanged(const QString &arg1);
void on_leCharHeight_textChanged(const QString &arg1);
void on_leBlockWidth_textChanged(const QString &arg1);
void on_leBlockHeight_textChanged(const QString &arg1);
void on_leOutCharWidth_textChanged(const QString &arg1);
void on_leOutCharHeight_textChanged(const QString &arg1);
void on_leAllowance_textChanged(const QString &arg1);
void on_leDither_textChanged(const QString &arg1);
void on_leGamma_textChanged(const QString &arg1);
void on_leShift_textChanged(const QString &arg1);
void on_leHsv_textChanged(const QString &arg1);
void on_leSat_textChanged(const QString &arg1);
void on_leBlur_textChanged(const QString &arg1);
void on_leScaleX_textChanged(const QString &arg1);
void on_leScaleY_textChanged(const QString &arg1);
void on_chkCustom_stateChanged(int arg1);
void on_leCustomPalette_textChanged(const QString &arg1);
void on_comboBox_currentIndexChanged(int index);
void on_leForceD800_editingFinished();
void on_leForceD800_textChanged(const QString &arg1);
void on_comboBox_2_currentIndexChanged(const QString &arg1);
private:
Ui::DialogImport *ui;
};
#endif // DIALOGIMPORT_H