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
4//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the Qt API. It exists for the convenience
9// of Qt Designer. This header
10// file may change from version to version without notice, or even be removed.
11//
12// We mean it.
13//
14
15#ifndef DPICHOOSER_H
16#define DPICHOOSER_H
17
18#include <QtWidgets/qwidget.h>
19
20QT_BEGIN_NAMESPACE
21
22class QSpinBox;
23class QComboBox;
24
25namespace qdesigner_internal {
26
27struct DPI_Entry;
28
29/* Let the user choose a DPI settings */
30class DPI_Chooser : public QWidget {
33
34public:
35 explicit DPI_Chooser(QWidget *parent = nullptr);
36 ~DPI_Chooser();
37
38 void getDPI(int *dpiX, int *dpiY) const;
39 void setDPI(int dpiX, int dpiY);
40
41private slots:
42 void syncSpinBoxes();
43
44private:
45 void setUserDefinedValues(int dpiX, int dpiY);
46
47 struct DPI_Entry *m_systemEntry;
48 QComboBox *m_predefinedCombo;
49 QSpinBox *m_dpiXSpinBox;
50 QSpinBox *m_dpiYSpinBox;
51};
52}
53
54QT_END_NAMESPACE
55
56#endif // DPICHOOSER_H
friend class QWidget
Definition qpainter.h:421
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