diff --git a/src/frontends/qt2/QMath.C b/src/frontends/qt2/QMath.C
index 971551825c..6ef5ebbed7 100644
--- a/src/frontends/qt2/QMath.C
+++ b/src/frontends/qt2/QMath.C
@@ -68,7 +68,7 @@ void QMath::superscript()
}
-void QMath::insert_symbol(string const & name)
+void QMath::insert(string const & name)
{
current_view->owner()->dispatch(FuncRequest(LFUN_INSERT_MATH, '\\' + name));
}
@@ -82,6 +82,12 @@ void QMath::insertCubeRoot()
}
+void QMath::insertMatrix()
+{
+ current_view->owner()->dispatch(FuncRequest(LFUN_INSERT_MATRIX, "2 2"));
+}
+
+
void QMath::toggleDisplay()
{
current_view->owner()->dispatch(FuncRequest(LFUN_MATH_DISPLAY));
diff --git a/src/frontends/qt2/QMath.h b/src/frontends/qt2/QMath.h
index e32f67e257..460619088b 100644
--- a/src/frontends/qt2/QMath.h
+++ b/src/frontends/qt2/QMath.h
@@ -32,11 +32,14 @@ public:
virtual void build_dialog();
/// insert a math symbol into the doc
- void insert_symbol(string const & name);
+ void insert(string const & name);
/// insert a cube root
void insertCubeRoot();
+ /// insert a matrix
+ void insertMatrix();
+
/// add a subscript
void subscript();
diff --git a/src/frontends/qt2/QMathDialog.C b/src/frontends/qt2/QMathDialog.C
index 2e5185d9a3..158fdef58b 100644
--- a/src/frontends/qt2/QMathDialog.C
+++ b/src/frontends/qt2/QMathDialog.C
@@ -178,13 +178,13 @@ void QMathDialog::addPanel(int num)
void QMathDialog::symbol_clicked(string str)
{
- form_->insert_symbol(str);
+ form_->insert(str);
}
void QMathDialog::fracClicked()
{
- form_->insert_symbol("frac");
+ form_->insert("frac");
}
@@ -208,12 +208,13 @@ void QMathDialog::expandClicked()
void QMathDialog::functionSelected(const QString & str)
{
- form_->insert_symbol(str.latin1());
+ form_->insert(str.latin1());
}
void QMathDialog::matrixClicked()
{
+ form_->insertMatrix();
}
@@ -246,7 +247,7 @@ void QMathDialog::insertSpace(int id)
case 5: str = "qquad"; break;
case 6: str = "!"; break;
}
- form_->insert_symbol(str);
+ form_->insert(str);
}
@@ -254,13 +255,13 @@ void QMathDialog::insertRoot(int id)
{
switch (id) {
case 1:
- form_->insert_symbol("sqrt");
+ form_->insert("sqrt");
break;
case 2:
form_->insertCubeRoot();
break;
case 3:
- form_->insert_symbol("root");
+ form_->insert("root");
break;
}
}
@@ -275,7 +276,7 @@ void QMathDialog::insertStyle(int id)
case 3: str = "scriptstyle"; break;
case 4: str = "scriptscriptstyle"; break;
}
- form_->insert_symbol(str);
+ form_->insert(str);
}
@@ -293,5 +294,5 @@ void QMathDialog::insertFont(int id)
case 8: str = "mathcal"; break;
case 9: str = "textrm"; break;
}
- form_->insert_symbol(str);
+ form_->insert(str);
}
diff --git a/src/frontends/qt2/ui/QMathDialog.ui b/src/frontends/qt2/ui/QMathDialog.ui
index 4033d38fe3..ec66f0a051 100644
--- a/src/frontends/qt2/ui/QMathDialog.ui
+++ b/src/frontends/qt2/ui/QMathDialog.ui
@@ -13,8 +13,8 @@
0
0
- 319
- 357
+ 304
+ 356
@@ -157,6 +157,189 @@
+
+ QLayoutWidget
+
+ name
+ Layout11
+
+
+
+ margin
+ 0
+
+
+ spacing
+ 6
+
+
+ QLayoutWidget
+
+ name
+ Layout10
+
+
+
+ margin
+ 0
+
+
+ spacing
+ 6
+
+
+ QPushButton
+
+ name
+ fracPB
+
+
+ sizePolicy
+
+ 1
+ 1
+
+
+
+ text
+
+
+
+ pixmap
+ image4
+
+
+ toolTip
+ Insert fraction (\frac)
+
+
+
+ QPushButton
+
+ name
+ equationPB
+
+
+ sizePolicy
+
+ 1
+ 1
+
+
+
+ text
+
+
+
+ pixmap
+ image5
+
+
+ toolTip
+ Toggle between display mode
+
+
+
+ QPushButton
+
+ name
+ matrixPB
+
+
+ text
+
+
+
+ pixmap
+ image6
+
+
+ toolTip
+ Insert matrix
+
+
+
+ QPushButton
+
+ name
+ subscriptPB
+
+
+ text
+
+
+
+ pixmap
+ image7
+
+
+ toolTip
+ Subscript
+
+
+
+ QPushButton
+
+ name
+ superscriptPB
+
+
+ text
+
+
+
+ pixmap
+ image8
+
+
+ toolTip
+ Superscript
+
+
+
+ QPushButton
+
+ name
+ delimitersPB
+
+
+ text
+
+
+
+ pixmap
+ image9
+
+
+ toolTip
+ Show delimiter and bracket dialog
+
+
+
+
+
+
+ name
+ Spacer5
+
+
+ orientation
+ Horizontal
+
+
+ sizeType
+ Expanding
+
+
+ sizeHint
+
+ 20
+ 20
+
+
+
+
+
QLayoutWidget
@@ -229,176 +412,10 @@
-
- QLayoutWidget
-
- name
- Layout18
-
-
-
- margin
- 0
-
-
- spacing
- 6
-
-
- QPushButton
-
- name
- delimitersPB
-
-
- text
-
-
-
- pixmap
- image4
-
-
- toolTip
- Show delimiter and bracket dialog
-
-
-
- QPushButton
-
- name
- matrixPB
-
-
- text
-
-
-
- pixmap
- image5
-
-
- toolTip
- Show math matrix dialog
-
-
-
- QPushButton
-
- name
- subscriptPB
-
-
- text
-
-
-
- pixmap
- image6
-
-
- toolTip
- Subscript
-
-
-
- QPushButton
-
- name
- superscriptPB
-
-
- text
-
-
-
- pixmap
- image7
-
-
- toolTip
- Superscript
-
-
-
- QPushButton
-
- name
- fracPB
-
-
- sizePolicy
-
- 1
- 1
-
-
-
- text
-
-
-
- pixmap
- image8
-
-
- toolTip
- Insert fraction (\frac)
-
-
-
- QPushButton
-
- name
- equationPB
-
-
- sizePolicy
-
- 1
- 1
-
-
-
- text
-
-
-
- pixmap
- image9
-
-
- toolTip
- Toggle between display mode
-
-
-
-
- name
- Spacer4
-
-
- orientation
- Vertical
-
-
- sizeType
- Expanding
-
-
- sizeHint
-
- 20
- 20
-
-
-
-
-
name
- Spacer5
+ Spacer4
orientation
@@ -755,28 +772,28 @@
image4
- 789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523232500022630543251d2e253d856405bffcbc54105b19c856360003103711c64d4b03abc402c8135756564608813948e289608026ae8710d7c31087e0a12b8ec55fb8c2017bb851215e6aadb900c1776f11
-
-
- image5
- 789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232325000210543251d2e253d856405bffcbc54105b19c856360082b434b0141640a6b832102011087110421084c57198336a2fa9e2b5d65c00168a5f43
-
-
- image6
- 789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523232500022630543251d2e253d856405bffcbc54105b19c856360003103711c64d4b03abc402a82cae0c0658c4f560c48088278200367120499c38c45f18e25040b238ba7b3000c9e2b5d65c00f2a86971
-
-
- image7
- 789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523232500022630543251d2e253d856405bffcbc54105b19c856360003103711c64d4b03abc40250c59541009b381413144f04032ce27a6082647174f740c531dc4f737188bf30c431c08089d75a7301006ff86b61
-
-
- image8
789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523232500022630543251d2e253d856405bffcbc54103b11c856360003105719c64d4b03abc40288105706032ce2708246e238ecc5eace4424408cf850f72f8678ad351700b4f269b9
- image9
+ image5
789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523232500022630543251d2e253d856405bffcbc54105b19c856360003103711c64d4b03abc402c814574601d4578f4f3c110cb088c30922c57198438a7b06321c50c56badb90087fe6771
+
+ image6
+ 789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232325000210543251d2e253d856405bffcbc54105b19c856360082b434b0141640a6b832102011087110421084c57198336a2fa9e2b5d65c00168a5f43
+
+
+ image7
+ 789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523232500022630543251d2e253d856405bffcbc54105b19c856360003103711c64d4b03abc402a82cae0c0658c4f560c48088278200367120499c38c45f18e25040b238ba7b3000c9e2b5d65c00f2a86971
+
+
+ image8
+ 789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523232500022630543251d2e253d856405bffcbc54105b19c856360003103711c64d4b03abc40250c59541009b381413144f04032ce27a6082647174f740c531dc4f737188bf30c431c08089d75a7301006ff86b61
+
+
+ image9
+ 789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523232500022630543251d2e253d856405bffcbc54105b19c856360003103711c64d4b03abc402c8135756564608813948e289608026ae8710d7c31087e0a12b8ec55fb8c2017bb851215e6aadb900c1776f11
+
image10
789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758