ClientManagerLite

Search for usage in LXR

#include <clientmanagerlite.h>

Inherits BaseClientQt.

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.

Property Documentation

◆ 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 63 of file clientmanagerlite.h.

Member Function Documentation

◆ 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.

◆ saveDisplayImage()

bool ClientManagerLite::saveDisplayImage ( )

saveDisplayImage

Returns
true if image was saved false otherwise

Definition at line 787 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.

◆ 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-2022 The KDE developers.
Generated on Fri Aug 12 2022 04:00:59 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.