comparison confirmcommentdialog.h @ 105:1928f9b408e6

* Better-behaved comment dialog; avoid empty comments. Also ignore signals from closing ptys
author Chris Cannam
date Thu, 25 Nov 2010 17:21:32 +0000
parents af314dd436d5
children 1721c580c10e
comparison
equal deleted inserted replaced
104:af314dd436d5 105:1928f9b408e6
16 */ 16 */
17 17
18 #ifndef CONFIRMCOMMENTDIALOG_H 18 #ifndef CONFIRMCOMMENTDIALOG_H
19 #define CONFIRMCOMMENTDIALOG_H 19 #define CONFIRMCOMMENTDIALOG_H
20 20
21 #include <QDialog>
21 #include <QWidget> 22 #include <QWidget>
22 #include <QString> 23 #include <QString>
23 #include <QStringList> 24 #include <QStringList>
25 #include <QTextEdit>
26 #include <QPushButton>
24 27
25 class ConfirmCommentDialog 28 class ConfirmCommentDialog : public QDialog
26 { 29 {
30 Q_OBJECT
31
27 public: 32 public:
28 static bool confirmFilesAction(QWidget *parent, 33 static bool confirmFilesAction(QWidget *parent,
29 QString title, 34 QString title,
30 QString introText, 35 QString introText,
31 QString introTextWithCount, 36 QString introTextWithCount,
43 QString title, 48 QString title,
44 QString introText, 49 QString introText,
45 QString &comment, 50 QString &comment,
46 bool longComment); 51 bool longComment);
47 52
53 private slots:
54 void commentChanged();
55
56 private:
57 ConfirmCommentDialog(QWidget *parent,
58 QString title,
59 QString introText,
60 QString initialComment);
61
62 QString getComment() const;
63
64 QTextEdit *m_textEdit;
65 QPushButton *m_ok;
48 }; 66 };
49 67
50 #endif // CONFIRMCOMMENTDIALOG_H 68 #endif // CONFIRMCOMMENTDIALOG_H