Subversion Repositories tpanel

Rev

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

Rev 293 Rev 296
Line 32... Line 32...
32
class QMediaPlayer;
32
class QMediaPlayer;
33
class QVideoWidget;
33
class QVideoWidget;
34
class QPropertyAnimation;
34
class QPropertyAnimation;
35
class QListWidget;
35
class QListWidget;
36
class TQScrollArea;
36
class TQScrollArea;
-
 
37
class MainWindow;
37
QT_END_NAMESPACE
38
QT_END_NAMESPACE
38
 
39
 
39
class TObject
40
class TObject
40
{
41
{
41
    public:
42
    public:
Line 77... Line 78...
77
            bool invalid{true};
78
            bool invalid{true};
78
            QPropertyAnimation *animation{nullptr};
79
            QPropertyAnimation *animation{nullptr};
79
            ANIMATION_t animate;
80
            ANIMATION_t animate;
80
            bool aniDirection{false};
81
            bool aniDirection{false};
81
            WId wid{0};                     // Used to identify a QTextEdit or QLineEdit
82
            WId wid{0};                     // Used to identify a QTextEdit or QLineEdit
82
            std::atomic<bool> remove{false};// Object is marked for remove. Used with animation.
83
            bool remove{false};             // Object is marked for remove. Used with animation.
83
            OBJECT_t *next{nullptr};
-
 
84
        }OBJECT_t;
84
        }OBJECT_t;
85
 
85
 
86
        TObject();
86
        TObject();
87
        ~TObject();
87
        ~TObject();
88
 
88
 
-
 
89
        void setParent(MainWindow *mw) { mMainWindow = mw; }
89
        void clear(bool force=false);
90
        void clear(bool force=false);
90
        OBJECT_t *addObject();
91
        bool addObject(OBJECT_t& obj);
91
        OBJECT_t *findObject(ulong handle);
92
        OBJECT_t *findObject(ulong handle);
92
        OBJECT_t *findObject(WId id);
93
        OBJECT_t *findObject(WId id);
93
        OBJECT_t *findFirstChild(ulong handle);
94
        OBJECT_t *findFirstChild(ulong handle);
94
        OBJECT_t *findNextChild(ulong handle);
95
        OBJECT_t *findNextChild(ulong handle);
95
        OBJECT_t *getMarkedRemove();
96
        OBJECT_t *getMarkedRemove();
Line 98... Line 99...
98
        OBJECT_t *findNextWindow(OBJECT_t *obj);
99
        OBJECT_t *findNextWindow(OBJECT_t *obj);
99
        void cleanMarked();
100
        void cleanMarked();
100
        void removeAllChilds(ulong handle, bool drop=true);
101
        void removeAllChilds(ulong handle, bool drop=true);
101
        void removeObject(ulong handle, bool drop=true);
102
        void removeObject(ulong handle, bool drop=true);
102
        void invalidateAllObjects();
103
        void invalidateAllObjects();
-
 
104
        void invalidateObject(ulong handle);
103
        void invalidateAllSubObjects(ulong handle);
105
        void invalidateAllSubObjects(ulong handle);
-
 
106
        bool enableObject(ulong handle);
-
 
107
        bool enableAllSubObjects(ulong handle);
104
 
108
 
105
        static std::string objectToString(OBJECT_TYPE o);
109
        static std::string objectToString(OBJECT_TYPE o);
106
        void dropContent(OBJECT_t *obj, bool lock=true);
110
        void dropContent(OBJECT_t *obj, bool lock=true);
107
 
111
 
108
    private:
112
    private:
109
        std::mutex mutex_obj;
113
        std::mutex mutex_obj;
110
 
114
 
111
        OBJECT_t *mObject{nullptr};
115
        std::map<ulong, OBJECT_t> mObjects;
-
 
116
        MainWindow *mMainWindow;
112
};
117
};
113
 
118
 
114
#endif
119
#endif