summaryrefslogtreecommitdiffstats
path: root/tests/manual/widgets/inputmethods/colorpicker.h
blob: 0b6b3257a5cd4a5cc222ab6ede95d576d004a0f9 (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
// 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 COLORPICKER_H
#define COLORPICKER_H

#include <QColor>
#include <QWidget>

QT_BEGIN_NAMESPACE
class QLineEdit;
class QPushButton;
QT_END_NAMESPACE

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

    QColor color() const;
    void setColor(const QColor &);

public slots:
    void colorStringChanged(const QString &);
    void selectButtonClicked();

private:
    QLineEdit *m_colorInput;
    QPushButton *m_chooseButton;
};

#endif // COLORPICKER_H