Logo    
KDWinUtils
Helper library for MFC to Qt migration
Loading...
Searching...
No Matches
ksliderctrl.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) 2023 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
25class QSlider;
26
28
38{
39public:
41 QSlider *widget() const;
43 void setWidget(QSlider *slider);
44
46 void SetRange(int nMin, int nMax, bool bRedraw = false);
47
49 int GetPos() const;
51 void SetPos(int nPos);
52
54 void SetRangeMin(int nMin, bool bRedraw = false);
55
57 void SetRangeMax(int nMax, bool bRedraw = false);
58
60 int GetRangeMax() const;
61
63 int GetRangeMin() const;
64
66 int SetPageSize(int nSize);
67
69 int GetPageSize() const;
70
72 void SetTicFreq(int nFreq);
73
75 int SetLineSize(int nSize);
76
78 int GetLineSize() const;
79
81 void ClearTics(bool bRedraw = false);
82
83private:
84 QSlider *m_widget = nullptr;
85};
86
The KSliderCtrl class is used to replace DDX_Control slider data exchange.
Definition ksliderctrl.h:38
void SetPos(int nPos)
Sets the current position of the slider.
void SetTicFreq(int nFreq)
Sets the frequency with which tick marks are displayed in a slider.
int GetLineSize() const
Retrieves the size of the line for a slider control.
QSlider * widget() const
int GetRangeMax() const
Retrieves the maximum position for the slider in a slider control.
void setWidget(QSlider *slider)
int GetPos() const
Retrieves the current position of the slider.
void SetRange(int nMin, int nMax, bool bRedraw=false)
Sets the minimum and maximum positions for a slider.
int GetPageSize() const
Retrieves the size of the page for a slider control.
void ClearTics(bool bRedraw=false)
Removes the current tick marks from a slider control.
int SetPageSize(int nSize)
Sets the size of the page for a slider control.
int SetLineSize(int nSize)
Sets the size of the line for a slider control.
void SetRangeMin(int nMin, bool bRedraw=false)
Sets the minimum range for the slider in a slider control.
int GetRangeMin() const
Retrieves the minimum position for the slider in a slider control.
void SetRangeMax(int nMax, bool bRedraw=false)
Sets the maximum range for the slider in a slider control.
#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