mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +08:00
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:
committed by
Mathew Sutcliffe
parent
2507ce6715
commit
6fda875e8f
50
src/blackgui/enableforviewbasedindicator.h
Normal file
50
src/blackgui/enableforviewbasedindicator.h
Normal 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
|
||||
Reference in New Issue
Block a user