| Summary: | UI: Convert the functions list in the functions deck to collapsible sections (tree-like view) | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Ahmed Hamed <ahmedhamed3699> |
| Component: | Calc | Assignee: | Ahmed Hamed <ahmedhamed3699> |
| Status: | ASSIGNED --- | ||
| Severity: | enhancement | CC: | ahmedhamed3699, andreas.heinisch, heiko.tietze |
| Priority: | medium | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Crash report or crash signature: | Regression By: | ||
| Bug Depends on: | |||
| Bug Blocks: | 92416 | ||
|
Description
Ahmed Hamed
2024-05-27 15:04:01 UTC
As discussed in the meeting here some code pointers: Function Wizard [1] Functions in the side pane [2] Panel Factory [3] UI Elements in the panel factory [4] [1] https://opengrok.libreoffice.org/search?full=funcpage&project=core [2] https://opengrok.libreoffice.org/search?full=functionpanel&project=core [3] https://opengrok.libreoffice.org/xref/core/sc/source/ui/sidebar/ScPanelFactory.cxx [4] https://opengrok.libreoffice.org/xref/core/sc/source/ui/sidebar/ScPanelFactory.cxx#48 Let me know if you need more code pointers or any help. I think I am a little stuck here.
I am using the weld::TreeView to implement the collapsible sections, and the list in the FD is actually implemented using weld::TreeView. So, I was going to make this conversion by appending categories, and then append functions as children to these categories, is this right ?
I am doing that by adding this function to the TreeView class:
void append(const OUString& rStr, TreeIter* pRet)
{
insert(nullptr, -1, &rStr, nullptr, nullptr, nullptr, false, pRet);
}
So I can get a pointer to the inserted category node in pRet, and then call this function to insert the all the functions in this category:
void append(const TreeIter* pParent, const OUString& rStr)
{
insert(pParent, -1, &rStr, nullptr, nullptr, nullptr, false, nullptr);
}
But this is not working, so how can I append a child to a parent in a TreeView ? Or is the TreeView not suitable for this job ?
Also I am showing expanders in the .ui file, but they didn't appear, do they only appear if there is a correct parent-child relation ?
|