comparison moreinformationdialog.cpp @ 275:1244dc3107cb more_information_dialog

* Some work on separating out the "more information" component from dialog messages. Will need work on layouts
author Chris Cannam
date Mon, 31 Jan 2011 17:23:10 +0000
parents
children c0c254f67346
comparison
equal deleted inserted replaced
273:cc95394e2392 275:1244dc3107cb
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3 /*
4 EasyMercurial
5
6 Based on hgExplorer by Jari Korhonen
7 Copyright (c) 2010 Jari Korhonen
8 Copyright (c) 2011 Chris Cannam
9 Copyright (c) 2011 Queen Mary, University of London
10
11 This program is free software; you can redistribute it and/or
12 modify it under the terms of the GNU General Public License as
13 published by the Free Software Foundation; either version 2 of the
14 License, or (at your option) any later version. See the file
15 COPYING included with this distribution for more information.
16 */
17
18 #include "moreinformationdialog.h"
19
20 #include <QMessageBox>
21
22 void
23 MoreInformationDialog::critical(QWidget *parent, QString title,
24 QString text, QString more)
25 {
26 QMessageBox mb(QMessageBox::Critical,
27 title,
28 text,
29 QMessageBox::Ok,
30 parent,
31 Qt::Dialog);
32 mb.setDetailedText(more);
33 mb.exec();
34 }
35
36 void
37 MoreInformationDialog::information(QWidget *parent, QString title,
38 QString text, QString more)
39 {
40 QMessageBox mb(QMessageBox::Information,
41 title,
42 text,
43 QMessageBox::Ok,
44 parent,
45 Qt::Dialog);
46 mb.setDefaultButton(QMessageBox::Ok);
47 mb.setDetailedText(more);
48 mb.exec();
49 }
50
51 void
52 MoreInformationDialog::warning(QWidget *parent, QString title,
53 QString text, QString more)
54 {
55 QMessageBox mb(QMessageBox::Warning,
56 title,
57 text,
58 QMessageBox::Ok,
59 parent,
60 Qt::Dialog);
61 mb.setDetailedText(more);
62 mb.exec();
63 }
64