MCPcopy Create free account
hub / github.com/SpartanJ/eepp / downloadFileWeb

Method downloadFileWeb

src/tools/ecode/uidownloadwindow.cpp:6–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4namespace ecode {
5
6void UIDownloadWindow::downloadFileWeb( const std::string& url ) {
7 static const char* DOWNLOAD_WINDOW = R"xml(
8<DownloadWindow width="300dp" height="120dp" padding="8dp" window-title="@string(downloading_file, Downloading File)" window-flags="default|shadow|maximize|draggable" window-min-size="300dp 80dp">
9 <vbox lw="mp" lh="mp">
10 <TextView text="@string(download_file, Downloading file:)" margin-bottom="8dp" />
11 <TextView class="download_url" lw="mp" lh="wc" text="" margin-bottom="8dp" text-overflow="ellipsis" />
12 <ProgressBar lw="mp" lh="12dp" progress="0" displayPercent="true" />
13 </vbox>
14</DownloadWindow>
15 )xml";
16 UIWidgetCreator::registerWidget( "downloadwindow", UIDownloadWindow::New );
17 SceneManager::instance()
18 ->getUISceneNode()
19 ->loadLayoutFromString( DOWNLOAD_WINDOW )
20 ->asType<UIDownloadWindow>()
21 ->startDownload( url )
22 ->center();
23}
24
25UIDownloadWindow* UIDownloadWindow::New() {
26 return eeNew( UIDownloadWindow, () );

Callers

nothing calls this directly

Calls 4

centerMethod · 0.80
startDownloadMethod · 0.80
loadLayoutFromStringMethod · 0.80
getUISceneNodeMethod · 0.45

Tested by

no test coverage detected