ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

downloaddialog.h

Go to the documentation of this file.
00001 /* ScummVM - Graphic Adventure Engine
00002  *
00003  * ScummVM is the legal property of its developers, whose names
00004  * are too numerous to list here. Please refer to the COPYRIGHT
00005  * file distributed with this source distribution.
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 #ifndef GUI_DOWNLOADDIALOG_H
00024 #define GUI_DOWNLOADDIALOG_H
00025 
00026 #include "gui/dialog.h"
00027 #include "common/str.h"
00028 
00029 namespace GUI {
00030 class LauncherDialog;
00031 
00032 class CommandSender;
00033 class EditTextWidget;
00034 class StaticTextWidget;
00035 class ButtonWidget;
00036 class SliderWidget;
00037 class BrowserDialog;
00038 class RemoteBrowserDialog;
00039 
00040 enum DownloadProgress {
00041     kDownloadProgressCmd = 'DLPR',
00042     kDownloadEndedCmd = 'DLEN'
00043 };
00044 
00045 class DownloadDialog : public Dialog {
00046     LauncherDialog *_launcher;
00047     BrowserDialog *_browser;
00048     RemoteBrowserDialog *_remoteBrowser;
00049 
00050     StaticTextWidget *_remoteDirectoryLabel;
00051     StaticTextWidget *_localDirectoryLabel;
00052     StaticTextWidget *_percentLabel;
00053     StaticTextWidget *_downloadSizeLabel;
00054     StaticTextWidget *_downloadSpeedLabel;
00055     SliderWidget *_progressBar;
00056     ButtonWidget *_cancelButton;
00057     ButtonWidget *_closeButton;
00058 
00059     Common::String _localDirectory;
00060     bool _close;
00061 
00062     Common::String getSizeLabelText();
00063     Common::String getSpeedLabelText();
00064 
00065     void refreshWidgets();
00066     bool selectDirectories();
00067 
00068 public:
00069     DownloadDialog(uint32 storageId, LauncherDialog *launcher);
00070     virtual ~DownloadDialog();
00071 
00072     virtual void open();
00073     virtual void close();
00074     virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
00075     virtual void handleTickle();
00076     virtual void reflowLayout();
00077 };
00078 
00079 } // End of namespace GUI
00080 
00081 #endif


Generated on Sat Mar 16 2019 05:01:25 for ResidualVM by doxygen 1.7.1
curved edge   curved edge