Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement support for further grouping HVAC library by category #713

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

manuvarkey
Copy link

  1. Implement OSCategoryPlaceholder class for further grouping inside OSCollapsibleItemList
  2. Modification to search bar to use category in addition to type and name.
  3. Resolves Organize HVAC library by category #123

Copy link
Contributor

github-actions bot commented May 8, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@manuvarkey
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request May 8, 2024
1. implement OSCategoryPlaceholder class for further grouping inside OSCollapsibleItemList
2. Modification to search bar to use category in addition to type and name.
Q_OBJECT

public:
OSCategoryPlaceholder(const std::string& text, QWidget* parent = nullptr);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
OSCategoryPlaceholder(const std::string& text, QWidget* parent = nullptr);
explicit OSCategoryPlaceholder(const std::string& text, QWidget* parent = nullptr);

Comment on lines 58 to 59
m_itemsType(OSItemType::ListItem),
m_placeholderItems() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
m_itemsType(OSItemType::ListItem),
m_placeholderItems() {
m_itemsType(OSItemType::ListItem) {

Copy link
Collaborator

@jmarrec jmarrec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, this is neat, thanks a lot @manuvarkey

I do question whether we shouldn't use an actual OSCollapsibleItemHeader directly, so we can expand it or not.

Here is a demo of the current code:

Peek 2024-05-13 15-25

Comment on lines +171 to +175
void OSCollapsibleItemList::addCategoryPlaceholderItem(OSCategoryPlaceholder* categoryPlaceholderItem) {

m_placeholderItems.push_back(categoryPlaceholderItem);
m_vLayout->insertWidget(0, categoryPlaceholderItem);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@macumber This makes me realize we have a std::vector<OSCollapsibleItem*> m_collapsibleItems; but our void OSCollapsibleItemList::addCollapsibleItem(OSCollapsibleItem* collapsibleItem) does not add to it... even though other functions loop on it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Organize HVAC library by category
2 participants