summaryrefslogtreecommitdiffstats
path: root/vcs/subversion/subversion_widget.h
blob: 0108da812344007d17c23fe698e60f644dbd0f17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/* Copyright (C) 2003
	 Mickael Marchand <marchand@kde.org>

	 This program is free software; you can redistribute it and/or
	 modify it under the terms of the GNU General Public
	 License as published by the Free Software Foundation; either
	 version 2 of the License, or (at your option) any later version.

	 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.  See the GNU
	 General Public License for more details.

	 You should have received a copy of the GNU General Public License
	 along with this program; see the file COPYING.  If not, write to
	 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
	 Boston, MA 02110-1301, USA.
	 */

#ifndef __SUBVERSION_WIDGET_H__
#define __SUBVERSION_WIDGET_H__

#include <tqlistview.h>
#include "svn_blamewidget.h"
#include "svn_logviewwidget.h"
#include <tqvaluelist.h>

class subversionPart;
#include <ktabwidget.h>
#include <kio/defaultprogress.h>
#include <tqguardedptr.h>
class KTextEdit;
class SvnLogHolder;
class SvnBlameHolder;
class SvnLogViewWidget;
class TQToolButton;
class TQPushButton;

/** The main Subversion DockWidget. Contains logview-output, blame-output, status and etc */
// class subversionWidget : public SvnOutputWidgetBase
class subversionWidget : public KTabWidget
{
    Q_OBJECT
  TQ_OBJECT
public:
    subversionWidget(subversionPart *part, TQWidget *tqparent, const char* name);
    ~subversionWidget();

    // append what?. Append any text status outputs
    void append( TQString notifications );
    void showLogResult( TQValueList<SvnLogHolder> *holderList, TQString reqUrl );
    void showBlameResult( TQValueList<SvnBlameHolder> *blamelist );

protected slots:
    void closeCurrentTab();

private:
    KTabWidget* tab(){ return this; }
	subversionPart *m_part;
    
    TQGuardedPtr<KTextEdit> m_edit;
    TQPushButton *m_closeButton;

};
/**
 * reimplement compare(), to be able to sort any item by integer
 */
class SvnIntSortListItem : public TQListViewItem {
public:
	SvnIntSortListItem ( TQListView* tqparent=0 );
	~SvnIntSortListItem ();
	/** Returns < 0 if this item is less than i, 0 if they are equal and > 0 if this item is greater than i. 
	 */
	virtual int compare( TQListViewItem* i, int col, bool ascending ) const;
};

class SvnLogViewItem : public SvnIntSortListItem {
    public:
        SvnLogViewItem( TQListView* tqparent );
        ~SvnLogViewItem();

        TQString m_pathList;
        TQString m_message;
};

/////////////////////////////////////////////////////////////
/// Subversion Progress Display Widget
class SvnProgressDlg : public KIO::DefaultProgress {
public:
	SvnProgressDlg( bool showNow = true );
	~SvnProgressDlg();
	void setSourceUrl( const TQString & );
	void setDestUrl( const TQString & );
};

#endif