Skip to content

Commit

Permalink
Add support for writable object settings that are rendered as a table.
Browse files Browse the repository at this point in the history
  • Loading branch information
bpotchik committed Dec 24, 2023
1 parent 24504c4 commit 3007496
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ui/settingsview.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class BINARYNINJAUIAPI SettingsEditor : public QWidget
QLineEdit* m_arrayText = nullptr;
QTableWidget* m_objectTable = nullptr;
std::set<QString> m_validComboSelections;
QStringList m_objectTableColumns;
std::vector<std::pair<std::string, Json::ValueType>> m_objectTableColumns;
Json::StreamWriterBuilder m_builder;

bool m_optional = false;
Expand All @@ -175,7 +175,8 @@ class BINARYNINJAUIAPI SettingsEditor : public QWidget
int m_minHeight;
int m_maxAdjustedWidth;

QStringList columnsForObject(const Json::Value& value);
std::pair<bool, std::vector<std::pair<std::string, Json::ValueType>>> isObjectSetting(const Json::Value& value);
QTableWidgetItem* getTableItemForValue(const Json::Value& value);

public:
SettingsEditor(QWidget* parent, SettingsRef settings, BinaryViewRef view, BNSettingsScope scope, const Json::Value* setting);
Expand Down

0 comments on commit 3007496

Please sign in to comment.