Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
dpi_chooser.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3// Qt-Security score:significant reason:default
4
5//
6// W A R N I N G
7// -------------
8//
9// This file is not part of the Qt API. It exists for the convenience
10// of Qt Designer. This header
11// file may change from version to version without notice, or even be removed.
12//
13// We mean it.
14//
15
16#ifndef DPICHOOSER_H
17#define DPICHOOSER_H
18
19#include <QtWidgets/qwidget.h>
20
21QT_BEGIN_NAMESPACE
22
23class QSpinBox;
24class QComboBox;
25
26namespace qdesigner_internal {
27
28struct DPI_Entry;
29
30/* Let the user choose a DPI settings */
31class DPI_Chooser : public QWidget {
34
35public:
36 explicit DPI_Chooser(QWidget *parent = nullptr);
38
39 void getDPI(int *dpiX, int *dpiY) const;
40 void setDPI(int dpiX, int dpiY);
41
42private slots:
43 void syncSpinBoxes();
44
45private:
46 void setUserDefinedValues(int dpiX, int dpiY);
47
48 struct DPI_Entry *m_systemEntry;
49 QComboBox *m_predefinedCombo;
50 QSpinBox *m_dpiXSpinBox;
51 QSpinBox *m_dpiYSpinBox;
52};
53}
54
55QT_END_NAMESPACE
56
57#endif // DPICHOOSER_H
friend class QWidget
Definition qpainter.h:432
void getDPI(int *dpiX, int *dpiY) const
void setDPI(int dpiX, int dpiY)
@ minDPI
@ maxDPI
QT_END_NAMESPACE Q_DECLARE_METATYPE(const struct qdesigner_internal::DPI_Entry *)
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
const struct DPI_Entry dpiEntries[]
int dpiY
const char * description
int dpiX