#include "GuiMathMatrix.h"
-#include "ControlMath.h"
#include "EmptyTable.h"
#include "qt_helpers.h"
-#include "gettext.h"
+#include "support/gettext.h"
#include <sstream>
#include <QPushButton>
#include <QSpinBox>
-using std::ostringstream;
-using std::string;
+using namespace std;
namespace lyx {
namespace frontend {
-GuiMathMatrixDialog::GuiMathMatrixDialog(LyXView & lv)
- : GuiDialog(lv, "mathmatrix")
+GuiMathMatrix::GuiMathMatrix(GuiView & lv)
+ : GuiMath(lv, "mathmatrix", qt_("Math Matrix"))
{
setupUi(this);
- setViewTitle(_("Math Matrix"));
- setController(new ControlMath(*this));
table->setMinimumSize(100, 100);
rowsSB->setValue(5);
}
-ControlMath & GuiMathMatrixDialog::controller() const
-{
- return static_cast<ControlMath &>(GuiDialog::controller());
-}
-
-
-void GuiMathMatrixDialog::columnsChanged(int)
+void GuiMathMatrix::columnsChanged(int)
{
char h_align_str[80] = "c";
int const nx = int(columnsSB->value());
}
-void GuiMathMatrixDialog::rowsChanged(int)
+void GuiMathMatrix::rowsChanged(int)
{
}
-void GuiMathMatrixDialog::change_adaptor()
+void GuiMathMatrix::change_adaptor()
{
// FIXME: We need a filter for the halign input
}
-void GuiMathMatrixDialog::slotOK()
+void GuiMathMatrix::slotOK()
{
char v_align_c[] = "tcb";
char const c = v_align_c[valignCO->currentIndex()];
ostringstream os;
os << nx << ' ' << ny << ' ' << c << ' ' << sh;
- controller().dispatchMatrix(os.str().c_str());
+ dispatchMatrix(os.str().c_str());
// close the dialog
close();
}
-void GuiMathMatrixDialog::slotClose()
+void GuiMathMatrix::slotClose()
{
close();
}
+
+Dialog * createGuiMathMatrix(GuiView & lv) { return new GuiMathMatrix(lv); }
+
+
} // namespace frontend
} // namespace lyx