File indexing completed on 2024-05-19 05:35:22
0001 #ifndef oxygenwidgetstatedata_h 0002 #define oxygenwidgetstatedata_h 0003 0004 ////////////////////////////////////////////////////////////////////////////// 0005 // oxygenwidgetstatedata.h 0006 // generic data container for widgetstate hover (mouse-over) animations 0007 // ------------------- 0008 // 0009 // SPDX-FileCopyrightText: 2009 Hugo Pereira Da Costa <hugo.pereira@free.fr> 0010 // 0011 // SPDX-License-Identifier: MIT 0012 ////////////////////////////////////////////////////////////////////////////// 0013 0014 #include "oxygengenericdata.h" 0015 0016 namespace Oxygen 0017 { 0018 //* handle widget state (hover/focus/enable) changes 0019 class WidgetStateData : public GenericData 0020 { 0021 Q_OBJECT 0022 0023 public: 0024 //* constructor 0025 WidgetStateData(QObject *parent, QWidget *target, int duration, bool state = false) 0026 : GenericData(parent, target, duration) 0027 , _state(state) 0028 { 0029 } 0030 0031 /** 0032 returns true if hover has Changed 0033 and starts timer accordingly 0034 */ 0035 bool updateState(bool value); 0036 0037 private: 0038 bool _state = false; 0039 }; 0040 } 0041 0042 #endif