]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/tabularcreatedlg.C
implement getLabelList
[lyx.git] / src / frontends / qt2 / tabularcreatedlg.C
1 /****************************************************************************
2 ** Form implementation generated from reading ui file 'tabularcreatedlg.ui'
3 **
4 ** Created: Tue Feb 6 01:41:28 2001
5 **      by:  The User Interface Compiler (uic)
6 **
7 ** WARNING! All changes made in this file will be lost!
8 ****************************************************************************/
9 #include "tabularcreatedlg.h"
10
11 #include <qlabel.h>
12 #include <qpushbutton.h>
13 #include <qspinbox.h>
14 #include "emptytable.h"
15 #include <qlayout.h>
16 #include <qvariant.h>
17 #include <qtooltip.h>
18 #include <qwhatsthis.h>
19
20 /* 
21  *  Constructs a InsertTabularDlg which is a child of 'parent', with the 
22  *  name 'name' and widget flags set to 'f' 
23  *
24  *  The dialog will by default be modeless, unless you set 'modal' to
25  *  TRUE to construct a modal dialog.
26  */
27 InsertTabularDlg::InsertTabularDlg( QWidget* parent,  const char* name, bool modal, WFlags fl )
28     : QDialog( parent, name, modal, fl )
29 {
30     if ( !name )
31         setName( "InsertTabularDlg" );
32     resize( 245, 235 ); 
33     setSizeGripEnabled( TRUE );
34     setCaption( tr( "Form1" ) );
35     InsertTabularDlgLayout = new QVBoxLayout( this ); 
36     InsertTabularDlgLayout->setSpacing( 6 );
37     InsertTabularDlgLayout->setMargin( 11 );
38
39     Layout1 = new QHBoxLayout; 
40     Layout1->setSpacing( 6 );
41     Layout1->setMargin( 0 );
42
43     rowsL = new QLabel( this, "rowsL" );
44     rowsL->setText( tr( "Rows:" ) );
45     Layout1->addWidget( rowsL );
46
47     rows = new QSpinBox( this, "rows" );
48     rows->setMinValue( 1 );
49     rows->setMaxValue( 511 );
50     Layout1->addWidget( rows );
51
52     columnsL = new QLabel( this, "columnsL" );
53     columnsL->setText( tr( "Columns:" ) );
54     Layout1->addWidget( columnsL );
55
56     columns = new QSpinBox( this, "columns" );
57     columns->setMinValue( 1 );
58     columns->setMaxValue( 511 );
59     Layout1->addWidget( columns );
60     QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
61     Layout1->addItem( spacer );
62     InsertTabularDlgLayout->addLayout( Layout1 );
63
64     table = new EmptyTable( this, "table" );
65     InsertTabularDlgLayout->addWidget( table );
66
67     Layout2 = new QHBoxLayout; 
68     Layout2->setSpacing( 6 );
69     Layout2->setMargin( 0 );
70     QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
71     Layout2->addItem( spacer_2 );
72
73     insertPB = new QPushButton( this, "insertPB" );
74     insertPB->setText( tr( "&Insert" ) );
75     Layout2->addWidget( insertPB );
76
77     cancelPB = new QPushButton( this, "cancelPB" );
78     cancelPB->setText( tr( "&Cancel" ) );
79     Layout2->addWidget( cancelPB );
80     InsertTabularDlgLayout->addLayout( Layout2 );
81
82     // signals and slots connections
83     connect( table, SIGNAL( rowsChanged(int) ), rows, SLOT( setValue(int) ) );
84     connect( table, SIGNAL( colsChanged(int) ), columns, SLOT( setValue(int) ) );
85     connect( rows, SIGNAL( valueChanged(int) ), table, SLOT( setNumberRows(int) ) );
86     connect( columns, SIGNAL( valueChanged(int) ), table, SLOT( setNumberColumns(int) ) );
87     connect( insertPB, SIGNAL( clicked() ), this, SLOT( insert_tabular() ) );
88     connect( cancelPB, SIGNAL( clicked() ), this, SLOT( cancel_adaptor() ) );
89 }
90
91 /*  
92  *  Destroys the object and frees any allocated resources
93  */
94 InsertTabularDlg::~InsertTabularDlg()
95 {
96     // no need to delete child widgets, Qt does it all for us
97 }
98
99 void InsertTabularDlg::insert_tabular()
100 {
101     qWarning( "InsertTabularDlg::insert_tabular(): Not implemented yet!" );
102 }
103
104 void InsertTabularDlg::cancel_adaptor()
105 {
106     qWarning( "InsertTabularDlg::cancel_adaptor(): Not implemented yet!" );
107 }
108