Logo    
KDWinUtils
Helper library for MFC to Qt migration
Loading...
Searching...
No Matches
kprogressctrl.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of KDWinutils, KDAB's MFC to Qt migration tool.
4**
5** Copyright (C) 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6** All rights reserved.
7**
8** This file is intended solely for use by the migration tools and services
9** provided by Klarälvdalens Datakonsult AB.
10**
11** Any other use or distribution of this software that is not otherwise agreed
12** upon in writing and signed by an authorized representative of Klarälvdalens
13** Datakonsult AB, KDAB (USA) LLC, KDAB (Deutschland) GmbH & Co. K.G.,
14** KDAB (France) SAS, KDAB (UK), Ltd., or any future subsidiary of Klarälvdalens
15** Datakonsult AB is hereby prohibited.
16**
17** Contact info@kdab.com if any conditions stated above are unclear to you.
18**
19****************************************************************************/
20
21#pragma once
22
24
25#include <QColor>
26
27class QProgressBar;
28
30
40{
41public:
43 QProgressBar *widget() const;
45 void setWidget(QProgressBar *progressBar);
46
49 void OffsetPos(int nPos);
50
53 void SetRange(short nLower, short nUpper);
54
56 void SetStep(int nStep);
57
60 void SetPos(int nPos);
61
64 int StepIt();
65
67 int GetStep() const;
68
70 void GetRange(int &nLower, int &nUpper);
71
73 int GetPos();
74
76 void SetBarColor(const QColor &clr);
77
79 void SetBkColor(const QColor &clr);
80
81private:
82 int m_stepValue = 10;
83 QProgressBar *m_widget = nullptr;
84};
85
The KProgressCtrl class is used to replace DDX_Control edit data exchange.
Definition kprogressctrl.h:40
QProgressBar * widget() const
int GetStep() const
Retrieves the step increment for the progress bar of the current progress bar control.
void setWidget(QProgressBar *progressBar)
void SetPos(int nPos)
Sets the progress bar control's current position as specified by nPos and redraws the bar to reflect ...
void SetBarColor(const QColor &clr)
Sets the color of the progress indicator bar in the current progress bar control.
int StepIt()
Advances the current position for a progress bar control by the step increment and redraws the bar to...
void SetStep(int nStep)
Specifies the step increment for a progress bar control.
void SetRange(short nLower, short nUpper)
Sets the upper and lower limits of the progress bar control's range and redraws the bar to reflect th...
void SetBkColor(const QColor &clr)
Sets the background color of the progress bar control.
void GetRange(int &nLower, int &nUpper)
Gets the current lower and upper limits, or range, of the progress bar control.
int GetPos()
Retrieves the current position of the progress bar.
void OffsetPos(int nPos)
Advances the progress bar control's current position by the increment specified by nPos and redraws t...
#define KDWINUTILS_EXPORT
Definition kdwinutils_export.h:31
#define KDWINUTILS_BEGIN_NAMESPACE
Definition kdwinutils_global.h:27
#define KDWINUTILS_END_NAMESPACE
Definition kdwinutils_global.h:28