Elaztek Developer Hub
Blamite Game Engine - Keystone  00453.06.08.26.0624.blamite
A library that enables the use of Qt in Blamite's editing tools.
vector.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <HEKGuerilla/components/tags/fields/vector/vector.h>
4 #include <qspinbox.h>
5 
7 #include "../generic/generic.h"
8 
15 {
16 private slots:
22  void TextChangedX(QString text);
23 
29  void TextChangedY(QString text);
30 
36  void TextChangedZ(QString text);
37 
43  void TextChangedW(QString text);
44 
45 private:
46  QLineEdit* input_control_x = nullptr;
47  QLineEdit* input_control_y = nullptr;
48  QLineEdit* input_control_z = nullptr;
49  QLineEdit* input_control_w = nullptr;
50 
51  QDoubleSpinBox* input_spin_x = nullptr;
52  QDoubleSpinBox* input_spin_y = nullptr;
53  QDoubleSpinBox* input_spin_z = nullptr;
54  QDoubleSpinBox* input_spin_w = nullptr;
55 
56  void text_edit_helper(QString text, QWidget* input_control, float* out_value, bool is_spinbox = false);
57 
58  void DeleteInputControls();
59 
60 public:
66  ui_vector_field(BlamTagField_Vector* _field, BlamEditorDocument_Tag* _document);
67 
73  ui_vector_field(BlamPluginField* _template, BlamEditorDocument_Tag* _document);
74 
76 
77  void SetupUI() override;
78 };
BlamEditorDocument_Tag
Class representing a Tag document.
Definition: tag.h:14
BlamEditorDocument_Tag::FlagAsModified
void FlagAsModified(bool new_modified_state=true) override
Flags the document as being modified.
Definition: tag.cpp:141
BlamEditorTagFieldControl::FieldChanged
void FieldChanged(BlamEditorTagFieldControl *_field)
ui_vector_field::~ui_vector_field
~ui_vector_field()
Definition: vector.cpp:18
BlamEditorTagFieldControl::document
BlamEditorDocument_Tag * document
The document this field belongs to.
Definition: tag_fields.h:27
ui_generic_field::template_field
BlamPluginField * template_field
The plugin field associated with this control.
Definition: generic.h:35
BlamEditorDocumentType::Tag
@ Tag
Indicates the document represents a tag file.
ui_vector_field::SetupUI
void SetupUI() override
Configures the UI for the current field.
Definition: vector.cpp:135
ui_generic_field::ui
Ui::basic_tag_field ui
Definition: generic.h:24
ui_generic_field::field
BlamTagField * field
The field associated with this control.
Definition: generic.h:30
ui_vector_field
A vector input field.
Definition: vector.h:14
ui_generic_field::is_template
bool is_template
Whether or not this field is displaying as a template.
Definition: generic.h:36
vector.h
ui_vector_field::ui_vector_field
ui_vector_field(BlamTagField_Vector *_field, BlamEditorDocument_Tag *_document)
Initializes a new Vector field.
Definition: vector.cpp:8
ui_generic_field
A generic tag field control template.
Definition: generic.h:19
BlamKeystone::UI::TagFields::SetWidgetValidAppearance
KEYSTONE void SetWidgetValidAppearance(QWidget *widget, bool valid)
Applies the configured invalid field colors to a given widget.
Definition: tag_fields.cpp:157
tag_fields.h
BlamKeystone::EditorData::GetDocumentTypeConfiguration
KEYSTONE BlamConfigurationFile * GetDocumentTypeConfiguration(BlamEditorDocumentType type)
Attempts to locate the configuration file for the specified document type.
Definition: document_config.cpp:108