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
doubleprogressdialog.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
18
#ifndef DOUBLEPROGRESSDIALOG_H
19
#define DOUBLEPROGRESSDIALOG_H
20
21
#include <QProgressDialog>
22
#include <QProgressBar>
23
24
namespace
Ui {
25
class
DoubleProgressDialog
;
26
}
27
28
class
DoubleProgressDialog
:
public
QProgressDialog
29
{
30
Q_OBJECT
31
32
public
:
33
explicit
DoubleProgressDialog
(
QWidget
*
parent
=
nullptr
);
34
~DoubleProgressDialog
();
35
36
QString
getStatus();
37
void
setStatus(
QString
msg);
38
39
class
ProgressBarControl
{
40
public
:
41
ProgressBarControl
(
QProgressBar
*b);
42
43
float
getMin() {
return
min; }
44
void
setMin(
float
minimum
);
45
46
float
getMax() {
return
max; }
47
void
setMax(
float
maximum
);
48
49
void
setRange(
float
minimum
,
float
maximum
) { setMin(
minimum
); setMax(
maximum
); }
50
51
float
getValue() {
return
val; }
52
void
setValue(
float
value
);
53
54
int
getPrecision();
55
void
setPrecision(
int
e);
56
private
:
57
QProgressBar
*bar;
58
float
min = 0, max = 1, val = 0;
59
60
int
convertUnits(
float
value
);
61
int
unitFactor = 100;
62
};
63
64
ProgressBarControl
*major, *minor;
65
66
private
:
67
Ui::DoubleProgressDialog *ui;
68
};
69
70
#endif
// DOUBLEPROGRESSDIALOG_H
DoubleProgressDialog::ProgressBarControl
Definition:
doubleprogressdialog.h:39
DoubleProgressDialog
Definition:
doubleprogressdialog.h:29
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QObject::parent
QObject * parent() const const
QProgressBar
QProgressDialog
QProgressDialog::maximum
maximum
QProgressDialog::minimum
minimum
QProgressDialog::value
value
QString
QWidget