~ubuntu-branches/ubuntu/quantal/kdevplatform/quantal-proposed

« back to all changes in this revision

Viewing changes to vcs/dvcs/ui/branchmanager.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-10-24 00:06:18 UTC
  • mfrom: (0.3.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20101024000618-7otebin77mfcmt3b
Tags: 1.1.0-0ubuntu1
* New upstream release
  - Bump build-dependencies
  - Build against libboost-serialization1.42-dev
  - Update kdevplatform1-libs.install
  - Update kdevplatform-dev.install

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include <QtGui/QStringListModel>
25
25
#include <KDE/KDialog>
26
 
 
27
 
#include "ui_branchmanager.h"
28
 
 
29
 
///TODO: maybe KDevelop's progressBar?
30
 
 
 
26
#include <QStandardItemModel>
 
27
 
 
28
class BranchesListModel;
31
29
class KJob;
 
30
namespace Ui { class BranchDialogBase; }
32
31
 
33
32
namespace KDevelop
34
33
{
35
34
    class DistributedVersionControlPlugin;
36
35
}
37
36
 
38
 
class BranchManager : public KDialog, public Ui::BranchDialogBase
 
37
class BranchManager : public KDialog
39
38
{
40
39
    Q_OBJECT
41
40
public:
42
41
    BranchManager(const QString &_repo, KDevelop::DistributedVersionControlPlugin* executor, QWidget *parent = 0);
43
42
    ~BranchManager();
 
43
    
 
44
    bool isValid() const { return m_valid; }
44
45
 
45
46
signals:
46
47
    void checkedOut(KJob*);
47
48
 
48
49
private slots:
49
50
    void createBranch();
50
 
    void renameBranch(QListWidgetItem * item);
51
51
    void delBranch();
52
52
    void checkoutBranch();
53
53
 
54
 
    void currentActivatedData(QListWidgetItem * item);
55
 
    void activateButtons(const QItemSelection&, const QItemSelection&);
56
 
 
57
54
private:
58
55
    QString repo;
59
 
    QString lastActivated;
60
56
    KDevelop::DistributedVersionControlPlugin* d;
61
57
 
62
 
};
 
58
    Ui::BranchDialogBase* m_ui;
 
59
    BranchesListModel* m_model;
 
60
    bool m_valid;
 
61
    
 
62
};
 
63
 
 
64
class BranchesListModel : public QStandardItemModel
 
65
{
 
66
    Q_OBJECT
 
67
    public:
 
68
        BranchesListModel(KDevelop::DistributedVersionControlPlugin* dvcsplugin, const QString& repo, QObject* parent = 0);
 
69
        
 
70
        void createBranch(const QString& baseBranch, const QString& newBranch);
 
71
        void removeBranch(const QString& branch);
 
72
        
 
73
        KDevelop::DistributedVersionControlPlugin* dvcsPlugin() const { return dvcsplugin; }
 
74
        QString repository() const { return repo; }
 
75
        
 
76
    public slots:
 
77
        void resetCurrent();
 
78
        
 
79
    private:
 
80
        KDevelop::DistributedVersionControlPlugin* dvcsplugin;
 
81
        QString repo;
 
82
};
 
83
 
63
84
 
64
85
#endif