Logo    
KDWinUtils
Helper library for MFC to Qt migration
Loading...
Searching...
No Matches
kspinbuttonctrl.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
25class QSpinBox;
26
28
38{
39public:
41 QSpinBox *widget() const;
43 void setWidget(QSpinBox *lineEdit);
44
46 void GetRange(int &lower, int &upper) const;
47
49 int GetPos() const;
50
52 int SetPos(int nPos);
53
55 void SetRange(short nLower, short nUpper);
56
57private:
58 QSpinBox *m_widget = nullptr;
59};
60
The KSpinButtonCtrl class is used to replace DDX_Control edit data exchange.
Definition kspinbuttonctrl.h:38
int GetPos() const
Retrieves the current position of a spin button control.
QSpinBox * widget() const
void setWidget(QSpinBox *lineEdit)
int SetPos(int nPos)
Sets the current position for a spin button control. Return the previous position.
void SetRange(short nLower, short nUpper)
Sets the upper and lower limits (range) for a spin button control.
void GetRange(int &lower, int &upper) const
Retrieves the upper and lower limits (range) for a spin button 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