summaryrefslogtreecommitdiffstats
path: root/src/kdesvnview.h
blob: f471ec0900af869225a8f2d87a5d0d46e3cbf624 (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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/***************************************************************************
 *   Copyright (C) 2005-2007 by Rajko Albrecht                             *
 *   ral@alwins-world.de                                                   *
 *                                                                         *
 *   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; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
 ***************************************************************************/


#ifndef _KDESVNVIEW_H_
#define _KDESVNVIEW_H_

#include "src/svnqt/repositorylistener.hpp"
#include <tqwidget.h>
#include <kparts/part.h>

class TQPainter;
class KURL;
class kdesvnfilelist;
class KdeSvnDirList;
class TQVBoxLayout;
class TQHBoxLayout;
class TQGridLayout;
class TQSpacerItem;
class TQSplitter;
class KActionCollection;
class KTextBrowser;
class KProgress;


/**
 * This is the main view class for kdesvn.  Most of the non-menu,
 * non-toolbar, and non-statusbar (e.g., non frame) GUI code should go
 * here.
 *
 * @short Main view
 * @author Rajko Albrecht <ral@alwins-world.de>
 * @version 0.1
 */
class kdesvnView : public TQWidget,public svn::repository::RepositoryListener
{
    Q_OBJECT
  TQ_OBJECT
public:
    /**
     * Default constructor
     */
    kdesvnView(KActionCollection*,TQWidget *parent,const char*name=0,bool full=false);

    /**
     * Destructor
     */
    virtual ~kdesvnView();

    /**
     * Random 'get' function
     */
    TQString currentURL();

    /**
     * Random 'set' function accessed by DCOP
     */
    virtual bool openURL(TQString url);

    /**
     * Random 'set' function
     */
    virtual bool openURL(const KURL& url);

    /* repositorylistener methods */
    virtual void sendWarning(const TQString&);
    virtual void sendError(const TQString&);
    virtual bool isCanceld();

signals:
    /**
     * Use this signal to change the content of the statusbar
     */
    void signalChangeStatusbar(const TQString&);

    /**
     * Use this signal to change the content of the caption
     */
    void signalChangeCaption(const TQString&);

    void sigShowPopup(const TQString&,TQWidget**);
    void sigSwitchUrl(const KURL&);
    void setWindowCaption(const TQString&);
    void sigUrlChanged(const TQString&);
    void sigMakeBaseDirs();

    /* repositorylistener methods */
    void tickProgress();
    void waitShow(bool);

public slots:
    virtual void closeMe();
    virtual void slotDispPopup(const TQString&,TQWidget**);
    virtual void refreshCurrentTree();
    virtual void slotSettingsChanged();
    virtual void slotCreateRepo();
    virtual void slotDumpRepo();
    virtual void slotHotcopy();
    virtual void slotLoaddump();

    /* repositorylistener methods */
    virtual void setCanceled(bool);
    virtual void fillCacheStatus(TQ_LONG,TQ_LONG);

protected slots:
    virtual void slotOnURL(const TQString& url);
    virtual void slotSetTitle(const TQString& title);
    virtual void slotAppendLog(const TQString& text);
    virtual void slotUrlChanged(const TQString&);

protected:
    kdesvnfilelist*m_flist;
    KActionCollection*m_Collection;

    TQSplitter *m_Splitter,*m_infoSplitter;
    TQString m_currentURL;
    KTextBrowser*m_LogWindow;
    TQVBoxLayout*m_topLayout;
    KProgress*m_CacheProgressBar;

protected:
    virtual void setupActions();
    bool m_ReposCancel;
};

#endif // _KDESVNVIEW_H_