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
3Pencil2D - Traditional Animation Software
4Copyright (C) 2005-2007 Patrick Corrieri & Pascal Naidon
5Copyright (C) 2012-2020 Matthew Chiawen Chang
6
7This program is free software; you can redistribute it and/or
8modify it under the terms of the GNU General Public License
9as published by the Free Software Foundation; version 2 of the License.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU 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
24namespace Ui {
25class DoubleProgressDialog;
26}
27
28class DoubleProgressDialog : public QProgressDialog
29{
30 Q_OBJECT
31
32public:
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
66private:
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
Generated on Thu May 8 2025 04:47:53 for Pencil2D by doxygen 1.9.6 based on revision 4513250b1d5b1a3676ec0e67b06b7a885ceaae39