Chris@102: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@102: Chris@102: /* Chris@102: EasyMercurial Chris@102: Chris@102: Based on hgExplorer by Jari Korhonen Chris@102: Copyright (c) 2010 Jari Korhonen Chris@244: Copyright (c) 2011 Chris Cannam Chris@244: Copyright (c) 2011 Queen Mary, University of London Chris@102: Chris@102: This program is free software; you can redistribute it and/or Chris@102: modify it under the terms of the GNU General Public License as Chris@102: published by the Free Software Foundation; either version 2 of the Chris@102: License, or (at your option) any later version. See the file Chris@102: COPYING included with this distribution for more information. Chris@102: */ Chris@102: Chris@102: #ifndef CONFIRMCOMMENTDIALOG_H Chris@102: #define CONFIRMCOMMENTDIALOG_H Chris@102: Chris@105: #include Chris@102: #include Chris@102: #include Chris@102: #include Chris@105: #include Chris@105: #include Chris@102: Chris@105: class ConfirmCommentDialog : public QDialog Chris@102: { Chris@105: Q_OBJECT Chris@105: Chris@102: public: Chris@193: static bool confirm(QWidget *parent, Chris@193: QString title, Chris@298: QString head, Chris@193: QString text, Chris@193: QString okButtonText); Chris@193: Chris@193: static bool confirmDangerous(QWidget *parent, Chris@193: QString title, Chris@298: QString head, Chris@193: QString text, Chris@193: QString okButtonText); Chris@193: Chris@102: static bool confirmFilesAction(QWidget *parent, Chris@102: QString title, Chris@102: QString introText, Chris@102: QString introTextWithCount, Chris@193: QStringList files, Chris@193: QString okButtonText); Chris@102: Chris@109: static bool confirmDangerousFilesAction(QWidget *parent, Chris@109: QString title, Chris@109: QString introText, Chris@109: QString introTextWithCount, Chris@193: QStringList files, Chris@193: QString okButtonText); Chris@109: Chris@109: static bool confirmAndGetShortComment(QWidget *parent, Chris@109: QString title, Chris@109: QString introText, Chris@109: QString introTextWithCount, Chris@109: QStringList files, Chris@193: QString &comment, Chris@193: QString okButtonText); Chris@109: Chris@109: static bool confirmAndGetLongComment(QWidget *parent, Chris@109: QString title, Chris@109: QString introText, Chris@109: QString introTextWithCount, Chris@109: QStringList files, Chris@193: QString &comment, Chris@193: QString okButtonText); Chris@109: Chris@109: static bool confirmAndGetShortComment(QWidget *parent, Chris@109: QString title, Chris@109: QString introText, Chris@193: QString &comment, Chris@193: QString okButtonText); Chris@109: Chris@109: static bool confirmAndGetLongComment(QWidget *parent, Chris@109: QString title, Chris@109: QString introText, Chris@193: QString &comment, Chris@193: QString okButtonText); Chris@109: Chris@109: private slots: Chris@109: void commentChanged(); Chris@109: Chris@109: private: Chris@109: ConfirmCommentDialog(QWidget *parent, Chris@109: QString title, Chris@109: QString introText, Chris@193: QString initialComment, Chris@193: QString okButtonText); Chris@109: Chris@102: static bool confirmAndComment(QWidget *parent, Chris@102: QString title, Chris@102: QString introText, Chris@102: QString introTextWithCount, Chris@102: QStringList files, Chris@104: QString &comment, Chris@193: bool longComment, Chris@193: QString okButtonText); Chris@102: Chris@102: static bool confirmAndComment(QWidget *parent, Chris@102: QString title, Chris@102: QString introText, Chris@104: QString &comment, Chris@193: bool longComment, Chris@193: QString okButtonText); Chris@102: Chris@109: static QString buildFilesText(QString intro, QStringList files); Chris@105: Chris@105: QString getComment() const; Chris@105: Chris@105: QTextEdit *m_textEdit; Chris@105: QPushButton *m_ok; Chris@102: }; Chris@102: Chris@102: #endif // CONFIRMCOMMENTDIALOG_H