mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
59 lines
1.9 KiB
C++
59 lines
1.9 KiB
C++
/* Copyright (C) 2016
|
|
* 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_COMPONENTS_SETTINGSMODELCOMPONENT_H
|
|
#define BLACKGUI_COMPONENTS_SETTINGSMODELCOMPONENT_H
|
|
|
|
#include "blackgui/settings/guisettings.h"
|
|
#include <QFrame>
|
|
|
|
namespace Ui { class CSettingsModelComponent; }
|
|
namespace BlackCore { namespace Db { class CBackgroundDataUpdater; }}
|
|
namespace BlackGui
|
|
{
|
|
namespace Components
|
|
{
|
|
/*!
|
|
* Settings UI for model matching/mapping
|
|
*/
|
|
class CSettingsModelComponent : public QFrame
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
//! Constructor
|
|
explicit CSettingsModelComponent(QWidget *parent = nullptr);
|
|
|
|
//! Destructor
|
|
virtual ~CSettingsModelComponent();
|
|
|
|
//! Interval, -1 for disabled
|
|
int getBackgroundUpdaterIntervallSecs() const;
|
|
|
|
//! Updater (the updater this setting is for)
|
|
void setBackgroundUpdater(BlackCore::Db::CBackgroundDataUpdater *updater);
|
|
|
|
private:
|
|
QScopedPointer<Ui::CSettingsModelComponent> ui;
|
|
BlackMisc::CSetting<BlackGui::Settings::TBackgroundConsolidation> m_consolidationSetting { this, &CSettingsModelComponent::cacheChanged }; //!< consolidation time
|
|
BlackCore::Db::CBackgroundDataUpdater *m_updater = nullptr;
|
|
|
|
//! Consolidation time entered
|
|
void consolidationEntered();
|
|
|
|
//! Cache has been changed
|
|
void cacheChanged();
|
|
};
|
|
} // ns
|
|
} // ns
|
|
|
|
#endif // guard
|