Kaydet (Commit) 7d2e94d0 authored tarafından Rafael Dominguez's avatar Rafael Dominguez

Move Populate and ShowOverlay as pure virtual functions.

Change-Id: I6544ec030646a2f9fb0e322c1c2032b78ff6390c
üst 0703d559
......@@ -24,6 +24,11 @@ public:
virtual ~TemplateAbstractView ();
// Fill view with template folders thumbnails
virtual void Populate () = 0;
virtual void showOverlay (bool bVisible) = 0;
// Check if the overlay is visible or not.
bool isOverlayVisible () const;
......
......@@ -36,11 +36,11 @@ public:
virtual ~TemplateFolderView ();
// Fill view with template folders thumbnails
void Populate ();
virtual void Populate ();
std::vector<rtl::OUString> getFolderNames ();
void showOverlay (bool bVisible);
virtual void showOverlay (bool bVisible);
void filterTemplatesByApp (const FILTER_APPLICATION &eApp);
......
......@@ -23,7 +23,9 @@ public:
virtual ~TemplateOnlineView ();
// Load repositories from user settings.
void Populate ();
virtual void Populate ();
virtual void showOverlay (bool bVisible);
void setItemDimensions (long ItemWidth, long ThumbnailHeight, long DisplayHeight, int itemPadding);
......
......@@ -87,6 +87,20 @@ void TemplateOnlineView::Populate()
Invalidate();
}
void TemplateOnlineView::showOverlay (bool bVisible)
{
mbActive = !bVisible;
mpItemView->Show(bVisible);
// Clear items is the overlay is closed.
if (!bVisible)
{
mpItemView->Clear();
setSelectionMode(mbSelectionMode);
}
}
void TemplateOnlineView::setItemDimensions(long ItemWidth, long ThumbnailHeight, long DisplayHeight, int itemPadding)
{
ThumbnailView::setItemDimensions(ItemWidth,ThumbnailHeight,DisplayHeight,itemPadding);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment