comparison src/confirmcommentdialog.h @ 370:b9c153e00e84

Move source files to src/
author Chris Cannam
date Thu, 24 Mar 2011 10:27:51 +0000
parents confirmcommentdialog.h@fd9dc5a457d8
children 533519ebc0cb
comparison
equal deleted inserted replaced
369:19cce6d2c470 370:b9c153e00e84
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3 /*
4 EasyMercurial
5
6 Based on hgExplorer by Jari Korhonen
7 Copyright (c) 2010 Jari Korhonen
8 Copyright (c) 2011 Chris Cannam
9 Copyright (c) 2011 Queen Mary, University of London
10
11 This program is free software; you can redistribute it and/or
12 modify it under the terms of the GNU General Public License as
13 published by the Free Software Foundation; either version 2 of the
14 License, or (at your option) any later version. See the file
15 COPYING included with this distribution for more information.
16 */
17
18 #ifndef CONFIRMCOMMENTDIALOG_H
19 #define CONFIRMCOMMENTDIALOG_H
20
21 #include <QDialog>
22 #include <QWidget>
23 #include <QString>
24 #include <QStringList>
25 #include <QTextEdit>
26 #include <QPushButton>
27
28 class ConfirmCommentDialog : public QDialog
29 {
30 Q_OBJECT
31
32 public:
33 static bool confirm(QWidget *parent,
34 QString title,
35 QString head,
36 QString text,
37 QString okButtonText);
38
39 static bool confirmDangerous(QWidget *parent,
40 QString title,
41 QString head,
42 QString text,
43 QString okButtonText);
44
45 static bool confirmFilesAction(QWidget *parent,
46 QString title,
47 QString introText,
48 QString introTextWithCount,
49 QStringList files,
50 QString okButtonText);
51
52 static bool confirmDangerousFilesAction(QWidget *parent,
53 QString title,
54 QString introText,
55 QString introTextWithCount,
56 QStringList files,
57 QString okButtonText);
58
59 static bool confirmAndGetShortComment(QWidget *parent,
60 QString title,
61 QString introText,
62 QString introTextWithCount,
63 QStringList files,
64 QString &comment,
65 QString okButtonText);
66
67 static bool confirmAndGetLongComment(QWidget *parent,
68 QString title,
69 QString introText,
70 QString introTextWithCount,
71 QStringList files,
72 QString &comment,
73 QString okButtonText);
74
75 static bool confirmAndGetShortComment(QWidget *parent,
76 QString title,
77 QString introText,
78 QString &comment,
79 QString okButtonText);
80
81 static bool confirmAndGetLongComment(QWidget *parent,
82 QString title,
83 QString introText,
84 QString &comment,
85 QString okButtonText);
86
87 private slots:
88 void commentChanged();
89
90 private:
91 ConfirmCommentDialog(QWidget *parent,
92 QString title,
93 QString introText,
94 QString initialComment,
95 QString okButtonText);
96
97 static bool confirmAndComment(QWidget *parent,
98 QString title,
99 QString introText,
100 QString introTextWithCount,
101 QStringList files,
102 QString &comment,
103 bool longComment,
104 QString okButtonText);
105
106 static bool confirmAndComment(QWidget *parent,
107 QString title,
108 QString introText,
109 QString &comment,
110 bool longComment,
111 QString okButtonText);
112
113 static QString buildFilesText(QString intro, QStringList files);
114
115 QString getComment() const;
116
117 QTextEdit *m_textEdit;
118 QPushButton *m_ok;
119 };
120
121 #endif // CONFIRMCOMMENTDIALOG_H