Class sh::ui::web::WebDetailPanelManager¶
-
class
sh::ui::web
::
WebDetailPanelManager
: public QObject, public sh::ui::web::WebModule¶ Manages the detail panel (typically in bottom part of main window).
Public Functions
-
WebDetailPanelManager
()¶
Loads details for a given list of nodes (typically called after they get selected).
-
bool
rootCommand
(WebServerEngineRequest *request, QString webadapter)¶ Returns the root (‘index.html’) content. .
-
void
setEngine
(WebServerEngine *webserver)¶ Assigns this web module to a sh::ui::web::WebServerEngine. .
-
WebServerEngine *
webserver
()¶ Returns the sh::ui::web::WebServerEngine this web module is assigned to (may be nullptr).
Public Static Functions
-
bool
executeCommand_byQObjectReflection
(QObject *o, WebServerEngineRequest *request, QString command, QString justLeftside = QString())¶ Convenience function often used by executeCommand().
For a QObject, it searches there for a slot with the name
cmd_{command}
, with `’/’s replaced by
’_’s (so, for the command
”foo/get_bars”, it searches for slot
cmd_foo_get_bars`). If it finds one, it gets executed (in a worker thread). The request is considered as handled, if so.If there is such a slot, but with appended
__M
in name, it is called in main thread!- Return
If it handled (answered) the command.
Private Functions
-
bool
executeCommand
(WebServerEngineRequest *request, QString command) override¶ Executes
command
as requested by the browser, if responsible.Read parameters, check if this module is responsible for answering, and then write an answer with
request
.Implementations often use executeCommand_byQObjectReflection() for convenience.
- Return
If it handled (answered) the command.
Private Members
-
QMutex
_mutex
¶
-
QList<std::shared_ptr<sh::paneldetails::PanelDetail>>
_paneldetails
¶
-
qint64
_webts_lastupdate
¶
Private Slots
-
void
cmd__get_details
(WebServerEngineRequest *request)¶
-
void
cmd__get_thumbnail
(WebServerEngineRequest *request)¶
-
void
cmd__link_clicked
(WebServerEngineRequest *request)¶
-