/* 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 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; BlackMisc::CSetting 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