File indexing completed on 2024-05-19 05:35:25
0001 #ifndef oxygencomboboxengine_h 0002 #define oxygencomboboxengine_h 0003 0004 ////////////////////////////////////////////////////////////////////////////// 0005 // oxygencomboboxengine.h 0006 // stores event filters and maps widgets to 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 "oxygenbaseengine.h" 0015 #include "oxygencomboboxdata.h" 0016 #include "oxygendatamap.h" 0017 0018 namespace Oxygen 0019 { 0020 //* used for simple widgets 0021 class ComboBoxEngine : public BaseEngine 0022 { 0023 Q_OBJECT 0024 0025 public: 0026 //* constructor 0027 explicit ComboBoxEngine(QObject *parent) 0028 : BaseEngine(parent) 0029 { 0030 } 0031 0032 //* register widget 0033 bool registerWidget(QComboBox *); 0034 0035 //* duration 0036 void setEnabled(bool value) override 0037 { 0038 BaseEngine::setEnabled(value); 0039 _data.setEnabled(value); 0040 } 0041 0042 //* duration 0043 void setDuration(int value) override 0044 { 0045 BaseEngine::setDuration(value); 0046 _data.setDuration(value); 0047 } 0048 0049 public Q_SLOTS: 0050 0051 //* remove widget from map 0052 bool unregisterWidget(QObject *object) override 0053 { 0054 return _data.unregisterWidget(object); 0055 } 0056 0057 private: 0058 //* maps 0059 DataMap<ComboBoxData> _data; 0060 }; 0061 } 0062 0063 #endif