Rabbit Remote Control 0.1.0-bate14
Loading...
Searching...
No Matches
CParameterWakeOnLan Class Reference

The wake on lan parameters. More...

#include <ParameterWakeOnLan.h>

Inheritance diagram for CParameterWakeOnLan:
Collaboration diagram for CParameterWakeOnLan:

Public Types

enum class  HostState { Online , GetMac , WakeOnLan , Offline }

Signals

void sigHostStateChanged ()
Signals inherited from CParameterOperate
void sigSetPluginParameters ()
 Only used by this class.
void sigNameChanged (const QString &name=QString())
Signals inherited from CParameter
void sigChanged ()
 emit when the parameter changes Usually if required, the corresponding parameter corresponds to a change event.

Public Member Functions

 CParameterWakeOnLan (QObject *parent=nullptr)
const bool GetEnable () const
int SetEnable (bool bEnable)
const QString GetMac () const
int SetMac (const QString &szMac)
const QString GetBroadcastAddress () const
int SetBroadcastAddress (const QString &szBroadcastAddress)
const QString GetNetworkInterface () const
 Get network interface.
int SetNetworkInterface (const QString &szName)
const quint16 GetPort () const
int SetPort (quint16 port)
const QString GetPassword () const
int SetPassword (const QString &szPassword)
const bool GetSavePassword () const
int SetSavePassword (bool save)
 Set save password.
const int GetRepeat () const
int SetRepeat (int nRepeat)
const int GetInterval () const
 Unit: ms.
int SetInterval (int nInterval)
 Unit: ms.
const int GetTimeOut () const
 Unit: ms.
int SetTimeOut (int nTimeout)
 Unit: ms.
HostState GetHostState () const
void SetHostState (HostState newHostState)
Public Member Functions inherited from CParameterOperate
 CParameterOperate (QObject *parent, const QString &szPrefix=QString())
CParameterPluginGetPluginParameters ()
 Get CParameterPlugin.
int SetPluginParameters (CParameterPlugin *p)
const QString GetName () const
void SetName (const QString &szName)
int LoadPassword (const QString &szTitle, const QString &szKey, QString &password, QSettings &set)
 Restore password.
int SavePassword (const QString &szKey, const QString &password, QSettings &set, bool bSave=false)
Public Member Functions inherited from CParameter
 CParameter (QObject *parent, const QString &szPrefix=QString())
virtual int Load (QString szFile=QString())
 Load from file.
virtual int Save (QString szFile=QString(), bool bForce=true)
 Save to file.
virtual int Load (QSettings &set)
 Load from QSettings.
virtual int Save (QSettings &set, bool bForce=true)
 Save to QSettings.
virtual bool CheckValidity ()
 Check whether the parameter is valid to decide whether to use or save the parameter.

Public Attributes

CParameterNet m_Net

Protected Slots

virtual void slotSetPluginParameters () override
Protected Slots inherited from CParameterOperate
virtual void slotSetPluginParameters ()
 Call after set CParameterPlugin.

Protected Member Functions

virtual int OnLoad (QSettings &set) override
 Unit: ms.
virtual int OnSave (QSettings &set) override
virtual bool OnCheckValidity () override
 Check validity.
Protected Member Functions inherited from CParameterOperate
QByteArray PasswordSum (const std::string &password, const std::string &key)
Protected Member Functions inherited from CParameter
int SetModified (bool bModified=true)
 When setting parameters, if there is a modification, it is called.
bool GetModified ()
 Whether the parameters have been modified.

Private Attributes

bool m_bEnable
HostState m_HostState
QString m_szMac
QString m_szBoardcastAddress
QString m_szNetworkInteface
quint16 m_nPort
QString m_szPassword
bool m_bSavePassword
int m_nRepeat
int m_nInterval
int m_nTimeOut
 Unit: ms.

Additional Inherited Members

Properties inherited from CParameter
bool Modified

Detailed Description

The wake on lan parameters.

it's UI is CParameterWakeOnLanUI

See also
CParameterWakeOnLanUI

Definition at line 14 of file ParameterWakeOnLan.h.

Member Enumeration Documentation

◆ HostState

enum class CParameterWakeOnLan::HostState
strong

Definition at line 65 of file ParameterWakeOnLan.h.

Constructor & Destructor Documentation

◆ CParameterWakeOnLan()

CParameterWakeOnLan::CParameterWakeOnLan ( QObject * parent = nullptr)
explicit

Definition at line 14 of file ParameterWakeOnLan.cpp.

Member Function Documentation

◆ GetBroadcastAddress()

const QString CParameterWakeOnLan::GetBroadcastAddress ( ) const

Definition at line 132 of file ParameterWakeOnLan.cpp.

◆ GetEnable()

const bool CParameterWakeOnLan::GetEnable ( ) const

Definition at line 104 of file ParameterWakeOnLan.cpp.

◆ GetHostState()

CParameterWakeOnLan::HostState CParameterWakeOnLan::GetHostState ( ) const

Definition at line 244 of file ParameterWakeOnLan.cpp.

◆ GetInterval()

const int CParameterWakeOnLan::GetInterval ( ) const

Unit: ms.

Definition at line 216 of file ParameterWakeOnLan.cpp.

◆ GetMac()

const QString CParameterWakeOnLan::GetMac ( ) const

Definition at line 118 of file ParameterWakeOnLan.cpp.

◆ GetNetworkInterface()

const QString CParameterWakeOnLan::GetNetworkInterface ( ) const

Get network interface.

Returns
Source IP

Definition at line 146 of file ParameterWakeOnLan.cpp.

◆ GetPassword()

const QString CParameterWakeOnLan::GetPassword ( ) const

Definition at line 174 of file ParameterWakeOnLan.cpp.

◆ GetPort()

const quint16 CParameterWakeOnLan::GetPort ( ) const

Definition at line 160 of file ParameterWakeOnLan.cpp.

◆ GetRepeat()

const int CParameterWakeOnLan::GetRepeat ( ) const

Definition at line 202 of file ParameterWakeOnLan.cpp.

◆ GetSavePassword()

const bool CParameterWakeOnLan::GetSavePassword ( ) const

Definition at line 188 of file ParameterWakeOnLan.cpp.

◆ GetTimeOut()

const int CParameterWakeOnLan::GetTimeOut ( ) const

Unit: ms.

Definition at line 230 of file ParameterWakeOnLan.cpp.

◆ OnCheckValidity()

bool CParameterWakeOnLan::OnCheckValidity ( )
overrideprotectedvirtual

Check validity.

Returns
  • true: valid
  • false: invalid

Reimplemented from CParameter.

Definition at line 63 of file ParameterWakeOnLan.cpp.

◆ OnLoad()

int CParameterWakeOnLan::OnLoad ( QSettings & set)
overrideprotectedvirtual

Unit: ms.

Reimplemented from CParameterOperate.

Definition at line 26 of file ParameterWakeOnLan.cpp.

◆ OnSave()

int CParameterWakeOnLan::OnSave ( QSettings & set)
overrideprotectedvirtual

Reimplemented from CParameterOperate.

Definition at line 45 of file ParameterWakeOnLan.cpp.

◆ SetBroadcastAddress()

int CParameterWakeOnLan::SetBroadcastAddress ( const QString & szBroadcastAddress)

Definition at line 137 of file ParameterWakeOnLan.cpp.

◆ SetEnable()

int CParameterWakeOnLan::SetEnable ( bool bEnable)

Definition at line 109 of file ParameterWakeOnLan.cpp.

◆ SetHostState()

void CParameterWakeOnLan::SetHostState ( HostState newHostState)

Definition at line 249 of file ParameterWakeOnLan.cpp.

◆ SetInterval()

int CParameterWakeOnLan::SetInterval ( int nInterval)

Unit: ms.

Definition at line 221 of file ParameterWakeOnLan.cpp.

◆ SetMac()

int CParameterWakeOnLan::SetMac ( const QString & szMac)

Definition at line 123 of file ParameterWakeOnLan.cpp.

◆ SetNetworkInterface()

int CParameterWakeOnLan::SetNetworkInterface ( const QString & szName)

Definition at line 151 of file ParameterWakeOnLan.cpp.

◆ SetPassword()

int CParameterWakeOnLan::SetPassword ( const QString & szPassword)

Definition at line 179 of file ParameterWakeOnLan.cpp.

◆ SetPort()

int CParameterWakeOnLan::SetPort ( quint16 port)

Definition at line 165 of file ParameterWakeOnLan.cpp.

◆ SetRepeat()

int CParameterWakeOnLan::SetRepeat ( int nRepeat)

Definition at line 207 of file ParameterWakeOnLan.cpp.

◆ SetSavePassword()

int CParameterWakeOnLan::SetSavePassword ( bool save)

Set save password.

Parameters
save

Definition at line 193 of file ParameterWakeOnLan.cpp.

◆ SetTimeOut()

int CParameterWakeOnLan::SetTimeOut ( int nTimeout)

Unit: ms.

Definition at line 235 of file ParameterWakeOnLan.cpp.

◆ slotSetPluginParameters

void CParameterWakeOnLan::slotSetPluginParameters ( )
overrideprotectedvirtualslot

Definition at line 96 of file ParameterWakeOnLan.cpp.

Member Data Documentation

◆ m_bEnable

bool CParameterWakeOnLan::m_bEnable
private

Definition at line 79 of file ParameterWakeOnLan.h.

◆ m_bSavePassword

bool CParameterWakeOnLan::m_bSavePassword
private

Definition at line 86 of file ParameterWakeOnLan.h.

◆ m_HostState

HostState CParameterWakeOnLan::m_HostState
private

Definition at line 80 of file ParameterWakeOnLan.h.

◆ m_Net

CParameterNet CParameterWakeOnLan::m_Net

Definition at line 24 of file ParameterWakeOnLan.h.

◆ m_nInterval

int CParameterWakeOnLan::m_nInterval
private

Definition at line 89 of file ParameterWakeOnLan.h.

◆ m_nPort

quint16 CParameterWakeOnLan::m_nPort
private

Definition at line 84 of file ParameterWakeOnLan.h.

◆ m_nRepeat

int CParameterWakeOnLan::m_nRepeat
private

Definition at line 88 of file ParameterWakeOnLan.h.

◆ m_nTimeOut

int CParameterWakeOnLan::m_nTimeOut
private

Unit: ms.

Definition at line 90 of file ParameterWakeOnLan.h.

◆ m_szBoardcastAddress

QString CParameterWakeOnLan::m_szBoardcastAddress
private

Definition at line 82 of file ParameterWakeOnLan.h.

◆ m_szMac

QString CParameterWakeOnLan::m_szMac
private

Definition at line 81 of file ParameterWakeOnLan.h.

◆ m_szNetworkInteface

QString CParameterWakeOnLan::m_szNetworkInteface
private

Definition at line 83 of file ParameterWakeOnLan.h.

◆ m_szPassword

QString CParameterWakeOnLan::m_szPassword
private

Definition at line 85 of file ParameterWakeOnLan.h.


The documentation for this class was generated from the following files: