Revision 1196729
Go back to digest for 14th November 2010Other in Utilities
I did some thinking and have made some vast improvements to the view hierarchy.
Before, the root view (AvailableView in this instance) was doing it all: Housing the QStackedWidget, the BreadcrumbWidget, *and* trying to manage the creation, parenting and switching of all child items.
Obviously, not the best design.
I have now made an AbstractViewBase class that all views are now based off of. All subviews are based off of this class, and handle the creation of their own subviews on their own, recursively.
What the root view does now is much more reasonable. It still houses the QStackedWidget, the breadcrumb widget and a root subview, but this is all it does. The root view forwards signals about the creation of new subviews and requests to switch to the QStackedWidget so it can handle switching.
All in all, this implementation is much more well thought out, scalable, and much less a mess of spaghetti code.
Still have to port the ApplicationDetailsWidget to AbstractViewBase, and make a view container for non-categorized ApplicationViews that are filtered by origin or install status.
File Changes
- /trunk/extragear/sysadmin/muon/installer
- /AbstractViewBase.cpp
- /AbstractViewBase.h
- /CategoryView/CategoryViewWidget.cpp
- /CategoryView/CategoryViewWidget.h
- /trunk/extragear/sysadmin/muon/installer
- /AvailableView.cpp
- /AvailableView.h
- /CMakeLists.txt
- /BreadcrumbWidget/BreadcrumbItem.cpp
- /BreadcrumbWidget/BreadcrumbItem.h
- /BreadcrumbWidget/BreadcrumbWidget.cpp
- /BreadcrumbWidget/BreadcrumbWidget.h
- /CategoryView/CategoryView.cpp
- /CategoryView/CategoryView.h