]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QTabularCreateDialog.C
rename LFUN enum values according to their command (as used in th minibuffer/bind...
[lyx.git] / src / frontends / qt4 / QTabularCreateDialog.C
1 /**
2  * \file QTabularCreateDialog.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  * \author Edwin Leuven
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #include <config.h>
13
14 #include "QTabularCreateDialog.h"
15 #include "QTabularCreate.h"
16
17 #include <qpushbutton.h>
18 #include <qspinbox.h>
19 #include "emptytable.h"
20
21 namespace lyx {
22 namespace frontend {
23
24 QTabularCreateDialog::QTabularCreateDialog(QTabularCreate * form)
25         : form_(form)
26 {
27         setupUi(this);
28
29         table->setMinimumSize(100,100);
30         rowsSB->setValue(5);
31         columnsSB->setValue(5);
32
33         connect(okPB, SIGNAL(clicked()),
34                 form_, SLOT(slotOK()));
35         connect(closePB, SIGNAL(clicked()),
36                 form_, SLOT(slotClose()));
37
38     connect( table, SIGNAL( rowsChanged(int) ), rowsSB, SLOT( setValue(int) ) );
39     connect( table, SIGNAL( colsChanged(int) ), columnsSB, SLOT( setValue(int) ) );
40     connect( rowsSB, SIGNAL( valueChanged(int) ), table, SLOT( setNumberRows(int) ) );
41     connect( columnsSB, SIGNAL( valueChanged(int) ), table, SLOT( setNumberColumns(int) ) );
42     connect( rowsSB, SIGNAL( valueChanged(int) ), this, SLOT( rowsChanged(int) ) );
43     connect( columnsSB, SIGNAL( valueChanged(int) ), this, SLOT( columnsChanged(int) ) );
44 }
45
46
47 void QTabularCreateDialog::columnsChanged(int)
48 {
49         form_->changed();
50 }
51
52
53 void QTabularCreateDialog::rowsChanged(int)
54 {
55         form_->changed();
56 }
57
58 } // namespace frontend
59 } // namespace lyx