Subversion Repositories tpanel

Rev

Rev 14 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14 Rev 21
Line 1... Line 1...
1
/*
1
/*
2
 * Copyright (C) 2020 by Andreas Theofilu <andreas@theosys.at>
2
 * Copyright (C) 2020, 2021 by Andreas Theofilu <andreas@theosys.at>
3
 *
3
 *
4
 * This program is free software; you can redistribute it and/or modify
4
 * This program is free software; you can redistribute it and/or modify
5
 * it under the terms of the GNU General Public License as published by
5
 * it under the terms of the GNU General Public License as published by
6
 * the Free Software Foundation; either version 3 of the License, or
6
 * the Free Software Foundation; either version 3 of the License, or
7
 * (at your option) any later version.
7
 * (at your option) any later version.
Line 21... Line 21...
21
 
21
 
22
#include <string>
22
#include <string>
23
#include <QtGlobal>
23
#include <QtGlobal>
24
 
24
 
25
QT_BEGIN_NAMESPACE
25
QT_BEGIN_NAMESPACE
26
class QImage;
-
 
27
class QLabel;
26
class QLabel;
28
class QWidget;
27
class QWidget;
29
class QTextObject;
28
class QTextObject;
-
 
29
class QMediaPlayer;
-
 
30
class QVideoWidget;
30
QT_END_NAMESPACE
31
QT_END_NAMESPACE
31
 
32
 
32
class TObject
33
class TObject
33
{
34
{
34
    public:
35
    public:
Line 37... Line 38...
37
            OBJ_NONE,
38
            OBJ_NONE,
38
            OBJ_PAGE,
39
            OBJ_PAGE,
39
            OBJ_SUBPAGE,
40
            OBJ_SUBPAGE,
40
            OBJ_BUTTON,
41
            OBJ_BUTTON,
41
            OBJ_TEXT,
42
            OBJ_TEXT,
42
            OBJ_INPUT
43
            OBJ_INPUT,
-
 
44
            OBJ_VIDEO
43
        }OBJECT_TYPE;
45
        }OBJECT_TYPE;
44
 
46
 
45
        typedef union _OBJ
47
        typedef union _OBJ
46
        {
48
        {
47
            QImage *image{nullptr};     // An image only
49
            QVideoWidget *vwidget{nullptr}; // A video window
48
            QLabel *label;              // For buttons
50
            QLabel *label;                  // For buttons
49
            QWidget *widget;            // For subpage
51
            QWidget *widget;                // For subpage
50
            QTextObject *text;          // For text line optional with input
52
            QTextObject *text;              // For text line optional with input
51
        }_OBJ;
53
        }_OBJ;
52
 
54
 
53
        typedef struct OBJECT_t
55
        typedef struct OBJECT_t
54
        {
56
        {
55
            OBJECT_TYPE type{OBJ_NONE};
57
            OBJECT_TYPE type{OBJ_NONE};
56
            ulong handle{0};
58
            ulong handle{0};
57
            _OBJ object;
59
            _OBJ object;
-
 
60
            QMediaPlayer *player{nullptr};  // Pointer to video player if this is a video button
58
            int left{0};
61
            int left{0};
59
            int top{0};
62
            int top{0};
60
            int width{0};
63
            int width{0};
61
            int height{0};
64
            int height{0};
62
            OBJECT_t *next{nullptr};
65
            OBJECT_t *next{nullptr};