1 /* === S Y N F I G ========================================================= */
2 /*! \file tool/progress.h
3 ** \brief Progress class
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
9 ** Copyright (c) 2007, 2008 Chris Moore
11 ** This package is free software; you can redistribute it and/or
12 ** modify it under the terms of the GNU General Public License as
13 ** published by the Free Software Foundation; either version 2 of
14 ** the License, or (at your option) any later version.
16 ** This package is distributed in the hope that it will be useful,
17 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ** General Public License for more details.
22 /* ========================================================================= */
24 #ifndef __SYNFIG_PROGRESS_H
25 #define __SYNFIG_PROGRESS_H
29 using namespace synfig;
31 #include <synfig/string.h>
32 #include "definitions.h"
34 class Progress : public synfig::ProgressCallback
40 Progress(const char *name):program(name) { }
43 task(const String &task)
45 VERBOSE_OUT(1)<<program<<": "<<task<<std::endl;
50 error(const String &task)
52 std::cerr<<program<<": "<<_("error")<<": "<<task<<std::endl;
57 warning(const String &task)
59 std::cerr<<program<<": "<<_("warning")<<": "<<task<<std::endl;
64 amount_complete(int /*current*/, int /*total*/)