logdlg.h 2.03 KB
Newer Older
John Firebaugh's avatar
John Firebaugh committed
1
/*
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
 *  Copyright (C) 1999-2001 Bernd Gehrmann
 *                          bernd@physik.hu-berlin.de
 *
 * This program may be distributed under the terms of the Q Public
 * License as defined by Trolltech AS of Norway and appearing in the
 * file LICENSE.QPL included in the packaging of this file.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */


#ifndef _LOGDLG_H_
#define _LOGDLG_H_

#include <qdialog.h>
#include <qlabel.h>
John Firebaugh's avatar
John Firebaugh committed
20
#include <qtextedit.h>
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
#include <qlistview.h>
#include <qcombobox.h>
#include <qtabbar.h>
#include "loglist.h"
#include "logtree.h"


class RevisionInfo
{
public:
    QString rev;
    QString author;
    QString date;
    QString comment;
    QString tagcomment;
};


class TagInfo
{
public:
    QString rev;
    QString tag;
    QString branchpoint;
};


class LogDialog : public QDialog
{
    Q_OBJECT

public:
    LogDialog( QWidget *parent=0, const char *name=0 );

    bool parseCvsLog(const QString &sbox, const QString &repo, const QString &fname);

    static void loadOptions(KConfig *config);
    static void saveOptions(KConfig *config);

protected slots:
    virtual void done(int res);

private slots:
    void diffClicked();
    void annotateClicked();
    void revisionSelected(QString rev, bool rmb);
    void tagSelected(QString rev, bool rmb);
    void tagASelected(int n);
    void tagBSelected(int n);

private:
    struct Options {
        QSize size;
        bool showlisttab;
    };
    static Options *options;

    QString sandbox;
    QString repository;
    QString filename;
Laurent Montel's avatar
Laurent Montel committed
81 82
    QPtrList<RevisionInfo> items;
    QPtrList<TagInfo> tags;
83 84 85 86 87 88 89 90
    QString selectionA;
    QString selectionB;
    LogTreeView *tree;
    LogListView *list;
    QTabBar *tabbar;
    QLabel *revbox[2];
    QLabel *authorbox[2];
    QLabel *datebox[2];
John Firebaugh's avatar
John Firebaugh committed
91 92
    QTextEdit *commentbox[2];
    QTextEdit *tagsbox[2];
93 94 95 96 97 98 99 100 101
    QComboBox *tagcombo[2];
};

#endif


// Local Variables:
// c-basic-offset: 4
// End: