Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 38 lines (31 sloc) 0.925 kb
4531f65 Joe Ferris Move logic to wait for pending page loads into a decorator
jferris authored
1 #include <QObject>
2 #include <QStringList>
9202683 Joe Ferris PageLoadingCommand implements the Command interface
jferris authored
3 #include "Command.h"
4531f65 Joe Ferris Move logic to wait for pending page loads into a decorator
jferris authored
4
5 class Response;
1264113 Matthew Horan Close new windows on reset
mhoran authored
6 class WebPageManager;
4531f65 Joe Ferris Move logic to wait for pending page loads into a decorator
jferris authored
7
8 /*
9 * Decorates a Command by deferring the finished() signal until any pending
10 * page loads are complete.
11 *
12 * If a Command starts a page load, no signal will be emitted until the page
13 * load is finished.
14 *
15 * If a pending page load fails, the command's response will be discarded and a
16 * failure response will be emitted instead.
17 */
9202683 Joe Ferris PageLoadingCommand implements the Command interface
jferris authored
18 class PageLoadingCommand : public Command {
4531f65 Joe Ferris Move logic to wait for pending page loads into a decorator
jferris authored
19 Q_OBJECT
20
21 public:
1264113 Matthew Horan Close new windows on reset
mhoran authored
22 PageLoadingCommand(Command *command, WebPageManager *page, QObject *parent = 0);
9202683 Joe Ferris PageLoadingCommand implements the Command interface
jferris authored
23 virtual void start();
4531f65 Joe Ferris Move logic to wait for pending page loads into a decorator
jferris authored
24
25 public slots:
26 void pageLoadingFromCommand();
27 void pendingLoadFinished(bool success);
28 void commandFinished(Response *response);
29
30 private:
1264113 Matthew Horan Close new windows on reset
mhoran authored
31 WebPageManager *m_manager;
4531f65 Joe Ferris Move logic to wait for pending page loads into a decorator
jferris authored
32 Command *m_command;
33 Response *m_pendingResponse;
34 bool m_pageSuccess;
35 bool m_pageLoadingFromCommand;
36 };
37
Something went wrong with that request. Please try again.