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 #include "moreinformationdialog.h"
|
Chris@275
|
19
|
Chris@275
|
20 #include <QMessageBox>
|
Chris@275
|
21
|
Chris@275
|
22 void
|
Chris@275
|
23 MoreInformationDialog::critical(QWidget *parent, QString title,
|
Chris@275
|
24 QString text, QString more)
|
Chris@275
|
25 {
|
Chris@275
|
26 QMessageBox mb(QMessageBox::Critical,
|
Chris@275
|
27 title,
|
Chris@275
|
28 text,
|
Chris@275
|
29 QMessageBox::Ok,
|
Chris@275
|
30 parent,
|
Chris@275
|
31 Qt::Dialog);
|
Chris@275
|
32 mb.setDetailedText(more);
|
Chris@275
|
33 mb.exec();
|
Chris@275
|
34 }
|
Chris@275
|
35
|
Chris@275
|
36 void
|
Chris@275
|
37 MoreInformationDialog::information(QWidget *parent, QString title,
|
Chris@275
|
38 QString text, QString more)
|
Chris@275
|
39 {
|
Chris@275
|
40 QMessageBox mb(QMessageBox::Information,
|
Chris@275
|
41 title,
|
Chris@275
|
42 text,
|
Chris@275
|
43 QMessageBox::Ok,
|
Chris@275
|
44 parent,
|
Chris@275
|
45 Qt::Dialog);
|
Chris@275
|
46 mb.setDefaultButton(QMessageBox::Ok);
|
Chris@275
|
47 mb.setDetailedText(more);
|
Chris@275
|
48 mb.exec();
|
Chris@275
|
49 }
|
Chris@275
|
50
|
Chris@275
|
51 void
|
Chris@275
|
52 MoreInformationDialog::warning(QWidget *parent, QString title,
|
Chris@275
|
53 QString text, QString more)
|
Chris@275
|
54 {
|
Chris@275
|
55 QMessageBox mb(QMessageBox::Warning,
|
Chris@275
|
56 title,
|
Chris@275
|
57 text,
|
Chris@275
|
58 QMessageBox::Ok,
|
Chris@275
|
59 parent,
|
Chris@275
|
60 Qt::Dialog);
|
Chris@275
|
61 mb.setDetailedText(more);
|
Chris@275
|
62 mb.exec();
|
Chris@275
|
63 }
|
Chris@275
|
64
|