summaryrefslogtreecommitdiffstats
path: root/tests/manual/widgets/inputmethods/controlview.h
blob: caa08593ffdcb6e1301796185f9d00f1f307b2b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#ifndef CONTROLVIEW_H
#define CONTROLVIEW_H

#include <QInputMethodEvent>
#include <QTextCharFormat>
#include <QWidget>

QT_BEGIN_NAMESPACE
class QComboBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QSpinBox;
QT_END_NAMESPACE

class ColorPicker;

class ControlView : public QWidget
{
    Q_OBJECT
public:
    explicit ControlView(QWidget *parent = 0);

    const QString getText() const;
    const QList<QInputMethodEvent::Attribute> getAtrributes() const;

public slots:
    void receiveInputMethodData(int, int, QTextCharFormat::UnderlineStyle, const QColor &, const QColor &, const QString &);
signals:
    void requestInputMethodEvent();

private:
    QComboBox *m_underlineStyleCombo;
    ColorPicker *m_underlineColorPicker;
    ColorPicker *m_backgroundColorPicker;
    QSpinBox *m_startSpin;
    QSpinBox *m_lengthSpin;
    QLineEdit *m_inputLine;
    QPushButton *m_sendEventButton;
};

#endif // CONTROLVIEW_H