forked from qt-creator/qt-creator
Move cancel button back into progressbar
I made it hide the cancel button this time and added a nice animation when hovered.
This commit is contained in:
@@ -38,6 +38,9 @@
|
||||
class ProgressBar : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(float fader READ fader WRITE setFader)
|
||||
|
||||
public:
|
||||
ProgressBar(QWidget *parent = 0);
|
||||
~ProgressBar();
|
||||
@@ -50,13 +53,16 @@ public:
|
||||
QSize sizeHint() const;
|
||||
void paintEvent(QPaintEvent *);
|
||||
void mouseMoveEvent(QMouseEvent *);
|
||||
|
||||
int minimum() const { return m_minimum; }
|
||||
int maximum() const { return m_maximum; }
|
||||
int value() const { return m_value; }
|
||||
void reset();
|
||||
void setRange(int minimum, int maximum);
|
||||
void setValue(int value);
|
||||
float fader() { return m_fader; }
|
||||
void setFader(float value) { m_fader = value; update(); }
|
||||
bool event(QEvent *);
|
||||
|
||||
signals:
|
||||
void clicked();
|
||||
|
||||
@@ -69,10 +75,11 @@ private:
|
||||
QString m_title;
|
||||
bool m_error;
|
||||
int m_progressHeight;
|
||||
|
||||
int m_minimum;
|
||||
int m_maximum;
|
||||
int m_value;
|
||||
float m_fader;
|
||||
|
||||
};
|
||||
|
||||
#endif // PROGRESSPIE_H
|
||||
|
||||
Reference in New Issue
Block a user