Chris@275: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@275: Chris@275: /* Chris@275: EasyMercurial Chris@275: Chris@275: Based on hgExplorer by Jari Korhonen Chris@275: Copyright (c) 2010 Jari Korhonen Chris@275: Copyright (c) 2011 Chris Cannam Chris@275: Copyright (c) 2011 Queen Mary, University of London Chris@275: Chris@275: This program is free software; you can redistribute it and/or Chris@275: modify it under the terms of the GNU General Public License as Chris@275: published by the Free Software Foundation; either version 2 of the Chris@275: License, or (at your option) any later version. See the file Chris@275: COPYING included with this distribution for more information. Chris@275: */ Chris@275: Chris@275: #ifndef MORE_INFORMATION_DIALOG_H Chris@275: #define MORE_INFORMATION_DIALOG_H Chris@275: Chris@275: #include Chris@290: #include Chris@275: Chris@290: class QLabel; Chris@290: class QTextEdit; Chris@290: class QPushButton; Chris@275: Chris@275: /** Chris@275: * Provide methods like the QMessageBox static methods, to call up Chris@290: * dialogs with "More information" buttons in them. QMessageBox does Chris@290: * have an optional additional-details field, but it doesn't behave Chris@290: * quite as we'd like with regard to layout Chris@275: */ Chris@275: Chris@290: class MoreInformationDialog : public QDialog Chris@275: { Chris@290: Q_OBJECT Chris@290: Chris@275: public: Chris@290: MoreInformationDialog(QString title, Chris@290: QString head, Chris@290: QString text, Chris@290: QString more, Chris@290: QWidget *parent = 0); Chris@290: Chris@290: ~MoreInformationDialog(); Chris@290: Chris@290: void setIcon(QIcon); Chris@290: Chris@290: static void critical(QWidget *parent, QString title, QString head, QString text, QString more); Chris@290: static void information(QWidget *parent, QString title, QString head, QString text, QString more); Chris@290: static void warning(QWidget *parent, QString title, QString head, QString text, QString more); Chris@290: Chris@290: private slots: Chris@290: void moreClicked(); Chris@290: Chris@290: private: Chris@290: QLabel *m_iconLabel; Chris@290: QPushButton *m_moreButton; Chris@290: QTextEdit *m_moreText; Chris@275: }; Chris@275: Chris@275: #endif