Skip to content

Commit

Permalink
Added ddop file saving, lots of render improvements
Browse files Browse the repository at this point in the history
Added proper rendering of localization data.
Started rendering of device element objects.
Added remaining device object widgets.
  • Loading branch information
ad3154 committed Aug 17, 2023
1 parent 1f56a06 commit 6fe5ff6
Show file tree
Hide file tree
Showing 3 changed files with 313 additions and 10 deletions.
9 changes: 8 additions & 1 deletion include/gui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ class DDOPGeneratorGUI
void render_device_property_settings(std::shared_ptr<isobus::task_controller_object::DevicePropertyObject> object);
void render_device_presentation_settings(std::shared_ptr<isobus::task_controller_object::DeviceValuePresentationObject> object);
void render_current_selected_object_settings(std::shared_ptr<isobus::task_controller_object::Object> object);
void render_save();
void on_selected_object_changed(std::shared_ptr<isobus::task_controller_object::Object> newObject);

private:
static constexpr std::size_t FILE_PATH_BUFFER_MAX_LENGTH = 1024;

static std::string get_element_type_string(isobus::task_controller_object::DeviceElementObject::Type type);
static std::string get_object_type_string(isobus::task_controller_object::ObjectTypes type);
const std::array<std::uint8_t, 7> generate_localization_label();

std::string languageCode; ///< The last received language code, such as "en", "es", "de", etc.
isobus::LanguageCommandInterface::DecimalSymbols decimalSymbol = isobus::LanguageCommandInterface::DecimalSymbols::Point;
Expand All @@ -61,10 +63,15 @@ class DDOPGeneratorGUI
char designatorBuffer[129] = { 0 };
char softwareVersionBuffer[129] = { 0 };
char serialNumberBuffer[129] = { 0 };
char structureLabelBuffer[129] = { 0 };
char structureLabelBuffer[8] = { 0 };
char extendedStructureLabelBuffer[129] = { 0 };
char hexIsoNameBuffer[17] = { 0 };
std::string lastFileName;
int elementNumberBuffer = 0;
int parentObjectBuffer = 0;
std::uint16_t selectedObjectID = 0xFFFF;
bool openFileDialogue = false;
bool saveAsModal = false;
bool currentPoolValid = false;
};

Expand Down
Loading

0 comments on commit 6fe5ff6

Please sign in to comment.