2001-08-19 13:25:15 +00:00
|
|
|
/**
|
|
|
|
* \file QTabularCreate.C
|
|
|
|
* Copyright 2001 the LyX Team
|
|
|
|
* Read the file COPYING
|
|
|
|
*
|
|
|
|
* \author John Levon <moz@compsoc.man.ac.uk>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
2001-08-28 04:17:49 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "ControlTabularCreate.h"
|
2001-08-19 13:25:15 +00:00
|
|
|
#include "QTabularCreateDialog.h"
|
|
|
|
#include "QTabularCreate.h"
|
2001-08-28 04:17:49 +00:00
|
|
|
#include "Qt2BC.h"
|
2001-08-19 13:25:15 +00:00
|
|
|
#include "gettext.h"
|
2002-03-21 21:21:28 +00:00
|
|
|
#include "debug.h"
|
2001-08-19 13:25:15 +00:00
|
|
|
|
2001-08-28 04:17:49 +00:00
|
|
|
#include <qspinbox.h>
|
|
|
|
#include <qpushbutton.h>
|
2001-08-19 13:25:15 +00:00
|
|
|
|
2001-08-28 04:17:49 +00:00
|
|
|
typedef Qt2CB<ControlTabularCreate, Qt2DB<QTabularCreateDialog> > base_class;
|
2001-08-19 13:25:15 +00:00
|
|
|
|
2001-08-28 04:17:49 +00:00
|
|
|
QTabularCreate::QTabularCreate(ControlTabularCreate & c)
|
|
|
|
: base_class(c, _("Insert table"))
|
2001-08-19 13:25:15 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-08-28 04:17:49 +00:00
|
|
|
void QTabularCreate::build_dialog()
|
2001-08-19 13:25:15 +00:00
|
|
|
{
|
2001-08-28 04:17:49 +00:00
|
|
|
dialog_.reset(new QTabularCreateDialog(this));
|
2001-08-19 13:25:15 +00:00
|
|
|
|
2001-08-28 04:17:49 +00:00
|
|
|
bc().setOK(dialog_->okPB);
|
|
|
|
bc().setCancel(dialog_->closePB);
|
2001-08-19 13:25:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-08-28 04:17:49 +00:00
|
|
|
void QTabularCreate::apply()
|
2001-08-19 13:25:15 +00:00
|
|
|
{
|
2001-08-28 04:17:49 +00:00
|
|
|
controller().params().first = dialog_->rowsSB->value();
|
|
|
|
controller().params().second = dialog_->columnsSB->value();
|
2001-08-19 13:25:15 +00:00
|
|
|
}
|