Engauge Digitizer 2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
DlgErrorReportLocal Class Reference

Dialog for saving error report for later transmission to the developers. More...

#include <DlgErrorReportLocal.h>

Inheritance diagram for DlgErrorReportLocal:
Inheritance graph
Collaboration diagram for DlgErrorReportLocal:
Collaboration graph

Public Member Functions

 DlgErrorReportLocal (const QString &xmlWithImage, QWidget *parent=0)
 Single constructor. With the original data, the extra context improves debugging. With anonymization, user privacy is maintained.
 
 ~DlgErrorReportLocal ()
 
QString xmlToUpload () const
 Xml to be uploaded. Includes document if user has approved.
 
- Public Member Functions inherited from DlgErrorReportAbstractBase
 DlgErrorReportAbstractBase (QWidget *parent=0)
 Single constructor.
 
 ~DlgErrorReportAbstractBase ()
 

Additional Inherited Members

- Protected Member Functions inherited from DlgErrorReportAbstractBase
QString errorFile () const
 File name for output file containing error report.
 
void saveFile (const QString &xml) const
 Save xml into output file named by errorFile.
 

Detailed Description

Dialog for saving error report for later transmission to the developers.

Definition at line 16 of file DlgErrorReportLocal.h.

Constructor & Destructor Documentation

◆ DlgErrorReportLocal()

DlgErrorReportLocal::DlgErrorReportLocal ( const QString & xmlWithImage,
QWidget * parent = 0 )

Single constructor. With the original data, the extra context improves debugging. With anonymization, user privacy is maintained.

Definition at line 19 of file DlgErrorReportLocal.cpp.

20 :
22 m_xmlOriginal (xml),
23 m_xmlAnonymized (xml)
24{
26 layout->setSizeConstraint (QLayout::SetFixedSize);
27 setLayout (layout);
28
30 setModal(true);
31 setWindowTitle (tr ("Error Report"));
32 setWindowIcon(style.standardIcon (QStyle::SP_MessageBoxCritical));
33
34 QLabel *lblMessage = new QLabel (tr ("An unrecoverable error has occurred. Would you like to save an error report that can "
35 "be sent later to the Engauge developers?\n\n"
36 "The original document can be sent as part of the error report, which increases the "
37 "chances of finding and fixing the problem(s). However, if any information is private "
38 "then an anonymized version of the document will be sent."));
39 lblMessage->setWordWrap(true);
40 layout->addWidget (lblMessage);
41
42 m_chkOriginal = new QCheckBox (tr ("Include original document information, otherwise anonymize the information"));
43 m_chkOriginal->setChecked (true);
44 updateFile ();
45 layout->addWidget (m_chkOriginal);
46 connect (m_chkOriginal, SIGNAL (stateChanged (int)), this, SLOT (slotDocumentCheckboxChanged (int)));
47
49
51 panelButtons->setLayout (layoutButtons);
52 layout->addWidget (panelButtons);
53
54 m_btnSave = new QPushButton(tr ("Save"));
55 m_btnSave->setMaximumWidth (MAX_BTN_WIDTH);
56 layoutButtons->addWidget (m_btnSave);
57 connect (m_btnSave, SIGNAL (released ()), this, SLOT (slotSave()));
58
59 m_btnCancel = new QPushButton(tr ("Cancel"));
60 m_btnCancel->setMaximumWidth (MAX_BTN_WIDTH);
61 layoutButtons->addWidget (m_btnCancel);
62 connect (m_btnCancel, SIGNAL (released ()), this, SLOT (reject ()));
63}
const int MAX_BTN_WIDTH
const int INNER_RADIUS_MIN
DlgErrorReportAbstractBase(QWidget *parent=0)
Single constructor.

◆ ~DlgErrorReportLocal()

DlgErrorReportLocal::~DlgErrorReportLocal ( )

Definition at line 65 of file DlgErrorReportLocal.cpp.

66{
67 removeFile();
68}

Member Function Documentation

◆ xmlToUpload()

QString DlgErrorReportLocal::xmlToUpload ( ) const

Xml to be uploaded. Includes document if user has approved.

Definition at line 103 of file DlgErrorReportLocal.cpp.

104{
105 return m_xmlToUpload;
106}

The documentation for this class was generated from the following files: