Junction Diagram Automation Suite 1.5.1
An AutoCAD 2024 plugin for the manipulation and generation of junction box wiring diagrams
Loading...
Searching...
No Matches
JBoxBuilderDialog.h
Go to the documentation of this file.
1
16
17#pragma once
18
19#include <format>
20
21#include "wx/filepicker.h"
22
23#include "common.h"
24#include "IOList.h"
25
26#include "OpenXLSX.hpp"
27
39
48class JBoxBuilderDialog : public wxDialog
49{
50public:
59 JBoxBuilderDialog(wxWindow *parent);
60
66 IOList *GetIOList() const;
67
73 std::string GetJunctionTag() const;
74
80 BoxSize GetBoxSize() const;
81private:
82 // UI components
83 wxStaticBoxSizer *tagSizer = nullptr;
84 std::vector<wxRadioButton*> tagRadioButtons = {};
85 std::vector<wxRadioButton*> sizeRadioButtons = {};
86 std::vector<std::string> tagOptions = {};
87 wxButton *drawNewButton = nullptr;
88 wxButton *drawCurrentButton = nullptr;
89 wxFilePickerCtrl *filePicker;
90
91 // State
92 IOList *chosenIOList = nullptr;
93 std::string chosenJunctionTag;
94
95
101 void OnExit(wxCommandEvent& event);
102
111 void OnSelectFile(wxCommandEvent& event);
112
120 void OnSelectTagRadio(wxCommandEvent& event);
121
130 void OnDrawNew(wxCommandEvent& event);
131
140 void OnDrawCurrent(wxCommandEvent& event);
141
149 bool BuildIOList(std::string xlPath);
150
156 void UpdateTagOptions();
157
163 void UpdateTagRadioButtons();
164
174 void UpdateSizeRadioButtons(std::string junctionTag);
175
181 void BlankSizeRadioButtons();
182};
Interface for the IOList class.
JBoxBuilderDialogResult
Definition JBoxBuilderDialog.h:35
@ ID_DRAW_NEW
Indicates "Draw in New File" was selected.
Definition JBoxBuilderDialog.h:36
@ ID_DRAW_CURRENT
Indicates "Draw in Current File" was selected.
Definition JBoxBuilderDialog.h:37
Parses and manages IO and cable data from an Excel file.
Definition IOList.h:27
IOList * GetIOList() const
Retrieve the parsed IOList object from the selected file.
Definition JBoxBuilderDialog.cpp:92
std::string GetJunctionTag() const
Get the currently selected junction tag.
Definition JBoxBuilderDialog.cpp:96
BoxSize GetBoxSize() const
Get the currently selected box size.
Definition JBoxBuilderDialog.cpp:100
JBoxBuilderDialog(wxWindow *parent)
Construct a new JBoxBuilderDialog with a parent window.
Definition JBoxBuilderDialog.cpp:15
Common includes and definitions.
BoxSize
Predefined enclosure footprints supported by the tool.
Definition common.h:45