File: example-qt.h

package info (click to toggle)
hiredict 1.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 924 kB
  • sloc: ansic: 9,806; makefile: 296; cpp: 143; sh: 117
file content (38 lines) | stat: -rw-r--r-- 851 bytes parent folder | download | duplicates (2)
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
// SPDX-FileCopyrightText: 2024 Hiredict Contributors
// SPDX-FileCopyrightText: 2024 Salvatore Sanfilippo <antirez at gmail dot com>
//
// SPDX-License-Identifier: BSD-3-Clause
// SPDX-License-Identifier: LGPL-3.0-or-later

#ifndef __HIREDICT_EXAMPLE_QT_H
#define __HIREDICT_EXAMPLE_QT_H

#include <adapters/qt.h>

class ExampleQt : public QObject {

    Q_OBJECT

    public:
        ExampleQt(const char * value, QObject * parent = 0)
            : QObject(parent), m_value(value) {}

    signals:
        void finished();

    public slots:
        void run();

    private:
        void finish() { emit finished(); }

    private:
        const char * m_value;
        redictAsyncContext * m_ctx;
        RedictQtAdapter m_adapter;

    friend
    void getCallback(redictAsyncContext *, void *, void *);
};

#endif /* !__HIREDICT_EXAMPLE_QT_H */