Subversion Repositories tpanel

Rev

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

Rev 383 Rev 386
Line 25... Line 25...
25
#endif
25
#endif
26
#include "QMediaPlayer"
26
#include "QMediaPlayer"
27
 
27
 
28
#include "tpagemanager.h"
28
#include "tpagemanager.h"
29
#include "tobject.h"
29
#include "tobject.h"
30
#include "tqemitqueue.h"
30
//#include "tqemitqueue.h"
31
#include "tpagelist.h"
31
#include "tpagelist.h"
32
#include "tqgesturefilter.h"
32
#include "tqgesturefilter.h"
33
 
33
 
34
extern bool prg_stopped;
34
extern bool prg_stopped;
35
extern std::atomic<bool> killed;
35
extern std::atomic<bool> killed;
Line 73... Line 73...
73
 
73
 
74
Q_DECLARE_METATYPE(size_t)
74
Q_DECLARE_METATYPE(size_t)
75
 
75
 
76
int qtmain(int argc, char **argv, TPageManager *pmanager);
76
int qtmain(int argc, char **argv, TPageManager *pmanager);
77
 
77
 
78
class MainWindow : public QMainWindow, TQManageQueue, public TObject
78
//class MainWindow : public QMainWindow, TQManageQueue, public TObject
-
 
79
class MainWindow : public QMainWindow, public TObject
79
{
80
{
80
    Q_OBJECT
81
    Q_OBJECT
81
 
82
 
82
    public:
83
    public:
83
        typedef enum J_ORIENTATION
84
        typedef enum J_ORIENTATION
Line 101... Line 102...
101
        void setOrientation(Qt::ScreenOrientation ori) { mOrientation = ori; }
102
        void setOrientation(Qt::ScreenOrientation ori) { mOrientation = ori; }
102
        void disconnectArea(TQScrollArea *area);
103
        void disconnectArea(TQScrollArea *area);
103
        void disconnectList(QListWidget *list);
104
        void disconnectList(QListWidget *list);
104
        void reconnectArea(TQScrollArea *area);
105
        void reconnectArea(TQScrollArea *area);
105
        void reconnectList(QListWidget *list);
106
        void reconnectList(QListWidget *list);
106
#if defined(QT_DEBUG) && (defined(Q_OS_IOS) || defined(Q_OS_ANDROID))
107
#ifdef Q_OS_IOS
107
        static std::string orientationToString(Qt::ScreenOrientation ori);
108
        static std::string orientationToString(Qt::ScreenOrientation ori);
108
#endif
109
#endif
109
 
-
 
110
    signals:
110
    signals:
111
        void sigDisplayButton(ulong handle, ulong parent, TBitmap buffer, int width, int height, int left, int top, bool passthrough);
111
        void sigDisplayButton(ulong handle, ulong parent, TBitmap buffer, int width, int height, int left, int top, bool passthrough);
112
        void sigDisplayViewButton(ulong handle, ulong parent, bool vertical, TBitmap buffer, int width, int height, int left, int top, int space, TColor::COLOR_T fillColor);
112
        void sigDisplayViewButton(ulong handle, ulong parent, bool vertical, TBitmap buffer, int width, int height, int left, int top, int space, TColor::COLOR_T fillColor);
113
        void sigAddViewButtonItems(ulong parent, std::vector<PGSUBVIEWITEM_T> items);
113
        void sigAddViewButtonItems(ulong parent, std::vector<PGSUBVIEWITEM_T> items);
114
        void sigUpdateViewButton(ulong handle, ulong parent, TBitmap buffer, TColor::COLOR_T fillColor);
114
        void sigUpdateViewButton(ulong handle, ulong parent, TBitmap buffer, TColor::COLOR_T fillColor);
Line 207... Line 207...
207
        void stopSound();
207
        void stopSound();
208
        void muteSound(bool state);
208
        void muteSound(bool state);
209
        void setVolume(int volume);
209
        void setVolume(int volume);
210
        void onAppStateChanged(Qt::ApplicationState state);
210
        void onAppStateChanged(Qt::ApplicationState state);
211
        void onScreenOrientationChanged(Qt::ScreenOrientation ori);
211
        void onScreenOrientationChanged(Qt::ScreenOrientation ori);
212
        void onCurrentOrientationChanged(int currentOrientation);
-
 
213
#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
212
#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
214
        void activateSettings(const std::string& oldNetlinx, int oldPort, int oldChannelID, const std::string& oldSurface, bool oldToolbarSuppress, bool oldToolbarForce);
213
        void activateSettings(const std::string& oldNetlinx, int oldPort, int oldChannelID, const std::string& oldSurface, bool oldToolbarSuppress, bool oldToolbarForce);
215
#ifdef Q_OS_IOS
214
#ifdef Q_OS_IOS
216
        void onPositionUpdated(const QGeoPositionInfo &update);
215
        void onPositionUpdated(const QGeoPositionInfo &update);
217
        void onErrorOccurred(QGeoPositionInfoSource::Error positioningError);
216
        void onErrorOccurred(QGeoPositionInfoSource::Error positioningError);
Line 256... Line 255...
256
 
255
 
257
    private:
256
    private:
258
        bool gestureEvent(QGestureEvent *event);
257
        bool gestureEvent(QGestureEvent *event);
259
        void createActions();
258
        void createActions();
260
        void writeSettings();
259
        void writeSettings();
261
        void playShowList();
260
//        void playShowList();
262
        int scale(int value);
261
        int scale(int value);
263
        int scaleSetup(int value);
262
        int scaleSetup(int value);
264
        bool isScaled();
263
        bool isScaled();
265
        bool isSetupScaled();
264
        bool isSetupScaled();
266
        bool startAnimation(TObject::OBJECT_t *obj, ANIMATION_t& ani, bool in = true);
265
        bool startAnimation(TObject::OBJECT_t *obj, ANIMATION_t& ani, bool in = true);
Line 397... Line 396...
397
        bool mIOSSettingsActive{false};     // TRUE: IOS settings are active.
396
        bool mIOSSettingsActive{false};     // TRUE: IOS settings are active.
398
        QMargins mNotchPortrait;            // The margins (notch, if any) for portrait orientation
397
        QMargins mNotchPortrait;            // The margins (notch, if any) for portrait orientation
399
        QMargins mNotchLandscape;           // The margins (notch, if any) for landscape orientation
398
        QMargins mNotchLandscape;           // The margins (notch, if any) for landscape orientation
400
        bool mHaveNotchPortrait{false};     // TRUE = Notch was already fetched for portrait orientation
399
        bool mHaveNotchPortrait{false};     // TRUE = Notch was already fetched for portrait orientation
401
        bool mHaveNotchLandscape{false};    // TRUE = Notch was already fetched for landscape orientation
400
        bool mHaveNotchLandscape{false};    // TRUE = Notch was already fetched for landscape orientation
-
 
401
        bool mGeoHavePermission{false};     // TRUE = The app has permission for geo location
402
#endif
402
#endif
403
        std::chrono::steady_clock::time_point mTouchStart;  // Time in micro seconds of the start of a touch event
403
        std::chrono::steady_clock::time_point mTouchStart;  // Time in micro seconds of the start of a touch event
404
        int mTouchX{0};                        // The X coordinate of the mouse pointer
404
        int mTouchX{0};                        // The X coordinate of the mouse pointer
405
        int mTouchY{0};                        // The Y coordinate of the mouse pointer
405
        int mTouchY{0};                        // The Y coordinate of the mouse pointer
406
};
406
};