Add line for debugging
[kdevelopdvcssupport.git] / vcs / vcsstatusinfo.h
blob19eed2fb092eaaa46e27c7e9982109d606380efd
1 /* This file is part of KDevelop
3 * Copyright 2007 Andreas Pakulat <apaku@gmx.de>
4 * Copyright 2007 Matthew Woehlke <mw_triad@users.sourceforge.net>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA
19 * 02110-1301, USA.
22 #ifndef VCSSTATUSINFO_H
23 #define VCSSTATUSINFO_H
25 #include <QtCore/QVariant>
27 #include <kurl.h>
29 #include "vcsexport.h"
31 class QString;
32 class QStringList;
34 namespace KDevelop
37 /**
39 * Class that encapsulates status information
40 * for one local url.
42 * The extendedState functions allow to transport
43 * extended status information
45 * Note for VCS implementations:
46 * If you want to use this class in queued signal/slot connections
47 * you should call qRegisterMetaType<KDevelop::VcsStatusInfo>()
48 * in the constructor of the plugin class
50 class KDEVPLATFORMVCS_EXPORT VcsStatusInfo
52 public:
53 /**
54 * Status of a local file
56 enum State
58 ItemUnknown = 0 /**< No VCS information about a file is known (or file is not under VCS control). */,
59 ItemUpToDate = 1 /**< Item was updated or it is already at up to date version. */,
60 ItemAdded = 2 /**< Item was added to the repository but not committed. */,
61 ItemModified = 3 /**< Item was modified locally. */,
62 ItemDeleted = 4 /**< Item is scheduled to be deleted. */,
63 ItemAddedIndex = 5 /**< Item is added to index (DVCS only). */,
64 ItemModifiedIndex = 6 /**< Item's modifications are added to index (DVCS only) */,
65 ItemDeletedIndex = 7 /**< Item was deleted from the index (DVCS only) */,
66 ItemHasConflicts = 8 /**< Local version has conflicts that need to be resolved before commit. */,
67 ItemUserState = 1000 /**< special states for individual vcs implementations should use this as base. */
70 VcsStatusInfo();
71 virtual ~VcsStatusInfo();
72 VcsStatusInfo(const VcsStatusInfo&);
74 /**
75 * retrieves the url of this status information item
76 * @return the url
78 KUrl url() const;
79 /**
80 * Change the url of this status information item
81 * @param url the url
83 void setUrl( const KUrl& );
85 VcsStatusInfo::State state() const;
86 void setState( VcsStatusInfo::State );
88 int extendedState() const;
89 void setExtendedState( int );
91 VcsStatusInfo& operator=( const VcsStatusInfo& rhs);
92 bool operator==( const KDevelop::VcsStatusInfo& rhs) const;
93 bool operator!=( const KDevelop::VcsStatusInfo& rhs) const;
95 private:
96 class VcsStatusInfoPrivate* d;
101 Q_DECLARE_METATYPE( KDevelop::VcsStatusInfo )
103 #endif