summaryrefslogtreecommitdiffstats
path: root/vcs/cvsservice/checkoutdialog.h
blob: 422290d060857600d2a9f4dec89cd6ab6e9e6567 (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
/***************************************************************************
 *   Copyright (C) 2003 by Mario Scalas                                    *
 *   mario.scalas@libero.it                                                *
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef CHECKOUTDIALOG_H
#define CHECKOUTDIALOG_H

#include <kdialogbase.h>
#include "cvsservicedcopIface.h"

class CvsService_stub;
class CvsJob_stub;
class CheckoutDialogBase;
class TQListViewItem;
//class TQStringList;

/**
* This dialog widget will collect all useful informazion about the module the
* user want to to check-out from a remote repository.
*
* @author Mario Scalas
*/
class CheckoutDialog : public KDialogBase, virtual public CVSServiceDCOPIface
{
    Q_OBJECT
  TQ_OBJECT
public:
    CheckoutDialog( CvsService_stub *cvsService, TQWidget *tqparent = 0,
        const char *name = 0, WFlags f = 0 );
    virtual ~CheckoutDialog();

	virtual void slotOk();

    /**
    * @return a server path string (i.e. :pserver:marios@cvs.kde.org:/home/kde)
    */
    TQString serverPath() const;
    /**
    * @param serverPaths a list of server location to use when filling the widget
    */
	void fillServerPaths( const TQStringList &serverPaths );
    /**
    * @return the directory which the user has fetched the module in
    */
    TQString workDir() const;
    /**
    * @param aDir directory which fetched modules will be put in (ending with '/')
    */
    void setWorkDir( const TQString &aDir );
    /**
    * @return the module the user has chosen to check-out from repository
    */
    TQString module() const;
    /**
    * @return
    */
    bool pruneDirs() const;
    /**
    * @return
    */
    TQString tag() const;

private slots:
    void slotModuleSelected( TQListViewItem *item );
    void slotFetchModulesList();
    // DCOP Iface
    virtual void slotJobExited( bool normalExit, int exitStatus );
    virtual void slotReceivedOutput( TQString someOutput );
    virtual void slotReceivedErrors( TQString someErrors );

private:
	/**
	 * Retrives the known servers from $HOME/.cvspass file
	 * @return a list of server locations (:pserver:user@server.somewhere:/cvsroot)
	 */
	void fetchUserCvsRepositories();

    CvsService_stub *m_service;
    CvsJob_stub *m_job;

    CheckoutDialogBase *m_base;
};

#endif