refs #475, added a utility class so the load indicator of a view can be triggered from the framing component

This commit is contained in:
Klaus Basan
2015-10-02 14:50:19 +02:00
committed by Mathew Sutcliffe
parent 2507ce6715
commit 6fda875e8f
16 changed files with 137 additions and 9 deletions

View File

@@ -0,0 +1,50 @@
/* Copyright (C) 2015
* swift project Community / Contributors
*
* This file is part of swift Project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
//! \file
#ifndef BLACKGUI_ENABLEFORVIEWBASEDINDICATOR_H
#define BLACKGUI_ENABLEFORVIEWBASEDINDICATOR_H
#include "blackgui/blackguiexport.h"
namespace BlackGui { namespace Views { class CViewBaseNonTemplate; }}
namespace BlackGui
{
//! Hand over indication task to an embedded view
class BLACKGUI_EXPORT CEnableForViewBasedIndicator
{
public:
//! Enable loading indicator
void enableLoadIndicator(bool enable);
//! Showing load indicator
bool isShowingLoadIndicator() const;
//! Show loading indicator
void showLoadIndicator();
//! Hide loading indicator
void hideLoadIndicator();
protected:
//! Constructor
CEnableForViewBasedIndicator(BlackGui::Views::CViewBaseNonTemplate *viewWithIndicator = nullptr);
//! Set the corresponding view
void setViewWithIndicator(BlackGui::Views::CViewBaseNonTemplate *viewWithIndicator);
private:
BlackGui::Views::CViewBaseNonTemplate *m_viewWithIndicator = nullptr;
};
} // namespace
#endif // guard