mirror of
https://github.com/AxioDL/amuse.git
synced 2025-12-10 14:07:48 +00:00
Initial KeymapEditor implementation
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
#include <QWidget>
|
||||
#include <QUndoCommand>
|
||||
#include <QApplication>
|
||||
#include <QSpinBox>
|
||||
#include <QComboBox>
|
||||
#include <QWheelEvent>
|
||||
#include "ProjectModel.hpp"
|
||||
|
||||
class EditorWidget : public QWidget
|
||||
@@ -44,4 +47,36 @@ public:
|
||||
void redo();
|
||||
};
|
||||
|
||||
class FieldSpinBox : public QSpinBox
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FieldSpinBox(QWidget* parent = Q_NULLPTR)
|
||||
: QSpinBox(parent) {}
|
||||
|
||||
/* Don't scroll */
|
||||
void wheelEvent(QWheelEvent* event) { event->ignore(); }
|
||||
};
|
||||
|
||||
class FieldComboBox : public QComboBox
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FieldComboBox(QWidget* parent = Q_NULLPTR)
|
||||
: QComboBox(parent) {}
|
||||
|
||||
/* Don't scroll */
|
||||
void wheelEvent(QWheelEvent* event) { event->ignore(); }
|
||||
};
|
||||
|
||||
class FieldProjectNode : public FieldComboBox
|
||||
{
|
||||
Q_OBJECT
|
||||
ProjectModel::CollectionNode* m_collection;
|
||||
public:
|
||||
explicit FieldProjectNode(ProjectModel::CollectionNode* collection = Q_NULLPTR, QWidget* parent = Q_NULLPTR);
|
||||
void setCollection(ProjectModel::CollectionNode* collection);
|
||||
ProjectModel::CollectionNode* collection() const { return m_collection; }
|
||||
};
|
||||
|
||||
#endif //AMUSE_EDITOR_WIDGET_HPP
|
||||
|
||||
Reference in New Issue
Block a user