annotate src/moreinformationdialog.h @ 721:744933aba33a

Ensure black pen (otherwise this becomes invisible with macOS in dark mode)
author Chris Cannam
date Thu, 13 Dec 2018 11:07:12 +0000
parents 4283398d248f
children
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@644 8 Copyright (c) 2013 Chris Cannam
Chris@644 9 Copyright (c) 2013 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@674 27 class QGridLayout;
Chris@275 28
Chris@275 29 /**
Chris@275 30 * Provide methods like the QMessageBox static methods, to call up
Chris@290 31 * dialogs with "More information" buttons in them. QMessageBox does
Chris@290 32 * have an optional additional-details field, but it doesn't behave
Chris@290 33 * quite as we'd like with regard to layout
Chris@275 34 */
Chris@275 35
Chris@290 36 class MoreInformationDialog : public QDialog
Chris@275 37 {
Chris@290 38 Q_OBJECT
Chris@290 39
Chris@275 40 public:
Chris@290 41 MoreInformationDialog(QString title,
Chris@290 42 QString head,
Chris@290 43 QString text,
Chris@290 44 QString more,
Chris@290 45 QWidget *parent = 0);
Chris@290 46
Chris@290 47 ~MoreInformationDialog();
Chris@290 48
Chris@290 49 void setIcon(QIcon);
Chris@290 50
Chris@290 51 static void critical(QWidget *parent, QString title, QString head, QString text, QString more);
Chris@290 52 static void information(QWidget *parent, QString title, QString head, QString text, QString more);
Chris@290 53 static void warning(QWidget *parent, QString title, QString head, QString text, QString more);
Chris@290 54
Chris@290 55 private slots:
Chris@290 56 void moreClicked();
Chris@290 57
Chris@290 58 private:
Chris@674 59 QGridLayout *m_layout;
Chris@290 60 QLabel *m_iconLabel;
Chris@290 61 QPushButton *m_moreButton;
Chris@290 62 QTextEdit *m_moreText;
Chris@275 63 };
Chris@275 64
Chris@275 65 #endif