Krita Source Code Documentation
Loading...
Searching...
No Matches
KisSpinBoxI18nHelper.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021-2023 Alvin Wong <alvin@alvinhc.com>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
7#ifndef KIS_SPIN_BOX_I18N_HELPER_H
8#define KIS_SPIN_BOX_I18N_HELPER_H
9
10#include <functional>
11
12#include <QStringView>
13
14#include "kritawidgetutils_export.h"
15
16class QDoubleSpinBox;
17class QSpinBox;
18class QString;
19
21
23{
38 KRITAWIDGETUTILS_EXPORT void install(QSpinBox *spinBox, std::function<QString(int)> messageFn);
39
47 KRITAWIDGETUTILS_EXPORT bool update(QSpinBox *spinBox);
48
58 KRITAWIDGETUTILS_EXPORT void setText(QSpinBox *spinBox, QStringView textTemplate);
59
69 KRITAWIDGETUTILS_EXPORT void setText(QDoubleSpinBox *spinBox, QStringView textTemplate);
70
77 void setText(KisSelectionPropertySliderBase *spinBox, const QStringView textTemplate) = delete;
78
79} /* namespace KisSpinBoxI18nHelper */
80
81#endif /* KIS_SPIN_BOX_I18N_HELPER_H */
void setText(QSpinBox *spinBox, const QStringView textTemplate)
void install(QSpinBox *spinBox, std::function< QString(int)> messageFn)
bool update(QSpinBox *spinBox)