bump version
[vng.git] / src / TrackedBranch.h
blob350cc998dbd87fb00f69471be09f60455357fc48
1 #ifndef TRACKEDBRANCH_H
2 #define TRACKEDBRANCH_H
4 #include <QString>
5 #include <QExplicitlySharedDataPointer>
7 #include "RemoteRepo.h"
9 class TrackedBranchPrivate;
10 class RemoteRepo;
12 // TODO move to .cpp file
13 class TrackedBranchPrivate : public QSharedData
15 public:
16 QString remoteBranch;
17 QString localBranch;
18 RemoteRepo remote;
21 /**
22 * A local branch that is registered in the configuration to track a remote branch.
24 class TrackedBranch
26 public:
27 TrackedBranch();
28 TrackedBranch(const TrackedBranch &trackedBranch);
29 TrackedBranch(const QString &localName, const QString &remoteName, const RemoteRepo &remote);
30 ~TrackedBranch();
32 QString localName() const;
33 QString remoteName() const;
34 RemoteRepo remote() const;
36 bool isValid() const { return d; }
38 private:
39 QExplicitlySharedDataPointer<TrackedBranchPrivate> d;
42 #endif