]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormTabularCreate.C
remove defaults stuff, let Qt handle no toolbar
[lyx.git] / src / frontends / xforms / FormTabularCreate.C
index 5a168d2c57ff35c56c97af8fb46a4d39c108e258..384aefd1f61d63f41b297c37bf97b61d32b0fcb3 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * \file xforms/FormTabularCreate.C
+ * \file FormTabularCreate.C
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
@@ -16,6 +16,7 @@
 #include "ControlTabularCreate.h"
 #include "FormTabularCreate.h"
 #include "forms/form_tabular_create.h"
+#include "Tooltips.h"
 #include "support/lstrings.h"
 #include FORMS_H_LOCATION
 
 using std::make_pair;
 
 
-typedef FormCB<ControlTabularCreate, FormDB<FD_tabular_create> > base_class;
+typedef FormController<ControlTabularCreate, FormView<FD_tabular_create> > base_class;
 
-FormTabularCreate::FormTabularCreate()
-       : base_class(_("Insert Tabular"))
+FormTabularCreate::FormTabularCreate(Dialog & parent)
+       : base_class(parent, _("Insert Tabular"))
 {}
 
 
@@ -34,17 +35,16 @@ void FormTabularCreate::build()
 {
        dialog_.reset(build_tabular_create(this));
 
-       fl_set_slider_bounds(dialog_->slider_rows, 1, 50);
-       fl_set_slider_bounds(dialog_->slider_columns, 1, 50);
-       fl_set_slider_value(dialog_->slider_rows, 5);
-       fl_set_slider_value(dialog_->slider_columns, 5);
-       fl_set_slider_precision(dialog_->slider_rows, 0);
-       fl_set_slider_precision(dialog_->slider_columns, 0);
-
        // Manage the ok, apply and cancel/close buttons
-       bc().setOK(dialog_->button_ok);
-       bc().setApply(dialog_->button_apply);
-       bc().setCancel(dialog_->button_close);
+       bcview().setOK(dialog_->button_ok);
+       bcview().setApply(dialog_->button_apply);
+       bcview().setCancel(dialog_->button_close);
+
+       // set up the tooltips
+       string str = _("Number of columns in the tabular.");
+       tooltips().init(dialog_->slider_columns, str);
+       str = _("Number of rows in the tabular.");
+       tooltips().init(dialog_->slider_rows, str);
 }