Pencil2D  ff90c0872e88be3bf81c548cd60f01983012ec49
Pencil2D is an animation software for both bitmap and vector graphics. It is free, multi-platform, and open source.
 All Classes Functions
errordialog.cpp
1 /*
2 
3 Pencil - Traditional Animation Software
4 Copyright (C) 2013-2017 Matt Chiawen Chang
5 
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; version 2 of the License.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 */
16 
17 #include "errordialog.h"
18 #include "ui_errordialog.h"
19 
20 ErrorDialog::ErrorDialog( QString title, QString description, QString details, QWidget *parent ) :
21  QDialog( parent ),
22  ui(new Ui::ErrorDialog)
23 {
24  ui->setupUi( this );
25  ui->horizontalLayout_2->setSpacing(0);
26 
27  this->setWindowTitle( title );
28  ui->title->setText( QString( "<h3>%1</h3>" ).arg( title ) );
29  ui->description->setText( description );
30  if ( details.isEmpty() )
31  {
32  ui->details->setVisible( false );
33  }
34  else
35  {
36  ui->details->setText( QString( "<pre>%1</pre>" ).arg( details ) );
37  }
38 }
39 
40 ErrorDialog::~ErrorDialog()
41 {
42  delete ui;
43 }