Connect with window(s) for control messages. More...
#include "us_window_message.h"
Classes | |
class | Interpreter |
Interpreter definition. More... | |
Public Member Functions | |
US_WindowMessage (QObject *=0) | |
Generic constructor for the US_WindowMessage class. More... | |
~US_WindowMessage () | |
A destructor. More... | |
int | findAllInterps (void) |
Function to issue a "winfo interps" command and populate an internal list of all interpreters. More... | |
int | findAllInterps (QList< Interpreter > &) |
Function to issue a "winfo interps" command, populate an internal list of all interpreters, and return a copy. More... | |
int | findLiveInterps () |
Function to populate an internal list of active RasMol interpreters. More... | |
int | findLiveInterps (QList< Interpreter > &) |
Function to return the list of active RasMol interpreters. More... | |
int | zombieList (QStringList &) |
Function to return any list of zombie interpreters. More... | |
ulong | addInterp (const QString) |
Function to add a new interpreter identified by the name of the file displayed in its window. More... | |
int | interpIDs (QList< ulong > &) |
Function to return the list of active interpreter IDs. More... | |
int | interpNames (QStringList &) |
Function to return the list of active interpreter names. More... | |
int | interpFiles (QStringList &) |
Function to return a list of active interpreter file names. More... | |
ulong | interpId (const QString) |
Function to return the interp ID for a given file name. More... | |
ulong | interpIdByName (const QString) |
Function to return the interp ID for a given interp name. More... | |
QString | interpName (const ulong) |
Function to return the interp name for a given ID. More... | |
QString | interpName (const QString) |
Function to return the interp name for a given file name. More... | |
QString | interpFileName (const ulong) |
Function to return the file name for a given ID. More... | |
QString | interpFileName (const QString) |
Function to return the file name for a given interp name. More... | |
int | sendMessage (const ulong, const QString) |
Function to send a message to an interpreter as identified by an ID number. More... | |
int | sendMessage (const QString, const QString) |
Function to send a message to an interpreter as identified by an interpreter name. More... | |
QString | sendQuery (const ulong, const QString) |
Function to send a query command to an interpreter, as identified by an ID number, and return the response. More... | |
QString | sendQuery (const QString, const QString) |
Function to send a query command to an interpreter, as identified by an interpreter name, and return the response. More... | |
bool | isLive (Interpreter &) |
Function to flag whether an interpreter is live. More... | |
QString | lastSendResult (void) |
Function to return a status/error message from the last interpreter send action. More... | |
Private Slots | |
int | fill_interps (int, char *, QList< Interpreter > &) |
Private Attributes | |
QList< Interpreter > | all_interps |
List of all interpreters. More... | |
QList< Interpreter > | live_interps |
List of active interpreters. More... | |
QList< ulong > | interp_ids |
List of active interpreter IDs. More... | |
QStringList | interp_names |
List of active interpreter names. More... | |
QStringList | file_names |
List of active interpreter file names. More... | |
QStringList | zombie_list |
List of zombie interpreter strings. More... | |
int | dbg_level |
Debug level value. More... | |
Connect with window(s) for control messages.
This class provides a connection to external windows, such as those created by Rasmol, so that control messages may be sent to a specific window.
Definition at line 19 of file us_window_message.h.
US_WindowMessage::US_WindowMessage | ( | QObject * | parent = 0 | ) |
Generic constructor for the US_WindowMessage class.
Definition at line 34 of file us_window_message.cpp.
|
inline |
A destructor.
Definition at line 45 of file us_window_message.h.
ulong US_WindowMessage::addInterp | ( | const QString | filename | ) |
Function to add a new interpreter identified by the name of the file displayed in its window.
filename | File name to associate with the last added interp. |
Definition at line 117 of file us_window_message.cpp.
|
privateslot |
Definition at line 342 of file us_window_message.cpp.
int US_WindowMessage::findAllInterps | ( | void | ) |
Function to issue a "winfo interps" command and populate an internal list of all interpreters.
Definition at line 41 of file us_window_message.cpp.
int US_WindowMessage::findAllInterps | ( | QList< Interpreter > & | interps | ) |
Function to issue a "winfo interps" command, populate an internal list of all interpreters, and return a copy.
interps | Reference to interpreters list populated herein. |
Definition at line 59 of file us_window_message.cpp.
int US_WindowMessage::findLiveInterps | ( | ) |
Function to populate an internal list of active RasMol interpreters.
Definition at line 67 of file us_window_message.cpp.
int US_WindowMessage::findLiveInterps | ( | QList< Interpreter > & | interps | ) |
Function to return the list of active RasMol interpreters.
interps | Reference to interpreters list populated herein. |
Definition at line 95 of file us_window_message.cpp.
QString US_WindowMessage::interpFileName | ( | const ulong | id | ) |
Function to return the file name for a given ID.
id | ID number for which to return a file name. |
Definition at line 258 of file us_window_message.cpp.
QString US_WindowMessage::interpFileName | ( | const QString | iname | ) |
Function to return the file name for a given interp name.
iname | Interpreter name for which to return a file name. |
Definition at line 275 of file us_window_message.cpp.
int US_WindowMessage::interpFiles | ( | QStringList & | fnames | ) |
Function to return a list of active interpreter file names.
fnames | Reference to interpreter file names list for return. |
Definition at line 178 of file us_window_message.cpp.
ulong US_WindowMessage::interpId | ( | const QString | filename | ) |
Function to return the interp ID for a given file name.
filename | File name for which to return the ID. |
Definition at line 190 of file us_window_message.cpp.
ulong US_WindowMessage::interpIdByName | ( | const QString | iname | ) |
Function to return the interp ID for a given interp name.
iname | Interpreter name for which to return the ID. |
Definition at line 207 of file us_window_message.cpp.
int US_WindowMessage::interpIDs | ( | QList< ulong > & | ids | ) |
Function to return the list of active interpreter IDs.
ids | Reference to interpreter IDs list for return. |
Definition at line 154 of file us_window_message.cpp.
QString US_WindowMessage::interpName | ( | const ulong | id | ) |
Function to return the interp name for a given ID.
id | Interpreter ID for which to return the name. |
Definition at line 224 of file us_window_message.cpp.
QString US_WindowMessage::interpName | ( | const QString | filename | ) |
Function to return the interp name for a given file name.
filename | File name for which to return the interp name. |
Definition at line 241 of file us_window_message.cpp.
int US_WindowMessage::interpNames | ( | QStringList & | names | ) |
Function to return the list of active interpreter names.
names | Reference to interpreter names list for return. |
Definition at line 166 of file us_window_message.cpp.
bool US_WindowMessage::isLive | ( | Interpreter & | interp | ) |
Function to flag whether an interpreter is live.
interp | Interpreter to evaluate. |
Definition at line 324 of file us_window_message.cpp.
QString US_WindowMessage::lastSendResult | ( | void | ) |
Function to return a status/error message from the last interpreter send action.
Definition at line 335 of file us_window_message.cpp.
int US_WindowMessage::sendMessage | ( | const ulong | id, |
const QString | wmsg | ||
) |
Function to send a message to an interpreter as identified by an ID number.
id | ID number of interpreter to contact. |
wmsg | Window message to send to the interpreter window. |
Definition at line 292 of file us_window_message.cpp.
int US_WindowMessage::sendMessage | ( | const QString | iname, |
const QString | wmsg | ||
) |
Function to send a message to an interpreter as identified by an interpreter name.
iname | Name of interpreter to contact. |
wmsg | Window message to send to the interpreter window. |
Definition at line 299 of file us_window_message.cpp.
QString US_WindowMessage::sendQuery | ( | const ulong | id, |
const QString | wmsg | ||
) |
Function to send a query command to an interpreter, as identified by an ID number, and return the response.
id | ID number of interpreter to contact. |
wmsg | Window message to send to the interpreter window. |
Definition at line 306 of file us_window_message.cpp.
QString US_WindowMessage::sendQuery | ( | const QString | iname, |
const QString | wmsg | ||
) |
Function to send a query command to an interpreter, as identified by an interpreter name, and return the response.
iname | Name of interpreter to contact. |
wmsg | Window message to send to the interpreter window. |
Definition at line 315 of file us_window_message.cpp.
int US_WindowMessage::zombieList | ( | QStringList & | zlist | ) |
Function to return any list of zombie interpreters.
zlist | Reference for return of zombies list |
Definition at line 105 of file us_window_message.cpp.
|
private |
List of all interpreters.
Definition at line 163 of file us_window_message.h.
|
private |
Debug level value.
Definition at line 171 of file us_window_message.h.
|
private |
List of active interpreter file names.
Definition at line 168 of file us_window_message.h.
|
private |
List of active interpreter IDs.
Definition at line 166 of file us_window_message.h.
|
private |
List of active interpreter names.
Definition at line 167 of file us_window_message.h.
|
private |
List of active interpreters.
Definition at line 164 of file us_window_message.h.
|
private |
List of zombie interpreter strings.
Definition at line 169 of file us_window_message.h.