File indexing completed on 2024-05-19 04:07:48

0001 /*
0002     SPDX-FileCopyrightText: 2010 Stefan Majewsky <majewsky@gmx.net>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef PALAPELI_TRIGGERCONFIGWIDGET_H
0008 #define PALAPELI_TRIGGERCONFIGWIDGET_H
0009 
0010 #include <QMap>
0011 #include <QTabWidget>
0012 
0013 namespace Palapeli
0014 {
0015     class Interactor;
0016     class TriggerListView;
0017 
0018     class TriggerConfigWidget : public QTabWidget
0019     {
0020         Q_OBJECT
0021         public:
0022             //TODO: Provide signal interface for changes (to enable "Apply" button in config dialog.)
0023             explicit TriggerConfigWidget(QWidget* parent = nullptr);
0024             ~TriggerConfigWidget() override;
0025 
0026             bool hasChanged() const;
0027             bool isDefault() const;
0028             void updateSettings();
0029             void updateWidgets();
0030             void updateWidgetsDefault();
0031         Q_SIGNALS:
0032             void associationsChanged();
0033         private:
0034             QMap<QByteArray, Palapeli::Interactor*> m_interactors;
0035             Palapeli::TriggerListView* m_mouseView;
0036             Palapeli::TriggerListView* m_wheelView;
0037     };
0038 }
0039 
0040 #endif // PALAPELI_TRIGGERCONFIGWIDGET_H