|
ParaView
|
pqServerConfigurationImporter class can be used to import remote server configurations. More...
#include <pqServerConfigurationImporter.h>
Classes | |
| class | Item |
Public Types | |
| enum | SourceMode { PVSC } |
Public Slots | |
| void | fetchConfigurations () |
| Use this method to fetch server configurations from urls specified. | |
| void | abortFetch () |
| Aborts blocking in fetchConfigurations(). | |
Signals | |
| void | incrementalUpdate () |
| fired as source configurations are fetched. | |
| void | configurationsUpdated () |
| fired at end of fetchConfigurations() call. | |
| void | authenticationRequired (QNetworkReply *, QAuthenticator *) |
| this signal is fired whenever the source-url requests authentication before delivering the contents. | |
| void | abortFetchTriggered () |
| fired when abortFetch() is called. | |
| void | message (const QString &message) |
| this class posts miscellaneous information about the network communication using this signal. | |
Public Member Functions | |
| pqServerConfigurationImporter (QObject *parent=0) | |
| virtual | ~pqServerConfigurationImporter () |
| void | addSource (const QString &name, const QUrl &url, SourceMode mode=PVSC) |
| Add source URL. | |
| void | clearSources () |
| Remove all added sources. | |
| const QList< Item > & | configurations () const |
| Returns the fetched configurations. | |
Protected Member Functions | |
| bool | processDownloadedContents () |
| Called after data from each source is fetched fully. | |
| bool | fetch (const QUrl &url) |
| Returns true if valid config was fetched and processed from the URL, otherwise returns false. | |
pqServerConfigurationImporter class can be used to import remote server configurations.
Definition at line 46 of file pqServerConfigurationImporter.h.
Definition at line 54 of file pqServerConfigurationImporter.h.
| pqServerConfigurationImporter::pqServerConfigurationImporter | ( | QObject * | parent = 0 | ) |
| virtual pqServerConfigurationImporter::~pqServerConfigurationImporter | ( | ) | [virtual] |
| void pqServerConfigurationImporter::addSource | ( | const QString & | name, |
| const QUrl & | url, | ||
| SourceMode | mode = PVSC |
||
| ) |
Add source URL.
Currently, we only support pvsc sources. In future we may support other types of sources. For every url added, the following locations are tried, in the specific order:
| void pqServerConfigurationImporter::clearSources | ( | ) |
Remove all added sources.
| const QList<Item>& pqServerConfigurationImporter::configurations | ( | ) | const |
Returns the fetched configurations.
If fetchConfigurations() was aborted using abortFetch(), then this list may be partially filled. Also, this list include all server configurations fetched, without checking if some of these configurations are already present in pqServerConfigurationCollection maintained by pqApplicationCore.
| void pqServerConfigurationImporter::fetchConfigurations | ( | ) | [slot] |
Use this method to fetch server configurations from urls specified.
This call blocks until all configurations are fetched. It uses a QEventLoop internally to wait for the network communication. One can abort the waiting by using abortFetch(). Refer to pqServerConnectDialog::fetchServers() for details on using fetchConfigurations() and abortFetch().
| void pqServerConfigurationImporter::abortFetch | ( | ) | [slot] |
Aborts blocking in fetchConfigurations().
Has any effect only when fetchConfigurations() has blocked.
| void pqServerConfigurationImporter::incrementalUpdate | ( | ) | [signal] |
fired as source configurations are fetched.
Makes it possible to build interfaces that are populated as new configurations arrive, rather than waiting for the entire fetchConfigurations() to complete.
| void pqServerConfigurationImporter::configurationsUpdated | ( | ) | [signal] |
fired at end of fetchConfigurations() call.
| void pqServerConfigurationImporter::authenticationRequired | ( | QNetworkReply * | , |
| QAuthenticator * | |||
| ) | [signal] |
this signal is fired whenever the source-url requests authentication before delivering the contents.
Refer to QNetworkAccessManager::authenticationRequired() for details.
| void pqServerConfigurationImporter::abortFetchTriggered | ( | ) | [signal] |
fired when abortFetch() is called.
An internal signal, not really useful for external components.
| void pqServerConfigurationImporter::message | ( | const QString & | message | ) | [signal] |
this class posts miscellaneous information about the network communication using this signal.
| bool pqServerConfigurationImporter::processDownloadedContents | ( | ) | [protected] |
Called after data from each source is fetched fully.
This will process the fetched data and update the configurations list. May fire incrementalUpdate() if configurations were updated.
| bool pqServerConfigurationImporter::fetch | ( | const QUrl & | url | ) | [protected] |
Returns true if valid config was fetched and processed from the URL, otherwise returns false.
1.7.5.1