summaryrefslogtreecommitdiffstats
path: root/vcs/cvsservice/releaseinputdialog.h
blob: e00b0b0424332b3dc6b5efc1fb307ca44694d84d (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
/***************************************************************************
 *   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 RELEASEINPUTDIALOG_H
#define RELEASEINPUTDIALOG_H

#include "releaseinputdialogbase.h"

/**
* Every time an operation needs to prompt the user about a release name,
* it can use this class: just customize the message to display
*/
class ReleaseInputDialog : public ReleaseInputDialogBase
{
  Q_OBJECT

public:
    /**
    * C-tor
    * @param parent
    */
    ReleaseInputDialog( TQWidget* parent = 0 );
    /**
    * Destructor
    */
    virtual ~ReleaseInputDialog();

    /**
    * @return a TQString formatted as "-r <RELEASE-TAG> " or "-D <RELEASE-DATE> "
    *         so it can be embedded in the command line.
    */
    TQString release() const;

    /**
    * @return true if the user has checked "rever": enforce operation then even
    * if the files have been locally modified.
    */
    bool isRevert() const;

private:
    enum ReleaseType { byHead, byDate, byRevision };

    ReleaseType type() const;
};

#endif