]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QTocDialog.C
Lots and lots of little trivial bits.
[lyx.git] / src / frontends / qt2 / QTocDialog.C
1 /**
2  * \file QTocDialog.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author John Levon 
7  *
8  * Full author contact details are available in file CREDITS
9  */
10
11 #include <config.h>
12  
13 #ifdef __GNUG__
14 #pragma implementation
15 #endif
16
17 #include "QToc.h"
18 #include "QTocDialog.h"
19
20 #include <qlistview.h>
21 #include <qpushbutton.h>
22
23 QTocDialog::QTocDialog(QToc * form)
24         : QTocDialogBase(0, 0, false, 0),
25         form_(form)
26 {
27         connect(closePB, SIGNAL(clicked()),
28                 form, SLOT(slotClose()));
29 }
30
31
32 QTocDialog::~QTocDialog()
33 {
34 }
35
36
37 void QTocDialog::activate_adaptor(int)
38 {
39         form_->updateToc(form_->depth_);
40 }
41
42
43 void QTocDialog::depth_adaptor(int depth)
44 {
45         form_->set_depth(depth);
46 }
47
48
49 void QTocDialog::select_adaptor(QListViewItem * item)
50 {
51         form_->select(item->text(0).latin1());
52 }
53
54
55 void QTocDialog::update_adaptor()
56 {
57         form_->update();
58 }
59
60
61 void QTocDialog::closeEvent(QCloseEvent * e)
62 {
63         form_->slotWMHide();
64         e->accept();
65 }