ClientManagerLite

Search for usage in LXR

#include <clientmanagerlite.h>

Public Types

enum  UploadMode { UPLOAD_CLIENT , UPLOAD_LOCAL , UPLOAD_BOTH }
 

Properties

bool connected
 
QString connectedHost
 
int lastUsedPort
 
QString lastUsedServer
 
int lastUsedWebManagerPort
 

Signals

void connectedChanged (bool)
 
void connectedHostChanged (QString)
 
void createINDIButton (QString deviceName, QString propName, QString propText, QString switchName, bool read, bool write, bool exclusive, bool checked, bool checkable)
 
void createINDILight (QString deviceName, QString propName, QString label, QString lightName)
 
void createINDIMenu (QString deviceName, QString propName, QString switchLabel, QString switchName, bool isSelected)
 
void createINDINumber (QString deviceName, QString propName, QString propLabel, QString numberName, QString propText, bool read, bool write, bool scale)
 
void createINDIRadio (QString deviceName, QString propName, QString propText, QString switchName, bool read, bool write, bool exclusive, bool checked, bool enabled)
 
void createINDIText (QString deviceName, QString propName, QString propLabel, QString fieldName, QString propText, bool read, bool write)
 
void deviceConnected (QString deviceName, bool isConnected)
 
void lastUsedPortChanged ()
 
void lastUsedServerChanged ()
 
void lastUsedWebManagerPortChanged ()
 
void newINDIBLOBImage (QString deviceName, bool isLoaded)
 
void newINDIDevice (QString deviceName)
 
void newINDILight (QString deviceName, QString propName)
 
void newINDIMessage (QString message)
 
void newINDINumber (QString deviceName, QString propName, QString numberName, QString value)
 
void newINDIProperty (QString deviceName, QString propName, QString groupName, QString type, QString label)
 
void newINDISwitch (QString deviceName, QString propName, QString switchName, bool isOn)
 
void newINDIText (QString deviceName, QString propName, QString fieldName, QString text)
 
void newLEDState (QString deviceName, QString propName)
 
void removeINDIDevice (QString deviceName)
 
void removeINDIProperty (QString deviceName, QString groupName, QString propName)
 
void telescopeAdded (TelescopeLite *newTelescope)
 
void telescopeConnected (TelescopeLite *telescope)
 
void telescopeDisconnected ()
 
void telescopeRemoved (TelescopeLite *delTelescope)
 

Public Member Functions

 ClientManagerLite (QQmlContext &main_context)
 
void buildLightGUI (INDI::Property property)
 
void buildMenuGUI (INDI::Property property)
 
void buildNumberGUI (INDI::Property property)
 
void buildSwitch (bool buttonGroup, ISwitch *sw, INDI::Property property, bool exclusive=false, PGui guiType=PG_BUTTONS)
 
void buildSwitchGUI (INDI::Property property, PGui guiType)
 
void buildTextGUI (INDI::Property property)
 
void clearDevices ()
 
QString connectedHost ()
 
Q_INVOKABLE void disconnectHost ()
 
QList< DeviceInfoLite * > getDevices ()
 
Q_INVOKABLE int getLastUsedPort ()
 
Q_INVOKABLE QString getLastUsedServer ()
 
Q_INVOKABLE int getLastUsedWebManagerPort ()
 
Q_INVOKABLE TelescopeLitegetTelescope ()
 
Q_INVOKABLE void getWebManagerProfiles (const QString &ip, unsigned int port)
 
bool isConnected ()
 
Q_INVOKABLE bool isDeviceConnected (const QString &deviceName)
 
Q_INVOKABLE bool saveDisplayImage ()
 
Q_INVOKABLE void sendNewINDINumber (const QString &deviceName, const QString &propName, const QString &numberName, double value)
 
Q_INVOKABLE void sendNewINDISwitch (const QString &deviceName, const QString &propName, const QString &name)
 
Q_INVOKABLE void sendNewINDISwitch (const QString &deviceName, const QString &propName, int index)
 
Q_INVOKABLE void sendNewINDIText (const QString &deviceName, const QString &propName, const QString &fieldName, const QString &text)
 
void setConnected (bool connected)
 
void setConnectedHost (const QString &connectedHost)
 
Q_INVOKABLE bool setHost (const QString &ip, unsigned int port)
 
void setIndiControlPage (QObject &page)
 
Q_INVOKABLE void setLastUsedPort (int port)
 
Q_INVOKABLE void setLastUsedServer (const QString &server)
 
Q_INVOKABLE void setLastUsedWebManagerPort (int port)
 
Q_INVOKABLE void startWebManagerProfile (const QString &profile)
 
Q_INVOKABLE void stopWebManagerProfile ()
 
Q_INVOKABLE QString syncLED (const QString &device, const QString &property, const QString &name="")
 
Q_INVOKABLE void webManagerReplyError (QNetworkReply::NetworkError code)
 
Q_INVOKABLE void webManagerReplyFinished ()
 

Protected Member Functions

virtual void newBLOB (IBLOB *bp) override
 
virtual void newDevice (INDI::BaseDevice *dp) override
 
virtual void newLight (ILightVectorProperty *lvp) override
 
virtual void newMessage (INDI::BaseDevice *dp, int messageID) override
 
virtual void newNumber (INumberVectorProperty *nvp) override
 
virtual void newProperty (INDI::Property property) override
 
virtual void newSwitch (ISwitchVectorProperty *svp) override
 
virtual void newText (ITextVectorProperty *tvp) override
 
virtual void removeDevice (INDI::BaseDevice *dp) override
 
virtual void removeProperty (INDI::Property property) override
 
virtual void serverConnected () override
 
virtual void serverDisconnected (int exit_code) override
 

Detailed Description

Author
Artem Fedoskin
Version
1.0

Definition at line 40 of file clientmanagerlite.h.

Member Enumeration Documentation

◆ UploadMode

enum ClientManagerLite::UploadMode

Definition at line 65 of file clientmanagerlite.h.

Property Documentation

◆ connected

bool ClientManagerLite::connected
readwrite

Definition at line 44 of file clientmanagerlite.h.

◆ connectedHost

QString ClientManagerLite::connectedHost
readwrite

Definition at line 43 of file clientmanagerlite.h.

◆ lastUsedPort

int ClientManagerLite::lastUsedPort
readwrite

A wrapper for Options::lastServer().

Used to store last used port if user successfully connected to some server at least once.

Definition at line 56 of file clientmanagerlite.h.

◆ lastUsedServer

QString ClientManagerLite::lastUsedServer
readwrite

A wrapper for Options::lastServer().

Used to store last used server if user successfully connected to some server at least once.

Definition at line 50 of file clientmanagerlite.h.

◆ lastUsedWebManagerPort

int ClientManagerLite::lastUsedWebManagerPort
readwrite

A wrapper for Options::lastServer().

Used to store last Web Manager used port if user successfully connected at least once.

Definition at line 62 of file clientmanagerlite.h.

Constructor & Destructor Documentation

◆ ClientManagerLite()

ClientManagerLite::ClientManagerLite ( QQmlContext & main_context)
explicit

Definition at line 46 of file clientmanagerlite.cpp.

◆ ~ClientManagerLite()

ClientManagerLite::~ClientManagerLite ( )
virtual

Definition at line 58 of file clientmanagerlite.cpp.

Member Function Documentation

◆ buildLightGUI()

void ClientManagerLite::buildLightGUI ( INDI::Property property)

Definition at line 586 of file clientmanagerlite.cpp.

◆ buildMenuGUI()

void ClientManagerLite::buildMenuGUI ( INDI::Property property)

Definition at line 468 of file clientmanagerlite.cpp.

◆ buildNumberGUI()

void ClientManagerLite::buildNumberGUI ( INDI::Property property)

Definition at line 405 of file clientmanagerlite.cpp.

◆ buildSwitch()

void ClientManagerLite::buildSwitch ( bool buttonGroup,
ISwitch * sw,
INDI::Property property,
bool exclusive = false,
PGui guiType = PG_BUTTONS )

Definition at line 527 of file clientmanagerlite.cpp.

◆ buildSwitchGUI()

void ClientManagerLite::buildSwitchGUI ( INDI::Property property,
PGui guiType )

Definition at line 500 of file clientmanagerlite.cpp.

◆ buildTextGUI()

void ClientManagerLite::buildTextGUI ( INDI::Property property)

Definition at line 354 of file clientmanagerlite.cpp.

◆ clearDevices()

void ClientManagerLite::clearDevices ( )

Definition at line 1202 of file clientmanagerlite.cpp.

◆ connectedHost()

QString ClientManagerLite::connectedHost ( )
inline

Definition at line 102 of file clientmanagerlite.h.

◆ disconnectHost()

void ClientManagerLite::disconnectHost ( )

Definition at line 81 of file clientmanagerlite.cpp.

◆ getDevices()

QList< DeviceInfoLite * > ClientManagerLite::getDevices ( )
inline

Definition at line 151 of file clientmanagerlite.h.

◆ getLastUsedPort()

int ClientManagerLite::getLastUsedPort ( )

Definition at line 1230 of file clientmanagerlite.cpp.

◆ getLastUsedServer()

QString ClientManagerLite::getLastUsedServer ( )

Definition at line 1216 of file clientmanagerlite.cpp.

◆ getLastUsedWebManagerPort()

int ClientManagerLite::getLastUsedWebManagerPort ( )

Definition at line 1244 of file clientmanagerlite.cpp.

◆ getTelescope()

TelescopeLite * ClientManagerLite::getTelescope ( )

Definition at line 276 of file clientmanagerlite.cpp.

◆ getWebManagerProfiles()

void ClientManagerLite::getWebManagerProfiles ( const QString & ip,
unsigned int port )

Get the profiles from Web Manager.

Parameters
ipIP address
portPort number

The process is async and the results are stored in webMProfiles. Once this request finishes, the server status is queried from the server.

Definition at line 88 of file clientmanagerlite.cpp.

◆ isConnected()

bool ClientManagerLite::isConnected ( )
inline

Definition at line 145 of file clientmanagerlite.h.

◆ isDeviceConnected()

bool ClientManagerLite::isDeviceConnected ( const QString & deviceName)

Definition at line 810 of file clientmanagerlite.cpp.

◆ newBLOB()

void ClientManagerLite::newBLOB ( IBLOB * bp)
overrideprotectedvirtual

Definition at line 958 of file clientmanagerlite.cpp.

◆ newDevice()

void ClientManagerLite::newDevice ( INDI::BaseDevice * dp)
overrideprotectedvirtual

Definition at line 826 of file clientmanagerlite.cpp.

◆ newLight()

void ClientManagerLite::newLight ( ILightVectorProperty * lvp)
overrideprotectedvirtual

Definition at line 1184 of file clientmanagerlite.cpp.

◆ newMessage()

void ClientManagerLite::newMessage ( INDI::BaseDevice * dp,
int messageID )
overrideprotectedvirtual

Definition at line 1190 of file clientmanagerlite.cpp.

◆ newNumber()

void ClientManagerLite::newNumber ( INumberVectorProperty * nvp)
overrideprotectedvirtual

Definition at line 1149 of file clientmanagerlite.cpp.

◆ newProperty()

void ClientManagerLite::newProperty ( INDI::Property property)
overrideprotectedvirtual

Definition at line 855 of file clientmanagerlite.cpp.

◆ newSwitch()

void ClientManagerLite::newSwitch ( ISwitchVectorProperty * svp)
overrideprotectedvirtual

Definition at line 1123 of file clientmanagerlite.cpp.

◆ newText()

void ClientManagerLite::newText ( ITextVectorProperty * tvp)
overrideprotectedvirtual

Definition at line 1170 of file clientmanagerlite.cpp.

◆ removeDevice()

void ClientManagerLite::removeDevice ( INDI::BaseDevice * dp)
overrideprotectedvirtual

Definition at line 850 of file clientmanagerlite.cpp.

◆ removeProperty()

void ClientManagerLite::removeProperty ( INDI::Property property)
overrideprotectedvirtual

Definition at line 929 of file clientmanagerlite.cpp.

◆ saveDisplayImage()

bool ClientManagerLite::saveDisplayImage ( )

saveDisplayImage

Returns
true if image was saved false otherwise

Definition at line 787 of file clientmanagerlite.cpp.

◆ sendNewINDINumber()

void ClientManagerLite::sendNewINDINumber ( const QString & deviceName,
const QString & propName,
const QString & numberName,
double value )

Definition at line 697 of file clientmanagerlite.cpp.

◆ sendNewINDISwitch() [1/2]

void ClientManagerLite::sendNewINDISwitch ( const QString & deviceName,
const QString & propName,
const QString & name )

Definition at line 649 of file clientmanagerlite.cpp.

◆ sendNewINDISwitch() [2/2]

void ClientManagerLite::sendNewINDISwitch ( const QString & deviceName,
const QString & propName,
int index )

Definition at line 755 of file clientmanagerlite.cpp.

◆ sendNewINDIText()

void ClientManagerLite::sendNewINDIText ( const QString & deviceName,
const QString & propName,
const QString & fieldName,
const QString & text )

Definition at line 726 of file clientmanagerlite.cpp.

◆ serverConnected()

virtual void ClientManagerLite::serverConnected ( )
inlineoverrideprotectedvirtual

Definition at line 188 of file clientmanagerlite.h.

◆ serverDisconnected()

void ClientManagerLite::serverDisconnected ( int exit_code)
overrideprotectedvirtual

Definition at line 1195 of file clientmanagerlite.cpp.

◆ setConnected()

void ClientManagerLite::setConnected ( bool connected)

Definition at line 296 of file clientmanagerlite.cpp.

◆ setConnectedHost()

void ClientManagerLite::setConnectedHost ( const QString & connectedHost)

Definition at line 288 of file clientmanagerlite.cpp.

◆ setHost()

bool ClientManagerLite::setHost ( const QString & ip,
unsigned int port )

Definition at line 62 of file clientmanagerlite.cpp.

◆ setIndiControlPage()

void ClientManagerLite::setIndiControlPage ( QObject & page)
inline

Set the INDI Control Page.

Parameters
pageReference to the QML page

Definition at line 114 of file clientmanagerlite.h.

◆ setLastUsedPort()

void ClientManagerLite::setLastUsedPort ( int port)

Definition at line 1235 of file clientmanagerlite.cpp.

◆ setLastUsedServer()

void ClientManagerLite::setLastUsedServer ( const QString & server)

Definition at line 1221 of file clientmanagerlite.cpp.

◆ setLastUsedWebManagerPort()

void ClientManagerLite::setLastUsedWebManagerPort ( int port)

Definition at line 1249 of file clientmanagerlite.cpp.

◆ startWebManagerProfile()

void ClientManagerLite::startWebManagerProfile ( const QString & profile)

Start an INDI server with a Web Manager profile.

Parameters
profileProfile name

Definition at line 104 of file clientmanagerlite.cpp.

◆ stopWebManagerProfile()

void ClientManagerLite::stopWebManagerProfile ( )

Stop the INDI server with an active Web Manager profile.

Definition at line 121 of file clientmanagerlite.cpp.

◆ syncLED()

QString ClientManagerLite::syncLED ( const QString & device,
const QString & property,
const QString & name = "" )

syncLED

Parameters
devicedevice name
propertyproperty name
nameof Light which LED needs to be synced
Returns
color of state

Definition at line 302 of file clientmanagerlite.cpp.

◆ webManagerReplyError()

void ClientManagerLite::webManagerReplyError ( QNetworkReply::NetworkError code)

Handle the errors of the async Web Manager requests.

Definition at line 136 of file clientmanagerlite.cpp.

◆ webManagerReplyFinished()

void ClientManagerLite::webManagerReplyFinished ( )

Do actions when async Web Manager requests are finished.

Definition at line 168 of file clientmanagerlite.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.