summaryrefslogtreecommitdiffstats
path: root/examples/corelib/threads/queuedcustomtype/block.h
blob: cbebfb0e3d0a0f54eac6e37a42852dc9fb09670b (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
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

#ifndef BLOCK_H
#define BLOCK_H

#include <QColor>
#include <QMetaType>
#include <QRect>

//! [custom type definition and meta-type declaration]
class Block
{
public:
    Block();
    Block(const Block &other);
    ~Block();

    Block(const QRect &rect, const QColor &color);

    QColor color() const;
    QRect rect() const;

private:
    QRect m_rect;
    QColor m_color;
};

Q_DECLARE_METATYPE(Block);
//! [custom type definition and meta-type declaration]

#endif