Kaydet (Commit) 80562aae authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

sc ANOVA: add "two factor" and rework "single factor" ANOVA

Change-Id: I8cfaa06019e641e0590065d8f6a3266ff82acb88
üst 8bfbfc06
......@@ -71,6 +71,7 @@
#define STR_ANOVA_LABEL_P_VALUE 71
#define STR_ANOVA_LABEL_F_CRITICAL 72
#define STR_ANOVA_LABEL_TOTAL 73
#define STR_ANOVA_TWO_FACTOR_LABEL 74
#define STR_CORRELATION_LABEL 80
#define STR_COVARIANCE_LABEL 81
......
......@@ -39,6 +39,11 @@ Resource RID_STATISTICS_DLGS
Text [ en-US ] = "ANOVA - Single Factor";
};
String STR_ANOVA_TWO_FACTOR_LABEL
{
Text [ en-US ] = "ANOVA - Two Factor";
};
String STR_ANOVA_LABEL_GROUPS
{
Text [ en-US ] = "Groups";
......
......@@ -21,10 +21,33 @@
#include "StatisticsInputOutputDialog.hxx"
class FormulaTemplate;
class AddressWalkerWriter;
class ScAnalysisOfVarianceDialog : public ScStatisticsInputOutputDialog
{
private:
NumericField* mpAlpha;
enum AnovaFactor
{
SINGLE_FACTOR,
TWO_FACTOR
};
NumericField* mpAlphaField;
RadioButton* mpSingleFactorRadio;
RadioButton* mpTwoFactorRadio;
NumericField* mpRowsPerSampleField;
DECL_LINK(FactorChanged, void*);
AnovaFactor meFactor;
void RowColumn(ScRangeList& rRangeList, AddressWalkerWriter& aOutput,
FormulaTemplate& aTemplate, OUString& sFormula,
GroupedBy aGroupedBy, ScRange* pResultRange);
void AnovaSingleFactor(AddressWalkerWriter& output, FormulaTemplate& aTemplate);
void AnovaTwoFactor(AddressWalkerWriter& output, FormulaTemplate& aTemplate);
public:
ScAnalysisOfVarianceDialog(
......
......@@ -52,6 +52,9 @@ protected:
formula::RefEdit* mpOutputRangeEdit;
formula::RefButton* mpOutputRangeButton;
RadioButton* mpGroupByColumnsRadio;
RadioButton* mpGroupByRowsRadio;
// Data
ScViewData* mViewData;
ScDocument* mDocument;
......@@ -69,8 +72,6 @@ private:
PushButton* mpButtonApply;
OKButton* mpButtonOk;
CloseButton* mpButtonClose;
RadioButton* mpGroupByColumnsRadio;
RadioButton* mpGroupByRowsRadio;
formula::RefEdit* mpActiveEdit;
ScAddress mCurrentAddress;
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.0 on Sun Nov 3 11:59:31 2013 -->
<!-- Generated with glade 3.16.1 -->
<interface>
<!-- interface-requires gtk+ 3.0 -->
<requires lib="gtk+" version="3.0"/>
<!-- interface-requires LibreOffice 1.0 -->
<object class="GtkAdjustment" id="alpha-adjustment">
<property name="lower">0.01</property>
......@@ -10,6 +10,12 @@
<property name="step_increment">0.01</property>
<property name="page_increment">0.050000000000000003</property>
</object>
<object class="GtkAdjustment" id="rows-per-sample-adjustment">
<property name="lower">1</property>
<property name="upper">1000000</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkDialog" id="AnalysisOfVarianceDialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
......@@ -247,7 +253,7 @@
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="top_attach">3</property>
<property name="width">3</property>
<property name="height">1</property>
</packing>
......@@ -302,6 +308,37 @@
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="rows-per-sample-label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Rows per sample</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="rows-per-sample-spin">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="text" translatable="yes">0,05</property>
<property name="adjustment">rows-per-sample-adjustment</property>
<property name="value">1</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
......@@ -319,7 +356,82 @@
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="top_attach">4</property>
<property name="width">3</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame-type">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkRadioButton" id="radio-single-factor">
<property name="label" translatable="yes">Single factor</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">radio-two-factor</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio-two-factor">
<property name="label" translatable="yes">Two factor</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">radio-single-factor</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Type</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">3</property>
<property name="height">1</property>
</packing>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment