Crossfire Server, Trunk  R20513
CREReportDisplay.cpp
Go to the documentation of this file.
1 #include "CREReportDisplay.h"
2 #include <QtGui>
3 
4 CREReportDisplay::CREReportDisplay(const QString& report, const QString& title)
5 {
6  myReport = report;
7 
8  setWindowTitle(title);
9 
10  QVBoxLayout* layout = new QVBoxLayout(this);
11 
12  QTextEdit* view = new QTextEdit(this);
13  view->setReadOnly(true);
14  view->setText(report);
15  layout->addWidget(view);
16 
17  QHBoxLayout* buttons = new QHBoxLayout();
18  layout->addLayout(buttons);
19 
20  QPushButton* copy = new QPushButton(tr("Copy (HTML)"), this);
21  buttons->addWidget(copy);
22  connect(copy, SIGNAL(clicked(bool)), this, SLOT(copyClicked(bool)));
23 
24  QPushButton* close = new QPushButton(tr("Close"), this);
25  buttons->addWidget(close);
26  connect(close, SIGNAL(clicked(bool)), this, SLOT(closeClicked(bool)));
27 
28  setSizeGripEnabled(true);
29 }
30 
32 {
33  QApplication::clipboard()->setText(myReport);
34 }
35 
37 {
38  accept();
39 }
Information on one title.
Definition: readable.c:106
CREReportDisplay(const QString &report, const QString &title)
Definition: main.c:88