dolphin/Source/Core/DolphinQt2/Config/Mapping/WiimoteEmuExtension.h
Lioncash 222fe58e25 DolphinQt2: Add missing Q_OBJECT macro to all QObject-related classes missing it
Without this macro, if any signals or slots were attempted to be used,
they wouldn't work; neither would various other features of the Qt
meta-object system. This can also lead to weird behavior in other
circumstances. Qt's documentation specifically states:

"Therefore, we strongly recommend that all subclasses of QObject use the
Q_OBJECT macro regardless of whether or not they actually use signals,
slots, and properties."

on its page for "The Meta-Object System", which can be seen here:
https://doc.qt.io/qt-5/metaobjects.html

Let's opt for "always do the right thing", and keep the code extensible
for the future and not have random things blow up on us.
2018-05-13 17:33:32 -04:00

53 lines
1.0 KiB
C++

// Copyright 2017 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include "DolphinQt2/Config/Mapping/MappingWidget.h"
class QGroupBox;
class QHBoxLayout;
class WiimoteEmuExtension final : public MappingWidget
{
Q_OBJECT
public:
enum class Type
{
NONE,
CLASSIC_CONTROLLER,
DRUMS,
GUITAR,
NUNCHUK,
TURNTABLE
};
explicit WiimoteEmuExtension(MappingWindow* window);
InputConfig* GetConfig() override;
void ChangeExtensionType(Type type);
private:
void LoadSettings() override;
void SaveSettings() override;
void CreateClassicLayout();
void CreateDrumsLayout();
void CreateGuitarLayout();
void CreateNoneLayout();
void CreateNunchukLayout();
void CreateTurntableLayout();
void CreateMainLayout();
// Main
QHBoxLayout* m_main_layout;
QGroupBox* m_classic_box;
QGroupBox* m_drums_box;
QGroupBox* m_guitar_box;
QGroupBox* m_none_box;
QGroupBox* m_nunchuk_box;
QGroupBox* m_turntable_box;
};