mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
refs #799, changed components to use settings
* removed update timer * Removed getter/setters for update times * used UI component for settings in main settings component
This commit is contained in:
@@ -14,18 +14,18 @@
|
||||
|
||||
#include "blackcore/network.h"
|
||||
#include "blackgui/blackguiexport.h"
|
||||
#include "blackgui/settings/viewupdatesettings.h"
|
||||
#include "blackgui/components/enablefordockwidgetinfoarea.h"
|
||||
#include "blackgui/components/updatetimer.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QScopedPointer>
|
||||
#include <QTabWidget>
|
||||
#include <QtGlobal>
|
||||
#include <QTimer>
|
||||
|
||||
class QWidget;
|
||||
|
||||
namespace Ui { class CUserComponent; }
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Components
|
||||
@@ -54,12 +54,6 @@ namespace BlackGui
|
||||
//! Update users
|
||||
void update();
|
||||
|
||||
//! \copydoc CUpdateTimer::setUpdateIntervalSeconds
|
||||
void setUpdateIntervalSeconds(int seconds) { Q_ASSERT(this->m_updateTimer); this->m_updateTimer->setUpdateIntervalSeconds(seconds); }
|
||||
|
||||
//! \copydoc CUpdateTimer::stopTimer
|
||||
void stopTimer() { Q_ASSERT(this->m_updateTimer); this->m_updateTimer->stopTimer(); }
|
||||
|
||||
private slots:
|
||||
//! Number of elements changed
|
||||
void ps_onCountChanged(int count, bool withFilter);
|
||||
@@ -67,9 +61,13 @@ namespace BlackGui
|
||||
//! Connection status
|
||||
void ps_connectionStatusChanged(BlackCore::INetwork::ConnectionStatus from, BlackCore::INetwork::ConnectionStatus to);
|
||||
|
||||
//! Settings have been changed
|
||||
void ps_settingsChanged();
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CUserComponent> ui;
|
||||
QScopedPointer<CUpdateTimer> m_updateTimer;
|
||||
QTimer m_updateTimer { this };
|
||||
BlackMisc::CSettingReadOnly<BlackGui::Settings::TViewUpdateSettings> m_settings { this, &CUserComponent::ps_settingsChanged };
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user