annotate src/moreinformationdialog.h @ 490:cd3dd285d0ff

OS/X build fixes
author Chris Cannam
date Thu, 18 Aug 2011 12:57:35 +0100
parents b9c153e00e84
children 533519ebc0cb
rev   line source
Chris@275 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@275 2
Chris@275 3 /*
Chris@275 4 EasyMercurial
Chris@275 5
Chris@275 6 Based on hgExplorer by Jari Korhonen
Chris@275 7 Copyright (c) 2010 Jari Korhonen
Chris@275 8 Copyright (c) 2011 Chris Cannam
Chris@275 9 Copyright (c) 2011 Queen Mary, University of London
Chris@275 10
Chris@275 11 This program is free software; you can redistribute it and/or
Chris@275 12 modify it under the terms of the GNU General Public License as
Chris@275 13 published by the Free Software Foundation; either version 2 of the
Chris@275 14 License, or (at your option) any later version. See the file
Chris@275 15 COPYING included with this distribution for more information.
Chris@275 16 */
Chris@275 17
Chris@275 18 #ifndef MORE_INFORMATION_DIALOG_H
Chris@275 19 #define MORE_INFORMATION_DIALOG_H
Chris@275 20
Chris@275 21 #include <QString>
Chris@290 22 #include <QDialog>
Chris@275 23
Chris@290 24 class QLabel;
Chris@290 25 class QTextEdit;
Chris@290 26 class QPushButton;
Chris@275 27
Chris@275 28 /**
Chris@275 29 * Provide methods like the QMessageBox static methods, to call up
Chris@290 30 * dialogs with "More information" buttons in them. QMessageBox does
Chris@290 31 * have an optional additional-details field, but it doesn't behave
Chris@290 32 * quite as we'd like with regard to layout
Chris@275 33 */
Chris@275 34
Chris@290 35 class MoreInformationDialog : public QDialog
Chris@275 36 {
Chris@290 37 Q_OBJECT
Chris@290 38
Chris@275 39 public:
Chris@290 40 MoreInformationDialog(QString title,
Chris@290 41 QString head,
Chris@290 42 QString text,
Chris@290 43 QString more,
Chris@290 44 QWidget *parent = 0);
Chris@290 45
Chris@290 46 ~MoreInformationDialog();
Chris@290 47
Chris@290 48 void setIcon(QIcon);
Chris@290 49
Chris@290 50 static void critical(QWidget *parent, QString title, QString head, QString text, QString more);
Chris@290 51 static void information(QWidget *parent, QString title, QString head, QString text, QString more);
Chris@290 52 static void warning(QWidget *parent, QString title, QString head, QString text, QString more);
Chris@290 53
Chris@290 54 private slots:
Chris@290 55 void moreClicked();
Chris@290 56
Chris@290 57 private:
Chris@290 58 QLabel *m_iconLabel;
Chris@290 59 QPushButton *m_moreButton;
Chris@290 60 QTextEdit *m_moreText;
Chris@275 61 };
Chris@275 62
Chris@275 63 #endif