~vcs-imports/qtpfsgui/trunk

« back to all changes in this revision

Viewing changes to src/Common/ProgressHelper.cpp

  • Committer: fcomida
  • Date: 2009-07-08 15:30:39 UTC
  • Revision ID: vcs-imports@canonical.com-20090708153039-66puaj50rnppo2yk
I made some changes to filenames to easy navigation of the source code,
it was quite a mess (ui dialog names different from cpp filenames
implementing the dialog and so on).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * This file is a part of Qtpfsgui package.
 
3
 * ----------------------------------------------------------------------
 
4
 * Copyright (C) 2009 Franco Comida
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; either version 2 of the License, or
 
9
 *  (at your option) any later version.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
19
 * ----------------------------------------------------------------------
 
20
 *
 
21
 * @author Franco Comida <fcomida@users.sourceforge.net>
 
22
 */
 
23
 
 
24
#include "ProgressHelper.h"
 
25
 
 
26
ProgressHelper::ProgressHelper(QObject *p): QObject(p), m_terminate(false) {}
 
27
 
 
28
void ProgressHelper::newValue(int progress) {
 
29
        emit valueChanged(progress);
 
30
}
 
31
 
 
32
void ProgressHelper::terminate(bool b) {
 
33
        m_terminate = b;
 
34
}
 
35
 
 
36
bool ProgressHelper::isTerminationRequested() {
 
37
        return m_terminate;
 
38
}
 
39
 
 
40