]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QErrorListDialog.C
enable Font cache only for MacOSX and inline width() for other platform.
[lyx.git] / src / frontends / qt4 / QErrorListDialog.C
1 /**
2  * \file QErrorListDialog.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Alfredo Braunstein
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "QErrorListDialog.h"
14 #include "QErrorList.h"
15
16 #include <QListWidget>
17 #include <QPushButton>
18 #include <QCloseEvent>
19
20 namespace lyx {
21 namespace frontend {
22
23 QErrorListDialog::QErrorListDialog(QErrorList * form)
24         : form_(form)
25 {
26         setupUi(this);
27         connect(closePB, SIGNAL(clicked()),
28                 form, SLOT(slotClose()));
29         connect(errorsLW, SIGNAL( itemActivated(QListWidgetItem *)),
30                 form, SLOT(slotClose()));
31         connect( errorsLW, SIGNAL( itemClicked(QListWidgetItem *) ), 
32                 this, SLOT( select_adaptor(QListWidgetItem *) ) );
33 }
34
35
36 QErrorListDialog::~QErrorListDialog()
37 {}
38
39
40 void QErrorListDialog::select_adaptor(QListWidgetItem * item)
41 {
42         form_->select(item);
43 }
44
45
46 void QErrorListDialog::closeEvent(QCloseEvent * e)
47 {
48         form_->slotWMHide();
49         e->accept();
50 }
51
52 } // namespace frontend
53 } // namespace lyx
54
55 #include "QErrorListDialog_moc.cpp"