~ubuntu-branches/ubuntu/karmic/kleansweep/karmic

« back to all changes in this revision

Viewing changes to src/sweepfileinfo.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2006-01-20 11:26:41 UTC
  • Revision ID: james.westby@ubuntu.com-20060120112641-xd1rmv568k0vvz3u
Tags: upstream-0.2.5
ImportĀ upstreamĀ versionĀ 0.2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is a part of KleanSweep.
 
3
 *
 
4
 * Copyright (C) 2005 Pawel Stolowski <pawel.stolowski@wp.pl>
 
5
 *
 
6
 * KleanSweep is free software; you can redestribute it and/or modify it
 
7
 * under terms of GNU General Public License by Free Software Foundation.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful, but
 
10
 * WITHOUT ANY WARRANTY. See GPL for more details.
 
11
 */
 
12
 
 
13
#include "sweepfileinfo.h"
 
14
#include <kurl.h>
 
15
 
 
16
#ifdef DEBUG
 
17
#include <iostream>
 
18
#endif
 
19
 
 
20
SweepFileInfo::SweepFileInfo(const KURL &path, char score): KFileItem(KFileItem::Unknown, KFileItem::Unknown, path, false), remove(false), target(QString::null), scre(score)
 
21
{
 
22
}
 
23
 
 
24
SweepFileInfo::~SweepFileInfo()
 
25
{
 
26
}
 
27
 
 
28
void SweepFileInfo::markForRemoval(bool f)
 
29
{
 
30
        #ifdef DEBUG
 
31
        std::cerr << __PRETTY_FUNCTION__ << " " << name() << " " << f << std::endl;
 
32
        #endif
 
33
 
 
34
        remove = f;
 
35
}
 
36
 
 
37
bool SweepFileInfo::isMarkedForRemoval() const
 
38
{
 
39
        return remove;
 
40
}
 
41
 
 
42
void SweepFileInfo::setTarget(const QString &path)
 
43
{
 
44
        target = path;
 
45
}
 
46
 
 
47
QString SweepFileInfo::getTarget() const
 
48
{
 
49
        return target;
 
50
}
 
51
 
 
52
int SweepFileInfo::getScore() const
 
53
{
 
54
        return scre;
 
55
}
 
56